summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>2010-11-30 23:06:43 +0000
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:06 -0400
commit6f76aaded76a4404d98447598ae8536725b804d5 (patch)
tree3318ef92a08684632428651beaddf4fbd26120af /debian/patches
parentc09b33dc22f6b15bb31abd798aa00375773b94d9 (diff)
parentb745315323de9f27538edac9453205ca70e6186e (diff)
Imported Debian patch 1.6.2+dfsg-1
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/02_libver.diff28
-rw-r--r--debian/patches/12_fix_compiler_warnings.diff166
-rw-r--r--debian/patches/13_curl.diff12
-rw-r--r--debian/patches/14_compiler_flags.diff19
-rw-r--r--debian/patches/15_move_icudatadir.diff23
-rw-r--r--debian/patches/16_gcc4.6_sword.patch339
-rw-r--r--debian/patches/2631_fix_curl.patch30
-rw-r--r--debian/patches/series5
8 files changed, 516 insertions, 106 deletions
diff --git a/debian/patches/02_libver.diff b/debian/patches/02_libver.diff
deleted file mode 100644
index 21fe438..0000000
--- a/debian/patches/02_libver.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-This patch changes the upstream SO name to Debian/Ubuntu SO name.
-
-Index: sword/lib/Makefile.am
-===================================================================
---- sword.orig/lib/Makefile.am 2010-01-03 04:36:09.622945995 +0200
-+++ sword/lib/Makefile.am 2010-01-03 04:38:16.010955077 +0200
-@@ -23,7 +23,7 @@
-
- AM_CPPFLAGS += $(ICUDEF)
-
--libsword_la_LDFLAGS = -release $(VERSION)
-+libsword_la_LDFLAGS = -version-info 8
-
- include ../src/keys/Makefile.am
- include ../src/utilfuns/Makefile.am
-Index: sword/lib/Makefile.in
-===================================================================
---- sword.orig/lib/Makefile.in 2010-01-03 03:49:46.274945658 +0200
-+++ sword/lib/Makefile.in 2010-01-03 04:38:47.198943804 +0200
-@@ -537,7 +537,7 @@
- $(zlddir)/zld.cpp $(bindingsdir)/flatapi.cpp
- @HAVE_ICU_FALSE@ICUDEF =
- @HAVE_ICU_TRUE@ICUDEF = -DSWICU_DATA=\"${pkglibdir}/${VERSION}_icu_${ICU_VER}\"
--libsword_la_LDFLAGS = -release $(VERSION)
-+libsword_la_LDFLAGS = -version-info 8
- keysdir = $(top_srcdir)/src/keys
- utilfunsdir = $(top_srcdir)/src/utilfuns
- @INTERNALFTPLIB_FALSE@ftpsrc =
diff --git a/debian/patches/12_fix_compiler_warnings.diff b/debian/patches/12_fix_compiler_warnings.diff
index 6d579ff..de1970c 100644
--- a/debian/patches/12_fix_compiler_warnings.diff
+++ b/debian/patches/12_fix_compiler_warnings.diff
@@ -1,9 +1,9 @@
Remove compiler warnings so SWORD will compile with -Wall -Werror
-Index: sword/src/mgr/filemgr.cpp
+Index: debian/src/mgr/filemgr.cpp
===================================================================
---- sword.orig/src/mgr/filemgr.cpp 2010-01-04 00:38:49.052717665 +0200
-+++ sword/src/mgr/filemgr.cpp 2010-01-04 00:40:32.823732625 +0200
-@@ -408,7 +408,7 @@
+--- debian.orig/src/mgr/filemgr.cpp
++++ debian/src/mgr/filemgr.cpp
+@@ -408,7 +408,7 @@ int FileMgr::createPathAndFile(const cha
int FileMgr::copyFile(const char *sourceFile, const char *targetFile) {
@@ -12,10 +12,10 @@ Index: sword/src/mgr/filemgr.cpp
char buf[4096];
if ((sfd = ::open(sourceFile, O_RDONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH)) < 1)
-Index: sword/src/utilfuns/zlib/untgz.c
+Index: debian/src/utilfuns/zlib/untgz.c
===================================================================
---- sword.orig/src/utilfuns/zlib/untgz.c 2010-01-04 00:38:49.032728497 +0200
-+++ sword/src/utilfuns/zlib/untgz.c 2010-01-04 00:39:44.144727307 +0200
+--- debian.orig/src/utilfuns/zlib/untgz.c
++++ debian/src/utilfuns/zlib/untgz.c
@@ -13,6 +13,8 @@
#include <fcntl.h>
#ifdef unix
@@ -25,7 +25,7 @@ Index: sword/src/utilfuns/zlib/untgz.c
#else
# include <direct.h>
# include <io.h>
-@@ -80,7 +82,7 @@
+@@ -80,7 +82,7 @@ union tar_buffer {
enum { TGZ_EXTRACT = 0, TGZ_LIST };
@@ -34,7 +34,7 @@ Index: sword/src/utilfuns/zlib/untgz.c
void TGZnotfound OF((const char *));
int getoct OF((char *, int));
-@@ -105,22 +107,23 @@
+@@ -105,22 +107,23 @@ static char *TGZprefix[] = { "\0", ".tgz
/* Return the real name of the TGZ archive */
/* or NULL if it does not exist. */
@@ -74,7 +74,7 @@ Index: sword/src/utilfuns/zlib/untgz.c
/* error message for the filename */
-@@ -277,7 +280,7 @@
+@@ -277,7 +280,7 @@ int untar (gzFile in, const char *dest)
int remaining = 0;
FILE *outfile = NULL;
char fname[BLOCKSIZE];
@@ -83,11 +83,11 @@ Index: sword/src/utilfuns/zlib/untgz.c
while (1) {
len = gzread(in, &buffer, BLOCKSIZE);
-Index: sword/tests/testblocks.cpp
+Index: debian/tests/testblocks.cpp
===================================================================
---- sword.orig/tests/testblocks.cpp 2010-01-04 00:38:48.928718885 +0200
-+++ sword/tests/testblocks.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -29,14 +29,18 @@
+--- debian.orig/tests/testblocks.cpp
++++ debian/tests/testblocks.cpp
+@@ -29,14 +29,18 @@ using namespace sword;
void addEntry(EntriesBlock *eb) {
string input;
string body;
@@ -111,7 +111,7 @@ Index: sword/tests/testblocks.cpp
}
while (input.compare("."));
std::cout << "Adding new entry. Index is: " << eb->addEntry(body.c_str()) << "\n\n";
-@@ -72,29 +76,33 @@
+@@ -72,29 +76,33 @@ int main(int argc, char **argv) {
EntriesBlock *eb = new EntriesBlock();
string input;
@@ -163,11 +163,11 @@ Index: sword/tests/testblocks.cpp
}
}
}
-Index: sword/utilities/stepdump.cpp
+Index: debian/utilities/stepdump.cpp
===================================================================
---- sword.orig/utilities/stepdump.cpp 2010-01-04 00:38:49.012719004 +0200
-+++ sword/utilities/stepdump.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -153,33 +153,56 @@
+--- debian.orig/utilities/stepdump.cpp
++++ debian/utilities/stepdump.cpp
+@@ -158,33 +158,56 @@ int main(int argc, char **argv) {
void readVersion(int fd, Version *versionRecord) {
@@ -235,7 +235,7 @@ Index: sword/utilities/stepdump.cpp
cout << "\tmodifiedBy: " << versionRecord->modifiedBy << "\n";
int skip = versionRecord->versionRecordSize - 16/*sizeof(struct Version*/;
-@@ -187,33 +210,49 @@
+@@ -192,33 +215,49 @@ void readVersion(int fd, Version *versio
if (skip) {
cout << "\nSkipping " << skip << " unknown bytes.\n";
char *skipbuf = new char[skip];
@@ -294,7 +294,7 @@ Index: sword/utilities/stepdump.cpp
cout << "\treserved2: " << viewableHeaderRecord->reserved2 << "\n";
int skip = viewableHeaderRecord->viewableHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/;
-@@ -221,18 +260,23 @@
+@@ -226,18 +265,23 @@ void readViewableHeader(int fd, Viewable
if (skip) {
cout << "\nSkipping " << skip << " unknown bytes.\n";
char *skipbuf = new char[skip];
@@ -320,7 +320,7 @@ Index: sword/utilities/stepdump.cpp
compress->zBuf(&size, *buf);
strcpy(*buf, compress->Buf());
-@@ -242,30 +286,41 @@
+@@ -247,30 +291,41 @@ void readViewableBlockText(int fd, Viewa
void readViewableBlock(int fd, ViewableBlock *vb) {
@@ -368,11 +368,11 @@ Index: sword/utilities/stepdump.cpp
(*buf)[headerControlWordAreaSize] = 0;
cout << "headerControlWordArea:\n" << *buf << "\n";
-Index: sword/utilities/treeidxutil.cpp
+Index: debian/utilities/treeidxutil.cpp
===================================================================
---- sword.orig/utilities/treeidxutil.cpp 2010-01-04 00:38:48.992719359 +0200
-+++ sword/utilities/treeidxutil.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -49,27 +49,33 @@
+--- debian.orig/utilities/treeidxutil.cpp
++++ debian/utilities/treeidxutil.cpp
+@@ -53,27 +53,33 @@ void printLocalName(TreeKeyIdx *treeKey)
void setLocalName(TreeKeyIdx *treeKey) {
@@ -412,7 +412,7 @@ Index: sword/utilities/treeidxutil.cpp
treeKey->append();
treeKey->setLocalName(buf);
treeKey->save();
-@@ -79,9 +85,11 @@
+@@ -83,9 +89,11 @@ void appendSibbling(TreeKeyIdx *treeKey)
void appendChild(TreeKeyIdx *treeKey) {
@@ -426,7 +426,7 @@ Index: sword/utilities/treeidxutil.cpp
treeKey->appendChild();
treeKey->setLocalName(buf);
treeKey->save();
-@@ -114,11 +122,13 @@
+@@ -118,11 +126,13 @@ int main(int argc, char **argv) {
TreeKeyIdx root = *treeKey;
std::string input;
@@ -442,11 +442,11 @@ Index: sword/utilities/treeidxutil.cpp
input = line;
if (input.length() > 0) {
switch (input[0]) {
-Index: sword/utilities/gbfidx.cpp
+Index: debian/utilities/gbfidx.cpp
===================================================================
---- sword.orig/utilities/gbfidx.cpp 2010-01-04 00:38:48.952718391 +0200
-+++ sword/utilities/gbfidx.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -53,7 +53,7 @@
+--- debian.orig/utilities/gbfidx.cpp
++++ debian/utilities/gbfidx.cpp
+@@ -53,7 +53,7 @@ char testmnt;
int main(int argc, char **argv)
{
long pos, offset;
@@ -455,7 +455,7 @@ Index: sword/utilities/gbfidx.cpp
char startflag = 0;
short size;
-@@ -65,18 +65,30 @@
+@@ -65,18 +65,30 @@ int main(int argc, char **argv)
num1 = key1.Chapter();
num2 = key1.Verse();
pos = 0;
@@ -492,7 +492,7 @@ Index: sword/utilities/gbfidx.cpp
while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
if (!startflag) {
-@@ -120,6 +132,7 @@
+@@ -120,6 +132,7 @@ int main(int argc, char **argv)
void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
{
@@ -500,7 +500,7 @@ Index: sword/utilities/gbfidx.cpp
long pos;
short tmp;
-@@ -127,26 +140,48 @@
+@@ -127,26 +140,48 @@ void writeidx(VerseKey &key1, VerseKey &
if (key1.Verse() == 1) { // new chapter
if (key1.Chapter() == 1) { // new book
pos = lseek(cfp, 0, SEEK_CUR);
@@ -560,11 +560,11 @@ Index: sword/utilities/gbfidx.cpp
}
}
}
-Index: sword/utilities/genbookutil.cpp
+Index: debian/utilities/genbookutil.cpp
===================================================================
---- sword.orig/utilities/genbookutil.cpp 2010-01-04 00:38:49.024719769 +0200
-+++ sword/utilities/genbookutil.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -48,9 +48,11 @@
+--- debian.orig/utilities/genbookutil.cpp
++++ debian/utilities/genbookutil.cpp
+@@ -53,9 +53,11 @@ void printLocalName(TreeKeyIdx *treeKey)
void setLocalName(TreeKeyIdx *treeKey) {
@@ -578,7 +578,7 @@ Index: sword/utilities/genbookutil.cpp
SWBuf name = buf;
treeKey->setLocalName(name.trim());
treeKey->save();
-@@ -58,18 +60,22 @@
+@@ -63,18 +65,22 @@ void setLocalName(TreeKeyIdx *treeKey) {
void gotoPath(TreeKeyIdx *treeKey) {
@@ -605,7 +605,7 @@ Index: sword/utilities/genbookutil.cpp
SWBuf path = buf;
treeKey->assureKeyPath(path.trim());
}
-@@ -86,10 +92,12 @@
+@@ -91,10 +97,12 @@ void setEntryText(RawGenBook *book) {
SWBuf body;
TreeKeyIdx *treeKey = (TreeKeyIdx *)(SWKey *)(*book);
if (treeKey->getOffset()) {
@@ -620,7 +620,7 @@ Index: sword/utilities/genbookutil.cpp
SWBuf text = buf;
text.trim();
if ((text[0] == '.') && (text[1] == 0))
-@@ -106,9 +114,11 @@
+@@ -111,9 +119,11 @@ void setEntryText(RawGenBook *book) {
void appendSibbling(TreeKeyIdx *treeKey) {
if (treeKey->getOffset()) {
@@ -634,7 +634,7 @@ Index: sword/utilities/genbookutil.cpp
SWBuf name = buf;
treeKey->append();
treeKey->setLocalName(name.trim());
-@@ -119,9 +129,11 @@
+@@ -124,9 +134,11 @@ void appendSibbling(TreeKeyIdx *treeKey)
void appendChild(TreeKeyIdx *treeKey) {
@@ -648,7 +648,7 @@ Index: sword/utilities/genbookutil.cpp
SWBuf name = buf;
treeKey->appendChild();
treeKey->setLocalName(name.trim());
-@@ -163,11 +175,13 @@
+@@ -168,11 +180,13 @@ int main(int argc, char **argv) {
treeKey = (TreeKeyIdx *)(SWKey *)(*book);
SWBuf input;
@@ -664,11 +664,11 @@ Index: sword/utilities/genbookutil.cpp
input = line;
input.trim();
if (input.length() > 0) {
-Index: sword/utilities/vpl2mod.cpp
+Index: debian/utilities/vpl2mod.cpp
===================================================================
---- sword.orig/utilities/vpl2mod.cpp 2010-01-04 00:38:48.968728584 +0200
-+++ sword/utilities/vpl2mod.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -67,14 +67,18 @@
+--- debian.orig/utilities/vpl2mod.cpp
++++ debian/utilities/vpl2mod.cpp
+@@ -72,14 +72,18 @@ char readline(int fd, char **buf) {
break;
}
@@ -690,11 +690,11 @@ Index: sword/utilities/vpl2mod.cpp
(*buf)[size] = 0;
// clean up any trailing junk on buf
-Index: sword/utilities/installmgr.cpp
+Index: debian/utilities/installmgr.cpp
===================================================================
---- sword.orig/utilities/installmgr.cpp 2010-01-04 00:38:48.984719291 +0200
-+++ sword/utilities/installmgr.cpp 2010-01-04 00:39:44.144727307 +0200
-@@ -65,8 +65,10 @@
+--- debian.orig/utilities/installmgr.cpp
++++ debian/utilities/installmgr.cpp
+@@ -69,8 +69,10 @@ virtual bool isUserDisclaimerConfirmed()
cout << "then type yes at the prompt\n\n";
cout << "enable? [no] ";
@@ -707,11 +707,11 @@ Index: sword/utilities/installmgr.cpp
confirmed = (!strcmp(prompt, "yes\n"));
cout << "\n";
}
-Index: sword/utilities/step2vpl.cpp
+Index: debian/utilities/step2vpl.cpp
===================================================================
---- sword.orig/utilities/step2vpl.cpp 2010-01-04 00:38:48.936719093 +0200
-+++ sword/utilities/step2vpl.cpp 2010-01-04 00:39:44.148729122 +0200
-@@ -218,93 +218,169 @@
+--- debian.orig/utilities/step2vpl.cpp
++++ debian/utilities/step2vpl.cpp
+@@ -223,93 +223,169 @@ int main(int argc, char **argv) {
void readVersion(int fd, Version *versionRecord) {
@@ -916,7 +916,7 @@ Index: sword/utilities/step2vpl.cpp
compress->zBuf(&size, *buf);
strcpy(*buf, compress->Buf());
-@@ -312,35 +388,53 @@
+@@ -317,35 +393,53 @@ void readViewableBlockText(int fd, Viewa
void readViewableBlock(int fd, ViewableBlock *vb) {
@@ -977,7 +977,7 @@ Index: sword/utilities/step2vpl.cpp
VSyncPoint vSyncPoint;
lseek(fdvsync, vSyncBooksInfo->offset, SEEK_SET);
-@@ -351,9 +445,15 @@
+@@ -356,9 +450,15 @@ void displayBook(int fdbook, int fdviewa
char *sectionName;
char *verseText;
@@ -996,7 +996,7 @@ Index: sword/utilities/step2vpl.cpp
vSyncPoint.offset = SECTIONSLEVELSTART + (vSyncPoint.offset * SECTIONSLEVELSIZE);
lseek(fdsections, vSyncPoint.offset, SEEK_SET);
readSectionLevelInfo(fdsections, &sectionLevelInfo);
-@@ -408,26 +508,50 @@
+@@ -413,26 +513,50 @@ void extractVerseText(int fdviewable, in
void readSectionName(int fd, SectionLevelInfo *sli, char **name) {
@@ -1058,11 +1058,11 @@ Index: sword/utilities/step2vpl.cpp
}
void cleanBuf(char *buf) {
-Index: sword/utilities/cipherraw.cpp
+Index: debian/utilities/cipherraw.cpp
===================================================================
---- sword.orig/utilities/cipherraw.cpp 2010-01-04 00:38:48.960718319 +0200
-+++ sword/utilities/cipherraw.cpp 2010-01-04 00:39:44.148729122 +0200
-@@ -43,7 +43,7 @@
+--- debian.orig/utilities/cipherraw.cpp
++++ debian/utilities/cipherraw.cpp
+@@ -48,7 +48,7 @@ int main(int argc, char **argv) {
SWCipher *zobj;
VerseKey key;
RawVerse *rawdrv;
@@ -1071,7 +1071,7 @@ Index: sword/utilities/cipherraw.cpp
long tmpoff = 0, offset, loffset = 0, lzoffset = 0;
unsigned short size, lsize = 0, lzsize;
char *tmpbuf;
-@@ -69,10 +69,18 @@
+@@ -74,10 +74,18 @@ int main(int argc, char **argv) {
delete [] tmpbuf;
printf("\n");
@@ -1094,7 +1094,7 @@ Index: sword/utilities/cipherraw.cpp
key.AutoNormalize(0);
key.Headings(1);
-@@ -84,8 +92,13 @@
+@@ -89,8 +97,13 @@ int main(int argc, char **argv) {
printf("using previous offset,size %d\n", size);
offset = lseek(oxfd[key.Testament() - 1], 0, SEEK_CUR);
printf("%ld %ld %d \n", offset, lzoffset, lzsize);
@@ -1110,7 +1110,7 @@ Index: sword/utilities/cipherraw.cpp
}
else {
lsize = size;
-@@ -102,13 +115,23 @@
+@@ -107,13 +120,23 @@ int main(int argc, char **argv) {
offset = lseek(ofd[key.Testament() - 1], 0, SEEK_CUR);
tmpoff = lseek(oxfd[key.Testament() - 1], 0, SEEK_CUR);
printf("%s: (%ld) NEW offset: %ld; size: %d\n", (const char *)key, tmpoff, offset, size);
@@ -1138,10 +1138,10 @@ Index: sword/utilities/cipherraw.cpp
lzsize = size;
}
}
-Index: sword/utilities/lexdump.c
+Index: debian/utilities/lexdump.c
===================================================================
---- sword.orig/utilities/lexdump.c 2010-01-04 00:38:49.004730321 +0200
-+++ sword/utilities/lexdump.c 2010-01-04 00:39:44.148729122 +0200
+--- debian.orig/utilities/lexdump.c
++++ debian/utilities/lexdump.c
@@ -40,7 +40,7 @@
int main(int argc, char **argv) {
@@ -1151,7 +1151,7 @@ Index: sword/utilities/lexdump.c
long offset;
unsigned int size;
char datbuf[255];
-@@ -59,11 +59,17 @@
+@@ -59,11 +59,17 @@ int main(int argc, char **argv) {
offset = atoi(argv[2]) * 6;
lseek(idxfd, offset, SEEK_SET);
@@ -1172,3 +1172,29 @@ Index: sword/utilities/lexdump.c
datbuf[40] = 0;
printf("%s\n", datbuf);
close(datfd);
+Index: debian/src/modules/swmodule.cpp
+===================================================================
+--- debian.orig/src/modules/swmodule.cpp
++++ debian/src/modules/swmodule.cpp
+@@ -536,7 +536,7 @@ ListKey &SWModule::search(const char *is
+ }
+ }
+ listKey << *resultKey;
+- listKey.GetElement()->userData = (void *)((__u32)(h->score(i)*100));
++ listKey.GetElement()->userData = (void *)((long)(h->score(i)*100));
+ }
+ (*percent)(98, percentUserData);
+ }
+Index: debian/tests/ciphertest.cpp
+===================================================================
+--- debian.orig/tests/ciphertest.cpp
++++ debian/tests/ciphertest.cpp
+@@ -30,7 +30,7 @@ int main(int argc, char **argv) {
+ }
+
+
+- int encipher = atoi(argv[2]);
++ long encipher = atoi(argv[2]);
+
+ SWFilter *filter = new CipherFilter(argv[1]);
+
diff --git a/debian/patches/13_curl.diff b/debian/patches/13_curl.diff
index f0934b6..2d3fc68 100644
--- a/debian/patches/13_curl.diff
+++ b/debian/patches/13_curl.diff
@@ -5,13 +5,11 @@ timestamp: Sat 2010-03-20 11:49:54 +0000
message:
applied Karl's patch to fix libcurl problem with status reporter data.
-Index: sword/src/mgr/curlftpt.cpp
-===================================================================
---- sword.orig/src/mgr/curlftpt.cpp 2010-03-22 18:22:59.045847934 +0000
-+++ sword/src/mgr/curlftpt.cpp 2010-03-22 18:23:02.244846081 +0000
-@@ -177,6 +177,9 @@
- res = curl_easy_perform(session);
- SWLog::getSystemLog()->logDebug("***** Finished performing curl easy action. \n");
+--- a/src/mgr/curlftpt.cpp
++++ b/src/mgr/curlftpt.cpp
+@@ -180,6 +180,9 @@
+ // it seems CURL tries to use this option data later for some reason, so we unset here
+ curl_easy_setopt(session, CURLOPT_PROGRESSDATA, (void*)NULL);
+ // it seems CURL tries to use this option data later for some reason, so we unset here
+ curl_easy_setopt(session, CURLOPT_PROGRESSDATA, (void*)NULL);
diff --git a/debian/patches/14_compiler_flags.diff b/debian/patches/14_compiler_flags.diff
new file mode 100644
index 0000000..f453072
--- /dev/null
+++ b/debian/patches/14_compiler_flags.diff
@@ -0,0 +1,19 @@
+Make CMake honour environmental flags.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -139,13 +139,13 @@
+
+ IF(BUILDING_SHARED)
+ SET_TARGET_PROPERTIES(sword
+- PROPERTIES COMPILE_FLAGS ${SWORD_CFLAGS}
++ PROPERTIES COMPILE_FLAGS "$ENV{CFLAGS} -fPIC"
+ )
+ ENDIF(BUILDING_SHARED)
+
+ IF(BUILDING_STATIC)
+ SET_TARGET_PROPERTIES(sword_static
+- PROPERTIES COMPILE_FLAGS ${SWORD_CFLAGS}
++ PROPERTIES COMPILE_FLAGS "$ENV{CFLAGS}"
+ )
+ ENDIF(BUILDING_STATIC)
+
diff --git a/debian/patches/15_move_icudatadir.diff b/debian/patches/15_move_icudatadir.diff
new file mode 100644
index 0000000..978104b
--- /dev/null
+++ b/debian/patches/15_move_icudatadir.diff
@@ -0,0 +1,23 @@
+Move transliteration files into $(libdir)/sword sub-dir
+=== modified file 'cmake/install.cmake'
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
+@@ -62,7 +62,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 +86,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)
diff --git a/debian/patches/16_gcc4.6_sword.patch b/debian/patches/16_gcc4.6_sword.patch
new file mode 100644
index 0000000..9e32095
--- /dev/null
+++ b/debian/patches/16_gcc4.6_sword.patch
@@ -0,0 +1,339 @@
+Description: gcc-4.6 -Wunused-but-set-variable fixes
+Origin: commit, revision id: dmitrijs.ledkovs@credativ.co.uk-20110805200647-l3i6n1uwjuyjv525
+Author: Dmitrijs Ledkovs <dmitrijs.ledkovs@credativ.co.uk>
+Last-Update: 2011-08-05
+X-Bzr-Revision-Id: dmitrijs.ledkovs@credativ.co.uk-20110805200647-l3i6n1uwjuyjv525
+
+=== modified file 'src/mgr/swmgr.cpp'
+Index: debian/src/mgr/swmgr.cpp
+===================================================================
+--- debian.orig/src/mgr/swmgr.cpp
++++ debian/src/mgr/swmgr.cpp
+@@ -889,7 +889,6 @@ SWModule *SWMgr::CreateMod(const char *n
+ if ((!stricmp(driver, "zText")) || (!stricmp(driver, "zCom"))) {
+ SWCompress *compress = 0;
+ int blockType = CHAPTERBLOCKS;
+- int blockNum = 1;
+ misc1 = ((entry = section.find("BlockType")) != section.end()) ? (*entry).second : (SWBuf)"CHAPTER";
+ if (!stricmp(misc1.c_str(), "VERSE"))
+ blockType = VERSEBLOCKS;
+@@ -898,9 +897,6 @@ SWModule *SWMgr::CreateMod(const char *n
+ else if (!stricmp(misc1.c_str(), "BOOK"))
+ blockType = BOOKBLOCKS;
+
+- misc1 = ((entry = section.find("BlockNumber")) != section.end()) ? (*entry).second : (SWBuf)"1";
+- blockNum = atoi(misc1.c_str());
+-
+ misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (SWBuf)"LZSS";
+ #ifndef EXCLUDEZLIB
+ if (!stricmp(misc1.c_str(), "ZIP"))
+Index: debian/src/modules/filters/gbfrtf.cpp
+===================================================================
+--- debian.orig/src/modules/filters/gbfrtf.cpp
++++ debian/src/modules/filters/gbfrtf.cpp
+@@ -42,7 +42,6 @@ char GBFRTF::processText(SWBuf &text, co
+ SWBuf strongnum;
+ SWBuf strongtense;
+ bool hideText = false;
+- int wordLen = 0;
+ int wordCount = 0;
+
+ const char *from;
+@@ -50,7 +49,6 @@ char GBFRTF::processText(SWBuf &text, co
+ from = orig.c_str();
+ for (text = ""; *from; from++) {
+ if (*from == '<') {
+- wordLen = wordCount;
+ wordCount = 0;
+ intoken = true;
+ tokpos = 0;
+Index: debian/src/modules/filters/gbfwordjs.cpp
+===================================================================
+--- debian.orig/src/modules/filters/gbfwordjs.cpp
++++ debian/src/modules/filters/gbfwordjs.cpp
+@@ -57,7 +57,6 @@ char GBFWordJS::processText(SWBuf &text,
+ char token[2112]; // cheese. Fix.
+ int tokpos = 0;
+ bool intoken = false;
+- bool lastspace = false;
+ int word = 1;
+ char val[128];
+ char wordstr[5];
+@@ -152,14 +151,11 @@ char GBFWordJS::processText(SWBuf &text,
+ else strong << 1;
+
+ SWModule *sLex = 0;
+- SWModule *sMorph = 0;
+ if (gh == 'G') {
+ sLex = defaultGreekLex;
+- sMorph = defaultGreekParse;
+ }
+ if (gh == 'H') {
+ sLex = defaultHebLex;
+- sMorph = defaultHebParse;
+ }
+ SWBuf lexName = "";
+ if (sLex) {
+@@ -223,7 +219,6 @@ char GBFWordJS::processText(SWBuf &text,
+ }
+ else {
+ text += *from;
+- lastspace = (*from == ' ');
+ }
+ }
+
+Index: debian/src/modules/filters/osislemma.cpp
+===================================================================
+--- debian.orig/src/modules/filters/osislemma.cpp
++++ debian/src/modules/filters/osislemma.cpp
+@@ -44,7 +44,6 @@ OSISLemma::~OSISLemma() {
+ char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
+ SWBuf token;
+ bool intoken = false;
+- bool lastspace = false;
+
+ const SWBuf orig = text;
+ const char * from = orig.c_str();
+@@ -90,7 +89,6 @@ char OSISLemma::processText(SWBuf &text,
+ }
+ else {
+ text.append(*from);
+- lastspace = (*from == ' ');
+ }
+ }
+ }
+Index: debian/src/modules/filters/osismorph.cpp
+===================================================================
+--- debian.orig/src/modules/filters/osismorph.cpp
++++ debian/src/modules/filters/osismorph.cpp
+@@ -45,7 +45,6 @@ char OSISMorph::processText(SWBuf &text,
+ char token[2048]; // cheese. Fix.
+ int tokpos = 0;
+ bool intoken = false;
+- bool lastspace = false;
+ SWBuf orig = text;
+ const char *from = orig.c_str();
+
+@@ -90,7 +89,6 @@ char OSISMorph::processText(SWBuf &text,
+ }
+ else {
+ text.append(*from);
+- lastspace = (*from == ' ');
+ }
+ }
+ }
+Index: debian/src/modules/filters/osisruby.cpp
+===================================================================
+--- debian.orig/src/modules/filters/osisruby.cpp
++++ debian/src/modules/filters/osisruby.cpp
+@@ -44,7 +44,6 @@ OSISRuby::~OSISRuby() {
+ char OSISRuby::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
+ SWBuf token;
+ bool intoken = false;
+- bool lastspace = false;
+
+ const SWBuf orig = text;
+ const char * from = orig.c_str();
+@@ -83,7 +82,6 @@ char OSISRuby::processText(SWBuf &text,
+ }
+ else {
+ text.append(*from);
+- lastspace = (*from == ' ');
+ }
+ }
+ }
+Index: debian/src/modules/filters/osisstrongs.cpp
+===================================================================
+--- debian.orig/src/modules/filters/osisstrongs.cpp
++++ debian/src/modules/filters/osisstrongs.cpp
+@@ -49,7 +49,6 @@ OSISStrongs::~OSISStrongs() {
+ char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
+ SWBuf token;
+ bool intoken = false;
+- bool lastspace = false;
+ int wordNum = 1;
+ char wordstr[5];
+ const char *wordStart = 0;
+@@ -280,7 +279,6 @@ char OSISStrongs::processText(SWBuf &tex
+ }
+ else {
+ text.append(*from);
+- lastspace = (*from == ' ');
+ }
+ }
+ return 0;
+Index: debian/src/modules/filters/osiswordjs.cpp
+===================================================================
+--- debian.orig/src/modules/filters/osiswordjs.cpp
++++ debian/src/modules/filters/osiswordjs.cpp
+@@ -59,7 +59,6 @@ char OSISWordJS::processText(SWBuf &text
+ char token[2112]; // cheese. Fix.
+ int tokpos = 0;
+ bool intoken = false;
+- bool lastspace = false;
+ int wordNum = 1;
+ char wordstr[5];
+ SWBuf modName = (module)?module->Name():"";
+@@ -186,7 +185,6 @@ char OSISWordJS::processText(SWBuf &text
+ }
+ else {
+ text.append(*from);
+- lastspace = (*from == ' ');
+ }
+ }
+ }
+Index: debian/src/modules/filters/thmlwordjs.cpp
+===================================================================
+--- debian.orig/src/modules/filters/thmlwordjs.cpp
++++ debian/src/modules/filters/thmlwordjs.cpp
+@@ -58,7 +58,6 @@ char ThMLWordJS::processText(SWBuf &text
+ char token[2112]; // cheese. Fix.
+ int tokpos = 0;
+ bool intoken = false;
+- bool lastspace = false;
+ int word = 1;
+ char val[128];
+ char *valto;
+@@ -166,14 +165,11 @@ char ThMLWordJS::processText(SWBuf &text
+ else strong << 1;
+
+ SWModule *sLex = 0;
+- SWModule *sMorph = 0;
+ if (gh == 'G') {
+ sLex = defaultGreekLex;
+- sMorph = defaultGreekParse;
+ }
+ if (gh == 'H') {
+ sLex = defaultHebLex;
+- sMorph = defaultHebParse;
+ }
+ SWBuf lexName = "";
+ if (sLex) {
+@@ -204,16 +200,6 @@ char ThMLWordJS::processText(SWBuf &text
+ textStr += lastAppendLen;
+ SWBuf spanStart = "";
+
+-
+-
+-/*
+- if (sMorph) {
+- SWBuf popMorph = "<a onclick=\"";
+- popMorph.appendFormatted("p(\'%s\',\'%s\','%s','');\" >%s</a>", sMorph->Name(), morph.c_str(), wordID.c_str(), morph.c_str());
+- morph = popMorph;
+- }
+-*/
+-
+ // 'p' = 'fillpop' to save bandwidth
+ const char *m = strchr(morph.c_str(), ':');
+ if (m) m++;
+@@ -237,7 +223,6 @@ char ThMLWordJS::processText(SWBuf &text
+ }
+ else {
+ text += *from;
+- lastspace = (*from == ' ');
+ }
+ }
+
+Index: debian/src/modules/filters/utf8html.cpp
+===================================================================
+--- debian.orig/src/modules/filters/utf8html.cpp
++++ debian/src/modules/filters/utf8html.cpp
+@@ -34,14 +34,11 @@ UTF8HTML::UTF8HTML() {
+ char UTF8HTML::processText(SWBuf &text, const SWKey *key, const SWModule *module)
+ {
+ unsigned char *from;
+- int len;
+ char digit[10];
+ unsigned long ch;
+ if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering
+ return (char)-1;
+
+- len = strlen(text.c_str()) + 2; // shift string to right of buffer
+-
+ SWBuf orig = text;
+ from = (unsigned char *)orig.c_str();
+
+Index: debian/src/modules/filters/utf8latin1.cpp
+===================================================================
+--- debian.orig/src/modules/filters/utf8latin1.cpp
++++ debian/src/modules/filters/utf8latin1.cpp
+@@ -36,14 +36,12 @@ char UTF8Latin1::processText(SWBuf &text
+ {
+ unsigned char *from;
+
+- int len;
+ unsigned long uchar;
+ unsigned char significantFirstBits, subsequent;
+
+ if ((unsigned long)key < 2) {// hack, we're en(1)/de(0)ciphering
+ return (char)-1;
+ }
+- len = strlen(text.c_str()) + 1; // shift string to right of buffer
+
+ SWBuf orig = text;
+ from = (unsigned char*)orig.c_str();
+Index: debian/src/utilfuns/url.cpp
+===================================================================
+--- debian.orig/src/utilfuns/url.cpp
++++ debian/src/utilfuns/url.cpp
+@@ -133,7 +133,6 @@ void URL::parse () {
+ //3.Get the hostname part. This is the part from pos up to the first slash
+ bool checkPath = true;
+ bool checkParams = true;
+- bool checkAnchor = true;
+
+ end = strchr(urlPtr, '/');
+ if (!end) {
+@@ -145,7 +144,6 @@ void URL::parse () {
+ end = strchr(urlPtr, '#');
+ }
+ if (!end) {
+- checkAnchor = false;
+ end = urlPtr+strlen(urlPtr);
+ }
+
+@@ -160,7 +158,6 @@ void URL::parse () {
+ end = strchr(urlPtr, '#');
+ }
+ if (!end) {
+- checkAnchor = false;
+ end = urlPtr+strlen(urlPtr);
+ }
+
+@@ -174,14 +171,6 @@ void URL::parse () {
+ SWBuf paramName;
+ SWBuf paramValue;
+
+-/*
+- end = strchr(urlPtr, '#');
+- if (!end) {
+- checkAnchor = false;
+- end = urlPtr+strlen(urlPtr);
+- }
+-*/
+- //end = (start && strchr(start, '?')) ? strchr(start, '?')+1 :0;
+ end = urlPtr;
+ while (end) {
+ paramName = "";
+Index: debian/utilities/osis2mod.cpp
+===================================================================
+--- debian.orig/utilities/osis2mod.cpp
++++ debian/utilities/osis2mod.cpp
+@@ -1416,7 +1416,6 @@ int main(int argc, char **argv) {
+ const char* osisDoc = argv[2];
+ int append = 0;
+ SWBuf compType = "";
+- bool isCommentary = false;
+ int iType = 4;
+ int entrySize = 0;
+ SWBuf cipherKey = "";
+@@ -1464,9 +1463,6 @@ int main(int argc, char **argv) {
+ }
+ usage(*argv, "-s requires one of <2|4>");
+ }
+- else if (!strcmp(argv[i], "-C")) {
+- isCommentary = true;
+- }
+ else if (!strcmp(argv[i], "-d")) {
+ if (i+1 < argc) debug |= atoi(argv[++i]);
+ else usage(*argv, "-d requires <flags>");
diff --git a/debian/patches/2631_fix_curl.patch b/debian/patches/2631_fix_curl.patch
new file mode 100644
index 0000000..acc2296
--- /dev/null
+++ b/debian/patches/2631_fix_curl.patch
@@ -0,0 +1,30 @@
+Description: types.h is no longer part of cURL stable
+Origin: commit, revision id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2631
+Author: chrislit
+Last-Update: 2011-07-03
+X-Bzr-Revision-Id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2631
+
+=== modified file 'src/mgr/curlftpt.cpp'
+--- old/src/mgr/curlftpt.cpp 2010-03-20 11:49:54 +0000
++++ new/src/mgr/curlftpt.cpp 2011-07-03 09:40:30 +0000
+@@ -26,7 +26,6 @@
+ #include <fcntl.h>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include <swlog.h>
+
+=== modified file 'src/mgr/curlhttpt.cpp'
+--- old/src/mgr/curlhttpt.cpp 2009-10-21 23:46:40 +0000
++++ new/src/mgr/curlhttpt.cpp 2011-07-03 09:40:30 +0000
+@@ -25,7 +25,6 @@
+ #include <cctype>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include <swlog.h>
+
diff --git a/debian/patches/series b/debian/patches/series
index e0f9d43..b3f4bb4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,6 @@
-02_libver.diff
12_fix_compiler_warnings.diff
13_curl.diff
+14_compiler_flags.diff
+15_move_icudatadir.diff
+16_gcc4.6_sword.patch
+2631_fix_curl.patch