sys-freebsd/freebsd-lib: Apply sys header fix only for USE=build
authorMichał Górny <mgorny@gentoo.org>
Thu, 1 Mar 2018 14:33:48 +0000 (15:33 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 1 Mar 2018 15:09:39 +0000 (16:09 +0100)
The 'sys' directory is not extracted with USE=-build, so apply the patch
only when there's something to patch. Not that I have any clue how
this is going to work at all with USE=-build.

sys-freebsd/freebsd-lib/freebsd-lib-11.1-r1.ebuild

index e28f2420c1f1d11fef989119beb996c66126b36a..6e8b27343dc968bc5381b7847d9074ade70ca260 100644 (file)
@@ -174,7 +174,6 @@ src_prepare() {
        # patches "${WORKDIR}/include"
        cd "${WORKDIR}"
        epatch "${FILESDIR}/${PN}-includes.patch"
-       epatch "${FILESDIR}/${PN}-11.1-elf-nhdr.patch"
 
        # Don't install the hesiod man page or header
        rm "${WORKDIR}"/include/hesiod.h || die
@@ -221,6 +220,7 @@ src_prepare() {
                # This patch has to be applied on ${WORKDIR}/sys, so we do it here since it
                # shouldn't be a symlink to /usr/src/sys (which should be already patched)
                epatch "${FILESDIR}"/freebsd-sources-9.0-sysctluint.patch
+               epatch "${FILESDIR}/${PN}-11.1-elf-nhdr.patch"
                return 0
        fi