From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 384C813829C for ; Wed, 1 Jun 2016 04:06:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 986B6234006; Wed, 1 Jun 2016 04:06:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 464A3234006 for ; Wed, 1 Jun 2016 04:06:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 11F2C33D3D0 for ; Wed, 1 Jun 2016 04:06:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EC5E016 for ; Wed, 1 Jun 2016 04:06:31 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1464753962.cf759e3b000d92683cc0c200cebaea448aadb484.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/iputils/iputils-20151218.ebuild net-misc/iputils/iputils-99999999.ebuild X-VCS-Directories: net-misc/iputils/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: cf759e3b000d92683cc0c200cebaea448aadb484 X-VCS-Branch: master Date: Wed, 1 Jun 2016 04:06:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5e4a25d3-15fe-485e-aa9b-13605f93134a X-Archives-Hash: 9d36258a269b6babda1539aaaeacb601 commit: cf759e3b000d92683cc0c200cebaea448aadb484 Author: Mike Frysinger gentoo org> AuthorDate: Wed Jun 1 04:06:02 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Jun 1 04:06:02 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf759e3b net-misc/iputils: make -lresolv linkage dynamic #584132 net-misc/iputils/iputils-20151218.ebuild | 9 +++++++++ net-misc/iputils/iputils-99999999.ebuild | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/net-misc/iputils/iputils-20151218.ebuild b/net-misc/iputils/iputils-20151218.ebuild index 1f283fa..03be077 100644 --- a/net-misc/iputils/iputils-20151218.ebuild +++ b/net-misc/iputils/iputils-20151218.ebuild @@ -82,6 +82,14 @@ src_configure() { use ipv6 || IPV6_TARGETS=() } +ldflag_resolv() { + # See if the system includes a libresolv. #584132 + echo "main(){}" > "${T}"/resolv.c + if ${CC} ${CFLAGS} ${LDFLAGS} "${T}"/resolv.c -lresolv -o "${T}"/resolv 2>/dev/null ; then + echo -lresolv + fi +} + src_compile() { tc-export CC emake \ @@ -89,6 +97,7 @@ src_compile() { USE_IDN=$(usex idn) \ USE_GCRYPT=$(usex gcrypt) \ USE_CRYPTO=$(usex ssl) \ + LDFLAG_RESOLV=$(ldflag_resolv) \ IPV4_TARGETS="${IPV4_TARGETS[*]}" \ IPV6_TARGETS="${IPV6_TARGETS[*]}" diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild index 09b9ad1..8276b43 100644 --- a/net-misc/iputils/iputils-99999999.ebuild +++ b/net-misc/iputils/iputils-99999999.ebuild @@ -82,6 +82,14 @@ src_configure() { use ipv6 || IPV6_TARGETS=() } +ldflag_resolv() { + # See if the system includes a libresolv. #584132 + echo "main(){}" > "${T}"/resolv.c + if ${CC} ${CFLAGS} ${LDFLAGS} "${T}"/resolv.c -lresolv -o "${T}"/resolv 2>/dev/null ; then + echo -lresolv + fi +} + src_compile() { tc-export CC emake \ @@ -89,6 +97,7 @@ src_compile() { USE_IDN=$(usex idn) \ USE_GCRYPT=$(usex gcrypt) \ USE_CRYPTO=$(usex ssl) \ + LDFLAG_RESOLV=$(ldflag_resolv) \ IPV4_TARGETS="${IPV4_TARGETS[*]}" \ IPV6_TARGETS="${IPV6_TARGETS[*]}"