app-text/sword: Fix automagic dep on clucene
authorChris Reffett <creffett@gentoo.org>
Tue, 14 Nov 2017 14:03:20 +0000 (09:03 -0500)
committerChris Reffett <creffett@gentoo.org>
Tue, 14 Nov 2017 14:04:08 +0000 (09:04 -0500)
Gentoo-Bug: 637398
Package-Manager: Portage-2.3.14, Repoman-2.3.5
RepoMan-Options: --force

app-text/sword/files/sword-1.7.4-configure.patch [new file with mode: 0644]
app-text/sword/metadata.xml
app-text/sword/sword-1.7.4-r1.ebuild [moved from app-text/sword/sword-1.7.4.ebuild with 90% similarity]

diff --git a/app-text/sword/files/sword-1.7.4-configure.patch b/app-text/sword/files/sword-1.7.4-configure.patch
new file mode 100644 (file)
index 0000000..a098add
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/configure
++++ b/configure
+@@ -16893,7 +16895,7 @@
+ # ---------------------------------------------------------------------
+ # NOTE the $libdir hack at the end of the c[xx]flags.  Apparently F16 finds that clucene is not multilib-save and places some include files in /usr/lib[64]/
++if test "x$with_clucene" != "xno"; then
+-with_clucene=no
+ if test "x$CLUCENE2_LIBS" != x; then
+    echo "clucene 2.x found - lucene searching options available"
+    AM_CXXFLAGS="$AM_CXXFLAGS $CLUCENE2_CFLAGS -DUSELUCENE -DCLUCENE2 -I$libdir"
+@@ -16914,6 +16912,11 @@
+    echo "lucene searching options not available"
+ fi
+ fi
++else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: excluding support" >&5
++$as_echo "clucene manually disabled - excluding support" >&6; }
++with_clucene="no"
++fi
+ for ac_func in vsnprintf
+ do :
index dd852d82e5553789d464812071051ca8b06ed1b8..fb9230654d3af36cb9786fa8ee302928ca069e01 100644 (file)
@@ -9,4 +9,7 @@ The SWORD Project is the CrossWire Bible Society's free Bible software
 project. Its purpose is to create tools that allow programmers and Bible
 societies to write new Bible software more quickly and easily.
 </longdescription>
+<use>
+    <flag name="clucene">Use <pkg>dev-cpp/clucene</pkg> for lucene search support</flag>
+</use>
 </pkgmetadata>
similarity index 90%
rename from app-text/sword/sword-1.7.4.ebuild
rename to app-text/sword/sword-1.7.4-r1.ebuild
index 2db87d10461dd309cab471d7d2a86f9246df9c04..be1fa4a331415e82410841dead55c2cfad9bcb9c 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 inherit eutils flag-o-matic
 
 DESCRIPTION="Library for Bible reading software"
@@ -11,11 +11,12 @@ SRC_URI="http://www.crosswire.org/ftpmirror/pub/${PN}/source/v${PV%.*}/${P}.tar.
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~ppc x86 ~x86-fbsd ~ppc-macos"
-IUSE="curl debug doc icu static-libs"
+IUSE="clucene curl debug doc icu static-libs"
 
 RDEPEND="sys-libs/zlib
        curl? ( net-misc/curl )
        icu? ( dev-libs/icu:= )
+       clucene? ( dev-cpp/clucene )
 "
 DEPEND="${RDEPEND}
        virtual/pkgconfig
@@ -39,19 +40,21 @@ src_prepare() {
        DataPath=${EPREFIX}/usr/share/${PN}/
        EOF
        epatch "${FILESDIR}/${PN}-1.7.4-gcc6.patch"
+       epatch "${FILESDIR}/${PN}-1.7.4-configure.patch"
+       eapply_user
 }
 
 src_configure() {
        # TODO: Why is this here and can we remove it?
        strip-flags
-
        econf \
                $(use_enable static-libs static) \
                $(use_enable debug) \
                --with-zlib \
                $(use_with icu) \
                --with-conf \
-               $(use_with curl)
+               $(use_with curl) \
+               $(use_with clucene)
 }
 
 src_install() {