diff options
author | marcus <marcus@FreeBSD.org> | 2004-10-24 02:35:07 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-10-24 02:35:07 +0000 |
commit | 42f2bd725c12b05c160a119145c5bd55a1a93078 (patch) | |
tree | b43dfb79bbdf231ebddf36f584b331d3cbb3be9c /www/mozilla-devel | |
parent | babad31ad9eaf9ebf3c4434045d7a2fb66884128 (diff) | |
download | FreeBSD-ports-42f2bd725c12b05c160a119145c5bd55a1a93078.zip FreeBSD-ports-42f2bd725c12b05c160a119145c5bd55a1a93078.tar.gz |
* Add a pkg-deinstall script to remove left-over dynamically generated
files [1]
* Move REINPLACE_CMD up from do-install to pre-install so no .bak files
are left behind after pkg_delete [2]
PR: 71313 [1]
73054 [2]
Submitted by: Michael Johnson <ahze@ahze.net> [2]
Diffstat (limited to 'www/mozilla-devel')
-rw-r--r-- | www/mozilla-devel/Makefile | 17 | ||||
-rw-r--r-- | www/mozilla-devel/pkg-deinstall.in | 22 |
2 files changed, 32 insertions, 7 deletions
diff --git a/www/mozilla-devel/Makefile b/www/mozilla-devel/Makefile index d88cda0..8aac680 100644 --- a/www/mozilla-devel/Makefile +++ b/www/mozilla-devel/Makefile @@ -84,6 +84,7 @@ MOZ_EXTENSIONS= default CONFIGURE_ENV= MOZ_INTERNAL_LIBART_LGPL=1 \ LOCALBASE=${LOCALBASE} PKGINSTALL= ${WRKDIR}/pkg-install +PKGDEINSTALL= ${WRKDIR}/pkg-deinstall CONFIGURE_ARGS+= --enable-default-toolkit=gtk2 @@ -246,12 +247,14 @@ post-patch: @${REINPLACE_CMD} -e 's|libfreetype.so.6|${FREETYPE_LIB}|g' \ ${WRKSRC}/modules/libpref/src/init/all.js @for pcfile in ${PKGCONFIG_FILES}; do \ - ${REINPLACE_CMD} -e 's|mozilla-xpcom|mozilla-xpcom${MOZ_SUFX}${PKGNAMESUFFIX}|g ; \ - s|mozilla-nspr|mozilla-nspr${MOZ_SUFX}${PKGNAMESUFFIX}|g' \ + ${REINPLACE_CMD} -e 's|mozilla-xpcom|mozilla-xpcom${MOZ_SUFX}|g ; \ + s|mozilla-nspr|mozilla-nspr${MOZ_SUFX}|g' \ ${WRKSRC}/build/unix/$${pcfile}.pc.in; \ done @${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g' \ < ${MASTERDIR}/pkg-install.in > ${PKGINSTALL} + @${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g' \ + < ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL} pre-configure: @if [ -n "`${PKG_INFO} -xI '^bind[0-9]*-base-[0-9]'`" ]; then \ @@ -268,6 +271,9 @@ pre-install: ${TOUCH} -f ${PLIST} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \ Makefile ${MAKE_ARGS} install + ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ + ${FAKEDIR}/bin/mozilla \ + ${FAKEDIR}/bin/mozilla-config if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \ ${ECHO_CMD} bin/mozilla >> ${PLIST} ; \ fi @@ -289,7 +295,7 @@ pre-install: ${SED} -e 's:^:@dirrm lib/${MOZILLA}/:' >> ${PLIST} ${ECHO_CMD} @dirrm lib/${MOZILLA} >> ${PLIST} for pcfile in ${PKGCONFIG_FILES}; do \ - ${ECHO_CMD} libdata/pkgconfig/$${pcfile}${MOZ_SUFX}${PKGNAMESUFFIX}.pc >> ${PLIST} ; \ + ${ECHO_CMD} libdata/pkgconfig/$${pcfile}${MOZ_SUFX}.pc >> ${PLIST} ; \ done cd ${FAKEDIR}/include/${MOZILLA} && ${FIND} -s * -type f -o -type l | \ ${SED} -e 's:^:include/${MOZILLA}/:' >> ${PLIST} \ @@ -302,9 +308,6 @@ do-install: ${CHMOD} 755 ${PREFIX}/lib/${MOZILLA} ${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla ${PREFIX}/lib/${MOZILLA} ${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla-config ${PREFIX}/lib/${MOZILLA} - ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ - ${PREFIX}/lib/${MOZILLA}/mozilla \ - ${PREFIX}/lib/${MOZILLA}/mozilla-config cd ${FAKEDIR}/lib/${MOZILLA} && ${FIND} . | \ ${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${MOZILLA} ${INSTALL_SCRIPT} ${WRKSRC}/${MOZILLA} ${PREFIX}/bin @@ -327,7 +330,7 @@ do-install: ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ ${WRKSRC}/build/unix/$${pcfile}.pc; \ ${INSTALL_DATA} ${WRKSRC}/build/unix/$${pcfile}.pc \ - ${PREFIX}/libdata/pkgconfig/$${pcfile}${MOZ_SUFX}${PKGNAMESUFFIX}.pc ; \ + ${PREFIX}/libdata/pkgconfig/$${pcfile}${MOZ_SUFX}.pc ; \ done -${RM} -fr ${PREFIX}/include/${MOZILLA} ${MKDIR} ${PREFIX}/include/${MOZILLA} diff --git a/www/mozilla-devel/pkg-deinstall.in b/www/mozilla-devel/pkg-deinstall.in new file mode 100644 index 0000000..329a58b --- /dev/null +++ b/www/mozilla-devel/pkg-deinstall.in @@ -0,0 +1,22 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Date created: Mon Nov 29, 2003 +# Whom: Thierry Thomas (<thierry@pompo.net>) +# Fix the chrome registry. + +umask 022 +PATH=/bin:/usr/bin + +[ "x$1" = "x" ] && exit 1 +[ "x$2" != "xDEINSTALL" ] && exit 0 + +MOZDIR=%%MOZDIR%% + +rm -rf ${MOZDIR}/chrome/overlayinfo +rm -f ${MOZDIR}/chrome/*.rdf +rm -f ${MOZDIR}/component.reg +rm -f ${MOZDIR}/components/*.dat + +exit 0 |