[SVN-Commit] r194 - branches/experimental/www/xpi-adblock

svn-freebsd-gecko at chruetertee.ch svn-freebsd-gecko at chruetertee.ch
Sat Dec 12 12:00:34 UTC 2009


Author: beat
Date: Sat Dec 12 12:00:27 2009
New Revision: 194

Log:
- Import www/xpi-adblock from ports for upcomig Thunderbird 3 and
  Seamnokey 2 changes.

Added:
   branches/experimental/www/xpi-adblock/
   branches/experimental/www/xpi-adblock/Makefile
   branches/experimental/www/xpi-adblock/Makefile.xpi
   branches/experimental/www/xpi-adblock/distinfo
   branches/experimental/www/xpi-adblock/pkg-descr

Added: branches/experimental/www/xpi-adblock/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/xpi-adblock/Makefile	Sat Dec 12 12:00:27 2009	(r194)
@@ -0,0 +1,27 @@
+# New ports collection makefile for:	xpi-adblock
+# Date created:		28 March 2006
+# Whom:			Andrew Pantyukhin <infofarmer at FreeBSD.org>
+#
+# $FreeBSD: ports/www/xpi-adblock/Makefile,v 1.10 2009/01/03 13:12:11 miwi Exp $
+#
+
+PORTNAME=	adblock
+PORTVERSION=	0.5.3.043
+DISTVERSIONSUFFIX=	-fx+fl+mz+ns
+CATEGORIES=	www
+
+MAINTAINER=	miwi at FreeBSD.org
+COMMENT=	A content filtering extension
+
+XPI_NUM=	10
+XPI_ID=		{34274bf4-1d97-a289-e984-17e546307e4f}
+XPI_FILES=	chrome/adblock.jar chrome.manifest components/.autoreg components/nsAdblock.js \
+		defaults/preferences/adblock.js install.js install.rdf license.txt
+XPI_DIRS=	chrome/adblock chrome components defaults/preferences defaults
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|2.0a3|2.0.*|g' ${WRKSRC}/install.rdf
+	@${RM} -f ${WRKSRC}/install.rdf?*
+
+.include "${.CURDIR}/../xpi-adblock/Makefile.xpi"
+.include <bsd.port.mk>

Added: branches/experimental/www/xpi-adblock/Makefile.xpi
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/xpi-adblock/Makefile.xpi	Sat Dec 12 12:00:27 2009	(r194)
@@ -0,0 +1,219 @@
+#-*- mode: makefile; tab-width: 4; -*
+# ex:ts=4
+#
+# New ports collection makefile for:	xpi infrastructure
+# Date created:		28 March 2006
+# Whom:				Andrew Pantyukhin <infofarmer at FreeBSD.org>
+#
+# $FreeBSD: ports/www/xpi-adblock/Makefile.xpi,v 1.21 2009/07/04 22:25:36 miwi Exp $
+#
+
+# XPI_ID		- Extension id, might be in {12345-...} or dev at org format
+# XPI_NUM		- Extension number, as in addons.mozilla.org URL
+# XPI_FILES		- List of files in xpi archive. This is used to produce
+#				  PLIST_FILES. XPI_FILES can be generated by xpi-gen, but be
+#				  sure to put chrome.manifest in ${FILESDIR} before that if you
+#				  need it.
+# XPI_DIRS		- List of directories in xpi archive. This is used to produce
+#				  PLIST_DIRS.
+# XPI_DISTNAME	- The name of distribution
+#				  Default: ${PORTNAME}
+# PORTNAME, PORTVERSION, DISTVERSIONSUFFIX, CATEGORIES, MAINTAINER, COMMENT
+#				- These should all be set manually for port to be functional. See
+#				  ${PORTSDIR}/Mk/bsd.port.mk for details.
+# MASTER_SITES	- This should be set if port is unavailable at the default site.
+#				  Default: ${MASTER_SITE_MOZILLA}
+# MASTER_SITE_SUBDIR
+#				- Default: extensions/${PORTNAME}
+# LATEST_LINK	- Default: ${PKGBASE:S/_//g}
+# XPI_LIBDIR	- Name of the directory to install extensions in.
+#				  Default: ${PREFIX}/lib/xpi
+# XPI_XPIDIR	- Name of the directory to install extension's files in.
+#				  Default: ${XPI_LIBDIR}/${XPI_ID}
+# USE_XPI		- If set, the port installs one or more xpi extensions.
+#				  If this is set to a list of apps (wildcards possible) the
+#				  extensions will be installed for them only.
+# WITH_XPI		- A user-tunable variable, determines which apps should
+#				  extension be made available for. Can be set to a list of
+#				  apps, same as USE_XPI, and/or to "ext:app[,app,app,...]" tuples.
+#				  ext should be a portname. If ext starts and ends with a slash
+#				  (`/'), it is treated as an extended regular expression (see
+#				  re_format(7)). Right of the colon should be a list of apps in
+#				  the same format as USE_XPI, but comma- instead of whitespace-
+#				  delimited. If no matching tuples for an extension are found,
+#				  WITH_XPI is scanned for non tuple-records which are then treated
+#				  as a USE_XPI list. If several tuples match, the last non-regexp
+#				  one takes precedence, then the last regexp one.
+#
+# This Makefile is a beta-version of the new xpi infrastructure. It currently
+# supports Gecko 1.8+ (Firefox 1.5+). Support for Gecko 1.7x (and Seamonkey 1.0)
+# may be merged later from Thierry Thomas works.
+#
+# A new xpi will require a PORTNAME, PORTVERSION, DISTVERSIONSUFFIX and
+# CATEGORIES. In case it is not published on the mozilla.org sites, MASTER_SITES
+# can be redefined. XPI_* vars will also need to be defined manually, which helps
+# keep the infrastructure simpler.
+#
+# Gecko 1.8 xpi engine tries to detect various compatibility issues all by itself.
+# Thus, xpi's are installed into ${LOCALBASE}/lib/xpi/${XPI_ID} by default and
+# links are made to all apps which have the engine (firefox, thunderbird, sunbird
+# and flock at the moment). relink and relink-all targets can be invoked to refarm
+# the links of a single extensions or all installed extensions accordingly.
+#
+# In case an xpi does not have chrome.manifest, it should be generated manually by
+# a maintainer and placed in files, where it will be noticed. 
+#
+# xpi ports do not depend on their master applications. You can install an
+# extension before the app and run relink when the app is present.
+
+.ifndef MASTER_SITES
+MASTER_SITES?=	MOZILLA_EXTENDED
+.ifdef XPI_NUM
+MASTER_SITE_SUBDIR?=	addons/${XPI_NUM}
+.endif
+MASTER_SITE_SUBDIR?=	extensions/${XPI_DISTNAME}
+.endif
+PKGNAMEPREFIX?=	xpi-
+EXTRACT_SUFX?=	.xpi
+DISTNAME?=		${XPI_DISTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
+DIST_SUBDIR?=	xpi
+LATEST_LINK?=	${PKGBASE:S/_//g}
+
+NO_BUILD=	yes
+USE_ZIP=	yes
+EXTRACT_AFTER_ARGS=	-d ${WRKSRC}
+
+XPI_DISTNAME?=	${PORTNAME}
+XPI_APPS_ALL_WC=	*firefox* *thunderbird* *flock* *sunbird* \
+					*netscape-navigator* *netscape-messenger*
+# *nvu*
+XPI_APPS_ALL=	firefox firefox-devel firefox3 firefox35\
+		linux-firefox linux-firefox-devel flock linux-flock \
+		thunderbird linux-thunderbird \
+		linux-netscape-navigator linux-netscape-messenger \
+		sunbird linux-sunbird
+# nvu linux-nvu kompozer linux-kompozer
+# Other apps: mango
+
+# === Let's process WITH_XPI into WITH_XPI_APPS
+WITH_XPI_TUPLES=	${WITH_XPI:M*?\:?*}
+WITH_XPI_NTUPLES=	${WITH_XPI:N*\:*}
+WITH_XPI_TUPLES_RX=	${WITH_XPI_TUPLES:M/*?*/\:?*}
+WITH_XPI_TUPLES_WC=	${WITH_XPI_TUPLES:N/*?*/\:?*}
+WITH_XPI_MATCH?=	${PORTNAME}
+WITH_XPI_MATCHSTRING?=	_=~match~=_
+
+.for tuple_rx in ${WITH_XPI_TUPLES_RX}
+_rx=	${tuple_rx:C!/(.*)/\:.*!\1!}
+_apps=	${tuple_rx:C!/.*/\:(.*)!\1!}
+_testrx=${WITH_XPI_MATCH:C!.*${_rx}.*!${WITH_XPI_MATCHSTRING}!}
+.if ${_testrx} == ${WITH_XPI_MATCHSTRING}
+WITH_XPI_APPS:=	${_apps:S/,/ /g}
+.endif
+.endfor
+
+.for tuple_wc in ${WITH_XPI_TUPLES_WC}
+_wc=	${tuple_wc:C!(.*)\:.*!\1!}
+_apps=	${tuple_wc:C!.*\:(.*)!\1!}
+.if ${_wc} == ${WITH_XPI_MATCH}
+WITH_XPI_APPS:=	${_apps:S/,/ /g}
+.endif
+.endfor
+
+.if ${WITH_XPI_NTUPLES}
+WITH_XPI_APPS?=	${WITH_XPI_NTUPLES}
+.endif
+# === WITH_XPI has been processed
+
+.ifdef WITH_XPI_APPS
+USE_XPI=	${WITH_XPI_APPS}
+.endif
+
+.if !defined(USE_XPI) || ${USE_XPI:U} == "YES" || ${USE_XPI} == "*"
+USE_XPI=	${XPI_APPS_ALL_WC}
+.endif
+
+XPI_APPS?=	${USE_XPI:S.^.${LOCALBASE}/lib/.:S.$./extensions.}
+XPI_SLDIRS_ALL=	${XPI_APPS_ALL:S.^.${XPI_SLDIR}/.}
+XPI_SLDIRS=		${USE_XPI:S.^.${XPI_SLDIR}/.}
+XPI_LINKFARMS=	${XPI_APPS} ${XPI_SLDIRS}
+
+XPI_LIBDIR?=	${PREFIX}/lib/xpi
+XPI_SLDIR?=		${XPI_LIBDIR}/symlinks
+.ifndef XPI_DISTNAMES
+XPI_XPIDIR?=	${XPI_LIBDIR}/${XPI_ID}
+.endif
+XPI_DIRS_TRY=	${XPI_SLDIRS_ALL:S,^${PREFIX}/,,} \
+				${XPI_SLDIR:S,^${PREFIX}/,,} \
+				${XPI_LIBDIR:S,^${PREFIX}/,,}
+
+PLIST_SUB+=		XPI_LIBDIR="${XPI_LIBDIR:S,^${PREFIX}/,,}" \
+				XPI_XPIDIR="${XPI_XPIDIR:S,^${PREFIX}/,,}"
+
+_TD=		${XPI_XPIDIR:S,^${PREFIX}/,,}
+_TD_FULL=	${XPI_XPIDIR}
+_A=	>> ${TMPPLIST}
+_Q=	2>/dev/null || true
+PLIST_FILES+=	${XPI_FILES:S!^!${_TD}/!}
+PLIST_DIRS+=	${XPI_DIRS:S!^!${_TD}/!} ${_TD}
+
+.for dist in ${XPI_DISTNAMES}
+XPI_XPIDIR_${dist}=	${XPI_LIBDIR}/${XPI_ID_${dist}}
+_TD_${dist}=	${XPI_XPIDIR_${dist}:S,^${PREFIX}/,,}
+PLIST_FILES+=	${XPI_FILES_${dist}:S!^!${_TD_${dist}}/!}
+PLIST_DIRS+=	${XPI_DIRS_${dist}:S!^!${_TD_${dist}}/!} ${_TD_${dist}}
+.endfor
+
+.if !target(do-install)
+do-install:
+	@${INSTALL} -d ${_TD_FULL} ${XPI_SLDIRS_ALL}
+	@${CP} -R ${WRKSRC}/ ${_TD_FULL}/
+	@if [ -d ${FILESDIR} -a -f ${FILESDIR}/chrome.manifest ] ; \
+		then ${CP} ${FILESDIR}/chrome.manifest ${_TD_FULL}/ ; fi
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${_TD_FULL}/
+	@${CHMOD} -R a+rX,go-w ${_TD_FULL}/
+	@for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${_TD_FULL} $$_dir/ ${_Q} ; }
+	@${ECHO_CMD} '@exec ${INSTALL} -d ${XPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A}
+	@${ECHO_CMD} '@exec for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${_TD_FULL} $$_dir/ ${_Q}; }' ${_A}
+	@${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ; { ${RM} -f $$_dir/${XPI_ID} ; }' ${_A}
+	@${ECHO_CMD} '@unexec rmdir ${XPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A}
+.endif
+
+.if !target(relink)
+relink:
+	@-for _app in ${XPI_APPS} ; { ${LN} -sf ${_TD_FULL} $$_app ${_Q} ; }
+.endif
+
+.if !target(relink-all)
+relink-all:
+	@-for _app in ${XPI_APPS} ; { for _xpi in ${XPI_LIBDIR}/*[\{@]* ; { \
+		${LN} -sf $$_xpi $$_app ${_Q} ; } ; }
+.endif
+
+# Maintainer section
+xpi-gen:	extract
+	@${ECHO_CMD} -n 'XPI_ID='
+	@${GREP} -Em1 'em:id|<id>' ${WRKSRC}/install.rdf | ${CUT} -f2- -d\> | \
+	${CUT} -f1 -d\< | ${CUT} -f2 -d\"
+	@${ECHO_CMD} -n 'XPI_FILES='
+	@cd ${WRKSRC} && ${FIND} -s . -not -type d | cut -f2- -d/ | ${TR} '\n' ' '
+	@if [ -d ${FILESDIR} -a -f ${FILESDIR}/chrome.manifest ] ; \
+		then ${ECHO_CMD} chrome.manifest ; fi
+	@${ECHO_CMD}
+	@${ECHO_CMD} -n 'XPI_DIRS='
+	@cd ${WRKSRC} && ${FIND} -ds . -not -name . -type d | cut -f2- -d/ | ${TR} '\n' ' '
+	@${ECHO_CMD}
+
+xpi-plist:	extract
+	@${FIND} -s ${WRKSRC} -not -type d | ${SED} -e "s,^${WRKSRC},%%XPI_XPIDIR%%," > ${PLIST}
+	@if [ -d ${FILESDIR} -a -f ${FILESDIR}/chrome.manifest ] ; \
+		then ${ECHO_CMD} %%XPI_XPIDIR%%/chrome.manifest >> ${PLIST} ; fi
+	@${FIND} -ds ${WRKSRC} -type d -not -name ${DISTNAME} | \
+		${SED} -e "s,^${WRKSRC}, at dirrm %%XPI_XPIDIR%%," >> ${PLIST}
+
+xpi-pre-chrome:
+	@${CHMOD} g+w ${_TD_FULL}
+	@${RM} -f ${_TD_FULL}/chrome.manifest
+
+xpi-post-chrome:
+	@${CP} -f ${_TD_FULL}/chrome.manifest ${FILESDIR}/

Added: branches/experimental/www/xpi-adblock/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/xpi-adblock/distinfo	Sat Dec 12 12:00:27 2009	(r194)
@@ -0,0 +1,3 @@
+MD5 (xpi/adblock-0.5.3.043-fx+fl+mz+ns.xpi) = da21eb170d6a5a68753eb47aae9c4e5f
+SHA256 (xpi/adblock-0.5.3.043-fx+fl+mz+ns.xpi) = 394856aca7e29f1cbe044342430580f3ad4c3b97bad143eec3d6ba7402ce1cd9
+SIZE (xpi/adblock-0.5.3.043-fx+fl+mz+ns.xpi) = 77641

Added: branches/experimental/www/xpi-adblock/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/xpi-adblock/pkg-descr	Sat Dec 12 12:00:27 2009	(r194)
@@ -0,0 +1,7 @@
+Adblock is a content filtering plug-in for the Mozilla and Firefox browsers.
+It is both more robust and more precise than the built-in image blocker.
+
+Adblock allows the user to specify filters, which remove unwanted content based
+on the source-address.
+
+WWW: http://adblock.mozdev.org/


More information about the freebsd-gecko mailing list