aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorflo <flo@FreeBSD.org>2011-08-20 07:16:47 +0800
committerflo <flo@FreeBSD.org>2011-08-20 07:16:47 +0800
commit4f88c37ad288567eea639cc0e099a57fdfecef8a (patch)
tree3ba3907b8d4db9c45ff2dbab62ade31f37618211 /Mk
parentdbcacad2ae8199d9700673a137b4b01c42fa76f6 (diff)
downloadfreebsd-ports-gnome-4f88c37ad288567eea639cc0e099a57fdfecef8a.tar.gz
freebsd-ports-gnome-4f88c37ad288567eea639cc0e099a57fdfecef8a.tar.zst
freebsd-ports-gnome-4f88c37ad288567eea639cc0e099a57fdfecef8a.zip
fix installation of gecko ports after 1.34. On FreeBSD versions < 800081
libarchive has a bug in the s modifier of -s where it would not rewrite symlinks e.g. /usr/local/bin/firefox would still point to /usr/ports/www/firefox/work/fake/lib/firefox/firefox Instead of forcing a dependency on archivers/libarchive use a creative workaround and rewrite the symlinks. This workaround should be removed once we drop support for FreeBSD 7 Reported by: naddy Submitted by: <ttsestt@gmail.com>
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.gecko.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk
index 7bd0d36dce6d..681dd6fd7191 100644
--- a/Mk/bsd.gecko.mk
+++ b/Mk/bsd.gecko.mk
@@ -898,6 +898,13 @@ gecko-do-install:
${TAR} cf - -C${FAKEDIR}/${dir} -s'|${FAKEDIR}|${PREFIX}|s' . | \
${TAR} xof - -C${PREFIX}/${dir}
.endfor
+.if (${OSVERSION} < 800081 )
+ # XXX: make sure bsdtar(1) corrected symlinks
+ ${FIND} ${FAKEDIR} -type l -exec \
+ ${ECHO} stat -f \'${LN} -hfs \"%Y\" \"%N\"\' {} + | \
+ ${SED} s'|${FAKEDIR}|${PREFIX}|g' | ${SH} | \
+ ${SED} -n s'|${FAKEDIR}|${PREFIX}|p' | ${SH} -x
+.endif
.for pcfile in ${MOZ_PKGCONFIG_FILES}
${INSTALL_DATA} ${FAKEDIR}/libdata/pkgconfig/${pcfile}.pc \
${PREFIX}/libdata/pkgconfig/${pcfile}.pc