summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog21
-rw-r--r--debian/compat2
-rw-r--r--debian/control44
-rw-r--r--debian/copyright25
-rwxr-xr-xdebian/dfsg.sh20
-rw-r--r--debian/diatheke.manpages2
-rw-r--r--debian/files.non-dfsg7
-rw-r--r--debian/libsword-dev.install1
-rw-r--r--debian/libsword-dev.links1
-rw-r--r--debian/libsword8.install7
-rw-r--r--debian/libsword8.manpages25
-rw-r--r--debian/man/addld.1.pod (renamed from debian/addld.1.pod)0
-rw-r--r--debian/man/diatheke.1 (renamed from debian/diatheke.1)0
-rw-r--r--debian/man/imp2gbs.1.pod (renamed from debian/imp2gbs.1.pod)0
-rw-r--r--debian/man/imp2ld.1.pod (renamed from debian/imp2ld.1.pod)0
-rw-r--r--debian/man/imp2vs.1.pod (renamed from debian/imp2vs.1.pod)0
-rw-r--r--debian/man/installmgr.1.pod (renamed from debian/installmgr.1.pod)0
-rw-r--r--debian/man/mkfastmod.1.pod (renamed from debian/mkfastmod.1.pod)0
-rw-r--r--debian/man/mod2imp.1.pod (renamed from debian/mod2imp.1.pod)0
-rw-r--r--debian/man/osis2mod.1.pod (renamed from debian/osis2mod.1.pod)0
-rw-r--r--debian/man/tei2mod.1.pod (renamed from debian/tei2mod.1.pod)0
-rw-r--r--debian/man/vpl2mod.1.pod (renamed from debian/vpl2mod.1.pod)0
-rw-r--r--debian/man/vs2osisref.1.pod (renamed from debian/vs2osisref.1.pod)0
-rw-r--r--debian/man/vs2osisreftxt.1.pod38
-rw-r--r--debian/man/xml2gbs.1.pod (renamed from debian/xml2gbs.1.pod)0
-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
-rw-r--r--debian/python-sword.install1
-rwxr-xr-xdebian/rules133
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch4
37 files changed, 737 insertions, 217 deletions
diff --git a/debian/changelog b/debian/changelog
index d63686b..2fb08be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,24 @@
+sword (1.6.2+dfsg-1) unstable; urgency=low
+
+ [ Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> ]
+ * Revamped debian/rules to use dh tiny rules style
+ * Raised compat to debhelper 7 and change associated packaging files
+ * Use CMake to build sword
+ * debian/patches/02_libver.diff: dropped, using CMake variable
+ * Add debian/source/local-options with VCS friendly options
+ * Add .bzr-builddeb/default.conf to facilitate building from bzr
+ * Use dpkg-buildflags
+ * Make CMake honour environmental variables
+ * Create python-sword package (LP: #49959) (Closes: 640357)
+ * document vs2osisreftxt.1
+ * 3.0 (quilt) format only (launchpad ppa supports it now)
+ * fix gcc-4.6 warnings
+ * Additional compiler error fix, thanks to
+ "brian m. carlson" <sandals@crustytoothpaste.net> (Closes: 624962)
+ * Updated debian/copyright to match the updated dep-5 spec
+
+ -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Tue, 30 Nov 2010 23:06:43 +0000
+
sword (1.6.1+dfsg-2) unstable; urgency=low
[ Dmitrijs Ledkovs ]
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+7
diff --git a/debian/control b/debian/control
index 0ee5e62..e1ede3b 100644
--- a/debian/control
+++ b/debian/control
@@ -1,9 +1,10 @@
Source: sword
-Build-Depends: autotools-dev,
- quilt,
- patchutils (>= 0.2.31),
- cdbs (>= 0.4.34),
- debhelper (>= 5.0.7),
+Build-Depends: debhelper (>= 7.0.50~),
+ cmake,
+ swig,
+ python-all-dev,
+ python-all-dbg,
+ python-support,
libz-dev,
pkg-config,
libcurl4-gnutls-dev,
@@ -17,7 +18,7 @@ Maintainer: CrossWire Packages <pkg-crosswire-devel@lists.alioth.debian.org>
Uploaders: Daniel Glassey <wdg@debian.org>,
Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>,
Jonathan Marsden <jmarsden@fastmail.fm>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
Homepage: http://www.crosswire.org/sword/
Package: libsword8
@@ -25,8 +26,7 @@ Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: sword-frontend
Conflicts: libsword6, libsword7
-Replaces: libsword1, libsword4, libsword4c2, libsword5, libsword5c2a,
- libsword6, libsword-runtime, libsword-config, libsword7
+Replaces: libsword6, libsword7
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
@@ -80,3 +80,31 @@ Description: Command line bible browsing and search tool
bible browsing and searching. This tool is used mostly only for
library testing. Nicer front-ends are Xiphos (Gtk), Bibletime (Qt)
and others.
+
+Package: python-sword
+Architecture: any
+Section: python
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: SWIG Python bindings to 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
+ of front-ends (GUI, textmode, web-based, etc.) and a library of over 200
+ text modules.
+ .
+ This package contains the SWIG bindings to develop applications in Python that
+ use the SWORD library.
+
+Package: python-sword-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: python-sword (= ${binary:Version}), ${misc:Depends}
+Recommends: python-dbg
+Description: SWIG Python binding to libsword (debug)
+ The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
+ MacOSX etc.) API/library for Bible software with a constantly growing list
+ of front-ends (GUI, textmode, web-based, etc.) and a library of over 200
+ text modules.
+ .
+ This package contains the debug symbols for SWIG bindings to develop
+ applications in Python that use the SWORD library.
diff --git a/debian/copyright b/debian/copyright
index 1910e3d..55a2316 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,11 @@
-Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=53
-Name: The SWORD Project
-Maintainer: Members of the SWORD Project team <sword-feedback@crosswire.org>
+Format: http://dep.debian.net/deps/dep5/
+Upstream-Name: The SWORD Project
+Upstream-Contact: Members of the SWORD Project team <sword-feedback@crosswire.org>
The CrossWire Bible Society
P. O. Box 2528
Tempe, AZ 85280-2528
Source: http://www.crosswire.org/sword/software/swordapi.jsp
-
-X-Comment: Note that the original source tarball was repackaged to
+Comment: Note that the original source tarball was repackaged to
remove some non-free files, and other convenience copies of
libraries. There is a get-orig-source rule in debian/rules
which does this repacking. The files removed are:
@@ -45,14 +44,14 @@ Files: include/installmgr.h
bindings/autogen.sh
Copyright: Unknown
License: Unknown
-X-Comment: Probable copyright holder CrossWire Bible Society.
- Probable intended license GPL-2 .
- include/ftpparse.h - C++ wrapper
+ 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 <paag@tid.es>
Jean-loup Gailly <jloup@gzip.org>
-X-Comment: The author of zlib has made changes to untgz.c, it is shipped in the
+Comment: The author of zlib has made changes to untgz.c, it is shipped in the
zlib Debian tarball, but is not installed/compiled. So I think we can assume the
zlib/libpng license.
License: ZLIB
@@ -70,6 +69,10 @@ Copyright: 2009 CrossWire Packaging Team <pkg-crosswire-devel@lists.alioth.debia
-2008 Daniel Glassey <wdg@debian.org>
License: GPL-2+
+License: GPL-2+
+ On Debian systems, the complete text of the GNU General Public
+ License, version 2, can be found in /usr/share/common-licenses/GPL-2.
+
License: GPL-2
On Debian systems, the complete text of the GNU General Public
License, version 2, can be found in /usr/share/common-licenses/GPL-2.
@@ -88,11 +91,11 @@ 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
arising from the use of this software.
-
+ .
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
-
+ .
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
diff --git a/debian/dfsg.sh b/debian/dfsg.sh
new file mode 100755
index 0000000..2cfde87
--- /dev/null
+++ b/debian/dfsg.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+format=`echo $3 | sed "s/\(.*\.\)\(.*\)/\2/"`
+newname=`echo $3 | sed "s/\(\.orig\)/\+dfsg\1/"`
+case $format in
+ gz)
+ compr=gzip
+ ;;
+ bz2)
+ compr=bzip2
+ ;;
+ lzma)
+ compr=lzma
+ ;;
+ xz)
+ compr=xz
+ ;;
+esac
+$compr -d -c $3 | tar --wildcards --delete `cat debian/files.non-dfsg` | \
+$compr -9 -f > $newname
+rm -f $3
diff --git a/debian/diatheke.manpages b/debian/diatheke.manpages
index e307ee4..78e26a3 100644
--- a/debian/diatheke.manpages
+++ b/debian/diatheke.manpages
@@ -1 +1 @@
-debian/diatheke.1
+debian/man/diatheke.1
diff --git a/debian/files.non-dfsg b/debian/files.non-dfsg
new file mode 100644
index 0000000..27dd492
--- /dev/null
+++ b/debian/files.non-dfsg
@@ -0,0 +1,7 @@
+*/src/utilfuns/zlib/[a-tv-z]*
+*/src/utilfuns/zlib/uncompr.c
+*/include/zlib.h
+*/src/utilfuns/regex.c
+*/include/internal/regex/regex.h
+*/src/utilfuns/win32
+*/bindings/gsoap/include/stdsoap.h
diff --git a/debian/libsword-dev.install b/debian/libsword-dev.install
index 2ce9231..8119ce0 100644
--- a/debian/libsword-dev.install
+++ b/debian/libsword-dev.install
@@ -1,4 +1,3 @@
usr/include
-usr/lib/libsword.so
usr/lib/libsword.a
usr/lib/pkgconfig
diff --git a/debian/libsword-dev.links b/debian/libsword-dev.links
new file mode 100644
index 0000000..6514748
--- /dev/null
+++ b/debian/libsword-dev.links
@@ -0,0 +1 @@
+usr/lib/libsword.so.8 usr/lib/libsword.so
diff --git a/debian/libsword8.install b/debian/libsword8.install
index 9c67efb..3a18425 100644
--- a/debian/libsword8.install
+++ b/debian/libsword8.install
@@ -1,5 +1,4 @@
-etc/sword.conf
-usr/lib/libsword.so.8.0.0
+samples/recommended/sword.conf etc/
usr/lib/libsword.so.8
usr/lib/sword
usr/bin/addld
@@ -16,5 +15,7 @@ usr/bin/osis2mod
usr/bin/tei2mod
usr/bin/vpl2mod
usr/bin/vs2osisref
+usr/bin/vs2osisreftxt
usr/bin/xml2gbs
-usr/share/sword
+locales.d usr/share/sword/
+samples/mods.d/globals.conf usr/share/sword/mods.d/
diff --git a/debian/libsword8.manpages b/debian/libsword8.manpages
index 747de7f..1148885 100644
--- a/debian/libsword8.manpages
+++ b/debian/libsword8.manpages
@@ -1,13 +1,14 @@
-imp2gbs.1
-imp2ld.1
-imp2vs.1
-installmgr.1
-mod2imp.1
-addld.1
-mkfastmod.1
-osis2mod.1
-tei2mod.1
-vpl2mod.1
-vs2osisref.1
-xml2gbs.1
+debian/man/imp2gbs.1
+debian/man/imp2ld.1
+debian/man/imp2vs.1
+debian/man/installmgr.1
+debian/man/mod2imp.1
+debian/man/addld.1
+debian/man/mkfastmod.1
+debian/man/osis2mod.1
+debian/man/tei2mod.1
+debian/man/vpl2mod.1
+debian/man/vs2osisref.1
+debian/man/vs2osisreftxt.1
+debian/man/xml2gbs.1
diff --git a/debian/addld.1.pod b/debian/man/addld.1.pod
index b4bb838..b4bb838 100644
--- a/debian/addld.1.pod
+++ b/debian/man/addld.1.pod
diff --git a/debian/diatheke.1 b/debian/man/diatheke.1
index aebcdf7..aebcdf7 100644
--- a/debian/diatheke.1
+++ b/debian/man/diatheke.1
diff --git a/debian/imp2gbs.1.pod b/debian/man/imp2gbs.1.pod
index 62c8b41..62c8b41 100644
--- a/debian/imp2gbs.1.pod
+++ b/debian/man/imp2gbs.1.pod
diff --git a/debian/imp2ld.1.pod b/debian/man/imp2ld.1.pod
index 021ebad..021ebad 100644
--- a/debian/imp2ld.1.pod
+++ b/debian/man/imp2ld.1.pod
diff --git a/debian/imp2vs.1.pod b/debian/man/imp2vs.1.pod
index 80b676b..80b676b 100644
--- a/debian/imp2vs.1.pod
+++ b/debian/man/imp2vs.1.pod
diff --git a/debian/installmgr.1.pod b/debian/man/installmgr.1.pod
index 244e8ba..244e8ba 100644
--- a/debian/installmgr.1.pod
+++ b/debian/man/installmgr.1.pod
diff --git a/debian/mkfastmod.1.pod b/debian/man/mkfastmod.1.pod
index 5a503c1..5a503c1 100644
--- a/debian/mkfastmod.1.pod
+++ b/debian/man/mkfastmod.1.pod
diff --git a/debian/mod2imp.1.pod b/debian/man/mod2imp.1.pod
index e7c0905..e7c0905 100644
--- a/debian/mod2imp.1.pod
+++ b/debian/man/mod2imp.1.pod
diff --git a/debian/osis2mod.1.pod b/debian/man/osis2mod.1.pod
index 2234527..2234527 100644
--- a/debian/osis2mod.1.pod
+++ b/debian/man/osis2mod.1.pod
diff --git a/debian/tei2mod.1.pod b/debian/man/tei2mod.1.pod
index 38bf7d0..38bf7d0 100644
--- a/debian/tei2mod.1.pod
+++ b/debian/man/tei2mod.1.pod
diff --git a/debian/vpl2mod.1.pod b/debian/man/vpl2mod.1.pod
index 32e8bcb..32e8bcb 100644
--- a/debian/vpl2mod.1.pod
+++ b/debian/man/vpl2mod.1.pod
diff --git a/debian/vs2osisref.1.pod b/debian/man/vs2osisref.1.pod
index 4205df7..4205df7 100644
--- a/debian/vs2osisref.1.pod
+++ b/debian/man/vs2osisref.1.pod
diff --git a/debian/man/vs2osisreftxt.1.pod b/debian/man/vs2osisreftxt.1.pod
new file mode 100644
index 0000000..720a4ee
--- /dev/null
+++ b/debian/man/vs2osisreftxt.1.pod
@@ -0,0 +1,38 @@
+# This is manual page in Perl POD format. Read more at
+# http://perldoc.perl.org/perlpod.html or run command:
+#
+# perldoc perlpod | less
+#
+# To check the syntax:
+#
+# podchecker *.pod
+#
+# Create manual page with command:
+#
+# pod2man PAGE.N.pod > PAGE.N
+
+=head1 NAME
+
+vs2osisreftxt - a tool that probably does something with OSIS refs
+
+=head1 SYNOPSIS
+
+vs2osisreftxt STRING [local_name] [test-in-set-verse]
+
+=head1 DESCRIPTION
+
+Apart from synopsis, little is know what this does. Probably something
+to do with parsing verses or verse references to/from string to/from
+OSIS in a given locale or something along the lines. Email me if you
+can give better description of what this util does.
+
+=head1 Authors
+
+This manual page was written by Dmitrijs Ledkovs <dmitrij.ledkov@gmail.com> for
+Debian project but may be used by others.
+
+=head1 SEE ALSO
+
+L<vs2osisref>
+
+=cut
diff --git a/debian/xml2gbs.1.pod b/debian/man/xml2gbs.1.pod
index 7b518b9..7b518b9 100644
--- a/debian/xml2gbs.1.pod
+++ b/debian/man/xml2gbs.1.pod
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
diff --git a/debian/python-sword.install b/debian/python-sword.install
new file mode 100644
index 0000000..607c065
--- /dev/null
+++ b/debian/python-sword.install
@@ -0,0 +1 @@
+usr/lib/python*
diff --git a/debian/rules b/debian/rules
index 177d319..23428f5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,74 +1,63 @@
#!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/utils.mk
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-
-DEB_DH_INSTALL_SOURCEDIR := debian/tmp
-DEB_CONFIGURE_EXTRA_FLAGS := --with-zlib --with-clucene=/usr --with-icu --enable-tests --enable-debug --without-internalregex
-DEB_DH_MAKESHLIBS_ARGS_libsword8 := -V"libsword8 (>= 1.6)"
-DEB_SHLIBDEPS_INCLUDE_libsword8 := debian/tmp/usr/lib
-DEB_SHLIBDEPS_INCLUDE_diatheke := debian/libsword8/usr/lib
-DEB_DBG_PACKAGE_libsword8 := libsword-dbg
-#CppUnitTestSuite - currently broken
-#DEB_MAKE_CHECK_TARGET := check
-DEB_OPT_FLAG := -g -O3 -Wall -Werror
-DEB_INSTALL_CHANGELOGS_ALL = ChangeLog
-
-build/libsword8::
- #Running Shell based Testsuite
+DH_VERBOSE := 1
+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)
+py :=obj-$(bd)/bindings/swig/python
+pyh:=$(shell if [ -f /usr/share/perl5/Debian/Debhelper/Sequence/python2.pm ]; then echo python2; else echo py_support; fi)
+
+WFLAGS := -Wall -Werror
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(WFLAGS)
+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) $(WFLAGS)
+
+%:
+ dh $@ --with $(pyh)
+override_dh_auto_configure:
+ dh_auto_configure -Scmake -- \
+ -DLIBSWORD_LIBRARY_TYPE="Shared Static" \
+ -DLIBSWORD_SOVERSION=8 \
+ -DCMAKE_BUILD_TYPE=NONE \
+ -DSWORD_BUILD_TESTS="Yes" \
+ -DSWORD_BINDINGS="Python"
+debian/man/%.1: debian/man/%.1.pod
+ 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)
- # The next three rules use chrpath to remove unwanted rpath info
- # from the compiled binaries when they are built on amd64.
- chrpath -d $(CURDIR)/lib/.libs/libsword.so*
- chrpath -d $(CURDIR)/utilities/.libs/*
- chrpath -d $(CURDIR)/utilities/diatheke/.libs/diatheke
-
- for file in `ls debian/*.pod`;\
- do\
- base=`basename $$file .pod`;\
- name=`basename $$base .1 | tr '[a-z]' '[A-Z]'`;\
- pod2man --release=$$VERSION --center "" -n $$name $$file > $$base;\
- done
-
-binary: list-missing
- #checking for missing files
-clean/::
- rm -f *.1
-
-# Makefile arcanery warning:
-# $(dir $(_)) gives us the path containing this rules file.
-# This magic care of Emmet Hickory:
-# (http://lists.debian.org/debian-devel-games/2008/02/msg00135.html)
-
-TEMP_DIR := $(shell mktemp -d)
-SOURCE_DIR = $(shell ls $(TEMP_DIR) | grep sword- | grep .tar.gz | sed s/.tar.gz//)
-SOURCE_VER = $(shell echo $(notdir $(SOURCE_DIR)) | sed s/sword-//)
-
-download-tarball:
- uscan --download --package sword --destdir=$(TEMP_DIR) \
- --no-symlink --upstream-version 0 --watchfile=$(dir $(_))/watch
- cd $(TEMP_DIR) && tar zxf sword-*.tar.gz
-
-remove-unwanted-files: download-tarball
- # zlib is (mostly) an old copy of the zlib library
- # Leave only untgz.c which is needed and not part of zlib
- rm $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/zlib/[a-tv-z]*
- rm $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/zlib/uncompr.c
- rm $(TEMP_DIR)/$(SOURCE_DIR)/include/zlib.h
- # regex.c and regex.h are GNU C library files
- rm $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/regex.c
- rm $(TEMP_DIR)/$(SOURCE_DIR)/include/internal/regex/regex.h
- # src/utilfuns/win32/* are a non-free dirent for Windows
- rm -r $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/win32
- # stdsoap.h is non-free
- rm $(TEMP_DIR)/$(SOURCE_DIR)/bindings/gsoap/include/stdsoap.h
-
-repack-source: remove-unwanted-files
- cd $(TEMP_DIR) && mv $(SOURCE_DIR) $(SOURCE_DIR)+dfsg && \
- tar zcf sword_$(SOURCE_VER)+dfsg.orig.tar.gz \
- $(notdir $(SOURCE_DIR)+dfsg)
-
-get-orig-source: repack-source
- mv $(TEMP_DIR)/sword_$(SOURCE_VER)+dfsg.orig.tar.gz $(CURDIR)
- rm -r $(TEMP_DIR)
+override_dh_auto_install:
+ dh_auto_install -Scmake
+ # if you do python-build in dh_auto_build, it will be rebuild again *sigh*
+ CFLAGS="$(CFLAGS) -Wno-error" dh_auto_configure -Spython_distutils -D$(py)
+ CFLAGS="$(CFLAGS) -Wno-error" dh_auto_build -Spython_distutils -D$(py)
+ CFLAGS="$(CFLAGS) -Wno-error" dh_auto_install -Spython_distutils -D$(py)
+override_dh_install:
+ chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/*so*
+ dh_install --list-missing
+ chmod -x debian/libsword8/usr/share/sword/locales.d/*
+override_dh_strip:
+ dh_strip --dbg-package=libsword-dbg
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ # lintian: python-debug-in-wrong-location, for some value of dh_strip
+ # & pysupport or dh_python2
+ # need to move if using pysupport, no need to move if using dh_python2
+ -mv debian/libsword-dbg/usr/lib/debug/usr/lib/pyshared \
+ debian/libsword-dbg/usr/lib/debug/usr/lib/pymodules
+ dh_installdirs -p python-sword-dbg usr/lib/debug/usr/lib
+ mv debian/libsword-dbg/usr/lib/debug/usr/lib/py* \
+ debian/python-sword-dbg/usr/lib/debug/usr/lib
+endif
+
+override_dh_makeshlibs:
+ dh_makeshlibs -V
+override_dh_clean:
+ dh_clean $(patsubst %.pod, %, $(wildcard debian/man/*.pod))
+
+MAKEFILE = $(firstword $(MAKEFILE_LIST))
+SOURCE_DIR = $(dir $(MAKEFILE))/..
+get-orig-source:
+ chmod +x $(SOURCE_DIR)/debian/dfsg.sh
+ cd $(SOURCE_DIR) && uscan --force-download --rename --destdir .
+
+override_dh_builddeb:
+ dh_builddeb $(if $(ppa),-- -Zlzma)
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
index b61694f..ba1db0e 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
version=3
opts=dversionmangle=s/\+dfsg\d*// \
- http://www.crosswire.org/ftpmirror/pub/sword/source/v([\d\.]+)/sword-(.*)\.tar\.gz
-
+ http://www.crosswire.org/ftpmirror/pub/sword/source/v([\d\.]+)/sword-(.*)\.tar\.gz \
+debian ./debian/dfsg.sh