ports/65590: www/mozilla, www/mozilla-devel, www/firefox: rebuild Chrome's registry on the spot.
Thierry Thomas
thierry at pompo.net
Thu Apr 15 21:10:16 UTC 2004
>Number: 65590
>Category: ports
>Synopsis: www/mozilla, www/mozilla-devel, www/firefox: rebuild Chrome's registry on the spot.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 15 14:10:15 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Thierry Thomas
>Release: FreeBSD 5.2.1-RELEASE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD ws90bj.pompo.net 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Thu Feb 26 22:14:29 CET 2004 thierry at ws90bj.pompo.net:/usr/obj/usr/src/sys/WS90BJ-040102 i386
>Description:
The current ports build the Chrome's registry during the post-build:
target, i.e. in the WRKSRC directory, and this location is recorded
in the registry.
Later, if you install a .xpi extension like mozex, you won't be able
to deinstall this extension and then mozilla cleanly.
The proposed patches rebuild the Chrome's registry during post-install:
>How-To-Repeat:
Install mozex (see PR ports/65589 deinstall it, then deinstall mozilla.
Mozilla won't deinstall cleanly.
>Fix:
Please apply the following patches:
--- mozilla.diff begins here ---
diff -urN www/mozilla.orig/Makefile www/mozilla/Makefile
--- www/mozilla.orig/Makefile Thu Apr 8 19:28:14 2004
+++ www/mozilla/Makefile Mon Apr 12 11:56:30 2004
@@ -309,6 +309,7 @@
${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/include/mozilla
post-install:
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CHMOD} -R u-w ${PREFIX}/lib/${MOZILLA}/components
@${CAT} ${PKGMESSAGE}
diff -urN www/mozilla.orig/pkg-install www/mozilla/pkg-install
--- www/mozilla.orig/pkg-install Thu Jan 1 01:00:00 1970
+++ www/mozilla/pkg-install Thu Apr 15 00:39:59 2004
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Date created: Mon Nov 29, 2003
+# Whom: Thierry Thomas (<thierry at pompo.net>)
+# Fix the chrome registry.
+
+umask 022
+PATH=/bin:/usr/bin
+
+[ "x$1" = "x" ] && exit 1
+[ "x$2" != "xPOST-INSTALL" ] && exit 0
+
+PREFIX=${PKG_PREFIX:-/usr/X11R6}
+
+PKG_NAME=${1%%-[0-9._]*}
+if [ $PKG_NAME = firefox ]; then
+MOZBIN=firefox-bin
+else
+MOZBIN=mozilla-bin
+fi
+
+MOZDIR=`find $PREFIX/lib -name $MOZBIN -exec dirname {} \; | head -n 1`
+REGXPCOM=$MOZDIR/regxpcom
+REGCHROME=$MOZDIR/regchrome
+
+echo "===> Building Chrome's registry..."
+rm -rf $MOZDIR/chrome/overlayinfo
+rm -f $MOZDIR/chrome/*.rdf
+mkdir -p $MOZDIR/chrome/overlayinfo
+rm -f $MOZDIR/component.reg
+
+LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regxpcom || true
+LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regchrome || true
+touch $MOZDIR/chrome/user-skins.rdf $MOZDIR/chrome/user-locales.rdf
+
+exit 0
--- mozilla.diff ends here ---
--- mozilla-devel.diff begins here ---
diff -urN www/mozilla-devel.orig/Makefile www/mozilla-devel/Makefile
--- www/mozilla-devel.orig/Makefile Mon Apr 12 05:29:59 2004
+++ www/mozilla-devel/Makefile Thu Apr 15 22:29:05 2004
@@ -120,6 +120,8 @@
OPTIMIZED_CFLAGS "Enable -O2 optimizations" off \
SMB "Enable smb:// URI support using gnomevfs" off
+PKGINSTALL= ${PORTSDIR}/www/mozilla/pkg-install
+
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
@@ -334,6 +336,7 @@
post-install:
@${CHMOD} -R u-w ${PREFIX}/lib/${MOZILLA}/components
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
--- mozilla-devel.diff ends here ---
--- firefox.diff begins here ---
diff -urN www/firefox.orig/Makefile www/firefox/Makefile
--- www/firefox.orig/Makefile Thu Apr 8 19:28:12 2004
+++ www/firefox/Makefile Thu Apr 15 00:12:24 2004
@@ -83,6 +83,8 @@
EXTRA_SCRIPTS= ${PORTNAME}.rb
+PKGINSTALL= ${PORTSDIR}/www/mozilla/pkg-install
+
.if ${ARCH} == "alpha" && ${OSVERSION} < 500035
IGNORE= "core dumps on alpha during post-build"
.endif
@@ -166,6 +168,7 @@
cd ${FAKEDIR} && ${FIND} * | ${CPIO} -dmp --quiet ${PREFIX}
post-install:
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.for i in ${EXTRA_SCRIPTS}
${INSTALL_SCRIPT} ${FILESDIR}/${i} ${PREFIX}/bin
.endfor
--- firefox.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list