commit:     1069c56a8946a005eadfaebc3c75ab6eceee1bed
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  5 23:19:20 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jul  5 23:20:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1069c56a

net-fs/autofs: fix --as-need issue USE=libtirpc

thanks Martin von Gagern for reporting & the patch

http://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed

Gentoo-Bug: 588106

Package-Manager: portage-2.3.0_rc1

 net-fs/autofs/autofs-5.1.2.ebuild                  |  4 ++++
 .../files/autofs-5.1.2-libtirpc-as-need.patch      | 28 ++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/net-fs/autofs/autofs-5.1.2.ebuild 
b/net-fs/autofs/autofs-5.1.2.ebuild
index 685e0bb..4fb3c61 100644
--- a/net-fs/autofs/autofs-5.1.2.ebuild
+++ b/net-fs/autofs/autofs-5.1.2.ebuild
@@ -47,6 +47,10 @@ DEPEND="${RDEPEND}
 
 CONFIG_CHECK="~AUTOFS4_FS"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-libtirpc-as-need.patch
+)
+
 src_prepare() {
        # Upstream's patchset
        if [[ -n ${PATCH_VER} ]]; then

diff --git a/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch 
b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
new file mode 100644
index 0000000..f6e1769
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
@@ -0,0 +1,28 @@
+Make configure compatible with -Wl,--as-needed following
+https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure
+
+2016-07-05 Martin von Gagern
+
+--- autofs-5.1.2.orig/aclocal.m4
++++ autofs-5.1.2/aclocal.m4
+@@ -413,9 +413,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC],
+ [
+ # save current flags
+ af_check_libtirpc_save_cflags="$CFLAGS"
+-af_check_libtirpc_save_ldflags="$LDFLAGS"
++af_check_libtirpc_save_libs="$LIBS"
+ CFLAGS="$CFLAGS -I/usr/include/tirpc"
+-LDFLAGS="$LDFLAGS -ltirpc"
++LIBS="$LIBS -ltirpc"
+ 
+ AC_TRY_LINK(
+     [ #include <rpc/rpc.h> ],
+@@ -438,7 +438,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna
+ 
+ # restore flags
+ CFLAGS="$af_check_libtirpc_save_cflags"
+-LDFLAGS="$af_check_libtirpc_save_ldflags"
++LIBS="$af_check_libtirpc_save_libs"
+ ])
+ 
+ AC_DEFUN([AF_WITH_LIBTIRPC],

Reply via email to