diff -Nru sword-1.7.3+dfsg/debian/changelog sword-1.7.3+dfsg/debian/changelog --- sword-1.7.3+dfsg/debian/changelog 2015-08-05 16:41:41.000000000 +0000 +++ sword-1.7.3+dfsg/debian/changelog 2015-09-16 17:36:15.000000000 +0000 @@ -1,12 +1,61 @@ -sword (1.7.3+dfsg-2.1build1) wily; urgency=medium +sword (1.7.3+dfsg-7) unstable; urgency=medium - * No-change rebuild against new libicu + * d/rules: default dh_auto_test to actually run the tests + * add tests/testblocks.cpp to selectively compiling patch + + -- Daniel Glassey Wed, 16 Sep 2015 18:36:09 +0100 + +sword (1.7.3+dfsg-6) unstable; urgency=medium + + * debian/control: add Vcs-Git and Vcs-Browser + * patch to fix tests to run + + -- Daniel Glassey Wed, 16 Sep 2015 11:15:10 +0100 + +sword (1.7.3+dfsg-5) unstable; urgency=medium + + * Rebuild with correct orig.tar.gz + * c++ transition, Closes: #796711 + * debian/control: + diatheke provides sword-frontend, Closes: #696742 + + -- Daniel Glassey Mon, 14 Sep 2015 11:45:04 +0100 + +sword (1.7.3+dfsg-4) unstable; urgency=medium + + * debian/copyright: + fix short names of publicdomain licences to not have spaces + remove 'unknown license' - files are under GPL as with rest of tarball + unless otherwise specified + * debian/control: + standards version 3.9.6 (no changes) + Multiarch enable library + dh-autoreconf build dep + * debian/rules: + dh --with autoreconf + set version for dh_makeshlibs + * remove debian/libsword-dev.links + * debian/patches: + new patch selectively_disable_compiler_warnings.patch + uses pragmas to disable unused-result warnings + clean up and remove old patches + + -- Daniel Glassey Mon, 14 Sep 2015 08:44:15 +0100 + +sword (1.7.3+dfsg-3) experimental; urgency=low + + * c++ transition + rename library to libsword11v5 + blocked by ICU c++ transition + * add patch abicompare.patch to allow libsword to work with + abi-compliance-checker for future transitions + + -- Daniel Glassey Wed, 02 Sep 2015 14:15:09 +0100 - -- Iain Lane Wed, 05 Aug 2015 17:41:41 +0100 sword (1.7.3+dfsg-2.1) unstable; urgency=medium - * Non maintainer upload. + * Non-maintainer upload. * Fix build with GCC 5 (-Wno-error=deprecated-declarations). Closes: #778133. -- Matthias Klose Fri, 10 Jul 2015 16:18:02 +0200 diff -Nru sword-1.7.3+dfsg/debian/control sword-1.7.3+dfsg/debian/control --- sword-1.7.3+dfsg/debian/control 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/control 2015-09-16 09:47:26.000000000 +0000 @@ -7,20 +7,25 @@ libclucene-dev, libicu-dev, chrpath, - perl + perl, + dh-autoreconf Section: libs Priority: optional Maintainer: CrossWire Packages Uploaders: Daniel Glassey , Dimitri John Ledkov , Jonathan Marsden -Standards-Version: 3.9.3 +Standards-Version: 3.9.6 Homepage: http://www.crosswire.org/sword/ +Vcs-Git: git://anonscm.debian.org/pkg-crosswire/sword.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-crosswire/sword.git/ -Package: libsword11 +Package: libsword11v5 Architecture: any +Pre-Depends: ${misc:Pre-Depends} Depends: libsword-common, ${shlibs:Depends}, ${misc:Depends} Recommends: sword-frontend +Multi-Arch: same Description: API/library for bible software The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris, MacOSX etc.) API/library for Bible software with a constantly growing list @@ -36,8 +41,9 @@ Package: libsword-dev Architecture: any Section: libdevel -Depends: libsword11 (= ${binary:Version}), ${misc:Depends} +Depends: libsword11v5 (= ${binary:Version}), ${misc:Depends} Recommends: libsword-utils +Multi-Arch: same Description: Development files for libsword The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris, MacOSX etc.) API/library for Bible software with a constantly growing list @@ -50,9 +56,10 @@ Package: libsword-common Architecture: all Section: devel -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends} Conflicts: libsword6, libsword7, libsword8 Replaces: libsword6, libsword7, libsword8 +Multi-Arch: foreign Description: common settings and module repository for libsword The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris, MacOSX etc.) API/library for Bible software with a constantly growing list @@ -64,6 +71,7 @@ Package: libsword-utils Architecture: any Section: devel +Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libsword6, libsword7, libsword8 Replaces: libsword6, libsword7, libsword8 @@ -80,7 +88,8 @@ Architecture: any Section: debug Priority: extra -Depends: libsword11 (= ${binary:Version}), ${misc:Depends} +Multi-Arch: same +Depends: libsword11v5 (= ${binary:Version}), ${misc:Depends} Description: API/library for bible software - Debug Files The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris, MacOSX etc.) API/library for Bible software with a constantly growing list @@ -92,6 +101,8 @@ Package: diatheke Architecture: any Section: text +Provides: sword-frontend +Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Description: command line bible browsing and search tool The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris, diff -Nru sword-1.7.3+dfsg/debian/copyright sword-1.7.3+dfsg/debian/copyright --- sword-1.7.3+dfsg/debian/copyright 2014-07-15 18:06:45.000000000 +0000 +++ sword-1.7.3+dfsg/debian/copyright 2015-09-15 14:35:54.000000000 +0000 @@ -22,31 +22,6 @@ Copyright: 1996-2009 CrossWire Bible Society License: GPL-2 -Files: include/installmgr.h - include/rawverse.h - include/defs.h - include/rawverse.h - include/rawverse4.h - include/sysdata.h - include/ftpparse.h - include/nullim.h - include/multimapwdef.h - include/entriesblk.h - bindings/swig/searcher.h - bindings/swig/rendercallback.h - bindings/swig/markupcallback.h - bindings/swig/package/searcher.h - bindings/swig/package/rendercallback.h - bindings/swig/package/autogen.sh - bindings/swig/package/markupcallback.h - bindings/bcppmake/MainCLXTest.h - bindings/bcppmake/MainTest.h - bindings/autogen.sh -Copyright: Unknown -License: Unknown - Probable copyright holder CrossWire Bible Society. - Probable intended license GPL-2 . - include/ftpparse.h - C++ wrapper Files: include/untgz.h src/utilfuns/zlib/untgz.c Copyright: Pedro A. Aranda Guti\irrez @@ -58,11 +33,17 @@ Files: include/sapphire.h src/modules/common/sapphire.cpp Copyright: Michael Paul Johnson -License: Public Domain +License: public-domain + Dedicated to the Public Domain the author and inventor + (Michael Paul Johnson). This code comes with no warranty. + Use it at your own risk. Files: bindings/corba/java/src/org/crosswire/util/Base64.java Copyright: Robert Harder -License: Public Domain - Base64 +License: public-domain + I am placing this code in the Public Domain. Do with it as you will. + This software comes with no guarantees or warranties but with + plenty of well-wishing instead! Files: include/ftplib.h src/utilfuns/ftplib.c Copyright: 1996, 1997 Thomas Pfau, pfau@cnj.digex.net @@ -87,16 +68,6 @@ Public License, version 2, can be found in /usr/share/common-licenses/LGPL-2. -License: Public Domain - Dedicated to the Public Domain the author and inventor - (Michael Paul Johnson). This code comes with no warranty. - Use it at your own risk. - -License: Public Domain - Base64 - I am placing this code in the Public Domain. Do with it as you will. - This software comes with no guarantees or warranties but with - plenty of well-wishing instead! - License: ZLIB This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff -Nru sword-1.7.3+dfsg/debian/libsword11.docs sword-1.7.3+dfsg/debian/libsword11.docs --- sword-1.7.3+dfsg/debian/libsword11.docs 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/libsword11.docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -doc/translation-template.conf diff -Nru sword-1.7.3+dfsg/debian/libsword11.install sword-1.7.3+dfsg/debian/libsword11.install --- sword-1.7.3+dfsg/debian/libsword11.install 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/libsword11.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libsword.so.11 diff -Nru sword-1.7.3+dfsg/debian/libsword11v5.docs sword-1.7.3+dfsg/debian/libsword11v5.docs --- sword-1.7.3+dfsg/debian/libsword11v5.docs 1970-01-01 00:00:00.000000000 +0000 +++ sword-1.7.3+dfsg/debian/libsword11v5.docs 2015-09-15 14:35:54.000000000 +0000 @@ -0,0 +1 @@ +doc/translation-template.conf diff -Nru sword-1.7.3+dfsg/debian/libsword11v5.install sword-1.7.3+dfsg/debian/libsword11v5.install --- sword-1.7.3+dfsg/debian/libsword11v5.install 1970-01-01 00:00:00.000000000 +0000 +++ sword-1.7.3+dfsg/debian/libsword11v5.install 2015-09-15 14:35:54.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libsword.so.11v5 diff -Nru sword-1.7.3+dfsg/debian/libsword-dev.install sword-1.7.3+dfsg/debian/libsword-dev.install --- sword-1.7.3+dfsg/debian/libsword-dev.install 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/libsword-dev.install 2015-09-15 14:35:54.000000000 +0000 @@ -1,3 +1,4 @@ usr/include -usr/lib/libsword.a -usr/lib/pkgconfig +usr/lib/*/libsword.a +usr/lib/*/libsword.so +usr/lib/*/pkgconfig diff -Nru sword-1.7.3+dfsg/debian/libsword-dev.links sword-1.7.3+dfsg/debian/libsword-dev.links --- sword-1.7.3+dfsg/debian/libsword-dev.links 2014-07-16 00:26:51.000000000 +0000 +++ sword-1.7.3+dfsg/debian/libsword-dev.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libsword.so.11 usr/lib/libsword.so diff -Nru sword-1.7.3+dfsg/debian/man/addld.1.pod sword-1.7.3+dfsg/debian/man/addld.1.pod --- sword-1.7.3+dfsg/debian/man/addld.1.pod 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/man/addld.1.pod 2015-09-15 14:35:54.000000000 +0000 @@ -33,7 +33,7 @@ =item B<-a FILE key [PATH]> -The form is used to add a key to a L&D module. Optionaly path can be +The form is used to add a key to a L&D module. Optionally path can be used to the file with the entry. =item B<-d FILE key> diff -Nru sword-1.7.3+dfsg/debian/patches/12_fix_compiler_warnings.diff sword-1.7.3+dfsg/debian/patches/12_fix_compiler_warnings.diff --- sword-1.7.3+dfsg/debian/patches/12_fix_compiler_warnings.diff 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/12_fix_compiler_warnings.diff 1970-01-01 00:00:00.000000000 +0000 @@ -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 - print entry\n"; -- std::cout << " r - 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 - print entry\n"; -+ std::cout << " r - 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, §ionLevelInfo); -@@ -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 -Nru sword-1.7.3+dfsg/debian/patches/16_gcc4.6_sword.patch sword-1.7.3+dfsg/debian/patches/16_gcc4.6_sword.patch --- sword-1.7.3+dfsg/debian/patches/16_gcc4.6_sword.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/16_gcc4.6_sword.patch 1970-01-01 00:00:00.000000000 +0000 @@ -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 -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 = "%s", 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 "); diff -Nru sword-1.7.3+dfsg/debian/patches/2631_fix_curl.patch sword-1.7.3+dfsg/debian/patches/2631_fix_curl.patch --- sword-1.7.3+dfsg/debian/patches/2631_fix_curl.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/2631_fix_curl.patch 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - #include --#include - #include - - #include - -=== 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 - - #include --#include - #include - - #include - diff -Nru sword-1.7.3+dfsg/debian/patches/2661.patch sword-1.7.3+dfsg/debian/patches/2661.patch --- sword-1.7.3+dfsg/debian/patches/2661.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/2661.patch 1970-01-01 00:00:00.000000000 +0000 @@ -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 --#include - - //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 -Nru sword-1.7.3+dfsg/debian/patches/abicompare.patch sword-1.7.3+dfsg/debian/patches/abicompare.patch --- sword-1.7.3+dfsg/debian/patches/abicompare.patch 1970-01-01 00:00:00.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/abicompare.patch 2015-09-15 14:35:54.000000000 +0000 @@ -0,0 +1,84 @@ +Description: allow abi-compliance-checker to compile headers +Author: Daniel Glassey + +Index: sword-1.7.3+dfsg/include/canon_abbrevs.h +=================================================================== +--- sword-1.7.3+dfsg.orig/include/canon_abbrevs.h 2013-08-22 08:03:11.000000000 +0100 ++++ sword-1.7.3+dfsg/include/canon_abbrevs.h 2015-09-03 07:00:52.709829136 +0100 +@@ -24,6 +24,8 @@ + #ifndef CANON_ABBREVS_H + #define CANON_ABBREVS_H + ++#include ++ + SWORD_NAMESPACE_START + + +Index: sword-1.7.3+dfsg/include/femain.h +=================================================================== +--- sword-1.7.3+dfsg.orig/include/femain.h 2015-09-03 07:52:46.497269566 +0100 ++++ sword-1.7.3+dfsg/include/femain.h 2015-09-03 07:57:23.730644294 +0100 +@@ -23,12 +23,15 @@ + #ifndef FEMAIN_H + #define FEMAIN_H + ++#include ++#include ++ + class FEMain + { + public: + FEMain (); + virtual ~FEMain (); +- list < SWDisplay * >displays; // so we can delete each display we create ++ std::list < sword::SWDisplay * >displays; // so we can delete each display we create + }; + + #endif +Index: sword-1.7.3+dfsg/include/hebrewmcim.h +=================================================================== +--- sword-1.7.3+dfsg.orig/include/hebrewmcim.h 2013-06-29 07:40:28.000000000 +0100 ++++ sword-1.7.3+dfsg/include/hebrewmcim.h 2015-09-03 07:49:51.896403768 +0100 +@@ -42,8 +42,8 @@ + + void init(); + int subst[255]; +- map subst2[12]; +- map multiChars; ++ std::map subst2[12]; ++ std::map multiChars; + + public: + HebrewMCIM(); +Index: sword-1.7.3+dfsg/include/sapphire.h +=================================================================== +--- sword-1.7.3+dfsg.orig/include/sapphire.h 2013-06-29 07:40:28.000000000 +0100 ++++ sword-1.7.3+dfsg/include/sapphire.h 2015-09-03 07:50:55.180717576 +0100 +@@ -37,6 +37,9 @@ + * results of assignments need to be reduced to 8 bits with + * & 0xFF or % 0x100, whichever is faster. + */ ++ ++#ifndef SAPPHIRE_H ++#define SAPPHIRE_H + + #ifndef NULL + #define NULL 0 +@@ -80,3 +83,5 @@ + + + SWORD_NAMESPACE_END ++ ++#endif //SAPPHIRE_H +Index: sword-1.7.3+dfsg/include/zcom.h +=================================================================== +--- sword-1.7.3+dfsg.orig/include/zcom.h 2013-06-29 07:40:28.000000000 +0100 ++++ sword-1.7.3+dfsg/include/zcom.h 2015-09-03 07:31:44.063009491 +0100 +@@ -25,6 +25,7 @@ + #define ZCOM_H + + #include ++#include + + #include + diff -Nru sword-1.7.3+dfsg/debian/patches/cmake_backport.patch sword-1.7.3+dfsg/debian/patches/cmake_backport.patch --- sword-1.7.3+dfsg/debian/patches/cmake_backport.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/cmake_backport.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,508 +0,0 @@ -Description: Backport of latest cmake -Origin: commit, revision id: dmitrij.ledkov@ubuntu.com-20120322235020-h7adn8axsyjujaj3 -Author: Dmitrijs Ledkovs -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 -Nru sword-1.7.3+dfsg/debian/patches/dso-missing-shared.patch sword-1.7.3+dfsg/debian/patches/dso-missing-shared.patch --- sword-1.7.3+dfsg/debian/patches/dso-missing-shared.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/dso-missing-shared.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -Description: clucene-shared is missing -Author: Dmitrijs Ledkovs -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 -Nru sword-1.7.3+dfsg/debian/patches/fix-ftbfs-gcc4.7.diff sword-1.7.3+dfsg/debian/patches/fix-ftbfs-gcc4.7.diff --- sword-1.7.3+dfsg/debian/patches/fix-ftbfs-gcc4.7.diff 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/fix-ftbfs-gcc4.7.diff 1970-01-01 00:00:00.000000000 +0000 @@ -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::const_iterator start = lower_bound(k); -- typename std::multimap::const_iterator end = upper_bound(k); -+ typename std::multimap::const_iterator start = this->lower_bound(k); -+ typename std::multimap::const_iterator end = this->upper_bound(k); - for (; start!=end; start++) { - if (start->second == val) - return true; diff -Nru sword-1.7.3+dfsg/debian/patches/fix-ftbfs-icu.patch sword-1.7.3+dfsg/debian/patches/fix-ftbfs-icu.patch --- sword-1.7.3+dfsg/debian/patches/fix-ftbfs-icu.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/fix-ftbfs-icu.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Description: Fix FTBFS by requesting libraries only from icu-config -Author: Dmitrijs Ledkovs , Daniel Glassey -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 -Nru sword-1.7.3+dfsg/debian/patches/icu_in_soname.patch sword-1.7.3+dfsg/debian/patches/icu_in_soname.patch --- sword-1.7.3+dfsg/debian/patches/icu_in_soname.patch 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/icu_in_soname.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -Description: Set icu folder name using SONAME instead of upstream version string -Author: Dmitrijs Ledkovs - -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 -Nru sword-1.7.3+dfsg/debian/patches/multiarch.patch sword-1.7.3+dfsg/debian/patches/multiarch.patch --- sword-1.7.3+dfsg/debian/patches/multiarch.patch 1970-01-01 00:00:00.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/multiarch.patch 2015-09-15 14:35:54.000000000 +0000 @@ -0,0 +1,34 @@ +Description: install to multiarch locations +Author: Daniel Glassey + +Index: sword-1.7.3+dfsg/cmake/install.cmake +=================================================================== +--- sword-1.7.3+dfsg.orig/cmake/install.cmake 2015-09-02 00:23:45.451613059 +0100 ++++ sword-1.7.3+dfsg/cmake/install.cmake 2015-09-02 00:24:49.763931921 +0100 +@@ -5,17 +5,17 @@ + # Configuration files, of course + SET(prefix "${PREFIX}") + SET(exec_prefix "${PREFIX}") +-SET(libdir "${LIBDIR}") ++SET(libdir "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}") + SET(includedir "${INCLUDEDIR}") + + # Install the library + IF(BUILDING_SHARED) + INSTALL(TARGETS sword +- DESTINATION "${LIBDIR}") ++ DESTINATION "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}") + ENDIF(BUILDING_SHARED) + IF(BUILDING_STATIC) + INSTALL(TARGETS sword_static +- DESTINATION "${LIBDIR}") ++ DESTINATION "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}") + ENDIF(BUILDING_STATIC) + # Install the locales + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/locales.d +@@ -53,4 +53,4 @@ + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/swversion.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/swversion.h @ONLY) + + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sword.pc +- DESTINATION "${LIBDIR}/pkgconfig") ++ DESTINATION "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig") diff -Nru sword-1.7.3+dfsg/debian/patches/no-included-zconf.h.diff sword-1.7.3+dfsg/debian/patches/no-included-zconf.h.diff --- sword-1.7.3+dfsg/debian/patches/no-included-zconf.h.diff 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/no-included-zconf.h.diff 2015-09-15 14:35:54.000000000 +0000 @@ -1,3 +1,5 @@ +Description: remove zconf.h + --- a/include/zconf.h +++ /dev/null @@ -1,279 +0,0 @@ diff -Nru sword-1.7.3+dfsg/debian/patches/runtests.patch sword-1.7.3+dfsg/debian/patches/runtests.patch --- sword-1.7.3+dfsg/debian/patches/runtests.patch 1970-01-01 00:00:00.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/runtests.patch 2015-09-16 10:14:02.000000000 +0000 @@ -0,0 +1,105 @@ +Description: run tests with make test, disable osis test +Author: Daniel Glassey + +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -14,7 +14,7 @@ + + MESSAGE(STATUS "\n-- CONFIGURING LIBRARY TESTS") + +-SET(test_PROGRAMS ++SET(tests_PROGRAMS + bibliotest + casttest + ciphertest +@@ -31,6 +31,7 @@ + localetest + mgrtest + modtest ++ osistest + parsekey + rawldidxtest + romantest +@@ -47,8 +48,8 @@ + ) + + IF(WITH_ICU) +- SET(test_PROGRAMS +- ${test_PROGRAMS} ++ SET(tests_PROGRAMS ++ ${tests_PROGRAMS} + icutest + # tlitmgrtest + translittest +@@ -56,20 +57,20 @@ + ENDIF(WITH_ICU) + + IF(WITH_ZLIB OR WITH_INTERNAL_ZLIB) +- SET(test_PROGRAMS +- ${test_PROGRAMS} ++ SET(tests_PROGRAMS ++ ${tests_PROGRAMS} + compzip + ) + ENDIF(WITH_ZLIB OR WITH_INTERNAL_ZLIB) + +-FOREACH(TEST ${test_PROGRAMS}) +- ADD_EXECUTABLE(${TEST} EXCLUDE_FROM_ALL ${TEST}.cpp) ++FOREACH(TESTS ${tests_PROGRAMS}) ++ ADD_EXECUTABLE(${TESTS} EXCLUDE_FROM_ALL ${TESTS}.cpp) + IF(BUILDING_SHARED) +- TARGET_LINK_LIBRARIES(${TEST} sword) ++ TARGET_LINK_LIBRARIES(${TESTS} sword) + ELSE(BUILDING_SHARED) +- TARGET_LINK_LIBRARIES(${TEST} sword_static) ++ TARGET_LINK_LIBRARIES(${TESTS} sword_static) + ENDIF(BUILDING_SHARED) +-ENDFOREACH(TEST ${test_PROGRAMS}) ++ENDFOREACH(TESTS ${tests_PROGRAMS}) + + ######################################################################################## + # The following tests require extra libraries to run +--- a/tests/testsuite/CMakeLists.txt ++++ b/tests/testsuite/CMakeLists.txt +@@ -3,23 +3,24 @@ + # + + ADD_CUSTOM_TARGET( +- tests_configure ++ test_configure + COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_BINARY_DIR} + COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.good ${CMAKE_CURRENT_BINARY_DIR} ++ COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.xml ${CMAKE_CURRENT_BINARY_DIR} + COMMAND echo \"[Install]\\nLocalePath=${CMAKE_CURRENT_SOURCE_DIR}/../../\" > ${CMAKE_CURRENT_BINARY_DIR}/sword.conf +- DEPENDS ${test_PROGRAMS} ++ DEPENDS ${tests_PROGRAMS} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + + ADD_CUSTOM_TARGET( +- tests ++ test + COMMAND ./runall.sh + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + + ADD_DEPENDENCIES( +- tests +- tests_configure ++ test ++ test_configure + ) + + MESSAGE(STATUS "Testing configured.") +--- a/tests/testsuite/runall.sh ++++ b/tests/testsuite/runall.sh +@@ -20,7 +20,8 @@ + # General Public License for more details. + # + +-TESTSUITE=`for i in *.good; do basename $i .good; done` ++#TESTSUITE=`for i in *.good; do basename $i .good; done` ++TESTSUITE="listtest versekeytest versemgrtest verseparsing verseparsing-utf8 xmltag" + + for i in $TESTSUITE; do + echo -n "$i: " diff -Nru sword-1.7.3+dfsg/debian/patches/selectively_disable_compiler_warnings.patch sword-1.7.3+dfsg/debian/patches/selectively_disable_compiler_warnings.patch --- sword-1.7.3+dfsg/debian/patches/selectively_disable_compiler_warnings.patch 1970-01-01 00:00:00.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/selectively_disable_compiler_warnings.patch 2015-09-16 17:25:23.000000000 +0000 @@ -0,0 +1,214 @@ +Description: use pragmas to disable unused-result warnings in utilities +Author: Daniel Glassey + +--- a/utilities/cipherraw.cpp ++++ b/utilities/cipherraw.cpp +@@ -25,6 +25,7 @@ + #pragma warning( disable: 4996 ) + #endif + ++ + #include + #include + #include +@@ -36,6 +37,8 @@ + #ifndef __GNUC__ + #include + #else ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" + #include + #endif + +@@ -129,3 +132,7 @@ + close(oxfd[1]); + return 0; + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif +--- a/utilities/gbfidx.cpp ++++ b/utilities/gbfidx.cpp +@@ -30,6 +30,8 @@ + #ifndef __GNUC__ + #include + #else ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" + #include + #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 +--- a/utilities/genbookutil.cpp ++++ b/utilities/genbookutil.cpp +@@ -30,6 +30,11 @@ + #include + #include + ++#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 +--- a/utilities/installmgr.cpp ++++ b/utilities/installmgr.cpp +@@ -34,6 +34,11 @@ + #include + #include + ++#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 +--- a/utilities/lexdump.c ++++ b/utilities/lexdump.c +@@ -36,6 +36,8 @@ + #ifndef __GNUC__ + #include + #else ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" + #include + #endif + +@@ -76,3 +78,7 @@ + return 0; + + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif +--- a/utilities/step2vpl.cpp ++++ b/utilities/step2vpl.cpp +@@ -35,6 +35,8 @@ + #ifndef __GNUC__ + #include + #else ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" + #include + #endif + +@@ -454,3 +456,7 @@ + } + *to = 0; + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif +--- a/utilities/stepdump.cpp ++++ b/utilities/stepdump.cpp +@@ -35,6 +35,8 @@ + #ifndef __GNUC__ + #include + #else ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" + #include + #endif + +@@ -280,3 +282,7 @@ + + cout << "headerControlWordArea:\n" << *buf << "\n"; + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif +--- a/utilities/treeidxutil.cpp ++++ b/utilities/treeidxutil.cpp +@@ -30,6 +30,11 @@ + #include + #include + ++#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 +--- a/utilities/vpl2mod.cpp ++++ b/utilities/vpl2mod.cpp +@@ -36,6 +36,8 @@ + #include + #else + #include ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" + #endif + + #include +@@ -288,3 +290,7 @@ + if (buffer) + delete [] buffer; + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif +--- a/tests/testblocks.cpp ++++ b/tests/testblocks.cpp +@@ -26,6 +26,11 @@ + #include + #include + ++#ifdef __GNUC__ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" ++#endif ++ + using namespace std; + #ifndef NO_SWORD_NAMESPACE + using namespace sword; +@@ -109,3 +114,8 @@ + + return 0; + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif ++ diff -Nru sword-1.7.3+dfsg/debian/patches/series sword-1.7.3+dfsg/debian/patches/series --- sword-1.7.3+dfsg/debian/patches/series 2014-07-15 18:01:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/patches/series 2015-09-16 09:12:46.000000000 +0000 @@ -1,12 +1,7 @@ -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 +runtests.patch diff -Nru sword-1.7.3+dfsg/debian/rules sword-1.7.3+dfsg/debian/rules --- sword-1.7.3+dfsg/debian/rules 2015-07-10 14:19:30.000000000 +0000 +++ sword-1.7.3+dfsg/debian/rules 2015-09-16 17:21:43.000000000 +0000 @@ -3,17 +3,19 @@ ppa:=$(shell sed -n "1s/.*~.*/yes/p" debian/changelog) ver:=$(shell dpkg-parsechangelog | sed -nr "2s/Version: (.*)-.*/\1/p") bd :=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) WFLAGS := -Wall -Werror -Wno-error=deprecated-declarations CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(WFLAGS) CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) $(WFLAGS) %: - dh $@ + dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -Scmake -- \ + -DCMAKE_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \ -DLIBSWORD_LIBRARY_TYPE="Shared Static" \ - -DLIBSWORD_SOVERSION=11 \ + -DLIBSWORD_SOVERSION=11v5 \ -DSWORD_GLOBAL_CONF_DIR='/etc' \ -DCMAKE_BUILD_TYPE=NONE \ -DSWORD_BUILD_TESTS="Yes" \ @@ -22,19 +24,17 @@ pod2man --release="SWORD $(ver)" --center "Sword Module Utilities" $< > $@ override_dh_auto_build: $(basename $(wildcard debian/man/*.pod)) dh_auto_build -Scmake --parallel -override_dh_auto_test: - $(shell cd tests/testsuite && ./runall.sh 1>&2) override_dh_auto_install: dh_auto_install -Scmake override_dh_install: - chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/*so* + chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*so* dh_install --list-missing # Fixes FTBFS if running binary-arch target only -chmod -x debian/libsword-common/usr/share/sword/locales.d/* override_dh_strip: dh_strip --dbg-package=libsword-dbg override_dh_makeshlibs: - dh_makeshlibs -V + dh_makeshlibs -V 'libsword11v5 (>= 1.7.3+dfsg-3)' override_dh_clean: dh_clean $(patsubst %.pod, %, $(wildcard debian/man/*.pod))