aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahze <ahze@FreeBSD.org>2006-06-07 00:57:10 +0800
committerahze <ahze@FreeBSD.org>2006-06-07 00:57:10 +0800
commit3e90e1d812f3fbf91f72f78ae708d4578a1702cf (patch)
treea97519d69ee6115dae8f9464a0ece19244808118
parent97991cd26cf84af2f574ae553f643455a4d547f2 (diff)
downloadfreebsd-ports-gnome-3e90e1d812f3fbf91f72f78ae708d4578a1702cf.tar.gz
freebsd-ports-gnome-3e90e1d812f3fbf91f72f78ae708d4578a1702cf.tar.zst
freebsd-ports-gnome-3e90e1d812f3fbf91f72f78ae708d4578a1702cf.zip
- Make it easier for ports to use firefox-devel/firefox10 or other geckos
that are no offically supported by a port. Example 1: Support for firefox-devel USE_GECKO=firefox-devel<->firefox firefox mozilla if ${GECKO}==firefox-devel a simple sed -e 's|firefox|firefox-devel| will be done on Makefile.in and configure files. Example 2: Support for seamonkey USE_GECKO=firefox seamonkey<->firefox
-rw-r--r--www/mozilla/bsd.gecko.mk23
1 files changed, 19 insertions, 4 deletions
diff --git a/www/mozilla/bsd.gecko.mk b/www/mozilla/bsd.gecko.mk
index 5a12f02ef772..4430a35feff5 100644
--- a/www/mozilla/bsd.gecko.mk
+++ b/www/mozilla/bsd.gecko.mk
@@ -35,13 +35,17 @@ Gecko_Pre_Include= bsd.gecko.mk
#
# Ports should use the following:
#
-# USE_GECKO= mozilla firefox seamonkey
+# USE_GECKO= mozilla firefox-devel firefox seamonkey
# The list of gecko backends that the port supports. Unless the user
# overrides it with WITH_GECKO, the first gecko listed in USE_GECKO
# will be the default. In the above example, www/mozilla will be used
# as a gecko backend unless WITH_GECKO=firefox or WITH_GECKO=seamonkey
# is defined by the user.
#
+# USE_GECKO= firefox-devel<->firefox
+# This will sed -e 's/firefox/firefox-devel/' on Makefile.in's and configure
+# if ${GECKO}=="firefox-devel"
+#
# Example:
# USE_GECKO= mozilla firefox seamonkey
# .include <bsd.port.pre.mk>
@@ -53,7 +57,7 @@ Gecko_Pre_Include= bsd.gecko.mk
# If you want your port to check the ${GECKO} variable to see which backend
# has been chosen.
#
-# Example:
+# Example:
# USE_GECKO= mozilla firefox seamonkey
# .include <bsd.port.pre.mk>
# .include "${.CURDIR}/../../www/mozilla/bsd.gecko.mk"
@@ -84,8 +88,11 @@ ${gecko}_PLIST?= ${X11BASE}/lib/${gecko}/libgtkembedmoz.so
# Figure out which mozilla to use
# Weed out bad options in USE_GECKO
.for badgecko in ${USE_GECKO}
-. if ${_GECKO_ALL:M${badgecko}}!=""
-GOOD_USE_GECKO+= ${badgecko}
+. if ${_GECKO_ALL:M${badgecko:C/^([^<->]+).*/\1/}}!=""
+GOOD_USE_GECKO+= ${badgecko:C/^([^<->]+).*/\1/}
+. endif
+. if ${_GECKO_ALL:M${badgecko:C/^[^<->]+<->([^<->]+).*/\1/}}!="${badgecko:C/^([^<->]+).*/\1/}"
+${badgecko:C/^([^<->]+).*/\1/}_HACK= s:${badgecko:C/^[^<->]+<->([^<->]+).*/\1/}:${badgecko:C/^([^<->]+).*/\1/}:g
. endif
.endfor
@@ -154,6 +161,14 @@ _gecko-pre-everything::
.endfor
@${ECHO_CMD} ""
+post-patch: gecko-post-patch
+
+gecko-post-patch:
+.if defined(${GECKO}_HACK)
+ ${FIND} ${WRKSRC} -name "Makefile.in" -o -name "configure" | \
+ ${XARGS} ${REINPLACE_CMD} -e ${${GECKO}_HACK}
+.endif
+
#.endif # end it all
.endif
# HERE THERE BE TACOS