diff options
author | trevor <trevor@FreeBSD.org> | 2002-03-09 08:37:37 +0000 |
---|---|---|
committer | trevor <trevor@FreeBSD.org> | 2002-03-09 08:37:37 +0000 |
commit | b8ec908e058be827bba0af961f33e23a449c7671 (patch) | |
tree | 20e167fe20f6cbb9f53ff5b980f9fc40d2262d0b /www/linux-mozilla-devel | |
parent | 36f570c121d98d3e4eff96bd6ad3930ecc239444 (diff) | |
download | FreeBSD-ports-b8ec908e058be827bba0af961f33e23a449c7671.zip FreeBSD-ports-b8ec908e058be827bba0af961f33e23a449c7671.tar.gz |
Add a selection dialog from which the user can disable the chatzilla,
deflenus, mail, psm and talkback components. This is based on the
recent work on the www/linux-netscape6 port. When psm is omitted,
Mozilla still shows the Privacy and Security menus, and complains
about not being able to load libpipboot.so. When talkback is
omitted, Mozilla makes noise about the missing libqfaservices.so.
Diffstat (limited to 'www/linux-mozilla-devel')
-rw-r--r-- | www/linux-mozilla-devel/Makefile | 81 | ||||
-rw-r--r-- | www/linux-mozilla-devel/scripts/configure | 43 |
2 files changed, 113 insertions, 11 deletions
diff --git a/www/linux-mozilla-devel/Makefile b/www/linux-mozilla-devel/Makefile index 5c1892b..fd1a888 100644 --- a/www/linux-mozilla-devel/Makefile +++ b/www/linux-mozilla-devel/Makefile @@ -12,16 +12,6 @@ CATEGORIES= www linux MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= mozilla/releases/mozilla${PORTVERSION}/linux-xpi/ PKGNAMEPREFIX= linux- -DISTFILES= browser.xpi \ - chatzilla.xpi \ - deflenus.xpi \ - langenus.xpi \ - mail.xpi \ - psm.xpi \ - regus.xpi \ - talkback.xpi \ - venkman.xpi \ - xpcom.xpi DIST_SUBDIR= linux-mozilla/${PORTVERSION} PATCH_SITES= ${MASTER_SITE_LOCAL} @@ -44,6 +34,62 @@ PKGMESSAGE= ${WRKDIR}/pkg-message PLIST= ${WRKDIR}/pkg-plist STARTUP_CMD= linux-mozilla +.if !defined(BATCH) +IS_INTERACTIVE= yes +.endif + +.include <bsd.port.pre.mk> + +pre-everything:: + ${MKDIR} ${WRKSRC} +.if !defined(BATCH) + ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure +.endif +DISTFILES= browser.xpi \ + chatzilla.xpi \ + deflenus.xpi \ + langenus.xpi \ + mail.xpi \ + psm.xpi \ + regus.xpi \ + talkback.xpi \ + venkman.xpi \ + xpcom.xpi +.if exists(${WRKDIRPREFIX}${.CURDIR}/work/xpi/components.conf) +DISTFILES!= ${CAT} ${WRKDIRPREFIX}${.CURDIR}/work/xpi/components.conf +.endif + +checksum: +.if !defined(REAL_EXTRACT) + @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch +.endif + @if [ ! -f ${MD5_FILE} ]; then \ + ${ECHO_MSG} ">> No MD5 checksum file."; \ + else \ + (cd ${DISTDIR}; OK="true"; \ + for file in ${_CKSUMFILES}; do \ + if [ -r $$file ]; then \ + CKSUM=`${MD5} < $$file`; \ + CKSUM2=`${GREP} "^MD5 ($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + if [ "$$CKSUM2" = "" ]; then \ + ${ECHO_MSG} ">> No checksum recorded for $$file."; \ + OK="false"; \ + elif ${EXPR} "$$CKSUM2" : ".*$$CKSUM" > /dev/null; then \ + ${ECHO_MSG} ">> Checksum OK for $$file."; \ + else \ + ${ECHO_MSG} ">> Checksum mismatch for $$file."; \ + OK="false"; \ + fi; \ + fi; \ + done; \ + if [ "$$OK" != "true" ]; then \ + ${ECHO_MSG} "Make sure the Makefile and distinfo file (${MD5_FILE})"; \ + ${ECHO_MSG} "are up to date. If you are absolutely sure you want to override this"; \ + ${ECHO_MSG} "check, type \"make NO_CHECKSUM=yes [other args]\"."; \ + exit 1; \ + fi) ; \ + fi + do-extract: ${MKDIR} ${WRKSRC} .for i in ${DISTFILES} @@ -51,7 +97,20 @@ do-extract: .endfor do-patch: + ${MKDIR} ${WRKSRC}/tmp + ${TAR} -C ${WRKSRC}/tmp -xzf ${DISTDIR}/${DIST_SUBDIR}/${PATCHFILES} ${TAR} -C ${WRKSRC}/bin -xzf ${DISTDIR}/${DIST_SUBDIR}/${PATCHFILES} + for j in chatzilla messenger pippki; do \ + if [ ! -e ${WRKSRC}/bin/chrome/$$j.jar ]; then \ + for i in communicator editor messenger navigator; do \ + ${GREP} -v $$j ${WRKSRC}/tmp/chrome/overlayinfo/$$i/content/overlays.rdf > \ + ${WRKSRC}/bin/chrome/overlayinfo/$$i/content/overlays.rdf; \ + ${CP} ${WRKSRC}/bin/chrome/overlayinfo/$$i/content/overlays.rdf \ + ${WRKSRC}/tmp/chrome/overlayinfo/$$i/content/overlays.rdf; \ + done; \ + ${RM} -f ${WRKSRC}/bin/chrome/overlayinfo/$$j/content/overlays.rdf; \ + fi; \ + done; do-configure: # - kldload linux @@ -94,4 +153,4 @@ post-install: - ${PREFIX}/lib/linux-mozilla/linkfarm ${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/www/linux-mozilla-devel/scripts/configure b/www/linux-mozilla-devel/scripts/configure new file mode 100644 index 0000000..bae76ba --- /dev/null +++ b/www/linux-mozilla-devel/scripts/configure @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD$ + +echo ${WRKSRC}/components.conf +if [ -f ${WRKSRC}/components.conf ]; then + exit +fi + +tempfile=`/usr/bin/mktemp -t checklist` + +echo "browser langenus regus venkman xpcom" > /tmp/checklist.tmp.$$; + +/usr/bin/dialog --title "Mozilla component selection" --clear \ + --checklist "\n\ +Choose which components of Mozilla to download and install. \n\ +Press the space bar to toggle selections." -1 -1 5 \ +"chatzilla" "IRC client (102 kB)" ON \ +"deflenus" "American English profile defaults (8 kB)" ON \ +"mail" "Mozilla Mail and News (1728 kB)" ON \ +"psm" "Personal Security Manager--recommended (656 kB)" ON \ +"talkback" "sends crash logs to Mozilla staff (832 kB)" ON \ +2>> /tmp/checklist.tmp.$$ + +retval=$? + +case $retval in + 1) echo "Cancel pressed." + exit 1 + ;; +esac + +choice=`cat /tmp/checklist.tmp.$$` +rm -f /tmp/checklist.tmp.$$ + +echo "$choice" +echo "$choice" \ + | sed -e "s/\"//g" \ + | sort -u \ + | sed -e "s/ /.xpi /g" \ + | sed -e "s/$/.xpi/g" \ + | perl -pi -e "s/ /\n/g" \ + > ${WRKSRC}/components.conf |