diff options
author | Fabian Groffen <grobian@gentoo.org> | 2016-07-04 14:24:02 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2016-07-04 14:25:00 +0200 |
commit | bfd0d5d8b0839284b65841332be32b99e6b84441 (patch) | |
tree | f5f846bae6ff91029ff7a117f550b7d4b1a4045e /net-analyzer | |
parent | sys-process/at-3.1.18-r1: add alpha keyword (diff) | |
download | gentoo-bfd0d5d8b0839284b65841332be32b99e6b84441.tar.gz gentoo-bfd0d5d8b0839284b65841332be32b99e6b84441.tar.bz2 gentoo-bfd0d5d8b0839284b65841332be32b99e6b84441.zip |
net-analyzer/openbsd-netcat: undo Linuxification on Darwin
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild index c4d9efa17197..f20c5c3d5566 100644 --- a/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild @@ -4,7 +4,7 @@ EAPI=6 -inherit toolchain-funcs +inherit toolchain-funcs flag-o-matic DESCRIPTION="The OpenBSD network swiss army knife" HOMEPAGE="http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/" @@ -12,11 +12,12 @@ SRC_URI="http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz" LICENSE="BSD" SLOT="0" +IUSE="elibc_Darwin" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x64-macos" DEPEND="virtual/pkgconfig" -RDEPEND="dev-libs/libbsd +RDEPEND="!elibc_Darwin? ( dev-libs/libbsd ) !net-analyzer/netcat !net-analyzer/netcat6 " @@ -25,6 +26,16 @@ S=${WORKDIR}/netcat-openbsd-${PV} PATCHES=( "${WORKDIR}/debian/patches" ) +src_prepare() { + default + if [[ ${CHOST} == *-darwin* ]] ; then + # Darwin = BSD, so remove libbsd dependency + sed -i -e '/#include/s|bsd/||' -e 's/strtonum/strtoimax/' *.[ch] || die + # Clang defaults to C99, but strtoimax isn't in C99 + append-flags -DIPTOS_LOWCOST=0x02 -std=c89 + fi +} + src_compile() { emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die } |