Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2010 22:20:34 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r448 - branches/experimental/Mk
Message-ID:  <201011292220.oATMKYUZ029444@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: beat
Date: Mon Nov 29 22:20:33 2010
New Revision: 448

Log:
- Reorganize bsd.gecko.mk to really fix its logic

Modified:
   branches/experimental/Mk/bsd.gecko.mk

Modified: branches/experimental/Mk/bsd.gecko.mk
==============================================================================
--- branches/experimental/Mk/bsd.gecko.mk	Mon Nov 29 20:52:51 2010	(r447)
+++ branches/experimental/Mk/bsd.gecko.mk	Mon Nov 29 22:20:33 2010	(r448)
@@ -8,9 +8,171 @@
 #
 # 4 column tabs prevent hair loss and tooth decay!
 
-.if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include)
-Gecko_Pre_Include=	bsd.gecko.mk
+# ======================= USERS =================================
+# To specify which gecko-based backend you prefer, use something like:
+#
+# WITH_GECKO=	libxul
+#
+# The valid backends are:
+# libxul seamonkey
+#
+# See below for more details.
+# ======================= /USERS ================================
+
+# bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users
+# and porters to support any available gecko backend without needing to build
+# many conditional tests. ${USE_GECKO} is the list of backends that your port
+# can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend.
+# Users set ${WITH_GECKO} to the list of gecko backends they want on their
+# system.
+
+.if defined(USE_GECKO) && ${USE_GECKO}!="gecko"
+
+.if !defined(Gecko_Pre_Include)
+# Please make sure all changes to this file are passed through the maintainer.
+# Do not commit them yourself (unless of course you're the Port's Wraith ;).
+Gecko_Include_MAINTAINER=		gecko@FreeBSD.org
+Gecko_Pre_Include=			bsd.gecko.mk
+
+# Users should use the following syntax:
+#
+# WITH_GECKO= libxul seamonkey
+#  Use libxul whenever a port supports it, falling back on seamonkey.
+# WITH_GECKO= libxul
+#  Sets your preferred backend. With this example, libxul will always
+#  be chosen, unless the port doesn't support a libxul backend. In that
+#  case, you get whatever the porter chose as the default. Better to use
+#  the first example.
+#
+#
+# Ports should use the following:
+#
+# USE_GECKO= libxul 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/libxul will be used
+#  as a gecko backend unless WITH_GECKO=seamonkey is defined by the user.
+#
+# USE_GECKO= libxul-devel<->libxul
+#  This will sed -e 's/libxul/libxul-devel/' on Makefile.in's and configure 
+#  if ${GECKO}=="libxul-devel"
+#
+#  Example:
+#  USE_GECKO= libxul seamonkey
+#  
+#  post-patch:
+#	@${REINPALCE_CMD} -e 's|mozilla-|${GECKO}-|' \
+#		${MOZSRC}/configure
+#
+#  If you want your port to check the ${GECKO} variable to see which backend
+#  has been chosen.
+#
+#  Example:
+#  USE_GECKO= libxul seamonkey
+#  
+#  post-patch:
+#  .if ${GECKO}=="seamonkey"
+#	@${REINPLACE_CMD} -e 's|mozilla-|seamonkey-|' \
+#		${MOZSRC}/configure
+#  .endif
+
+_GECKO_ALL=	seamonkey libxul
+
+libxul_PLIST=		${LOCALBASE}/lib/libxul/libxul.so
+
+.for gecko in ${_GECKO_ALL}
+${gecko}_PORTSDIR?=	www
+${gecko}_DEPENDS?=	${PORTSDIR}/${${gecko}_PORTSDIR}/${gecko}
+${gecko}_PLIST?=	${LOCALBASE}/lib/${gecko}/libgtkembedmoz.so
+.endfor
 
+# Figure out which mozilla to use
+# Weed out bad options in USE_GECKO
+.for badgecko in ${USE_GECKO}
+. 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
+
+.undef GECKO_FALLTHROUGH
+.undef _FOUND_WITH_GECKO
+# Figure out which gecko to use and weed out the bad ones
+.if defined(WITH_GECKO) && defined(GOOD_USE_GECKO)
+. for badgecko in ${WITH_GECKO}
+.  if ${GOOD_USE_GECKO:M${badgecko}}!=""
+GOOD_WITH_GECKO+=	${badgecko}
+.  endif
+. endfor
+. if defined(GOOD_WITH_GECKO)
+.  for gecko in ${GOOD_WITH_GECKO}
+.   if !defined(GECKO_FALLTHROUGH)
+GECKO=	${gecko}
+GECKO_FALLTHROUGH=	${TRUE}
+_FOUND_WITH_GECKO=	${TRUE}
+.   endif
+.  endfor
+. endif
+.endif
+
+.if !defined(GECKO) && defined(GOOD_USE_GECKO)
+. for gecko in ${GOOD_USE_GECKO}
+.  if !defined(GECKO_FALLTRHOUGH)
+GECKO=	${gecko}
+GECKO_FALLTRHOUGH=	${TRUE}
+.  endif
+. endfor
+.endif
+
+# Generic defines
+GECKO_CONFIG?=			${LOCALBASE}/bin/${GECKO}-config
+XPIDL?=				${LOCALBASE}/lib/${GECKO}/xpidl
+XPIDL_INCL?=			`${GECKO_CONFIG} --idlflags`
+
+.if defined(GECKO) && ${_GECKO_ALL:M${GECKO}}!=""
+BUILD_DEPENDS+=	${${GECKO}_PLIST}:${${GECKO}_DEPENDS}
+RUN_DEPENDS+=	${${GECKO}_PLIST}:${${GECKO}_DEPENDS}
+.else
+IGNORE=	Unable to find a supported gecko, please check USE_GECKO
+.endif
+
+pre-everything:: _gecko-pre-everything
+
+_gecko-pre-everything::
+	@${ECHO_CMD} ""
+.if !defined(_FOUND_WITH_GECKO) && defined(WITH_GECKO)
+	@${ECHO_CMD} " Warning: ${PORTNAME} does not support any gecko you"
+	@${ECHO_CMD} " listed in WITH_GECKO=${WITH_GECKO}."
+	@${ECHO_CMD} " \"${GECKO}\" will be used"
+	@${ECHO_CMD} ""
+	@${ECHO_CMD} " for gecko support, but you can change that by using one of"
+	@${ECHO_CMD} " the following values:"
+.else
+	@${ECHO_CMD} " ${PORTNAME} is using ${GECKO} for gecko support, but you can"
+	@${ECHO_CMD} " change that by defining WITH_GECKO to the following values:"
+.endif
+	@${ECHO_CMD} ""
+.for gecko in ${GOOD_USE_GECKO}
+	@${ECHO_CMD} "   ${gecko} "
+.endfor
+	@${ECHO_CMD} ""
+
+post-patch: gecko-post-patch
+
+gecko-post-patch:
+.if defined(${GECKO}_HACK)
+	${FIND} ${WRKSRC} -name "Makefile.in" -type f -o -name "configure" -type f | \
+		${XARGS} ${REINPLACE_CMD} -e ${${GECKO}_HACK}
+.endif
+.endif
+
+.elif !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) && (defined(USE_FIREFOX) || defined(USE_FIREFOX_BUILD) || defined(USE_SEAMONKEY) || defined(USE_SEAMONKEY_BUILD) || defined(USE_THUNDERBIRD) || defined(USE_THUNDERBIRD_BUILD))
+Gecko_Pre_Include=			bsd.gecko.mkl
+
+# Ports can use the following:
+#
 # USE_FIREFOX           - Add runtime dependency on Firefox. If no version
 #                         is given by the maintainer via the port or by the
 #                         user via defined variable try to find the highest
@@ -319,167 +481,6 @@
 .endif
 
 .endif # defined(USE_THUNDERBIRD)
-.endif
-
-# ======================= USERS =================================
-# To specify which gecko-based backend you prefer, use something like:
-#
-# WITH_GECKO=	libxul
-#
-# The valid backends are:
-# libxul seamonkey
-#
-# See below for more details.
-# ======================= /USERS ================================
-
-# bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users
-# and porters to support any available gecko backend without needing to build
-# many conditional tests. ${USE_GECKO} is the list of backends that your port
-# can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend.
-# Users set ${WITH_GECKO} to the list of gecko backends they want on their
-# system.
-
-.if defined(USE_GECKO) && ${USE_GECKO}!="gecko"
-
-.if !defined(Gecko_Pre_Include)
-# Please make sure all changes to this file are passed through the maintainer.
-# Do not commit them yourself (unless of course you're the Port's Wraith ;).
-Gecko_Include_MAINTAINER=		gecko@FreeBSD.org
-Gecko_Pre_Include=			bsd.gecko.mk
-
-# Users should use the following syntax:
-#
-# WITH_GECKO= libxul seamonkey
-#  Use libxul whenever a port supports it, falling back on seamonkey.
-# WITH_GECKO= libxul
-#  Sets your preferred backend. With this example, libxul will always
-#  be chosen, unless the port doesn't support a libxul backend. In that
-#  case, you get whatever the porter chose as the default. Better to use
-#  the first example.
-#
-#
-# Ports should use the following:
-#
-# USE_GECKO= libxul 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/libxul will be used
-#  as a gecko backend unless WITH_GECKO=seamonkey is defined by the user.
-#
-# USE_GECKO= libxul-devel<->libxul
-#  This will sed -e 's/libxul/libxul-devel/' on Makefile.in's and configure 
-#  if ${GECKO}=="libxul-devel"
-#
-#  Example:
-#  USE_GECKO= libxul seamonkey
-#  
-#  post-patch:
-#	@${REINPALCE_CMD} -e 's|mozilla-|${GECKO}-|' \
-#		${MOZSRC}/configure
-#
-#  If you want your port to check the ${GECKO} variable to see which backend
-#  has been chosen.
-#
-#  Example:
-#  USE_GECKO= libxul seamonkey
-#  
-#  post-patch:
-#  .if ${GECKO}=="seamonkey"
-#	@${REINPLACE_CMD} -e 's|mozilla-|seamonkey-|' \
-#		${MOZSRC}/configure
-#  .endif
-
-_GECKO_ALL=	seamonkey libxul
-
-libxul_PLIST=		${LOCALBASE}/lib/libxul/libxul.so
-
-.for gecko in ${_GECKO_ALL}
-${gecko}_PORTSDIR?=	www
-${gecko}_DEPENDS?=	${PORTSDIR}/${${gecko}_PORTSDIR}/${gecko}
-${gecko}_PLIST?=	${LOCALBASE}/lib/${gecko}/libgtkembedmoz.so
-.endfor
-
-# Figure out which mozilla to use
-# Weed out bad options in USE_GECKO
-.for badgecko in ${USE_GECKO}
-. 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
-
-.undef GECKO_FALLTHROUGH
-.undef _FOUND_WITH_GECKO
-# Figure out which gecko to use and weed out the bad ones
-.if defined(WITH_GECKO) && defined(GOOD_USE_GECKO)
-. for badgecko in ${WITH_GECKO}
-.  if ${GOOD_USE_GECKO:M${badgecko}}!=""
-GOOD_WITH_GECKO+=	${badgecko}
-.  endif
-. endfor
-. if defined(GOOD_WITH_GECKO)
-.  for gecko in ${GOOD_WITH_GECKO}
-.   if !defined(GECKO_FALLTHROUGH)
-GECKO=	${gecko}
-GECKO_FALLTHROUGH=	${TRUE}
-_FOUND_WITH_GECKO=	${TRUE}
-.   endif
-.  endfor
-. endif
-.endif
-
-.if !defined(GECKO) && defined(GOOD_USE_GECKO)
-. for gecko in ${GOOD_USE_GECKO}
-.  if !defined(GECKO_FALLTRHOUGH)
-GECKO=	${gecko}
-GECKO_FALLTRHOUGH=	${TRUE}
-.  endif
-. endfor
-.endif
-
-# Generic defines
-GECKO_CONFIG?=			${LOCALBASE}/bin/${GECKO}-config
-XPIDL?=				${LOCALBASE}/lib/${GECKO}/xpidl
-XPIDL_INCL?=			`${GECKO_CONFIG} --idlflags`
-
-.if defined(GECKO) && ${_GECKO_ALL:M${GECKO}}!=""
-BUILD_DEPENDS+=	${${GECKO}_PLIST}:${${GECKO}_DEPENDS}
-RUN_DEPENDS+=	${${GECKO}_PLIST}:${${GECKO}_DEPENDS}
-.else
-IGNORE=	Unable to find a supported gecko, please check USE_GECKO
-.endif
-
-pre-everything:: _gecko-pre-everything
-
-_gecko-pre-everything::
-	@${ECHO_CMD} ""
-.if !defined(_FOUND_WITH_GECKO) && defined(WITH_GECKO)
-	@${ECHO_CMD} " Warning: ${PORTNAME} does not support any gecko you"
-	@${ECHO_CMD} " listed in WITH_GECKO=${WITH_GECKO}."
-	@${ECHO_CMD} " \"${GECKO}\" will be used"
-	@${ECHO_CMD} ""
-	@${ECHO_CMD} " for gecko support, but you can change that by using one of"
-	@${ECHO_CMD} " the following values:"
-.else
-	@${ECHO_CMD} " ${PORTNAME} is using ${GECKO} for gecko support, but you can"
-	@${ECHO_CMD} " change that by defining WITH_GECKO to the following values:"
-.endif
-	@${ECHO_CMD} ""
-.for gecko in ${GOOD_USE_GECKO}
-	@${ECHO_CMD} "   ${gecko} "
-.endfor
-	@${ECHO_CMD} ""
-
-post-patch: gecko-post-patch
-
-gecko-post-patch:
-.if defined(${GECKO}_HACK)
-	${FIND} ${WRKSRC} -name "Makefile.in" -type f -o -name "configure" -type f | \
-		${XARGS} ${REINPLACE_CMD} -e ${${GECKO}_HACK}
-.endif
-.endif
 
 .else # split
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011292220.oATMKYUZ029444>