summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Glassey <wdg@debian.org>2015-09-07 16:04:53 +0100
committerDaniel Glassey <wdg@debian.org>2015-09-07 16:04:53 +0100
commit18cbcca08ff5866208873059f9f0c80f9eafbf5e (patch)
tree390e7f40be2fef58b7c9e92871a2e0accb1d6b3f /debian/patches
parent2e692e1d6dd7f9ff2a6f097477277a9b79a542ef (diff)
remove old patches, add selectively_disable_compiler_warnings.patch
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/12_fix_compiler_warnings.diff1083
-rw-r--r--debian/patches/16_gcc4.6_sword.patch339
-rw-r--r--debian/patches/2631_fix_curl.patch30
-rw-r--r--debian/patches/2661.patch102
-rw-r--r--debian/patches/cmake_backport.patch508
-rw-r--r--debian/patches/dso-missing-shared.patch15
-rw-r--r--debian/patches/fix-ftbfs-gcc4.7.diff25
-rw-r--r--debian/patches/fix-ftbfs-icu.patch17
-rw-r--r--debian/patches/icu_in_soname.patch24
-rw-r--r--debian/patches/selectively_disable_compiler_warnings.patch209
-rw-r--r--debian/patches/series10
11 files changed, 210 insertions, 2152 deletions
diff --git a/debian/patches/12_fix_compiler_warnings.diff b/debian/patches/12_fix_compiler_warnings.diff
deleted file mode 100644
index dbcf8b5..0000000
--- a/debian/patches/12_fix_compiler_warnings.diff
+++ /dev/null
@@ -1,1083 +0,0 @@
-Remove compiler warnings so SWORD will compile with -Wall -Werror
---- a/src/mgr/filemgr.cpp
-+++ b/src/mgr/filemgr.cpp
-@@ -409,7 +409,7 @@
-
-
- int FileMgr::copyFile(const char *sourceFile, const char *targetFile) {
-- int sfd, dfd, len;
-+ int sfd, dfd, len;
- char buf[4096];
-
- if ((sfd = ::open(sourceFile, O_RDONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH)) < 1)
---- a/src/utilfuns/zlib/untgz.c
-+++ b/src/utilfuns/zlib/untgz.c
-@@ -262,7 +262,7 @@
- int remaining = 0;
- FILE *outfile = NULL;
- char fname[BLOCKSIZE];
-- time_t tartime;
-+ time_t tartime = 0;
-
- while (1) {
- len = gzread(in, &buffer, BLOCKSIZE);
---- a/tests/testblocks.cpp
-+++ b/tests/testblocks.cpp
-@@ -34,14 +34,18 @@
- void addEntry(EntriesBlock *eb) {
- string input;
- string body;
-- char line[1024];
-+ char line[1024], *c;
- std::cout << "\nEnter new Entry's text. '.' on an empty line to finish:\n";
- do {
- std::cout << "> ";
-- fgets(line, 1000, stdin);
-- input = line;
-- if (input.compare("."))
-- body.append(input);
-+ c = fgets(line, 1000, stdin);
-+ if (c == NULL) {
-+ std::cerr << "ERROR: fgets failed during addEntry\n";
-+ } else {
-+ input = line;
-+ if (input.compare("."))
-+ body.append(input);
-+ }
- }
- while (input.compare("."));
- std::cout << "Adding new entry. Index is: " << eb->addEntry(body.c_str()) << "\n\n";
-@@ -77,29 +81,33 @@
-
- EntriesBlock *eb = new EntriesBlock();
- string input;
-- char line[1024];
-+ char line[1024], *c;
-
- std::cout << "Initial entry count should be 0: " << eb->getCount() << "\n";
-
- do {
- std::cout << "[" << eb->getCount() << "] > ";
-- fgets(line, 1000, stdin);
-- input = line;
-- if (input.length() > 0) {
-- switch (input[0]) {
-- case 'a': addEntry(eb); break;
-- case 'p': printEntry(eb, atoi(input.c_str()+1)); break;
-- case 'r': removeEntry(eb, atoi(input.c_str()+1)); break;
-- case 's': printSize(eb); break;
-- case 'q': break;
-- case '?':
-- default:
-- std::cout << "\n a - add a new entry\n";
-- std::cout << " p <entry_index> - print entry\n";
-- std::cout << " r <entry_index> - remove entry\n";
-- std::cout << " s - print size of raw data\n";
-- std::cout << " q - quit\n\n";
-- break;
-+ c = fgets(line, 1000, stdin);
-+ if (c == NULL) {
-+ std::cerr << "ERROR: fgets failed in main\n";
-+ } else {
-+ input = line;
-+ if (input.length() > 0) {
-+ switch (input[0]) {
-+ case 'a': addEntry(eb); break;
-+ case 'p': printEntry(eb, atoi(input.c_str()+1)); break;
-+ case 'r': removeEntry(eb, atoi(input.c_str()+1)); break;
-+ case 's': printSize(eb); break;
-+ case 'q': break;
-+ case '?':
-+ default:
-+ std::cout << "\n a - add a new entry\n";
-+ std::cout << " p <entry_index> - print entry\n";
-+ std::cout << " r <entry_index> - remove entry\n";
-+ std::cout << " s - print size of raw data\n";
-+ std::cout << " q - quit\n\n";
-+ break;
-+ }
- }
- }
- }
---- a/utilities/stepdump.cpp
-+++ b/utilities/stepdump.cpp
-@@ -163,33 +163,56 @@
-
-
- void readVersion(int fd, Version *versionRecord) {
-+ int r;
-
- cout << "\n\nReading Version Record (" << 16/*sizeof(struct Version)*/ << " bytes)\n\n";
- // DO NOT USE BECAUSE OF RECORD BYTE ALIGNMENT PROBLEMS
- // read(fd, &versionRecord, sizeof(struct Version));
-
- cout << "Version Record Information\n";
-- read(fd, &(versionRecord->versionRecordSize), 2);
-+ r = read(fd, &(versionRecord->versionRecordSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tversionRecordSize: " << versionRecord->versionRecordSize << "\n";
-- read(fd, &(versionRecord->publisherID), 2);
-+ r = read(fd, &(versionRecord->publisherID), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tpublisherID: " << versionRecord->publisherID << "\n";
-- read(fd, &(versionRecord->bookID), 2);
-+ r = read(fd, &(versionRecord->bookID), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tbookID: " << versionRecord->bookID << "\n";
-- read(fd, &(versionRecord->setID), 2);
-+ r = read(fd, &(versionRecord->setID), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tsetID: " << versionRecord->setID << "\n";
-- read(fd, &(versionRecord->conversionProgramVerMajor), 1);
-+ r = read(fd, &(versionRecord->conversionProgramVerMajor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tconversionProgramVerMajor: " << (int)versionRecord->conversionProgramVerMajor << "\n";
-- read(fd, &(versionRecord->conversionProgramVerMinor), 1);
-+ r = read(fd, &(versionRecord->conversionProgramVerMinor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tconversionProgramVerMinor: " << (int)versionRecord->conversionProgramVerMinor << "\n";
-- read(fd, &(versionRecord->leastCompatSTEPVerMajor), 1);
-+ r = read(fd, &(versionRecord->leastCompatSTEPVerMajor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tleastCompatSTEPVerMajor: " << (int)versionRecord->leastCompatSTEPVerMajor << "\n";
-- read(fd, &(versionRecord->leastCompatSTEPVerMinor), 1);
-+ r = read(fd, &(versionRecord->leastCompatSTEPVerMinor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tleastCompatSTEPVerMinor: " << (int)versionRecord->leastCompatSTEPVerMinor << "\n";
-- read(fd, &(versionRecord->encryptionType), 1);
-+ r = read(fd, &(versionRecord->encryptionType), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tencryptionType: " << (int)versionRecord->encryptionType << "\n";
-- read(fd, &(versionRecord->editionID), 1);
-+ r = read(fd, &(versionRecord->editionID), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
- cout << "\teditionID: " << (int)versionRecord->editionID << "\n";
-- read(fd, &(versionRecord->modifiedBy), 2);
-+ r = read(fd, &(versionRecord->modifiedBy), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
- cout << "\tmodifiedBy: " << versionRecord->modifiedBy << "\n";
-
- int skip = versionRecord->versionRecordSize - 16/*sizeof(struct Version*/;
-@@ -197,33 +220,49 @@
- if (skip) {
- cout << "\nSkipping " << skip << " unknown bytes.\n";
- char *skipbuf = new char[skip];
-- read(fd, skipbuf, skip);
-+ r = read(fd, skipbuf, skip);
-+ if (r != skip)
-+ perror("ERROR: read failed in readVersion");
- delete [] skipbuf;
- }
- }
-
-
- void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord) {
--
-+ int r;
- cout << "\n\nReading Viewable Header Record (" << 16/*sizeof(struct ViewableHeader)*/ << " bytes)\n\n";
-
- // DO NOT USE BECAUSE OF RECORD BYTE ALIGNMENT PROBLEMS
- // read(fd, &viewableHeaderRecord, sizeof(struct ViewableHeader));
-
- cout << "Viewable Header Record Information\n";
-- read(fd, &(viewableHeaderRecord->viewableHeaderRecordSize), 2);
-+ r = read(fd, &(viewableHeaderRecord->viewableHeaderRecordSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\tviewableHeaderRecordSize: " << viewableHeaderRecord->viewableHeaderRecordSize << "\n";
-- read(fd, &(viewableHeaderRecord->viewableBlocksCount), 4);
-+ r = read(fd, &(viewableHeaderRecord->viewableBlocksCount), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\tviewableBlocksCount: " << viewableHeaderRecord->viewableBlocksCount << "\n";
-- read(fd, &(viewableHeaderRecord->glossBlocksCount), 4);
-+ r = read(fd, &(viewableHeaderRecord->glossBlocksCount), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\tglossBlocksCount: " << viewableHeaderRecord->glossBlocksCount << "\n";
-- read(fd, &(viewableHeaderRecord->compressionType), 1);
-+ r = read(fd, &(viewableHeaderRecord->compressionType), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\tcompressionType: " << (int)viewableHeaderRecord->compressionType << "(0 - none; 1 - LZSS)\n";
-- read(fd, &(viewableHeaderRecord->reserved1), 1);
-+ r = read(fd, &(viewableHeaderRecord->reserved1), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\treserved1: " << (int)viewableHeaderRecord->reserved1 << "\n";
-- read(fd, &(viewableHeaderRecord->blockEntriesSize), 2);
-+ r = read(fd, &(viewableHeaderRecord->blockEntriesSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\tblockEntriesSize: " << viewableHeaderRecord->blockEntriesSize << "\n";
-- read(fd, &(viewableHeaderRecord->reserved2), 2);
-+ r = read(fd, &(viewableHeaderRecord->reserved2), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readViewableHeader");
- cout << "\treserved2: " << viewableHeaderRecord->reserved2 << "\n";
-
- int skip = viewableHeaderRecord->viewableHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/;
-@@ -231,18 +270,23 @@
- if (skip) {
- cout << "\nSkipping " << skip << " unknown bytes.\n";
- char *skipbuf = new char[skip];
-- read(fd, skipbuf, skip);
-+ r = read(fd, skipbuf, skip);
-+ if (r != skip)
-+ perror("ERROR: read failed in readViewableHeader");
- delete [] skipbuf;
- }
- }
-
-
- void readViewableBlockText(int fd, ViewableBlock *vb, char **buf) {
-+ int r;
- unsigned long size = vb->size;
-
- *buf = new char [ ((vb->size > vb->uncompressedSize) ? vb->size : vb->uncompressedSize) + 1 ];
- lseek(fd, vb->offset, SEEK_SET);
-- read(fd, *buf, vb->size);
-+ r = read(fd, *buf, vb->size);
-+ if (r != vb->size)
-+ perror("ERROR: read failed in readViewableBlocktext");
-
- compress->zBuf(&size, *buf);
- strcpy(*buf, compress->Buf());
-@@ -252,30 +296,41 @@
-
-
- void readViewableBlock(int fd, ViewableBlock *vb) {
--
-+ int r;
- cout << "\n\nReading Viewable Block (" << 12/*sizeof(struct ViewableHeader)*/ << " bytes)\n\n";
-
- // DO NOT USE BECAUSE OF RECORD BYTE ALIGNMENT PROBLEMS
- // read(fd, &vb, sizeof(struct ViewableBlock));
-
- cout << "Viewable Block Information\n";
-- read(fd, &(vb->offset), 4);
-+ r = read(fd, &(vb->offset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableBlock");
- cout << "\toffset: " << vb->offset << "\n";
-- read(fd, &(vb->uncompressedSize), 4);
-+ r = read(fd, &(vb->uncompressedSize), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableBlock");
- cout << "\tuncompressedSize: " << vb->uncompressedSize << "\n";
-- read(fd, &(vb->size), 4);
-+ r = read(fd, &(vb->size), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableBlock");
- cout << "\tsize: " << vb->size << "\n";
- }
-
-
- void readHeaderControlWordAreaText(int fd, char **buf) {
-+ int r;
- long headerControlWordAreaSize;
-- read(fd, &headerControlWordAreaSize, 4);
-+ r = read(fd, &headerControlWordAreaSize, 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readHeaderControlWordAreaText");
- cout << "Reading Header Control Word Area (" << headerControlWordAreaSize << " bytes)\n\n";
-
- *buf = new char [headerControlWordAreaSize + 1];
-
-- read(fd, *buf, headerControlWordAreaSize);
-+ r = read(fd, *buf, headerControlWordAreaSize);
-+ if (r != headerControlWordAreaSize)
-+ perror("ERROR: read failed in readHeaderControlWordAreaText");
- (*buf)[headerControlWordAreaSize] = 0;
-
- cout << "headerControlWordArea:\n" << *buf << "\n";
---- a/utilities/treeidxutil.cpp
-+++ b/utilities/treeidxutil.cpp
-@@ -58,27 +58,33 @@
-
-
- void setLocalName(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Node Name: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in setLocalName\n";
- treeKey->setLocalName(buf);
- treeKey->save();
- }
-
-
- void assurePath(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter path: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in assurePath\n";
- treeKey->assureKeyPath(buf);
- }
-
-
- void appendSibbling(TreeKeyIdx *treeKey) {
- if (treeKey->getOffset()) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Sibbling Name: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in appendSibbling\n";
- treeKey->append();
- treeKey->setLocalName(buf);
- treeKey->save();
-@@ -88,9 +94,11 @@
-
-
- void appendChild(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Child Name: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in appendChild\n";
- treeKey->appendChild();
- treeKey->setLocalName(buf);
- treeKey->save();
-@@ -123,11 +131,13 @@
- TreeKeyIdx root = *treeKey;
-
- std::string input;
-- char line[1024];
-+ char line[1024], *c;
-
- do {
- std::cout << "[" << treeKey->getText() << "] > ";
-- fgets(line, 1000, stdin);
-+ c = fgets(line, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in main\n";
- input = line;
- if (input.length() > 0) {
- switch (input[0]) {
---- a/utilities/gbfidx.cpp
-+++ b/utilities/gbfidx.cpp
-@@ -55,7 +55,7 @@
- int main(int argc, char **argv)
- {
- long pos, offset;
-- int num1, num2, rangemax;
-+ int num1, num2, rangemax, w;
- char startflag = 0;
- short size;
-
-@@ -67,18 +67,30 @@
- num1 = key1.getChapter();
- num2 = key1.getVerse();
- pos = 0;
-- write(bfp, &pos, 4); /* Book offset for testament intros */
-+ w = write(bfp, &pos, 4); /* Book offset for testament intros */
-+ if (w != 4)
-+ perror("ERROR: write failed in main");
- pos = 4;
-- write(cfp, &pos, 4); /* Chapter offset for testament intro */
-+ w = write(cfp, &pos, 4); /* Chapter offset for testament intro */
-+ if (w != 4)
-+ perror("ERROR: write failed in main");
-
-
- /* Right now just zero out intros until parsing correctly */
- pos = 0;
- size = 0;
-- write(vfp, &pos, 4); /* Module intro */
-- write(vfp, &size, 2);
-- write(vfp, &pos, 4); /* Testament intro */
-- write(vfp, &size, 2);
-+ w = write(vfp, &pos, 4); /* Module intro */
-+ if (w != 4)
-+ perror("ERROR: write failed in main");
-+ w = write(vfp, &size, 2);
-+ if (w != 2)
-+ perror("ERROR: write failed in main");
-+ w = write(vfp, &pos, 4); /* Testament intro */
-+ if (w != 4)
-+ perror("ERROR: write failed in main");
-+ w = write(vfp, &size, 2);
-+ if (w != 2)
-+ perror("ERROR: write failed in main");
-
- while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
- if (!startflag) {
-@@ -122,6 +134,7 @@
-
- void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
- {
-+ int w;
- long pos;
- short tmp;
-
-@@ -129,26 +142,48 @@
- if (key1.getVerse() == 1) { // new chapter
- if (key1.getChapter() == 1) { // new book
- pos = lseek(cfp, 0, SEEK_CUR);
-- write(bfp, &pos, 4);
-+ w = write(bfp, &pos, 4);
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
- pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-- write(cfp, &pos, 4);
-- write(vfp, &chapoffset, 4); /* Book intro (vss) set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-- write(vfp, &chapsize, 2);
-+ w = write(cfp, &pos, 4);
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
-+ w = write(vfp, &chapoffset, 4); /* Book intro (vss) set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
-+ w = write(vfp, &chapsize, 2);
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
- }
- pos = lseek(vfp, 0, SEEK_CUR);
-- write(cfp, &pos, 4);
-- write(vfp, &chapoffset, 4); /* Chapter intro */
-- write(vfp, &chapsize, 2);
-+ w = write(cfp, &pos, 4);
-+ if (w != 4)
-+ perror("ERROR: write failed in writeidx");
-+ w = write(vfp, &chapoffset, 4); /* Chapter intro */
-+ if (w != 4)
-+ perror("ERROR: write failed in writeidx");
-+ w = write(vfp, &chapsize, 2);
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
- }
- if (key1 >= key2) {
-- write(vfp, &offset, 4);
-- write(vfp, &size, 2);
-+ w = write(vfp, &offset, 4);
-+ if (w != 4)
-+ perror("ERROR: write failed in writeidx");
-+ w = write(vfp, &size, 2);
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
- }
- else {
- pos = 0;
- tmp = 0;
-- write(vfp, &pos, 4);
-- write(vfp, &tmp, 2);
-+ w = write(vfp, &pos, 4);
-+ if (w != 4)
-+ perror("ERROR: write failed in writeidx");
-+ w = write(vfp, &tmp, 2);
-+ if (w != 2)
-+ perror("ERROR: write failed in writeidx");
- }
- }
- }
---- a/utilities/genbookutil.cpp
-+++ b/utilities/genbookutil.cpp
-@@ -58,9 +58,11 @@
-
-
- void setLocalName(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Node Name: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in setLocalName\n";
- SWBuf name = buf;
- treeKey->setLocalName(name.trim());
- treeKey->save();
-@@ -68,18 +70,22 @@
-
-
- void gotoPath(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter Path: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in gotoPath\n";
- SWBuf path = buf;
- (*treeKey) = path.trim();
- }
-
-
- void assurePath(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter Path: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in assurePath\n";
- SWBuf path = buf;
- treeKey->assureKeyPath(path.trim());
- }
-@@ -96,10 +102,12 @@
- SWBuf body;
- TreeKeyIdx *treeKey = (TreeKeyIdx *)(SWKey *)(*book);
- if (treeKey->getOffset()) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Entry Text ('.' on a line by itself to end): \n";
- do {
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in setEntryText\n";
- SWBuf text = buf;
- text.trim();
- if ((text[0] == '.') && (text[1] == 0))
-@@ -116,9 +124,11 @@
-
- void appendSibbling(TreeKeyIdx *treeKey) {
- if (treeKey->getOffset()) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Sibbling Name: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in appendSibbling\n";
- SWBuf name = buf;
- treeKey->append();
- treeKey->setLocalName(name.trim());
-@@ -129,9 +139,11 @@
-
-
- void appendChild(TreeKeyIdx *treeKey) {
-- char buf[1023];
-+ char buf[1023], *c;
- std::cout << "Enter New Child Name: ";
-- fgets(buf, 1000, stdin);
-+ c = fgets(buf, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in appendChild\n";
- SWBuf name = buf;
- treeKey->appendChild();
- treeKey->setLocalName(name.trim());
-@@ -173,11 +185,13 @@
- treeKey = (TreeKeyIdx *)(SWKey *)(*book);
-
- SWBuf input;
-- char line[1024];
-+ char line[1024], *c;
-
- do {
- std::cout << "[" << treeKey->getText() << "] > ";
-- fgets(line, 1000, stdin);
-+ c = fgets(line, 1000, stdin);
-+ if (c == NULL)
-+ std::cerr << "ERROR: fgets failed in main\n";
- input = line;
- input.trim();
- if (input.length() > 0) {
---- a/utilities/vpl2mod.cpp
-+++ b/utilities/vpl2mod.cpp
-@@ -76,14 +76,18 @@
- break;
- }
-
-- int size = (lseek(fd, 0, SEEK_CUR) - index) - 1;
-+ int r, size = (lseek(fd, 0, SEEK_CUR) - index) - 1;
-
- *buf = new char [ size + 1 ];
-
- if (size > 0) {
- lseek(fd, index, SEEK_SET);
-- read(fd, *buf, size);
-- read(fd, &ch, 1); //pop terminating char
-+ r = read(fd, *buf, size);
-+ if (r != size)
-+ std::cerr <<"ERROR: short read in readline\n";
-+ r = read(fd, &ch, 1); //pop terminating char
-+ if (r != size)
-+ std::cerr <<"ERROR: short read of terminating char in readline\n";
- (*buf)[size] = 0;
-
- // clean up any trailing junk on buf
---- a/utilities/installmgr.cpp
-+++ b/utilities/installmgr.cpp
-@@ -74,8 +74,10 @@
- cout << "then type yes at the prompt\n\n";
- cout << "enable? [no] ";
-
-- char prompt[10];
-- fgets(prompt, 9, stdin);
-+ char prompt[10], *c;
-+ c = fgets(prompt, 9, stdin);
-+ if (c == NULL)
-+ std::cerr <<"ERROR: fgets failed in isUserDisclaimerConfirmed\n";
- confirmed = (!strcmp(prompt, "yes\n"));
- cout << "\n";
- }
---- a/utilities/step2vpl.cpp
-+++ b/utilities/step2vpl.cpp
-@@ -228,93 +228,169 @@
-
-
- void readVersion(int fd, Version *versionRecord) {
-+ int r;
-
-- read(fd, &(versionRecord->versionRecordSize), 2);
-- read(fd, &(versionRecord->publisherID), 2);
-- read(fd, &(versionRecord->bookID), 2);
-- read(fd, &(versionRecord->setID), 2);
-- read(fd, &(versionRecord->conversionProgramVerMajor), 1);
-- read(fd, &(versionRecord->conversionProgramVerMinor), 1);
-- read(fd, &(versionRecord->leastCompatSTEPVerMajor), 1);
-- read(fd, &(versionRecord->leastCompatSTEPVerMinor), 1);
-- read(fd, &(versionRecord->encryptionType), 1);
-- read(fd, &(versionRecord->editionID), 1);
-- read(fd, &(versionRecord->modifiedBy), 2);
-+ r = read(fd, &(versionRecord->versionRecordSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
-+
-+ r = read(fd, &(versionRecord->publisherID), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->bookID), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->setID), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->conversionProgramVerMajor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->conversionProgramVerMinor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->leastCompatSTEPVerMajor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->leastCompatSTEPVerMinor), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->encryptionType), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->editionID), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readVersion");
-+ r = read(fd, &(versionRecord->modifiedBy), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVersion");
-
- int skip = versionRecord->versionRecordSize - 16/*sizeof(struct Version*/;
-
- if (skip) {
- char *skipbuf = new char[skip];
-- read(fd, skipbuf, skip);
-+ r = read(fd, skipbuf, skip);
-+ if (r != skip)
-+ perror("ERROR: read failed in readVersion");
- delete [] skipbuf;
- }
- }
-
-
- void readSectionsHeader(int fd, SectionsHeader *sectionsHeaderRecord) {
-+ int r;
-
-- read(fd, &(sectionsHeaderRecord->sectionsHeaderRecordSize), 2);
-- read(fd, &(sectionsHeaderRecord->levelEntriesCount), 4);
-- read(fd, &(sectionsHeaderRecord->glossEntriesCount), 4);
-- read(fd, &(sectionsHeaderRecord->levelEntriesSize), 2);
-- read(fd, &(sectionsHeaderRecord->reserved), 4);
-+ r = read(fd, &(sectionsHeaderRecord->sectionsHeaderRecordSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readSectionsHeader");
-+ r = read(fd, &(sectionsHeaderRecord->levelEntriesCount), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionsHeader");
-+ r = read(fd, &(sectionsHeaderRecord->glossEntriesCount), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionsHeader");
-+ r = read(fd, &(sectionsHeaderRecord->levelEntriesSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readSectionsHeader");
-+ r = read(fd, &(sectionsHeaderRecord->reserved), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionsHeader");
-
- int skip = sectionsHeaderRecord->sectionsHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/;
-
- if (skip) {
- char *skipbuf = new char[skip];
-- read(fd, skipbuf, skip);
-+ r = read(fd, skipbuf, skip);
-+ if (r != skip)
-+ perror("ERROR: read failed in readSectionsHeader");
- delete [] skipbuf;
- }
- }
-
-
- void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord) {
-+ int r;
-
-- read(fd, &(viewableHeaderRecord->viewableHeaderRecordSize), 2);
-- read(fd, &(viewableHeaderRecord->viewableBlocksCount), 4);
-- read(fd, &(viewableHeaderRecord->glossBlocksCount), 4);
-- read(fd, &(viewableHeaderRecord->compressionType), 1);
-- read(fd, &(viewableHeaderRecord->reserved1), 1);
-- read(fd, &(viewableHeaderRecord->blockEntriesSize), 2);
-- read(fd, &(viewableHeaderRecord->reserved2), 2);
-+ r = read(fd, &(viewableHeaderRecord->viewableHeaderRecordSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readViewableHeader");
-+ r = read(fd, &(viewableHeaderRecord->viewableBlocksCount), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableHeader");
-+ r = read(fd, &(viewableHeaderRecord->glossBlocksCount), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableHeader");
-+ r = read(fd, &(viewableHeaderRecord->compressionType), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readViewableHeader");
-+ r = read(fd, &(viewableHeaderRecord->reserved1), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readViewableHeader");
-+ r = read(fd, &(viewableHeaderRecord->blockEntriesSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readViewableHeader");
-+ r = read(fd, &(viewableHeaderRecord->reserved2), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readViewableHeader");
-
- int skip = viewableHeaderRecord->viewableHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/;
-
- if (skip) {
- char *skipbuf = new char[skip];
-- read(fd, skipbuf, skip);
-+ r = read(fd, skipbuf, skip);
-+ if (r != skip)
-+ perror("ERROR: read failed in readViewableHeader");
- delete [] skipbuf;
- }
- }
-
-
- void readVSyncHeader(int fd, VSyncHeader *vSyncHeaderRecord) {
-+ int r;
-
-- read(fd, &(vSyncHeaderRecord->vSyncHeaderRecordSize), 2);
-- read(fd, &(vSyncHeaderRecord->startBookNumber), 2);
-- read(fd, &(vSyncHeaderRecord->endBookNumber), 2);
-- read(fd, &(vSyncHeaderRecord->bookPointerEntriesSize), 2);
-- read(fd, &(vSyncHeaderRecord->syncPointEntriesSize), 2);
-- read(fd, &(vSyncHeaderRecord->reserved1_1), 4);
-- read(fd, &(vSyncHeaderRecord->reserved1_2), 2);
-+ r = read(fd, &(vSyncHeaderRecord->vSyncHeaderRecordSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncHeader");
-+ r = read(fd, &(vSyncHeaderRecord->startBookNumber), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncHeader");
-+ r = read(fd, &(vSyncHeaderRecord->endBookNumber), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncHeader");
-+ r = read(fd, &(vSyncHeaderRecord->bookPointerEntriesSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncHeader");
-+ r = read(fd, &(vSyncHeaderRecord->syncPointEntriesSize), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncHeader");
-+ r = read(fd, &(vSyncHeaderRecord->reserved1_1), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readVSyncHeader");
-+ r = read(fd, &(vSyncHeaderRecord->reserved1_2), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncHeader");
-
- int skip = vSyncHeaderRecord->vSyncHeaderRecordSize - 16/*sizeof(VSyncHeader)*/;
-
- if (skip) {
- char *skipbuf = new char[skip];
-- read(fd, skipbuf, skip);
-+ r = read(fd, skipbuf, skip);
-+ if (r != skip)
-+ perror("ERROR: read failed in readVSyncHeader");
- delete [] skipbuf;
- }
- }
-
-
- void readViewableBlockText(int fd, ViewableBlock *vb, char **buf) {
-+ int r;
- unsigned long size = vb->size;
-
- *buf = new char [ ((vb->size > vb->uncompressedSize) ? vb->size : vb->uncompressedSize) + 1 ];
- lseek(fd, vb->offset, SEEK_SET);
-- read(fd, *buf, vb->size);
-+ r = read(fd, *buf, vb->size);
-+ if (r != vb->size)
-+ perror("ERROR: read failed in readViewableBlockText");
-
- compress->zBuf(&size, *buf);
- strcpy(*buf, compress->Buf());
-@@ -322,35 +398,53 @@
-
-
- void readViewableBlock(int fd, ViewableBlock *vb) {
-+ int r;
-
-- read(fd, &(vb->offset), 4);
-- read(fd, &(vb->uncompressedSize), 4);
-- read(fd, &(vb->size), 4);
-+ r = read(fd, &(vb->offset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableBlock");
-+ r = read(fd, &(vb->uncompressedSize), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableBlock");
-+ r = read(fd, &(vb->size), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readViewableBlock");
- }
-
-
- void readHeaderControlWordAreaText(int fd, char **buf) {
-+ int r;
- long headerControlWordAreaSize;
-- read(fd, &headerControlWordAreaSize, 4);
-+ r = read(fd, &headerControlWordAreaSize, 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readHeaderControlWordAreaText");
-
- *buf = new char [headerControlWordAreaSize + 1];
-
-- read(fd, *buf, headerControlWordAreaSize);
-+ r = read(fd, *buf, headerControlWordAreaSize);
-+ if (r != headerControlWordAreaSize)
-+ perror("ERROR: read failed in readHeaderControlWordAreaText");
- (*buf)[headerControlWordAreaSize] = 0;
-
- }
-
- void readVSyncBooksInfo(int fd, VSyncHeader *vSyncHeaderRecord, VSyncBooksInfo **vSyncBooksInfo) {
-
-+ int r;
- int bookCount = vSyncHeaderRecord->endBookNumber - vSyncHeaderRecord->startBookNumber;
- *vSyncBooksInfo = new VSyncBooksInfo[bookCount];
- for (int i = 0; i <= bookCount; i++) {
-- read(fd, &(*vSyncBooksInfo)[i].offset, 4);
-- read(fd, &(*vSyncBooksInfo)[i].count, 2);
-+ r = read(fd, &(*vSyncBooksInfo)[i].offset, 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readVSyncBooksInfo");
-+ r = read(fd, &(*vSyncBooksInfo)[i].count, 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readVSyncBooksInfo");
- }
- }
-
- void displayBook(int fdbook, int fdviewable, int fdvsync, int fdsections, VSyncBooksInfo *vSyncBooksInfo) {
-+ int r;
- VSyncPoint vSyncPoint;
-
- lseek(fdvsync, vSyncBooksInfo->offset, SEEK_SET);
-@@ -361,9 +455,15 @@
- char *sectionName;
- char *verseText;
-
-- read(fdvsync, &(vSyncPoint.chapter), 2);
-- read(fdvsync, &(vSyncPoint.verse), 2);
-- read(fdvsync, &(vSyncPoint.offset), 4);
-+ r = read(fdvsync, &(vSyncPoint.chapter), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in displayBook");
-+ r = read(fdvsync, &(vSyncPoint.verse), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in displayBook");
-+ r = read(fdvsync, &(vSyncPoint.offset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in displayBook");
- vSyncPoint.offset = SECTIONSLEVELSTART + (vSyncPoint.offset * SECTIONSLEVELSIZE);
- lseek(fdsections, vSyncPoint.offset, SEEK_SET);
- readSectionLevelInfo(fdsections, &sectionLevelInfo);
-@@ -418,26 +518,50 @@
-
-
- void readSectionName(int fd, SectionLevelInfo *sli, char **name) {
-+ int r;
- short size;
- lseek(fd, sli->nameOffset, SEEK_SET);
-- read(fd, &size, 2);
-+ r = read(fd, &size, 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readSectionName");
- *name = new char [ size + 1 ];
-- read(fd, *name, size);
-+ r = read(fd, *name, size);
-+ if (r != size)
-+ perror("ERROR: read failed in readSectionName");
- (*name)[size] = 0;
- }
-
- void readSectionLevelInfo(int fd, SectionLevelInfo *sli) {
-+ int r;
-
-- read(fd, &(sli->parentOffset), 4);
-- read(fd, &(sli->previousOffset), 4);
-- read(fd, &(sli->nextOffset), 4);
-- read(fd, &(sli->viewableOffset), 4);
-+ r = read(fd, &(sli->parentOffset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->previousOffset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->nextOffset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->viewableOffset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionLevelInfo");
- sli->viewableOffset = VIEWABLEBLOCKSTART + (VIEWABLEBLOCKSIZE * sli->viewableOffset);
-- read(fd, &(sli->startLevel), 2);
-- read(fd, &(sli->level), 1);
-- read(fd, &(sli->nameOffset), 4);
-- read(fd, &(sli->outSync_1), 4);
-- read(fd, &(sli->outSync_2), 2);
-+ r = read(fd, &(sli->startLevel), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->level), 1);
-+ if (r != 1)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->nameOffset), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->outSync_1), 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in readSectionLevelInfo");
-+ r = read(fd, &(sli->outSync_2), 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in readSectionLevelInfo");
- }
-
- void cleanBuf(char *buf) {
---- a/utilities/cipherraw.cpp
-+++ b/utilities/cipherraw.cpp
-@@ -53,7 +53,7 @@
- SWCipher *zobj;
- VerseKey key;
- RawVerse *rawdrv;
-- int ofd[2], oxfd[2];
-+ int ofd[2], oxfd[2], w;
- long tmpoff = 0, offset, loffset = 0, lzoffset = 0;
- unsigned short size, lsize = 0, lzsize;
- char *tmpbuf;
-@@ -79,10 +79,18 @@
- delete [] tmpbuf;
-
- printf("\n");
-- write(oxfd[0], &lzoffset, 4);
-- write(oxfd[0], &lzsize, 2);
-- write(oxfd[1], &lzoffset, 4);
-- write(oxfd[1], &lzsize, 2);
-+ w = write(oxfd[0], &lzoffset, 4);
-+ if (w < 0)
-+ perror("ERROR: write failed in main");
-+ w = write(oxfd[0], &lzsize, 2);
-+ if (w < 0)
-+ perror("ERROR: write failed in main");
-+ w = write(oxfd[1], &lzoffset, 4);
-+ if (w < 0)
-+ perror("ERROR: write failed in main");
-+ w = write(oxfd[1], &lzsize, 2);
-+ if (w < 0)
-+ perror("ERROR: write failed in main");
-
- key.setAutoNormalize(false);
- key.setIntros(true);
-@@ -94,8 +102,10 @@
- printf("using previous offset,size %d\n", size);
- offset = lseek(oxfd[key.getTestament() - 1], 0, SEEK_CUR);
- printf("%ld %ld %d \n", offset, lzoffset, lzsize);
-- write(oxfd[key.getTestament() - 1], &lzoffset, 4);
-- write(oxfd[key.getTestament() - 1], &lzsize, 2);
-+ if (write(oxfd[key.getTestament() - 1], &lzoffset, 4) < 0)
-+ perror("ERROR: write failed in main");
-+ if (write(oxfd[key.getTestament() - 1], &lzsize, 2) < 0)
-+ perror("ERROR: write failed in main");
- }
- else {
- lsize = size;
-@@ -112,13 +122,17 @@
- offset = lseek(ofd[key.getTestament() - 1], 0, SEEK_CUR);
- tmpoff = lseek(oxfd[key.getTestament() - 1], 0, SEEK_CUR);
- printf("%s: (%ld) NEW offset: %ld; size: %d\n", (const char *)key, tmpoff, offset, size);
-- write(oxfd[key.getTestament() - 1], &offset, 4);
-+ if (write(oxfd[key.getTestament() - 1], &offset, 4) < 0)
-+ perror("ERROR: write failed in main");
- unsigned long ulSize = size;
-- if (size)
-- write(ofd[key.getTestament() - 1], zobj->cipherBuf(&ulSize), size);
-+ if (size) {
-+ if (write(ofd[key.getTestament() - 1], zobj->cipherBuf(&ulSize), size) < 0)
-+ perror("ERROR: write failed in main");
-+ }
- size = (unsigned int)ulSize;
- lzoffset = offset;
-- write(oxfd[key.getTestament() - 1], &size, 2);
-+ if (write(oxfd[key.getTestament() - 1], &size, 2) < 0)
-+ perror("ERROR: write failed in main");
- lzsize = size;
- }
- }
---- a/utilities/lexdump.c
-+++ b/utilities/lexdump.c
-@@ -45,7 +45,7 @@
-
- int main(int argc, char **argv) {
- char *tmpbuf;
-- int idxfd, datfd;
-+ int idxfd, datfd, r;
- long offset;
- unsigned int size;
- char datbuf[255];
-@@ -64,11 +64,17 @@
-
- offset = atoi(argv[2]) * 6;
- lseek(idxfd, offset, SEEK_SET);
-- read(idxfd, &offset, 4);
-- read(idxfd, &size, 2);
-+ r = read(idxfd, &offset, 4);
-+ if (r != 4)
-+ perror("ERROR: read failed in main");
-+ r = read(idxfd, &size, 2);
-+ if (r != 2)
-+ perror("ERROR: read failed in main");
- printf("offset: %ld; size: %d\n", offset, size);
- lseek(datfd, offset, SEEK_SET);
-- read(datfd, datbuf, 40);
-+ r = read(datfd, datbuf, 40);
-+ if (r != 40)
-+ perror("ERROR: read failed in main");
- datbuf[40] = 0;
- printf("%s\n", datbuf);
- close(datfd);
diff --git a/debian/patches/16_gcc4.6_sword.patch b/debian/patches/16_gcc4.6_sword.patch
deleted file mode 100644
index 9e32095..0000000
--- a/debian/patches/16_gcc4.6_sword.patch
+++ /dev/null
@@ -1,339 +0,0 @@
-Description: gcc-4.6 -Wunused-but-set-variable fixes
-Origin: commit, revision id: dmitrijs.ledkovs@credativ.co.uk-20110805200647-l3i6n1uwjuyjv525
-Author: Dmitrijs Ledkovs <dmitrijs.ledkovs@credativ.co.uk>
-Last-Update: 2011-08-05
-X-Bzr-Revision-Id: dmitrijs.ledkovs@credativ.co.uk-20110805200647-l3i6n1uwjuyjv525
-
-=== modified file 'src/mgr/swmgr.cpp'
-Index: debian/src/mgr/swmgr.cpp
-===================================================================
---- debian.orig/src/mgr/swmgr.cpp
-+++ debian/src/mgr/swmgr.cpp
-@@ -889,7 +889,6 @@ SWModule *SWMgr::CreateMod(const char *n
- if ((!stricmp(driver, "zText")) || (!stricmp(driver, "zCom"))) {
- SWCompress *compress = 0;
- int blockType = CHAPTERBLOCKS;
-- int blockNum = 1;
- misc1 = ((entry = section.find("BlockType")) != section.end()) ? (*entry).second : (SWBuf)"CHAPTER";
- if (!stricmp(misc1.c_str(), "VERSE"))
- blockType = VERSEBLOCKS;
-@@ -898,9 +897,6 @@ SWModule *SWMgr::CreateMod(const char *n
- else if (!stricmp(misc1.c_str(), "BOOK"))
- blockType = BOOKBLOCKS;
-
-- misc1 = ((entry = section.find("BlockNumber")) != section.end()) ? (*entry).second : (SWBuf)"1";
-- blockNum = atoi(misc1.c_str());
--
- misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (SWBuf)"LZSS";
- #ifndef EXCLUDEZLIB
- if (!stricmp(misc1.c_str(), "ZIP"))
-Index: debian/src/modules/filters/gbfrtf.cpp
-===================================================================
---- debian.orig/src/modules/filters/gbfrtf.cpp
-+++ debian/src/modules/filters/gbfrtf.cpp
-@@ -42,7 +42,6 @@ char GBFRTF::processText(SWBuf &text, co
- SWBuf strongnum;
- SWBuf strongtense;
- bool hideText = false;
-- int wordLen = 0;
- int wordCount = 0;
-
- const char *from;
-@@ -50,7 +49,6 @@ char GBFRTF::processText(SWBuf &text, co
- from = orig.c_str();
- for (text = ""; *from; from++) {
- if (*from == '<') {
-- wordLen = wordCount;
- wordCount = 0;
- intoken = true;
- tokpos = 0;
-Index: debian/src/modules/filters/gbfwordjs.cpp
-===================================================================
---- debian.orig/src/modules/filters/gbfwordjs.cpp
-+++ debian/src/modules/filters/gbfwordjs.cpp
-@@ -57,7 +57,6 @@ char GBFWordJS::processText(SWBuf &text,
- char token[2112]; // cheese. Fix.
- int tokpos = 0;
- bool intoken = false;
-- bool lastspace = false;
- int word = 1;
- char val[128];
- char wordstr[5];
-@@ -152,14 +151,11 @@ char GBFWordJS::processText(SWBuf &text,
- else strong << 1;
-
- SWModule *sLex = 0;
-- SWModule *sMorph = 0;
- if (gh == 'G') {
- sLex = defaultGreekLex;
-- sMorph = defaultGreekParse;
- }
- if (gh == 'H') {
- sLex = defaultHebLex;
-- sMorph = defaultHebParse;
- }
- SWBuf lexName = "";
- if (sLex) {
-@@ -223,7 +219,6 @@ char GBFWordJS::processText(SWBuf &text,
- }
- else {
- text += *from;
-- lastspace = (*from == ' ');
- }
- }
-
-Index: debian/src/modules/filters/osislemma.cpp
-===================================================================
---- debian.orig/src/modules/filters/osislemma.cpp
-+++ debian/src/modules/filters/osislemma.cpp
-@@ -44,7 +44,6 @@ OSISLemma::~OSISLemma() {
- char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
- SWBuf token;
- bool intoken = false;
-- bool lastspace = false;
-
- const SWBuf orig = text;
- const char * from = orig.c_str();
-@@ -90,7 +89,6 @@ char OSISLemma::processText(SWBuf &text,
- }
- else {
- text.append(*from);
-- lastspace = (*from == ' ');
- }
- }
- }
-Index: debian/src/modules/filters/osismorph.cpp
-===================================================================
---- debian.orig/src/modules/filters/osismorph.cpp
-+++ debian/src/modules/filters/osismorph.cpp
-@@ -45,7 +45,6 @@ char OSISMorph::processText(SWBuf &text,
- char token[2048]; // cheese. Fix.
- int tokpos = 0;
- bool intoken = false;
-- bool lastspace = false;
- SWBuf orig = text;
- const char *from = orig.c_str();
-
-@@ -90,7 +89,6 @@ char OSISMorph::processText(SWBuf &text,
- }
- else {
- text.append(*from);
-- lastspace = (*from == ' ');
- }
- }
- }
-Index: debian/src/modules/filters/osisruby.cpp
-===================================================================
---- debian.orig/src/modules/filters/osisruby.cpp
-+++ debian/src/modules/filters/osisruby.cpp
-@@ -44,7 +44,6 @@ OSISRuby::~OSISRuby() {
- char OSISRuby::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
- SWBuf token;
- bool intoken = false;
-- bool lastspace = false;
-
- const SWBuf orig = text;
- const char * from = orig.c_str();
-@@ -83,7 +82,6 @@ char OSISRuby::processText(SWBuf &text,
- }
- else {
- text.append(*from);
-- lastspace = (*from == ' ');
- }
- }
- }
-Index: debian/src/modules/filters/osisstrongs.cpp
-===================================================================
---- debian.orig/src/modules/filters/osisstrongs.cpp
-+++ debian/src/modules/filters/osisstrongs.cpp
-@@ -49,7 +49,6 @@ OSISStrongs::~OSISStrongs() {
- char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
- SWBuf token;
- bool intoken = false;
-- bool lastspace = false;
- int wordNum = 1;
- char wordstr[5];
- const char *wordStart = 0;
-@@ -280,7 +279,6 @@ char OSISStrongs::processText(SWBuf &tex
- }
- else {
- text.append(*from);
-- lastspace = (*from == ' ');
- }
- }
- return 0;
-Index: debian/src/modules/filters/osiswordjs.cpp
-===================================================================
---- debian.orig/src/modules/filters/osiswordjs.cpp
-+++ debian/src/modules/filters/osiswordjs.cpp
-@@ -59,7 +59,6 @@ char OSISWordJS::processText(SWBuf &text
- char token[2112]; // cheese. Fix.
- int tokpos = 0;
- bool intoken = false;
-- bool lastspace = false;
- int wordNum = 1;
- char wordstr[5];
- SWBuf modName = (module)?module->Name():"";
-@@ -186,7 +185,6 @@ char OSISWordJS::processText(SWBuf &text
- }
- else {
- text.append(*from);
-- lastspace = (*from == ' ');
- }
- }
- }
-Index: debian/src/modules/filters/thmlwordjs.cpp
-===================================================================
---- debian.orig/src/modules/filters/thmlwordjs.cpp
-+++ debian/src/modules/filters/thmlwordjs.cpp
-@@ -58,7 +58,6 @@ char ThMLWordJS::processText(SWBuf &text
- char token[2112]; // cheese. Fix.
- int tokpos = 0;
- bool intoken = false;
-- bool lastspace = false;
- int word = 1;
- char val[128];
- char *valto;
-@@ -166,14 +165,11 @@ char ThMLWordJS::processText(SWBuf &text
- else strong << 1;
-
- SWModule *sLex = 0;
-- SWModule *sMorph = 0;
- if (gh == 'G') {
- sLex = defaultGreekLex;
-- sMorph = defaultGreekParse;
- }
- if (gh == 'H') {
- sLex = defaultHebLex;
-- sMorph = defaultHebParse;
- }
- SWBuf lexName = "";
- if (sLex) {
-@@ -204,16 +200,6 @@ char ThMLWordJS::processText(SWBuf &text
- textStr += lastAppendLen;
- SWBuf spanStart = "";
-
--
--
--/*
-- if (sMorph) {
-- SWBuf popMorph = "<a onclick=\"";
-- popMorph.appendFormatted("p(\'%s\',\'%s\','%s','');\" >%s</a>", sMorph->Name(), morph.c_str(), wordID.c_str(), morph.c_str());
-- morph = popMorph;
-- }
--*/
--
- // 'p' = 'fillpop' to save bandwidth
- const char *m = strchr(morph.c_str(), ':');
- if (m) m++;
-@@ -237,7 +223,6 @@ char ThMLWordJS::processText(SWBuf &text
- }
- else {
- text += *from;
-- lastspace = (*from == ' ');
- }
- }
-
-Index: debian/src/modules/filters/utf8html.cpp
-===================================================================
---- debian.orig/src/modules/filters/utf8html.cpp
-+++ debian/src/modules/filters/utf8html.cpp
-@@ -34,14 +34,11 @@ UTF8HTML::UTF8HTML() {
- char UTF8HTML::processText(SWBuf &text, const SWKey *key, const SWModule *module)
- {
- unsigned char *from;
-- int len;
- char digit[10];
- unsigned long ch;
- if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering
- return (char)-1;
-
-- len = strlen(text.c_str()) + 2; // shift string to right of buffer
--
- SWBuf orig = text;
- from = (unsigned char *)orig.c_str();
-
-Index: debian/src/modules/filters/utf8latin1.cpp
-===================================================================
---- debian.orig/src/modules/filters/utf8latin1.cpp
-+++ debian/src/modules/filters/utf8latin1.cpp
-@@ -36,14 +36,12 @@ char UTF8Latin1::processText(SWBuf &text
- {
- unsigned char *from;
-
-- int len;
- unsigned long uchar;
- unsigned char significantFirstBits, subsequent;
-
- if ((unsigned long)key < 2) {// hack, we're en(1)/de(0)ciphering
- return (char)-1;
- }
-- len = strlen(text.c_str()) + 1; // shift string to right of buffer
-
- SWBuf orig = text;
- from = (unsigned char*)orig.c_str();
-Index: debian/src/utilfuns/url.cpp
-===================================================================
---- debian.orig/src/utilfuns/url.cpp
-+++ debian/src/utilfuns/url.cpp
-@@ -133,7 +133,6 @@ void URL::parse () {
- //3.Get the hostname part. This is the part from pos up to the first slash
- bool checkPath = true;
- bool checkParams = true;
-- bool checkAnchor = true;
-
- end = strchr(urlPtr, '/');
- if (!end) {
-@@ -145,7 +144,6 @@ void URL::parse () {
- end = strchr(urlPtr, '#');
- }
- if (!end) {
-- checkAnchor = false;
- end = urlPtr+strlen(urlPtr);
- }
-
-@@ -160,7 +158,6 @@ void URL::parse () {
- end = strchr(urlPtr, '#');
- }
- if (!end) {
-- checkAnchor = false;
- end = urlPtr+strlen(urlPtr);
- }
-
-@@ -174,14 +171,6 @@ void URL::parse () {
- SWBuf paramName;
- SWBuf paramValue;
-
--/*
-- end = strchr(urlPtr, '#');
-- if (!end) {
-- checkAnchor = false;
-- end = urlPtr+strlen(urlPtr);
-- }
--*/
-- //end = (start && strchr(start, '?')) ? strchr(start, '?')+1 :0;
- end = urlPtr;
- while (end) {
- paramName = "";
-Index: debian/utilities/osis2mod.cpp
-===================================================================
---- debian.orig/utilities/osis2mod.cpp
-+++ debian/utilities/osis2mod.cpp
-@@ -1416,7 +1416,6 @@ int main(int argc, char **argv) {
- const char* osisDoc = argv[2];
- int append = 0;
- SWBuf compType = "";
-- bool isCommentary = false;
- int iType = 4;
- int entrySize = 0;
- SWBuf cipherKey = "";
-@@ -1464,9 +1463,6 @@ int main(int argc, char **argv) {
- }
- usage(*argv, "-s requires one of <2|4>");
- }
-- else if (!strcmp(argv[i], "-C")) {
-- isCommentary = true;
-- }
- else if (!strcmp(argv[i], "-d")) {
- if (i+1 < argc) debug |= atoi(argv[++i]);
- else usage(*argv, "-d requires <flags>");
diff --git a/debian/patches/2631_fix_curl.patch b/debian/patches/2631_fix_curl.patch
deleted file mode 100644
index acc2296..0000000
--- a/debian/patches/2631_fix_curl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Description: types.h is no longer part of cURL stable
-Origin: commit, revision id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2631
-Author: chrislit
-Last-Update: 2011-07-03
-X-Bzr-Revision-Id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2631
-
-=== modified file 'src/mgr/curlftpt.cpp'
---- old/src/mgr/curlftpt.cpp 2010-03-20 11:49:54 +0000
-+++ new/src/mgr/curlftpt.cpp 2011-07-03 09:40:30 +0000
-@@ -26,7 +26,6 @@
- #include <fcntl.h>
-
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
-
- #include <swlog.h>
-
-=== modified file 'src/mgr/curlhttpt.cpp'
---- old/src/mgr/curlhttpt.cpp 2009-10-21 23:46:40 +0000
-+++ new/src/mgr/curlhttpt.cpp 2011-07-03 09:40:30 +0000
-@@ -25,7 +25,6 @@
- #include <cctype>
-
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
-
- #include <swlog.h>
-
diff --git a/debian/patches/2661.patch b/debian/patches/2661.patch
deleted file mode 100644
index 19214f2..0000000
--- a/debian/patches/2661.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Description: Commiting patch from GHellings to support both CLucene 0.9x and 2.x
- Leaving the CMake stuff for Greg to commit himself so CMake blame stays with him ;)
-Origin: commit, revision id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2661,
- http://thread.gmane.org/gmane.comp.literature.sword.devel/21816
-Author: scribe, Tom Callaway, Deji Akingunola
-Last-Update: 2011-10-29
-X-Bzr-Revision-Id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2661
-
-=== modified file 'src/modules/swmodule.cpp'
---- a/src/modules/swmodule.cpp
-+++ b/src/modules/swmodule.cpp
-@@ -40,7 +40,6 @@
-
- #ifdef USELUCENE
- #include <CLucene.h>
--#include <CLucene/CLBackwards.h>
-
- //Lucence includes
- //#include "CLucene.h"
-@@ -59,6 +58,9 @@
-
- using std::vector;
-
-+extern size_t lucene_utf8towcs(wchar_t *, const char *, size_t maxslen);
-+extern size_t lucene_wcstoutf8 (char *, const wchar_t *, size_t maxslen);
-+
- SWORD_NAMESPACE_START
-
- SWDisplay SWModule::rawdisp;
-@@ -1144,7 +1146,7 @@
-
- lucene_utf8towcs(wcharBuffer, keyText, MAX_CONV_SIZE); //keyText must be utf8
- // doc->add( *(new Field("key", wcharBuffer, Field::STORE_YES | Field::INDEX_TOKENIZED)));
-- doc->add( *Field::Text(_T("key"), wcharBuffer ) );
-+ doc->add(*_CLNEW Field(_T("key"), wcharBuffer, Field::STORE_YES | Field::INDEX_TOKENIZED) );
-
-
- if (includeKeyInSearch) {
-@@ -1155,11 +1157,11 @@
- }
-
- lucene_utf8towcs(wcharBuffer, content, MAX_CONV_SIZE); //content must be utf8
-- doc->add( *Field::UnStored(_T("content"), wcharBuffer) );
-+ doc->add(*_CLNEW Field(_T("content"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED));
-
- if (strong.length() > 0) {
- lucene_utf8towcs(wcharBuffer, strong, MAX_CONV_SIZE);
-- doc->add( *Field::UnStored(_T("lemma"), wcharBuffer) );
-+ doc->add(*_CLNEW Field(_T("lemma"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) );
- //printf("setting fields (%s).\ncontent: %s\nlemma: %s\n", (const char *)*key, content, strong.c_str());
- }
-
-@@ -1280,12 +1282,12 @@
-
- //printf("proxBuf after (%s).\nprox: %s\nproxLem: %s\n", (const char *)*key, proxBuf.c_str(), proxLem.c_str());
-
-- doc->add( *Field::UnStored(_T("prox"), wcharBuffer) );
-+ doc->add(*_CLNEW Field(_T("prox"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) );
- good = true;
- }
- if (proxLem.length() > 0) {
- lucene_utf8towcs(wcharBuffer, proxLem, MAX_CONV_SIZE); //keyText must be utf8
-- doc->add( *Field::UnStored(_T("proxlem"), wcharBuffer) );
-+ doc->add(*_CLNEW Field(_T("proxlem"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) );
- good = true;
- }
- if (good) {
-@@ -1303,20 +1305,32 @@
- //coreWriter->optimize();
- coreWriter->close();
-
-+#ifdef CLUCENE2
-+ d = FSDirectory::getDirectory(target.c_str());
-+#endif
- if (IndexReader::indexExists(target.c_str())) {
-+#ifndef CLUCENE2
- d = FSDirectory::getDirectory(target.c_str(), false);
-+#endif
- if (IndexReader::isLocked(d)) {
- IndexReader::unlock(d);
- }
--
- fsWriter = new IndexWriter( d, an, false);
-- } else {
-+ }
-+ else {
-+#ifndef CLUCENE2
- d = FSDirectory::getDirectory(target.c_str(), true);
-+#endif
- fsWriter = new IndexWriter(d, an, true);
- }
-
- Directory *dirs[] = { ramDir, 0 };
-+#ifdef CLUCENE2
-+ lucene::util::ConstValueArray< lucene::store::Directory *>dirsa(dirs, 1);
-+ fsWriter->addIndexes(dirsa);
-+#else
- fsWriter->addIndexes(dirs);
-+#endif
- fsWriter->close();
-
- delete ramDir;
diff --git a/debian/patches/cmake_backport.patch b/debian/patches/cmake_backport.patch
deleted file mode 100644
index be70454..0000000
--- a/debian/patches/cmake_backport.patch
+++ /dev/null
@@ -1,508 +0,0 @@
-Description: Backport of latest cmake
-Origin: commit, revision id: dmitrij.ledkov@ubuntu.com-20120322235020-h7adn8axsyjujaj3
-Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
-Last-Update: 2012-03-22
-X-Bzr-Revision-Id: dmitrij.ledkov@ubuntu.com-20120322235020-h7adn8axsyjujaj3
-
-=== modified file 'CMakeLists.txt'
-Index: sword/CMakeLists.txt
-===================================================================
---- sword.orig/CMakeLists.txt 2012-03-23 00:14:16.541890418 +0000
-+++ sword/CMakeLists.txt 2012-03-23 00:32:45.377920112 +0000
-@@ -38,6 +38,7 @@
- # This will look for various libraries that libsword builds against. There is no REQUIRED
- # attribute added here, since all of the libraries here are not, in actuality, required.
- #
-+MESSAGE(STATUS "\n-- SEARCHING FOR SYTEM PACKAGES")
- # Find our packages
- FIND_PACKAGE(ZLIB QUIET)
- FIND_PACKAGE(ICU QUIET)
-@@ -77,30 +78,18 @@
- IF(NOT MSVC OR NOT LIBSWORD_LIBRARY_TYPE MATCHES ".*Shared.*")
- SET_TARGET_PROPERTIES(sword_static PROPERTIES
- OUTPUT_NAME "sword")
-- MESSAGE(STATUS "Building Static library with name sword")
-+ #MESSAGE(STATUS "Building Static library with name sword")
- ELSE(NOT MSVC OR NOT LIBSWORD_LIBRARY_TYPE MATCHES ".*Shared.*")
-- MESSAGE(STATUS "Building Static library with name
-- sword_static")
-+ #MESSAGE(STATUS "Building Static library with name
-+ #sword_static")
- ENDIF(NOT MSVC OR NOT LIBSWORD_LIBRARY_TYPE MATCHES ".*Shared.*")
-+ MESSAGE(STATUS "Building Static library.")
- ENDIF(LIBSWORD_LIBRARY_TYPE MATCHES ".*Static.*" OR NOT LIBSWORD_LIBRARY_TYPE)
-
- ################################################################################################
- # Some random user settings
- #
-
--IF(SWORD_ENABLE_PROFILE STREQUAL "Yes")
-- SET_TARGET_PROPERTIES(sword
-- PROPERTIES COMPILE_FLAGS "-pg"
-- )
--ENDIF(SWORD_ENABLE_PROFILE STREQUAL "Yes")
--
--IF(SWORD_ENABLE_PROFILEFN STREQUAL "Yes")
-- SET_TARGET_PROPERTIES(sword
-- PROPERTIES COMPILE_FLAGS "-g -finstrument-functions"
-- )
-- TARGET_LINK_LIBRARIES(libsword fnccheck)
--ENDIF(SWORD_ENABLE_PROFILEFN STREQUAL "Yes")
--
- IF(NOT SWORD_GLOBAL_CONF_DIR STREQUAL "")
- ADD_DEFINITIONS(-DGLOBCONFPATH="${SWORD_GLOBAL_CONF_DIR}/sword.conf")
- ENDIF(NOT SWORD_GLOBAL_CONF_DIR STREQUAL "")
-@@ -123,33 +112,41 @@
- ENDIF(BUILDING_SHARED)
-
- ###############################################################################################
--# Some options are only needed if we're going to be building a debug option into the library
--# These are generally only for developer building and testing
-+# The buildflags depend on the CMAKE_BUILD_TYPE supplied at the command line.
-+# For a full lists of different flags see http://cmake.org/Wiki/CMake_Useful_Variables
-+#
-+# Cmake has sane defaults for None aka '', DEBUG, RELEASE, RELWITHDEBINFO for known compilers.
-+#
-+# You can override these variables on the command-line or here.
-+# We provide our own defaults below
- #
--# Debug testing
--IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
-- SET(SWORD_CFLAGS "-g3 -Wall -Werror -O0")
--ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
-- SET(SWORD_CFLAGS "-O3")
--ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
-+# Note the below two initialisations done for us by cmake:
-+#
-+#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" or "$ENV{CFLAGS}" or "" )
-+#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" or "$ENV{CXXFLAGS}" or "" )
-
- IF(SWORD_ENABLE_WARNINGS STREQUAL "Yes")
-- SET(SWORD_CFLAGS "${SWORD_CFLAGS} -Werror")
-+ SET(CMAKE_C_FLAGS "-Werror ${CMAKE_C_FLAGS}")
-+ SET(CMAKE_CXX_FLAGS "-Werror ${CMAKE_CXX_FLAGS}")
- ENDIF(SWORD_ENABLE_WARNINGS STREQUAL "Yes")
-
--IF(BUILDING_SHARED)
-- SET_TARGET_PROPERTIES(sword
-- PROPERTIES COMPILE_FLAGS ${SWORD_CFLAGS}
-- )
--ENDIF(BUILDING_SHARED)
-+IF(SWORD_ENABLE_PROFILE STREQUAL "Yes")
-+ SET(CMAKE_C_FLAGS "-pg ${CMAKE_C_FLAGS}")
-+ SET(CMAKE_CXX_FLAGS "-pg ${CMAKE_CXX_FLAGS}")
-+ENDIF(SWORD_ENABLE_PROFILE STREQUAL "Yes")
-
--IF(BUILDING_STATIC)
-- SET_TARGET_PROPERTIES(sword_static
-- PROPERTIES COMPILE_FLAGS ${SWORD_CFLAGS}
-- )
--ENDIF(BUILDING_STATIC)
-+IF(SWORD_ENABLE_PROFILEFN STREQUAL "Yes")
-+ SET(CMAKE_C_FLAGS "-g -finstrument-functions ${CMAKE_C_FLAGS}")
-+ SET(CMAKE_CXX_FLAGS "-g -finstrument-functions ${CMAKE_CXX_FLAGS}")
-+ TARGET_LINK_LIBRARIES(libsword fnccheck)
-+ENDIF(SWORD_ENABLE_PROFILEFN STREQUAL "Yes")
-
--MESSAGE(STATUS "Setting CFlags for compile to ${SWORD_CFLAGS}")
-+SET(CMAKE_C_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_C_FLAGS}")
-+SET(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS}")
-+SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_C_FLAGS}")
-+SET(CMAKE_CXX_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_CXX_FLAGS}")
-+SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS}")
-+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
-
- ##############################################################################################
- # Setting libraries and includes
-@@ -167,11 +164,19 @@
- INCLUDE_DIRECTORIES(${CLUCENE_INCLUDE_DIR})
- SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${CLUCENE_LIBRARY})
- LINK_DIRECTORIES(${CLUCENE_LIBRARY_DIR})
-+ ADD_DEFINITIONS(-DUSELUCENE)
-+ IF(CLUCENE2)
-+ ADD_DEFINITIONS(-DCLUCENE2)
-+ ENDIF(CLUCENE2)
- ENDIF(WITH_CLUCENE)
- IF(WITH_ICU)
- INCLUDE_DIRECTORIES(${ICU_INCLUDE_DIRS})
-+ ADD_DEFINITIONS(${ICU_DEFINITIONS})
- SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES})
- ENDIF(WITH_ICU)
-+IF(REGEX_FOUND AND CROSS_COMPILE_MINGW32)
-+ SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${REGEX_LIBRARY})
-+ENDIF(REGEX_FOUND AND CROSS_COMPILE_MINGW32)
-
- IF(BUILDING_SHARED)
- TARGET_LINK_LIBRARIES(sword ${SWORD_LINK_LIBRARIES})
-@@ -219,9 +224,9 @@
- # Bindings are good, right?
- #
-
--IF(NOT SWORD_BINDINGS STREQUAL "")
-+IF(NOT SWORD_BINDINGS STREQUAL "" AND SWORD_BINDINGS)
- INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/bindings.cmake")
--ENDIF(NOT SWORD_BINDINGS STREQUAL "")
-+ENDIF(NOT SWORD_BINDINGS STREQUAL "" AND SWORD_BINDINGS)
-
- ##############################################################################################
- # Utilities are hawt
-Index: sword/cmake/FindCLucene.cmake
-===================================================================
---- sword.orig/cmake/FindCLucene.cmake 2012-03-23 00:14:16.485890416 +0000
-+++ sword/cmake/FindCLucene.cmake 2012-03-23 00:32:45.381920113 +0000
-@@ -63,7 +63,7 @@
- NAMES clucene clucene-core
- PATHS ${TRIAL_LIBRARY_PATHS})
- IF (CLUCENE_LIBRARY)
-- MESSAGE(STATUS "Found CLucene library: ${CLUCENE_LIBRARY}")
-+ #MESSAGE(STATUS "Found CLucene library: ${CLUCENE_LIBRARY}")
- ENDIF (CLUCENE_LIBRARY)
- FIND_PATH(CLUCENE_INCLUDE_DIR
- NAMES CLucene.h
-@@ -71,7 +71,7 @@
- ONLY_CMAKE_FIND_ROOT_PATH)
-
- IF (CLUCENE_INCLUDE_DIR)
-- MESSAGE(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}")
-+ #MESSAGE(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}")
- ENDIF (CLUCENE_INCLUDE_DIR)
-
- IF(WIN32)
-@@ -83,22 +83,29 @@
- FIND_PATH(CLUCENE_LIBRARY_DIR
- NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} NO_DEFAULT_PATH)
- IF (CLUCENE_LIBRARY_DIR)
-- MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
-+ SET(CLUCENE_INCLUDE_DIR ${CLUCENE_INCLUDE_DIR} ${CLUCENE_LIBRARY_DIR})
-+ #MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
- FILE(READ ${CLUCENE_LIBRARY_DIR}/CLucene/clucene-config.h CLCONTENT)
- STRING(REGEX MATCH "_CL_VERSION +\".*\"" CLMATCH ${CLCONTENT})
- IF (CLMATCH)
- STRING(REGEX REPLACE "_CL_VERSION +\"(.*)\"" "\\1" CLUCENE_VERSION ${CLMATCH})
-- IF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
-- MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}")
-+ IF (CLUCENE_VERSION VERSION_LESS "${CLUCENE_MIN_VERSION}")
-+ MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}")
- SET(CLUCENE_GOOD_VERSION FALSE)
-- ENDIF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
-- IF (CLUCENE_VERSION STREQUAL "0.9.17")
-- MESSAGE(ERROR "CLucene version 0.9.17 is not supported.")
-+ ENDIF (CLUCENE_VERSION VERSION_LESS "${CLUCENE_MIN_VERSION}")
-+ IF (CLUCENE_VERSION STREQUAL "0.9.17")
-+ MESSAGE(ERROR "CLucene version 0.9.17 is not supported.")
- SET(CLUCENE_GOOD_VERSION FALSE)
-- ENDIF (CLUCENE_VERSION STREQUAL "0.9.17")
-+ ENDIF (CLUCENE_VERSION STREQUAL "0.9.17")
-+ IF (CLUCENE_VERSION VERSION_GREATER "2.0")
-+ MESSAGE (STATUS "Found CLucene 2, enabling compatibility mode")
-+ SET(CLUCENE2 TRUE)
-+ ELSE (CLUCENE_VERSION VERSION_GREATER "2.0")
-+ SET(CLUCENE2 FALSE)
-+ ENDIF (CLUCENE_VERSION VERSION_GREATER "2.0")
- ENDIF (CLMATCH)
- ELSE (CLUCENE_LIBRARY_DIR)
-- MESSAGE(STATUS "CLucene library dir not found.")
-+ #MESSAGE(STATUS "CLucene library dir not found.")
- ENDIF (CLUCENE_LIBRARY_DIR)
-
- IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
-@@ -107,11 +114,11 @@
-
- IF(CLucene_FOUND)
- IF(NOT CLucene_FIND_QUIETLY)
-- MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARY}")
-+ MESSAGE(STATUS "CLucene: Yes ${CLUCENE_LIBRARY}")
- ENDIF(NOT CLucene_FIND_QUIETLY)
- ELSE(CLucene_FOUND)
- IF(CLucene_FIND_REQUIRED)
-- MESSAGE(FATAL_ERROR "Could not find CLucene.")
-+ MESSAGE(FATAL_ERROR "CLucene: No")
- ENDIF(CLucene_FIND_REQUIRED)
- ENDIF(CLucene_FOUND)
-
-Index: sword/cmake/FindICU.cmake
-===================================================================
---- sword.orig/cmake/FindICU.cmake 2012-03-23 00:14:16.473890416 +0000
-+++ sword/cmake/FindICU.cmake 2012-03-23 00:32:45.381920113 +0000
-@@ -5,6 +5,7 @@
- # ICU_INCLUDE_DIRS - Directory to include to get ICU headers
- # Note: always include ICU headers as, e.g.,
- # unicode/utypes.h
-+# ICU_DEFINITIONS - Definitions
- # ICU_LIBRARIES - Libraries to link against for the common ICU
- # ICU_I18N_LIBRARIES - Libraries to link against for ICU internationaliation
- # (note: in addition to ICU_LIBRARIES)
-@@ -13,6 +14,7 @@
- find_program(
- ICU_CONFIG_BIN
- icu-config
-+ HINTS "${ICU_CONFIG_BIN_PATH}"
- )
- find_program(
- ICU_GENRB
-@@ -20,25 +22,26 @@
- )
-
- if(ICU_CONFIG_BIN)
-- MESSAGE(STATUS "icu-config found at ${ICU_CONFIG_BIN}: Using that for configuration")
-- MESSAGE(STATUS "genrb found at ${ICU_GENRB}: Using that for generating transliteration data")
-+ MESSAGE(STATUS "[ICU] icu-config: Yes ${ICU_CONFIG_BIN}")
-+ MESSAGE(STATUS "[ICU] genrb: Yes ${ICU_GENRB}")
-
- # Get include directories
-- execute_process(COMMAND "${ICU_CONFIG_BIN}" "--cppflags"
-- OUTPUT_VARIABLE ICU_INCLUDE_DIR
-+ execute_process(COMMAND "${ICU_CONFIG_BIN}" ${ICU_CONFIG_OPTS} "--cppflags"
-+ OUTPUT_VARIABLE ICU_CPPFLAGS
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- # Sanitize output
-+ string(REGEX MATCHALL "-I[^ ]*\ |-I[^ ]*$" ICU_INCLUDE_DIR ${ICU_CPPFLAGS})
-+ string(REGEX MATCHALL "-D[^ ]*\ |-D[^ ]*$" ICU_DEFINITIONS ${ICU_CPPFLAGS})
- string(REPLACE "-I" "" ICU_INCLUDE_DIR ${ICU_INCLUDE_DIR})
-- string(REGEX REPLACE "^[ ]+" "" ICU_INCLUDE_DIR ${ICU_INCLUDE_DIR})
-
-- # Try to get the Libraries we need
-- execute_process(COMMAND "${ICU_CONFIG_BIN}" "--ldflags"
-+ # Try to get the Libraries we need
-+ execute_process(COMMAND "${ICU_CONFIG_BIN}" ${ICU_CONFIG_OPTS} "--ldflags"
- OUTPUT_VARIABLE ICU_LIBRARY_RAW
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
-- execute_process(COMMAND "${ICU_CONFIG_BIN}" "--ldflags-icuio"
-+ execute_process(COMMAND "${ICU_CONFIG_BIN}" ${ICU_CONFIG_OPTS} "--ldflags-icuio"
- OUTPUT_VARIABLE ICU_LIBRARY_IO_RAW
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-@@ -49,7 +52,7 @@
- set(ICU_LIBRARY "${ICU_LIBRARY} ${ICU_LIBRARY_IO_RAW}")
-
- # Get the version
-- execute_process(COMMAND "${ICU_CONFIG_BIN}" "--version"
-+ execute_process(COMMAND "${ICU_CONFIG_BIN}" ${ICU_CONFIG_OPTS} "--version"
- OUTPUT_VARIABLE ICU_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-@@ -95,4 +98,5 @@
- set(ICU_LIBRARIES)
- set(ICU_I18N_LIBRARIES)
- set(ICU_INCLUDE_DIRS)
-+ MESSAGE(STATUS "ICU: No")
- endif(ICU_INCLUDE_DIR AND ICU_LIBRARY)
-Index: sword/cmake/FindRegex.cmake
-===================================================================
---- sword.orig/cmake/FindRegex.cmake 2012-03-23 00:14:16.509890417 +0000
-+++ sword/cmake/FindRegex.cmake 2012-03-23 00:32:45.381920113 +0000
-@@ -27,8 +27,14 @@
- )
- ENDIF(NOT REGEX_INCLUDE_DIR)
-
-+FIND_LIBRARY(REGEX_LIBRARY
-+ NAMES regex gnurx)
-+
- IF(REGEX_INCLUDE_DIR)
- SET(REGEX_FOUND 1)
-+ MESSAGE(STATUS "System regex.h: Yes")
-+ELSE(REGEX_INCLUDE_DIR)
-+ MESSAGE(STATUS "System regex.h: No")
- ENDIF(REGEX_INCLUDE_DIR)
-
- MARK_AS_ADVANCED(
-Index: sword/cmake/bindings.cmake
-===================================================================
---- sword.orig/cmake/bindings.cmake 2012-03-23 00:14:16.497890418 +0000
-+++ sword/cmake/bindings.cmake 2012-03-23 00:32:45.381920113 +0000
-@@ -5,15 +5,16 @@
- # I will try to get them integrated into the system if I can. If there are bindings that you need
- # other than the Python|Perl/Swig bindings, then you should probably speak up now.
-
-+MESSAGE(STATUS "\n-- CONFIGURING SWIG BINDINGS")
- #####################################################################################################
- # SWIG
- # We need to find the SWIG executable in order to be able to do this, right?
- FIND_PACKAGE(SWIG)
-
- IF(NOT SWIG_FOUND)
-- MESSAGE(FATAL_ERROR "Swig not found. Bindings will not be built.")
-+ MESSAGE(FATAL_ERROR "Swig: no")
- ELSE(NOT SWIG_FOUND)
-- MESSAGE(STATUS "Swig found at ${SWIG_EXECUTABLE}")
-+ MESSAGE(STATUS "Swig: yes")
-
- SET(SWORD_SWIG_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/bindings/swig")
- SET(SWORD_SWIG_BINARY "${CMAKE_CURRENT_BINARY_DIR}/bindings/swig")
-@@ -72,7 +73,7 @@
- VERBATIM
- )
-
-- MESSAGE(STATUS "Configured for building Python bindings.")
-+ MESSAGE(STATUS "Python: yes")
- ENDIF(SWORD_BINDINGS MATCHES ".*Python.*")
-
- IF(SWORD_BINDINGS MATCHES ".*Perl.*")
-@@ -127,9 +128,9 @@
- VERBATIM
- )
-
-- MESSAGE(STATUS "Configured for building Perl bindings.")
-+ MESSAGE(STATUS "Perl: yes")
- ELSE(PERL_FOUND)
-- MESSAGE(FATAL_ERROR "Perl not found. Can't create perl bindings without Perl to bind")
-+ MESSAGE(FATAL_ERROR "Perl: not found")
- ENDIF(PERL_FOUND)
- ENDIF(SWORD_BINDINGS MATCHES ".*Perl.*")
- ENDIF(NOT SWIG_FOUND)
-Index: sword/cmake/install.cmake
-===================================================================
---- sword.orig/cmake/install.cmake 2012-03-23 00:14:16.461890416 +0000
-+++ sword/cmake/install.cmake 2012-03-23 00:32:45.381920113 +0000
-@@ -1,6 +1,7 @@
- #####################################################################
- # First, install the library itself
- #
-+MESSAGE(STATUS "\n-- CONFIGURING INSTALLATION DESTINATIONS")
- IF(NOT CMAKE_INSTALL_PREFIX)
- IF(APPLE)
- SET(SWORD_INSTALL_DIR "/opt/local")
-@@ -22,6 +23,9 @@
- INSTALL(TARGETS sword_static
- DESTINATION ${SWORD_INSTALL_DIR}/lib)
- ENDIF(BUILDING_STATIC)
-+# Install the locales
-+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/locales.d
-+ DESTINATION ${SWORD_INSTALL_DIR}/share/sword)
-
- # Install the headers
- INSTALL(FILES ${SWORD_INSTALL_HEADERS}
-@@ -32,7 +36,7 @@
- DESTINATION "${SWORD_INSTALL_DIR}/include/sword")
- ENDIF(SWORD_INTERNAL_REGEX)
-
--MESSAGE(STATUS "Installation destination: ${SWORD_INSTALL_DIR}")
-+MESSAGE(STATUS "Destination: ${SWORD_INSTALL_DIR}")
-
- # Configuration files, of course
- SET(prefix ${SWORD_INSTALL_DIR})
-@@ -62,7 +66,7 @@
-
- # Need to build/install the
- IF(WITH_ICU AND ICU_GENRB)
-- ADD_DEFINITIONS(-DSWICU_DATA="${libdir}/${SWORD_VERSION}_icu_${ICU_VERSION}")
-+ ADD_DEFINITIONS(-DSWICU_DATA="${libdir}/sword/${SWORD_VERSION}_icu_${ICU_VERSION}")
- FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/icu")
- FOREACH(translit ${translit_SOURCES})
- STRING(REPLACE ".txt" ".res" translit_OUTPUT ${translit})
-@@ -86,6 +90,6 @@
- ENDIF(BUILDING_SHARED)
-
- INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/icu/${translit_OUTPUT}"
-- DESTINATION "${libdir}/${SWORD_VERSION}_icu_${ICU_VERSION}")
-+ DESTINATION "${libdir}/sword/${SWORD_VERSION}_icu_${ICU_VERSION}")
- ENDFOREACH(translit ${translit_SOURCES})
--ENDIF(WITH_ICU AND ICU_GENRB)
-\ No newline at end of file
-+ENDIF(WITH_ICU AND ICU_GENRB)
-Index: sword/cmake/muxsources.cmake
-===================================================================
---- sword.orig/cmake/muxsources.cmake 2012-03-23 00:14:16.529890418 +0000
-+++ sword/cmake/muxsources.cmake 2012-03-23 00:32:45.385920113 +0000
-@@ -10,73 +10,74 @@
- # a ZLIB at all, and allowing a user to disable it does not bring about use
- # of some internal fall-back but just leaves the ability to read ZLIB files
- # out of the library altogether
-+MESSAGE(STATUS "\n-- CONFIGURING SOURCE LIST")
- IF(SWORD_NO_ZLIB STREQUAL "Yes")
-- MESSAGE(STATUS "ZLib support excluded")
-+ MESSAGE(STATUS "ZLib: excluded by use option")
- ADD_DEFINITIONS(-DEXCLUDEZLIB)
- SET(WITH_ZLIB 0)
- ELSE(SWORD_NO_ZLIB STREQUAL "Yes")
- SET(sword_SOURCES ${sword_SOURCES} ${sword_zlib_used_SOURCES})
- IF(NOT ZLIB_FOUND OR SWORD_USE_INTERNAL_ZLIB STREQUAL "Yes")
-- MESSAGE(STATUS "No system ZLib found or user forcing internal")
-+ MESSAGE(STATUS "ZLib: internal")
- SET(sword_SOURCES ${sword_SOURCES} ${sword_zlib_nofound_SOURCES})
- SET(WITH_INTERNAL_ZLIB 1)
- ELSE(NOT ZLIB_FOUND OR SWORD_USE_INTERNAL_ZLIB STREQUAL "Yes")
-- MESSAGE(STATUS "Using system ZLib: ${ZLIB_LIBRARY}")
-+ MESSAGE(STATUS "ZLib: system ${ZLIB_LIBRARY}")
- SET(WITH_ZLIB 1)
- ENDIF(NOT ZLIB_FOUND OR SWORD_USE_INTERNAL_ZLIB STREQUAL "Yes")
- ENDIF(SWORD_NO_ZLIB STREQUAL "Yes")
-
- # Check for if we've found ICU
- IF(CURL_FOUND AND NOT SWORD_NO_CURL STREQUAL "Yes")
-- MESSAGE(STATUS "cURL found , using ${CURL_LIBRARY} and ${CURL_INCLUDE_DIRS}")
-+ MESSAGE(STATUS "cURL: system ${CURL_LIBRARY} and ${CURL_INCLUDE_DIRS}")
- ADD_DEFINITIONS(-DCURLAVAILABLE)
- SET(sword_SOURCES ${sword_SOURCES} ${sword_curl_found_SOURCES})
- SET(WITH_CURL 1)
- ELSE(CURL_FOUND AND NOT SWORD_NO_CURL STREQUAL "Yes")
-- MESSAGE(STATUS "cURL not found or being ignored")
-+ MESSAGE(STATUS "cURL: no")
- SET(sword_SOURCES ${sword_SOURCES} ${sword_curl_nofound_SOURCES})
- SET(WITH_CURL 0)
- ENDIF(CURL_FOUND AND NOT SWORD_NO_CURL STREQUAL "Yes")
-
- # And for CLucene
- IF(CLucene_FOUND AND NOT SWORD_NO_CLUCENE STREQUAL "Yes")
-- MESSAGE(STATUS "CLucene found, using ${CLUCENE_LIBRARY} in ${CLUCENE_LIBRARY_DIR} and ${CLUCENE_INCLUDE_DIR}")
-+ MESSAGE(STATUS "CLucene: yes ${CLUCENE_LIBRARY} in ${CLUCENE_LIBRARY_DIR} and ${CLUCENE_INCLUDE_DIR}")
- SET(sword_SOURCES ${sword_SOURCES} ${sword_clucene_found_SOURCES})
- SET(WITH_CLUCENE 1)
- ELSE(CLucene_FOUND AND NOT SWORD_NO_CLUCENE STREQUAL "Yes")
-- MESSAGE(STATUS "CLucene not found or being ignored")
-+ MESSAGE(STATUS "CLucene: no")
- SET(sword_SOURCES ${sword_SOURCES} ${sword_clucene_nofound_SOURCES})
- SET(WITH_CLUCENE 0)
- ENDIF(CLucene_FOUND AND NOT SWORD_NO_CLUCENE STREQUAL "Yes")
-
- # Alert the user if PkgConfig is unavailalbe
- IF(NOT PKG_CONFIG_FOUND)
-- MESSAGE(STATUS "PkgConfig not found on the system. Proceeding without it.")
-+ MESSAGE(STATUS "PkgConfig: no")
- SET(WITH_PKG_CONFIG 1)
- ELSE(NOT PKG_CONFIG_FOUND)
-- MESSAGE(STATUS "PkgConfig found. Using.")
-+ MESSAGE(STATUS "PkgConfig: yes")
- SET(WITH_PKG_CONFIG 0)
- ENDIF(NOT PKG_CONFIG_FOUND)
-
- # ICU needs some lovin' too
- IF(ICU_FOUND AND NOT SWORD_NO_ICU STREQUAL "No")
-- MESSAGE(STATUS "ICU Found, using ${ICU_LIBRARY} and ${ICU_INCLUDE_DIRS}")
-+ MESSAGE(STATUS "ICU: yes ${ICU_LIBRARY} and ${ICU_INCLUDE_DIRS}")
- ADD_DEFINITIONS(-D_ICU_)
- SET(sword_SOURCES ${sword_SOURCES} ${sword_icu_found_SOURCES})
- SET(WITH_ICU 1)
- ELSE(ICU_FOUND AND NOT SWORD_NO_ICU STREQUAL "No")
-- MESSAGE(STATUS "ICU not found or ignored.")
-+ MESSAGE(STATUS "ICU: no")
- SET(WITH_ICU 0)
- ENDIF(ICU_FOUND AND NOT SWORD_NO_ICU STREQUAL "No")
-
- # Internal or external regex.h
- IF(REGEX_FOUND)
-- MESSAGE(STATUS "System Regex found: ${REGEX_INCLUDE_DIR}")
-+ MESSAGE(STATUS "Regex.h: system ${REGEX_INCLUDE_DIR}")
- INCLUDE_DIRECTORIES(${REGEX_INCLUDE_DIR})
- SET(sword_SOURCES ${sword_SOURCES} ${sword_external_regex_SOURCES})
- SET(WITH_REGEX 1)
- ELSE(REGEX_FOUND)
-- MESSAGE(STATUS "Using internal regex")
-+ MESSAGE(STATUS "Regex.h: internal")
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include/internal/regex)
- SET(sword_SOURCES ${sword_SOURCES} ${sword_internal_regex_SOURCES})
- SET(WITH_REGEX 0)
-Index: sword/cmake/sources.cmake
-===================================================================
---- sword.orig/cmake/sources.cmake 2012-03-23 00:14:16.449890415 +0000
-+++ sword/cmake/sources.cmake 2012-03-23 00:33:05.417920649 +0000
-@@ -417,4 +417,4 @@
- translit_Latin_Gothic.txt
- translit_Latin_Ugaritic.txt
- translit_swordindex.txt
--)
-\ No newline at end of file
-+)
diff --git a/debian/patches/dso-missing-shared.patch b/debian/patches/dso-missing-shared.patch
deleted file mode 100644
index 1b9c1b4..0000000
--- a/debian/patches/dso-missing-shared.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: clucene-shared is missing
-Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
-Bug-Debian: http://bugs.debian.org/707537
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -190,7 +190,7 @@
- ENDIF(WITH_CURL)
- IF(WITH_CLUCENE)
- INCLUDE_DIRECTORIES(${CLUCENE_INCLUDE_DIR})
-- SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${CLUCENE_LIBRARY})
-+ SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${CLUCENE_LIBRARY} -lclucene-shared)
- LINK_DIRECTORIES(${CLUCENE_LIBRARY_DIR})
- ADD_DEFINITIONS(-DUSELUCENE)
- IF(CLUCENE2)
diff --git a/debian/patches/fix-ftbfs-gcc4.7.diff b/debian/patches/fix-ftbfs-gcc4.7.diff
deleted file mode 100644
index 2299820..0000000
--- a/debian/patches/fix-ftbfs-gcc4.7.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-Partially fix ftbfs with gcc-4.7
-Index: sword-1.6.2+dfsg/include/multimapwdef.h
-===================================================================
---- sword-1.6.2+dfsg.orig/include/multimapwdef.h 2004-05-04 21:01:39.000000000 +0000
-+++ sword-1.6.2+dfsg/include/multimapwdef.h 2012-04-16 20:07:17.256834065 +0000
-@@ -19,14 +19,14 @@
- }
-
- T& operator[](const Key& k) {
-- if (find(k) == this->end()) {
-- insert(value_type(k, T()));
-+ if (this->find(k) == this->end()) {
-+ this->insert(value_type(k, T()));
- }
-- return (*(find(k))).second;
-+ return (*(this->find(k))).second;
- }
- bool has(const Key& k, const T &val) const {
-- typename std::multimap<Key, T, Compare>::const_iterator start = lower_bound(k);
-- typename std::multimap<Key, T, Compare>::const_iterator end = upper_bound(k);
-+ typename std::multimap<Key, T, Compare>::const_iterator start = this->lower_bound(k);
-+ typename std::multimap<Key, T, Compare>::const_iterator end = this->upper_bound(k);
- for (; start!=end; start++) {
- if (start->second == val)
- return true;
diff --git a/debian/patches/fix-ftbfs-icu.patch b/debian/patches/fix-ftbfs-icu.patch
deleted file mode 100644
index f4f1438..0000000
--- a/debian/patches/fix-ftbfs-icu.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Fix FTBFS by requesting libraries only from icu-config
-Author: Dmitrijs Ledkovs <xnox@debian.org>, Daniel Glassey <dglassey@gmail.com>
-Bug-Debian: http://bugs.debian.org/676097
-
-Index: b/cmake/FindICU.cmake
-===================================================================
---- a/cmake/FindICU.cmake
-+++ b/cmake/FindICU.cmake
-@@ -36,7 +36,7 @@
- string(REPLACE "-I" "" ICU_INCLUDE_DIR ${ICU_INCLUDE_DIR})
-
- # Try to get the Libraries we need
-- execute_process(COMMAND "${ICU_CONFIG_BIN}" ${ICU_CONFIG_OPTS} "--ldflags"
-+ execute_process(COMMAND "${ICU_CONFIG_BIN}" ${ICU_CONFIG_OPTS} "--ldflags-libsonly"
- OUTPUT_VARIABLE ICU_LIBRARY_RAW
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
diff --git a/debian/patches/icu_in_soname.patch b/debian/patches/icu_in_soname.patch
deleted file mode 100644
index d392d15..0000000
--- a/debian/patches/icu_in_soname.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: Set icu folder name using SONAME instead of upstream version string
-Author: Dmitrijs Ledkovs <xnox@debian.org>
-
-Index: sword/cmake/install.cmake
-===================================================================
---- sword.orig/cmake/install.cmake 2012-04-03 08:12:47.999839147 +0100
-+++ sword/cmake/install.cmake 2012-04-07 14:12:20.241257963 +0100
-@@ -66,7 +66,7 @@
-
- # Need to build/install the
- IF(WITH_ICU AND ICU_GENRB)
-- ADD_DEFINITIONS(-DSWICU_DATA="${libdir}/sword/${SWORD_VERSION}_icu_${ICU_VERSION}")
-+ ADD_DEFINITIONS(-DSWICU_DATA="${libdir}/sword/${SWORD_SOVERSION}_icu_${ICU_VERSION}")
- FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/icu")
- FOREACH(translit ${translit_SOURCES})
- STRING(REPLACE ".txt" ".res" translit_OUTPUT ${translit})
-@@ -90,6 +90,6 @@
- ENDIF(BUILDING_SHARED)
-
- INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/icu/${translit_OUTPUT}"
-- DESTINATION "${libdir}/sword/${SWORD_VERSION}_icu_${ICU_VERSION}")
-+ DESTINATION "${libdir}/sword/${SWORD_SOVERSION}_icu_${ICU_VERSION}")
- ENDFOREACH(translit ${translit_SOURCES})
- ENDIF(WITH_ICU AND ICU_GENRB)
diff --git a/debian/patches/selectively_disable_compiler_warnings.patch b/debian/patches/selectively_disable_compiler_warnings.patch
new file mode 100644
index 0000000..e403171
--- /dev/null
+++ b/debian/patches/selectively_disable_compiler_warnings.patch
@@ -0,0 +1,209 @@
+Description: use pragmas to disable unused-result warnings in utilities
+Author: Daniel Glassey <wdg@debian.org>
+
+Index: sword-1.7.3+dfsg/utilities/cipherraw.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/cipherraw.cpp 2015-09-02 12:12:33.683898357 +0100
++++ sword-1.7.3+dfsg/utilities/cipherraw.cpp 2015-09-02 12:34:06.918311161 +0100
+@@ -25,6 +25,7 @@
+ #pragma warning( disable: 4996 )
+ #endif
+
++
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+@@ -36,6 +37,8 @@
+ #ifndef __GNUC__
+ #include <io.h>
+ #else
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
+ #include <unistd.h>
+ #endif
+
+@@ -129,3 +132,7 @@
+ close(oxfd[1]);
+ return 0;
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/gbfidx.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/gbfidx.cpp 2015-09-02 12:12:33.599897951 +0100
++++ sword-1.7.3+dfsg/utilities/gbfidx.cpp 2015-09-02 12:38:36.703648984 +0100
+@@ -30,6 +30,8 @@
+ #ifndef __GNUC__
+ #include <io.h>
+ #else
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
+ #include <unistd.h>
+ #endif
+
+@@ -305,3 +307,7 @@
+ key1 = key2 = key3 = "Matthew 1:1";
+ else key1 = key2 = key3 = "Genesis 1:1";
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/genbookutil.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/genbookutil.cpp 2015-09-02 12:12:33.583897879 +0100
++++ sword-1.7.3+dfsg/utilities/genbookutil.cpp 2015-09-02 12:43:29.149099117 +0100
+@@ -30,6 +30,11 @@
+ #include <treekeyidx.h>
+ #include <rawgenbook.h>
+
++#ifdef __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
++#endif
++
+ #ifndef NO_SWORD_NAMESPACE
+ using namespace sword;
+ #endif
+@@ -226,3 +231,7 @@
+
+ return 0;
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/installmgr.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/installmgr.cpp 2015-09-02 12:12:33.635898127 +0100
++++ sword-1.7.3+dfsg/utilities/installmgr.cpp 2015-09-02 12:49:00.910744237 +0100
+@@ -34,6 +34,11 @@
+ #include <stdio.h>
+ #include <swlog.h>
+
++#ifdef __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
++#endif
++
+ using namespace sword;
+ using std::cout;
+ using std::cerr;
+@@ -408,3 +413,7 @@
+
+ return 0;
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/lexdump.c
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/lexdump.c 2015-09-02 12:12:33.691898417 +0100
++++ sword-1.7.3+dfsg/utilities/lexdump.c 2015-09-02 12:53:42.452140319 +0100
+@@ -36,6 +36,8 @@
+ #ifndef __GNUC__
+ #include <io.h>
+ #else
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
+ #include <unistd.h>
+ #endif
+
+@@ -76,3 +78,7 @@
+ return 0;
+
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/step2vpl.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/step2vpl.cpp 2015-09-02 12:12:33.703898461 +0100
++++ sword-1.7.3+dfsg/utilities/step2vpl.cpp 2015-09-02 12:59:22.501826538 +0100
+@@ -35,6 +35,8 @@
+ #ifndef __GNUC__
+ #include <io.h>
+ #else
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
+ #include <unistd.h>
+ #endif
+
+@@ -454,3 +456,7 @@
+ }
+ *to = 0;
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/stepdump.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/stepdump.cpp 2015-09-02 12:12:33.671898307 +0100
++++ sword-1.7.3+dfsg/utilities/stepdump.cpp 2015-09-02 13:02:52.718868954 +0100
+@@ -35,6 +35,8 @@
+ #ifndef __GNUC__
+ #include <io.h>
+ #else
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
+ #include <unistd.h>
+ #endif
+
+@@ -280,3 +282,7 @@
+
+ cout << "headerControlWordArea:\n" << *buf << "\n";
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/treeidxutil.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/treeidxutil.cpp 2015-09-02 12:12:33.615898023 +0100
++++ sword-1.7.3+dfsg/utilities/treeidxutil.cpp 2015-09-02 13:07:44.488315755 +0100
+@@ -30,6 +30,11 @@
+ #include <stdio.h>
+ #include <treekeyidx.h>
+
++#ifdef __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
++#endif
++
+ #ifndef NO_SWORD_NAMESPACE
+ using namespace sword;
+ #endif
+@@ -169,3 +174,7 @@
+
+ return 0;
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+Index: sword-1.7.3+dfsg/utilities/vpl2mod.cpp
+===================================================================
+--- sword-1.7.3+dfsg.orig/utilities/vpl2mod.cpp 2015-09-02 12:12:33.659898252 +0100
++++ sword-1.7.3+dfsg/utilities/vpl2mod.cpp 2015-09-02 13:12:05.117608148 +0100
+@@ -36,6 +36,8 @@
+ #include <io.h>
+ #else
+ #include <unistd.h>
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wunused-result"
+ #endif
+
+ #include <filemgr.h>
+@@ -288,3 +290,7 @@
+ if (buffer)
+ delete [] buffer;
+ }
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
diff --git a/debian/patches/series b/debian/patches/series
index c133da1..e98e95e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,14 +1,6 @@
-12_fix_compiler_warnings.diff
13_curl.diff
-#16_gcc4.6_sword.patch
-#2631_fix_curl.patch
-#cmake_backport.patch
-#icu_in_soname.patch
-#fix-ftbfs-gcc4.7.diff
-#fix-ftbfs-icu.patch
-#2661.patch
multiarch-clucene.patch
no-included-zconf.h.diff
-dso-missing-shared.patch
abicompare.patch
multiarch.patch
+selectively_disable_compiler_warnings.patch