diff options
author | Dmitrijs Ledkovs <xnox@debian.org> | 2013-08-04 19:20:31 +0100 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:08 -0400 |
commit | b4c654dae88de29bf3dd14294049c192160d07ff (patch) | |
tree | b52af55a4feed6d8939f18b77453fc6336040875 | |
parent | 444809607c3a05c1b690a644cd147d1e9c51762a (diff) |
Imported Debian patch 1.6.2+dfsg-6
-rw-r--r-- | debian/changelog | 16 | ||||
-rw-r--r-- | debian/control | 3 | ||||
-rw-r--r-- | debian/patches/12_fix_compiler_warnings.diff | 13 | ||||
-rw-r--r-- | debian/patches/2661.patch | 102 | ||||
-rw-r--r-- | debian/patches/dso-missing-shared.patch | 15 | ||||
-rw-r--r-- | debian/patches/multiarch-clucene.patch | 13 | ||||
-rw-r--r-- | debian/patches/no-included-zconf.h.diff | 292 | ||||
-rw-r--r-- | debian/patches/series | 4 | ||||
-rwxr-xr-x | debian/rules | 3 |
9 files changed, 446 insertions, 15 deletions
diff --git a/debian/changelog b/debian/changelog index a5e306a..dd92080 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +sword (1.6.2+dfsg-6) unstable; urgency=low + + [ Rene Engelhard ] + * fix FTBFS: remove include/zconf.h and don't rely on it (closes: #707537) + + [ Dmitrijs Ledkovs ] + * Add patch to build against clucene-core 2. + + -- Dmitrijs Ledkovs <xnox@debian.org> Sun, 04 Aug 2013 19:20:31 +0100 + +sword (1.6.2+dfsg-5ubuntu1) raring; urgency=low + + * Build against clucene-core 2. + + -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Wed, 21 Nov 2012 01:45:59 +0000 + sword (1.6.2+dfsg-5) unstable; urgency=low * Fix FTBFS due to icu changes (Closes: #676097). diff --git a/debian/control b/debian/control index 730380a..0a4107c 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,8 @@ Build-Depends: debhelper (>= 7.0.50~), perl Section: libs Priority: optional -Maintainer: CrossWire Packages <pkg-crosswire-devel@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: CrossWire Packages <pkg-crosswire-devel@lists.alioth.debian.org> Uploaders: Daniel Glassey <wdg@debian.org>, Dmitrijs Ledkovs <xnox@debian.org>, Jonathan Marsden <jmarsden@fastmail.fm> diff --git a/debian/patches/12_fix_compiler_warnings.diff b/debian/patches/12_fix_compiler_warnings.diff index de1970c..9822dcc 100644 --- a/debian/patches/12_fix_compiler_warnings.diff +++ b/debian/patches/12_fix_compiler_warnings.diff @@ -1172,19 +1172,6 @@ Index: debian/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 diff --git a/debian/patches/2661.patch b/debian/patches/2661.patch new file mode 100644 index 0000000..19214f2 --- /dev/null +++ b/debian/patches/2661.patch @@ -0,0 +1,102 @@ +Description: Commiting patch from GHellings to support both CLucene 0.9x and 2.x + Leaving the CMake stuff for Greg to commit himself so CMake blame stays with him ;) +Origin: commit, revision id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2661, + http://thread.gmane.org/gmane.comp.literature.sword.devel/21816 +Author: scribe, Tom Callaway, Deji Akingunola +Last-Update: 2011-10-29 +X-Bzr-Revision-Id: svn-v4:bcd7d363-81e1-0310-97ec-a550e20fc99c:trunk:2661 + +=== modified file 'src/modules/swmodule.cpp' +--- a/src/modules/swmodule.cpp ++++ b/src/modules/swmodule.cpp +@@ -40,7 +40,6 @@ + + #ifdef USELUCENE + #include <CLucene.h> +-#include <CLucene/CLBackwards.h> + + //Lucence includes + //#include "CLucene.h" +@@ -59,6 +58,9 @@ + + using std::vector; + ++extern size_t lucene_utf8towcs(wchar_t *, const char *, size_t maxslen); ++extern size_t lucene_wcstoutf8 (char *, const wchar_t *, size_t maxslen); ++ + SWORD_NAMESPACE_START + + SWDisplay SWModule::rawdisp; +@@ -1144,7 +1146,7 @@ + + lucene_utf8towcs(wcharBuffer, keyText, MAX_CONV_SIZE); //keyText must be utf8 + // doc->add( *(new Field("key", wcharBuffer, Field::STORE_YES | Field::INDEX_TOKENIZED))); +- doc->add( *Field::Text(_T("key"), wcharBuffer ) ); ++ doc->add(*_CLNEW Field(_T("key"), wcharBuffer, Field::STORE_YES | Field::INDEX_TOKENIZED) ); + + + if (includeKeyInSearch) { +@@ -1155,11 +1157,11 @@ + } + + lucene_utf8towcs(wcharBuffer, content, MAX_CONV_SIZE); //content must be utf8 +- doc->add( *Field::UnStored(_T("content"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("content"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED)); + + if (strong.length() > 0) { + lucene_utf8towcs(wcharBuffer, strong, MAX_CONV_SIZE); +- doc->add( *Field::UnStored(_T("lemma"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("lemma"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) ); + //printf("setting fields (%s).\ncontent: %s\nlemma: %s\n", (const char *)*key, content, strong.c_str()); + } + +@@ -1280,12 +1282,12 @@ + + //printf("proxBuf after (%s).\nprox: %s\nproxLem: %s\n", (const char *)*key, proxBuf.c_str(), proxLem.c_str()); + +- doc->add( *Field::UnStored(_T("prox"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("prox"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) ); + good = true; + } + if (proxLem.length() > 0) { + lucene_utf8towcs(wcharBuffer, proxLem, MAX_CONV_SIZE); //keyText must be utf8 +- doc->add( *Field::UnStored(_T("proxlem"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("proxlem"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) ); + good = true; + } + if (good) { +@@ -1303,20 +1305,32 @@ + //coreWriter->optimize(); + coreWriter->close(); + ++#ifdef CLUCENE2 ++ d = FSDirectory::getDirectory(target.c_str()); ++#endif + if (IndexReader::indexExists(target.c_str())) { ++#ifndef CLUCENE2 + d = FSDirectory::getDirectory(target.c_str(), false); ++#endif + if (IndexReader::isLocked(d)) { + IndexReader::unlock(d); + } +- + fsWriter = new IndexWriter( d, an, false); +- } else { ++ } ++ else { ++#ifndef CLUCENE2 + d = FSDirectory::getDirectory(target.c_str(), true); ++#endif + fsWriter = new IndexWriter(d, an, true); + } + + Directory *dirs[] = { ramDir, 0 }; ++#ifdef CLUCENE2 ++ lucene::util::ConstValueArray< lucene::store::Directory *>dirsa(dirs, 1); ++ fsWriter->addIndexes(dirsa); ++#else + fsWriter->addIndexes(dirs); ++#endif + fsWriter->close(); + + delete ramDir; diff --git a/debian/patches/dso-missing-shared.patch b/debian/patches/dso-missing-shared.patch new file mode 100644 index 0000000..94b540b --- /dev/null +++ b/debian/patches/dso-missing-shared.patch @@ -0,0 +1,15 @@ +Description: clucene-shared is missing +Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> +Bug-Debian: http://bugs.debian.org/707537 + +--- sword-1.6.2+dfsg.orig/CMakeLists.txt ++++ sword-1.6.2+dfsg/CMakeLists.txt +@@ -162,7 +162,7 @@ IF(WITH_CURL) + ENDIF(WITH_CURL) + IF(WITH_CLUCENE) + INCLUDE_DIRECTORIES(${CLUCENE_INCLUDE_DIR}) +- SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${CLUCENE_LIBRARY}) ++ SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${CLUCENE_LIBRARY} -lclucene-shared) + LINK_DIRECTORIES(${CLUCENE_LIBRARY_DIR}) + ADD_DEFINITIONS(-DUSELUCENE) + IF(CLUCENE2) diff --git a/debian/patches/multiarch-clucene.patch b/debian/patches/multiarch-clucene.patch new file mode 100644 index 0000000..1693a1a --- /dev/null +++ b/debian/patches/multiarch-clucene.patch @@ -0,0 +1,13 @@ +Description: add multiarch location +Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> + +--- sword-1.6.2+dfsg.orig/cmake/FindCLucene.cmake ++++ sword-1.6.2+dfsg/cmake/FindCLucene.cmake +@@ -46,6 +46,7 @@ SET(TRIAL_LIBRARY_PATHS + /opt/local/lib${LIB_SUFFIX} + /usr/lib${LIB_SUFFIX} + /usr/lib64 ++ /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} + /sw/lib${LIB_SUFFIX} + /usr/pkg/lib${LIB_SUFFIX} + ${WIN_CLUCENE_SEARCH_PATH} diff --git a/debian/patches/no-included-zconf.h.diff b/debian/patches/no-included-zconf.h.diff new file mode 100644 index 0000000..8286ead --- /dev/null +++ b/debian/patches/no-included-zconf.h.diff @@ -0,0 +1,292 @@ +--- a/include/zconf.h 2005-01-01 05:42:26.000000000 +0100 ++++ /dev/null 2012-07-03 16:36:49.000000000 +0200 +@@ -1,279 +0,0 @@ +-/* zconf.h -- configuration of the zlib compression library +- * Copyright (C) 1995-2002 Jean-loup Gailly. +- * For conditions of distribution and use, see copyright notice in zlib.h +- */ +- +-/* @(#) $Id: zconf.h 1688 2005-01-01 04:42:26Z scribe $ */ +- +-#ifndef _ZCONF_H +-#define _ZCONF_H +- +-/* +- * If you *really* need a unique prefix for all types and library functions, +- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. +- */ +-#ifdef Z_PREFIX +-# define deflateInit_ z_deflateInit_ +-# define deflate z_deflate +-# define deflateEnd z_deflateEnd +-# define inflateInit_ z_inflateInit_ +-# define inflate z_inflate +-# define inflateEnd z_inflateEnd +-# define deflateInit2_ z_deflateInit2_ +-# define deflateSetDictionary z_deflateSetDictionary +-# define deflateCopy z_deflateCopy +-# define deflateReset z_deflateReset +-# define deflateParams z_deflateParams +-# define inflateInit2_ z_inflateInit2_ +-# define inflateSetDictionary z_inflateSetDictionary +-# define inflateSync z_inflateSync +-# define inflateSyncPoint z_inflateSyncPoint +-# define inflateReset z_inflateReset +-# define compress z_compress +-# define compress2 z_compress2 +-# define uncompress z_uncompress +-# define adler32 z_adler32 +-# define crc32 z_crc32 +-# define get_crc_table z_get_crc_table +- +-# define Byte z_Byte +-# define uInt z_uInt +-# define uLong z_uLong +-# define Bytef z_Bytef +-# define charf z_charf +-# define intf z_intf +-# define uIntf z_uIntf +-# define uLongf z_uLongf +-# define voidpf z_voidpf +-# define voidp z_voidp +-#endif +- +-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +-# define WIN32 +-#endif +-#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) +-# ifndef __32BIT__ +-# define __32BIT__ +-# endif +-#endif +-#if defined(__MSDOS__) && !defined(MSDOS) +-# define MSDOS +-#endif +- +-/* +- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more +- * than 64k bytes at a time (needed on systems with 16-bit int). +- */ +-#if defined(MSDOS) && !defined(__32BIT__) +-# define MAXSEG_64K +-#endif +-#ifdef MSDOS +-# define UNALIGNED_OK +-#endif +- +-#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) +-# define STDC +-#endif +-#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) +-# ifndef STDC +-# define STDC +-# endif +-#endif +- +-#ifndef STDC +-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +-# define const +-# endif +-#endif +- +-/* Some Mac compilers merge all .h files incorrectly: */ +-#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) +-# define NO_DUMMY_DECL +-#endif +- +-/* Old Borland C incorrectly complains about missing returns: */ +-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) +-# define NEED_DUMMY_RETURN +-#endif +- +- +-/* Maximum value for memLevel in deflateInit2 */ +-#ifndef MAX_MEM_LEVEL +-# ifdef MAXSEG_64K +-# define MAX_MEM_LEVEL 8 +-# else +-# define MAX_MEM_LEVEL 9 +-# endif +-#endif +- +-/* Maximum value for windowBits in deflateInit2 and inflateInit2. +- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files +- * created by gzip. (Files created by minigzip can still be extracted by +- * gzip.) +- */ +-#ifndef MAX_WBITS +-# define MAX_WBITS 15 /* 32K LZ77 window */ +-#endif +- +-/* The memory requirements for deflate are (in bytes): +- (1 << (windowBits+2)) + (1 << (memLevel+9)) +- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) +- plus a few kilobytes for small objects. For example, if you want to reduce +- the default memory requirements from 256K to 128K, compile with +- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" +- Of course this will generally degrade compression (there's no free lunch). +- +- The memory requirements for inflate are (in bytes) 1 << windowBits +- that is, 32K for windowBits=15 (default value) plus a few kilobytes +- for small objects. +-*/ +- +- /* Type declarations */ +- +-#ifndef OF /* function prototypes */ +-# ifdef STDC +-# define OF(args) args +-# else +-# define OF(args) () +-# endif +-#endif +- +-/* The following definitions for FAR are needed only for MSDOS mixed +- * model programming (small or medium model with some far allocations). +- * This was tested only with MSC; for other MSDOS compilers you may have +- * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, +- * just define FAR to be empty. +- */ +-#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) +- /* MSC small or medium model */ +-# define SMALL_MEDIUM +-# ifdef _MSC_VER +-# define FAR _far +-# else +-# define FAR far +-# endif +-#endif +-#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) +-# ifndef __32BIT__ +-# define SMALL_MEDIUM +-# define FAR _far +-# endif +-#endif +- +-/* Compile with -DZLIB_DLL for Windows DLL support */ +-#if defined(ZLIB_DLL) +-# if defined(_WINDOWS) || defined(WINDOWS) +-# ifdef FAR +-# undef FAR +-# endif +-# include <windows.h> +-# define ZEXPORT WINAPI +-# ifdef WIN32 +-# define ZEXPORTVA WINAPIV +-# else +-# define ZEXPORTVA FAR _cdecl _export +-# endif +-# endif +-# if defined (__BORLANDC__) +-# if (__BORLANDC__ >= 0x0500) && defined (WIN32) +-# include <windows.h> +-# define ZEXPORT __declspec(dllexport) WINAPI +-# define ZEXPORTRVA __declspec(dllexport) WINAPIV +-# else +-# if defined (_Windows) && defined (__DLL__) +-# define ZEXPORT _export +-# define ZEXPORTVA _export +-# endif +-# endif +-# endif +-#endif +- +-#if defined (__BEOS__) +-# if defined (ZLIB_DLL) +-# define ZEXTERN extern __declspec(dllexport) +-# else +-# define ZEXTERN extern __declspec(dllimport) +-# endif +-#endif +- +-#ifndef ZEXPORT +-# define ZEXPORT +-#endif +-#ifndef ZEXPORTVA +-# define ZEXPORTVA +-#endif +-#ifndef ZEXTERN +-# define ZEXTERN extern +-#endif +- +-#ifndef FAR +-# define FAR +-#endif +- +-#if !defined(MACOS) && !defined(TARGET_OS_MAC) && !defined(VCL) +-typedef unsigned char Byte; /* 8 bits */ +-#endif +-typedef unsigned int uInt; /* 16 bits or more */ +-typedef unsigned long uLong; /* 32 bits or more */ +- +-#ifdef SMALL_MEDIUM +- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +-# define Bytef Byte FAR +-#else +- typedef unsigned char FAR Bytef; +-#endif +-typedef char FAR charf; +-typedef int FAR intf; +-typedef uInt FAR uIntf; +-typedef uLong FAR uLongf; +- +-#ifdef STDC +- typedef void FAR *voidpf; +- typedef void *voidp; +-#else +- typedef Byte FAR *voidpf; +- typedef Byte *voidp; +-#endif +- +-#ifdef HAVE_UNISTD_H +-# include <sys/types.h> /* for off_t */ +-# include <unistd.h> /* for SEEK_* and off_t */ +-# define z_off_t off_t +-#endif +-#ifndef SEEK_SET +-# define SEEK_SET 0 /* Seek from beginning of file. */ +-# define SEEK_CUR 1 /* Seek from current position. */ +-# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +-#endif +-#ifndef z_off_t +-# define z_off_t long +-#endif +- +-/* MVS linker does not support external names larger than 8 bytes */ +-#if defined(__MVS__) +-# pragma map(deflateInit_,"DEIN") +-# pragma map(deflateInit2_,"DEIN2") +-# pragma map(deflateEnd,"DEEND") +-# pragma map(inflateInit_,"ININ") +-# pragma map(inflateInit2_,"ININ2") +-# pragma map(inflateEnd,"INEND") +-# pragma map(inflateSync,"INSY") +-# pragma map(inflateSetDictionary,"INSEDI") +-# pragma map(inflate_blocks,"INBL") +-# pragma map(inflate_blocks_new,"INBLNE") +-# pragma map(inflate_blocks_free,"INBLFR") +-# pragma map(inflate_blocks_reset,"INBLRE") +-# pragma map(inflate_codes_free,"INCOFR") +-# pragma map(inflate_codes,"INCO") +-# pragma map(inflate_fast,"INFA") +-# pragma map(inflate_flush,"INFLU") +-# pragma map(inflate_mask,"INMA") +-# pragma map(inflate_set_dictionary,"INSEDI2") +-# pragma map(inflate_copyright,"INCOPY") +-# pragma map(inflate_trees_bits,"INTRBI") +-# pragma map(inflate_trees_dynamic,"INTRDY") +-# pragma map(inflate_trees_fixed,"INTRFI") +-# pragma map(inflate_trees_free,"INTRFR") +-#endif +- +-#endif /* _ZCONF_H */ +--- a/cmake/sources.cmake-old 2013-08-04 17:07:19.448157271 +0200 ++++ b/cmake/sources.cmake 2013-08-04 17:07:29.192157017 +0200 +@@ -383,7 +383,6 @@ + include/versekey.h + include/versetreekey.h + include/zcom.h +- include/zconf.h + include/zipcomprs.h + include/zld.h + include/zstr.h diff --git a/debian/patches/series b/debian/patches/series index a3afc62..0b77828 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,7 @@ 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 diff --git a/debian/rules b/debian/rules index 9b728c8..89b2761 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,8 @@ override_dh_auto_configure: -DLIBSWORD_SOVERSION=9 \ -DSWORD_GLOBAL_CONF_DIR='/etc' \ -DCMAKE_BUILD_TYPE=NONE \ - -DSWORD_BUILD_TESTS="Yes" + -DSWORD_BUILD_TESTS="Yes" \ + -DCLucene_FIND_REQUIRED="Yes" debian/man/%.1: debian/man/%.1.pod pod2man --release="SWORD $(ver)" --center "Sword Module Utilities" $< > $@ override_dh_auto_build: $(basename $(wildcard debian/man/*.pod)) |