dev-db/qdbm: fix build
authorAkinori Hattori <hattya@gentoo.org>
Thu, 30 Mar 2017 14:26:43 +0000 (23:26 +0900)
committerAkinori Hattori <hattya@gentoo.org>
Thu, 30 Mar 2017 14:26:43 +0000 (23:26 +0900)
Gentoo-Bug: 584998

Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-db/qdbm/files/qdbm-configure.patch [new file with mode: 0644]
dev-db/qdbm/qdbm-1.8.78-r1.ebuild

diff --git a/dev-db/qdbm/files/qdbm-configure.patch b/dev-db/qdbm/files/qdbm-configure.patch
new file mode 100644 (file)
index 0000000..364c5c9
--- /dev/null
@@ -0,0 +1,108 @@
+--- a/cgi/configure.in
++++ b/cgi/configure.in
+@@ -13,15 +13,6 @@
+ # Export variables
+ TARGETS="all"
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ #================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -20,15 +20,6 @@
+ LD="ld"
+ AR="ar"
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ #================================================================
+--- a/java/configure.in
++++ b/java/configure.in
+@@ -25,15 +25,6 @@
+ MYOPTS=""
+ LD="ld"
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ #================================================================
+--- a/perl/configure.in
++++ b/perl/configure.in
+@@ -5,15 +5,6 @@
+ # Targets
+ AC_INIT(qdbm-perl, 1.0.0)
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
+--- a/plus/configure.in
++++ b/plus/configure.in
+@@ -19,15 +19,6 @@
+ LD="ld"
+ AR="ar"
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ #================================================================
+--- a/ruby/configure.in
++++ b/ruby/configure.in
+@@ -5,15 +5,6 @@
+ # Targets
+ AC_INIT(qdbm-ruby, 1.0.0)
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
index 6f6bd6fc00d25a30d44866212bf610f87b4286be..cbde7564d40f26672763ffbd755d05293ea58d11 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI="6"
 
-inherit java-pkg-opt-2 perl-functions
+inherit autotools java-pkg-opt-2 perl-functions
 
 DESCRIPTION="Quick Database Manager"
 HOMEPAGE="http://fallabs.com/qdbm/"
@@ -24,12 +24,15 @@ DEPEND="${RDEPEND}
        java? ( >=virtual/jdk-1.4:* )"
 
 PATCHES=(
+       "${FILESDIR}"/${PN}-configure.patch
        "${FILESDIR}"/${PN}-perl.patch
        "${FILESDIR}"/${PN}-ruby19.patch
        "${FILESDIR}"/${PN}-runpath.patch
 )
 HTML_DOCS=( doc/. )
 
+AT_NOELIBTOOLIZE="yes"
+
 qdbm_foreach_api() {
        local u
        for u in cxx java perl ruby; do
@@ -42,6 +45,10 @@ qdbm_foreach_api() {
                fi
                cd "${u}"
                case "${EBUILD_PHASE}" in
+               prepare)
+                       mv configure.{in,ac}
+                       eautoreconf
+                       ;;
                configure)
                        case "${u}" in
                        cgi|java|plus)
@@ -75,8 +82,13 @@ src_prepare() {
                -e "/^CXXFLAGS/s|$| ${CXXFLAGS}|" \
                -e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
                -e 's/make\( \|$\)/$(MAKE)\1/g' \
+               -e '/^debug/,/^$/s/LDFLAGS="[^"]*" //' \
                Makefile.in {cgi,java,perl,plus,ruby}/Makefile.in
        find -name "*~" -delete
+
+       mv configure.{in,ac}
+       eautoreconf
+       qdbm_foreach_api
 }
 
 src_configure() {