net-dns/libidn2: fix compilation on Darwin
authorFabian Groffen <grobian@gentoo.org>
Tue, 18 Apr 2017 08:30:08 +0000 (10:30 +0200)
committerFabian Groffen <grobian@gentoo.org>
Tue, 18 Apr 2017 08:30:08 +0000 (10:30 +0200)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

net-dns/libidn2/libidn2-2.0.0-r1.ebuild

index c1c4f3f0ff44a221b82c551807c10568518b5151..cfa974b6bc609b6cdac1e457afda8e7ba1e27ba7 100644 (file)
@@ -27,10 +27,11 @@ DEPEND="
 src_prepare() {
        default
 
-       if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
-               # crude hack, fixed properly for next release, no error.h is present
-               sed -i -e '/#include "error\.h"/d' src/idn2.c || die
-               append-cppflags -D'error\(E,...\)=exit\(E\)'
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # Darwin ar chokes when TMPDIR doesn't exist (as done for some
+               # reason in the Makefile)
+               sed -i -e '/^TMPDIR = /d' Makefile.in || die
+               export TMPDIR="${T}"
        fi
 
        multilib_copy_sources