eclass/freebsd.eclass: Changed to apply upstream patch on WORKDIR
authorYuta Satoh <nigoro.dev@gmail.com>
Wed, 7 Dec 2016 11:01:55 +0000 (20:01 +0900)
committerMichał Górny <mgorny@gentoo.org>
Thu, 15 Dec 2016 12:11:22 +0000 (13:11 +0100)
eclass/freebsd.eclass

index 8f6b204f1f306179f517a0a3f1faafdbbc728d4f..774147007336a6c31f22dd1a4ab0b274b83f1e67 100644 (file)
@@ -141,7 +141,13 @@ freebsd_do_patches() {
                        epatch "${x}"
                done
        fi
-       [[ ${#UPSTREAM_PATCHES[@]} -gt 0 ]] && epatch $(freebsd_upstream_patches -s)
+
+       # Upstream patches need to be applied on WORKDIR.
+       if [[ ${#UPSTREAM_PATCHES[@]} -gt 0 ]] ; then
+               cd "${WORKDIR}" || die
+               epatch $(freebsd_upstream_patches -s)
+               cd "${S}" || die
+       fi
        epatch_user
 }