From 5259568a8933329cc89ac4f5b282f9b14365d1ad Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 7 Feb 2017 12:02:44 +0100 Subject: [PATCH] xapian patch to not use hardcoded '-lz' option. zlib may be installed under the libzlibstatic.a or libzlib.dll.so names. xapian correctly detect those name but use '-lz' option for xapian_inspec binary. --- kiwix-build.py | 3 ++- patches/xapian_no_hardcode_lz.patch | 34 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 patches/xapian_no_hardcode_lz.patch diff --git a/kiwix-build.py b/kiwix-build.py index 711d9b8..0953bc4 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -781,7 +781,8 @@ class Xapian(Dependency): class Source(ReleaseDownload): archive = Remotefile('xapian-core-1.4.0.tar.xz', '10584f57112aa5e9c0e8a89e251aecbf7c582097638bfee79c1fe39a8b6a6477') - patches = ["xapian_pkgconfig.patch"] + patches = ["xapian_pkgconfig.patch", + "xapian_no_hardcode_lz.patch"] class Builder(MakeBuilder): configure_option = "--disable-sse --disable-backend-inmemory --disable-documentation" diff --git a/patches/xapian_no_hardcode_lz.patch b/patches/xapian_no_hardcode_lz.patch new file mode 100644 index 0000000..705f4db --- /dev/null +++ b/patches/xapian_no_hardcode_lz.patch @@ -0,0 +1,34 @@ +diff -ur xapian-core-1.4.0/bin/Makefile.mk xapian-core-1.4.0.no_lz/bin/Makefile.mk +--- xapian-core-1.4.0/bin/Makefile.mk 2016-06-25 17:36:49.000000000 +0200 ++++ xapian-core-1.4.0.no_lz/bin/Makefile.mk 2017-02-07 11:15:10.166507000 +0100 +@@ -66,7 +66,7 @@ + unicode/unicode-data.cc\ + unicode/utf8itor.cc + +-bin_xapian_inspect_LDADD = $(ldflags) libgetopt.la -lz ++bin_xapian_inspect_LDADD = $(ldflags) libgetopt.la $(libxapian_la) + + bin_xapian_progsrv_SOURCES = bin/xapian-progsrv.cc + bin_xapian_progsrv_LDADD = $(ldflags) libgetopt.la $(libxapian_la) +diff -ur xapian-core-1.4.0/Makefile.in xapian-core-1.4.0.no_lz/Makefile.in +--- xapian-core-1.4.0/Makefile.in 2016-06-25 17:39:28.000000000 +0200 ++++ xapian-core-1.4.0.no_lz/Makefile.in 2017-02-07 11:27:21.050507000 +0100 +@@ -707,7 +707,8 @@ + unicode/bin_xapian_inspect-unicode-data.$(OBJEXT) \ + unicode/bin_xapian_inspect-utf8itor.$(OBJEXT) + bin_xapian_inspect_OBJECTS = $(am_bin_xapian_inspect_OBJECTS) +-bin_xapian_inspect_DEPENDENCIES = $(am__DEPENDENCIES_1) libgetopt.la ++bin_xapian_inspect_DEPENDENCIES = $(am__DEPENDENCIES_1) libgetopt.la \ ++ $(libxapian_la) + am_bin_xapian_progsrv_OBJECTS = bin/xapian-progsrv.$(OBJEXT) + bin_xapian_progsrv_OBJECTS = $(am_bin_xapian_progsrv_OBJECTS) + bin_xapian_progsrv_DEPENDENCIES = $(am__DEPENDENCIES_1) libgetopt.la \ +@@ -1405,7 +1406,7 @@ + unicode/unicode-data.cc\ + unicode/utf8itor.cc + +-bin_xapian_inspect_LDADD = $(ldflags) libgetopt.la -lz ++bin_xapian_inspect_LDADD = $(ldflags) libgetopt.la $(libxapian_la) + bin_xapian_progsrv_SOURCES = bin/xapian-progsrv.cc + bin_xapian_progsrv_LDADD = $(ldflags) libgetopt.la $(libxapian_la) + bin_xapian_replicate_SOURCES = bin/xapian-replicate.cc