dev-db/kyotocabinet: Fix gcc6 support (#594064 by Peter Levine), port to eapi6, use...
authorPacho Ramos <pacho@gentoo.org>
Sat, 8 Apr 2017 10:06:47 +0000 (12:06 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sat, 8 Apr 2017 10:28:03 +0000 (12:28 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch [new file with mode: 0644]
dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild

diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch
new file mode 100644 (file)
index 0000000..3bcc6a2
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/kcdbext.h
++++ b/kcdbext.h
+@@ -1278,7 +1278,7 @@
+     if (omode_ == 0) {
+       set_error(_KCCODELINE_, BasicDB::Error::INVALID, "not opened");
+       *sp = 0;
+-      return false;
++      return NULL;
+     }
+     if (!cache_) return db_.get(kbuf, ksiz, sp);
+     size_t dvsiz = 0;
index d1cee461ef96a79996f44d9595bd1f3fa5c53270..4b7d4de72a8f76c0e132e4ff4eb4c3392feb3598 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
-inherit autotools eutils toolchain-funcs
+inherit autotools ltprune toolchain-funcs
 
 DESCRIPTION="A straightforward implementation of DBM"
 HOMEPAGE="http://fallabs.com/kyotocabinet/"
@@ -18,13 +18,20 @@ DEPEND="sys-libs/zlib[static-libs?]
        app-arch/xz-utils[static-libs?]"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+       "${FILESDIR}"/fix_configure-1.2.62.patch
+       "${FILESDIR}"/${PN}-1.2.76-configure-8-byte-atomics.patch
+       "${FILESDIR}"/${PN}-1.2.76-flags.patch
+       "${FILESDIR}"/${PN}-1.2.76-gcc6.patch
+)
+
 src_prepare() {
-       epatch "${FILESDIR}"/fix_configure-1.2.62.patch
-       epatch "${FILESDIR}"/${PN}-1.2.76-configure-8-byte-atomics.patch
-       epatch "${FILESDIR}"/${PN}-1.2.76-flags.patch
+       default
+
        sed -i -e "/DOCDIR/d" Makefile.in || die
        tc-export AR
 
+       mv configure.in configure.ac || die
        eautoreconf
 }
 
@@ -32,7 +39,7 @@ src_configure() {
        econf $(use_enable debug) \
                $(use_enable static-libs static) \
                $(use_enable !static-libs shared) \
-               --enable-lzma --docdir=/usr/share/doc/${PF}
+               --enable-lzma
 }
 
 src_test() {
@@ -40,8 +47,7 @@ src_test() {
 }
 
 src_install() {
-       emake DESTDIR="${D}" install
-
+       default
        prune_libtool_files
 
        if use examples; then