From 3da7e283a2e577fdddfb140f1e29e82284988c19 Mon Sep 17 00:00:00 2001 From: ahze Date: Tue, 22 Nov 2005 21:29:16 +0000 Subject: -- Marge lots of common mozilla-ports tasks into Makefile.common o creation of plist (Disabled with NOGECKO_PLIST) o install (Disabled with NOGECKO_INSTALL) o many common post-patch routines - Expand post- pre- targets so ports and Makefile.common can use the same target - Makefile.common supports both ${FILESDIR}/mozconfig.in (if exists) and now has 3 new variables to add opions to .mozconfig [1] Ports can use the following: NOGECKO_INSTALL NOGECKO_PLIST Do not auto-create plist NOMOZCONFIG Use CONFIGURE_ARGS instead of .mozconfig MOZILLA_PLIST_DIRS Listing of directories to create plist and/or install MOZ_PIS_SCRIPTS List scripts listed in ${FILESDIR} to filter through MOZCONFIG_SED and install with mozilla PIS scripts. MOZ_SED_ARGS Add or replace to MOZ_SED_ARGS [1] MOZ_OPTIONS Add more configure arguments to .mozconfig MOZ_MK_OPTIONS Add more make arguments to .mozconfig MOZ_EXPORT Add export variables to .mozconfig if ${FILESDIR}/mozconfig.in exists and NOMOZCONFIG is not defined contents of ${FILESDIR}/mozconfig.in will be filtered through MOZCONFIG_SED and added the the end of .mozconfig I broke the following: o Optional extensions (irc, etc) , need to figure out how to handle this Todo: o Handle .desktop the install of .desktop files and icons o Handle Java plugins o Cleanup/Audit and moving any other common "things" into Makefile.common o (maybe) convert all the ${FILESDIR}/mozconfig.in to MOZ_OPTIONS/EXPORT variables o Add support for ports to set MOZILLA=PORTNAME-devel o Figure out how to get the rest of mozconfig-generic.in to work in MOZ_EXPORT, the following example does not work MOZ_EXPORT=CFLAGS="${CFLAGS}" if treats each flag in CFLAGS as a different flag and you end up with a bunch of export -O2, export -xxx instead of export -O2 -xxx -blah .... o Figure out why MOZ_OPIONS+=--prefix=${FAKEDIR} ends up in .mozconfig as --prefix=/fake instead of --prefix=${WRKDIR}/fake (--prefix is in mozconfig-generic.in for now) o testing testing TESTING git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@5182 df743ca5-7f9a-e211-a948-0013205c9059 --- mail/thunderbird/Makefile | 86 +--------------------- .../files/patch-build_unix_run-mozilla.sh | 2 +- mail/thunderbird/files/patch-config_autoconf.mk.in | 18 +++++ 3 files changed, 21 insertions(+), 85 deletions(-) create mode 100644 mail/thunderbird/files/patch-config_autoconf.mk.in (limited to 'mail/thunderbird') diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index b15f635dc..b58d21c6d 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -3,7 +3,7 @@ # Whom: Joe Marcus Clarke # # $FreeBSD$ -# $MCom$ +# $MCom: ports/mail/thunderbird/Makefile,v 1.8 2005/11/14 04:12:06 ahze Exp $ # PORTNAME= thunderbird @@ -28,9 +28,7 @@ USE_X_PREFIX= yes PORTNAME_ICON= ${PREFIX}/lib/${PORTNAME}/chrome/icons/default/default.xpm SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults/pref/${PORTNAME}.js -SCRIPTS_DIR= ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION} -MOZ_PIS_SCRIPTS=S50cleanhome -MOZ_PIS_DIR= ${SCRIPTS_DIR}/init.d +MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome CONFLICTS= thunderbird-1.5* @@ -45,28 +43,11 @@ IGNORE= core dumps at runtime EXTRA_PATCHES+= ${FILESDIR}/extra-patch-config_make-jars.pl .endif # ${PERL_LEVEL} < 500600 -pre-extract:: - @${ECHO_MSG} - @${ECHO_MSG} "Extracting source (this takes a while) ..." - @${ECHO_MSG} - post-extract:: @${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON}|' \ <${FILESDIR}/${PORTNAME}.desktop.in >${WRKDIR}/${PORTNAME}.desktop post-patch: -.for ii in ${MOZ_PIS_SCRIPTS} - @${SED} -e 's|%%MOZILLA%%|${PORTNAME}|g ; \ - s|%%PREFIX%%|${PREFIX}|g ; \ - s|%%X11BASE%%|${X11BASE}|g' \ - < ${FILESDIR}/moz_pis_${ii} > ${WRKDIR}/moz_pis_${ii} -.endfor - @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ - ${WRKSRC}/build/unix/run-mozilla.sh - @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' \ - ${WRKSRC}/security/coreconf/FreeBSD.mk \ - ${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \ - ${WRKSRC}/js/src/Makefile.in @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g' \ -e 's|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \ ${WRKSRC}/xpcom/*/SpecialSystemDirectory.cpp @@ -79,74 +60,11 @@ post-patch: ${WRKSRC}/xpcom/io/nsNativeCharsetUtils.cpp pre-install: - @${RM} -rf ${FAKEDIR} ${PLIST} - @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \ - Makefile ${MAKE_ARGS} ${INSTALL_TARGET} - @${MKDIR} ${SCRIPTS_DIR} - @${MKDIR} ${MOZ_PIS_DIR} ${ECHO_CMD} 'share/applications/${PORTNAME}.desktop' >> ${PLIST} ${ECHO_CMD} "@unexec ${RMDIR} %D/share/applications 2>/dev/null || ${TRUE}" >> ${PLIST} - ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g; \ - s|${PORTNAME}-${PORTVERSION}|${PORTNAME}|' \ - ${FAKEDIR}/bin/${PORTNAME} \ - ${FAKEDIR}/bin/${PORTNAME}-config - ${ECHO_CMD} bin/${PORTNAME} >> ${PLIST} - ${ECHO_CMD} bin/${PORTNAME}-config >> ${PLIST} -.for ii in ${MOZ_PIS_SCRIPTS} - ${INSTALL_SCRIPT} ${WRKDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii} -.endfor @${MKDIR} ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults - @${CP} -RL ${WRKSRC}/dist/bin/defaults/isp \ - ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults - cd ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION} && ${FIND} -s * -type f -o -type l | \ - ${SED} -e 's|^|lib/${PORTNAME}/|' >> ${PLIST} \ - && ${FIND} -d * -type d | \ - ${SED} -e 's|^|@dirrm lib/${PORTNAME}/|' >> ${PLIST} - ${ECHO_CMD} @dirrm lib/${PORTNAME} >> ${PLIST} - for pcfile in ${PKGCONFIG_FILES}; do \ - ${REINPLACE_CMD} -e 's|${PORTNAME}-${PORTVERSION}|${PORTNAME}|g; \ - s|${FAKEDIR}|${PREFIX}|g ; \ - s|${PORTNAME}-nspr = ${PORTVERSION}|nspr >= 4.6.0|g' \ - ${FAKEDIR}/lib/pkgconfig/$${pcfile}.pc ; \ - ${ECHO_CMD} libdata/pkgconfig/$${pcfile}.pc >> ${PLIST} ; \ - done - cd ${FAKEDIR}/include/${PORTNAME}-${PORTVERSION} && ${FIND} -s * -type f -o -type l | \ - ${SED} -e 's|^|include/${PORTNAME}/|' >> ${PLIST} \ - && ${FIND} -d * -type d | \ - ${SED} -e 's|^|@dirrm include/${PORTNAME}/|' >> ${PLIST} - ${ECHO_CMD} @dirrm include/${PORTNAME} >> ${PLIST} - cd ${FAKEDIR}/share/idl/${PORTNAME}-${PORTVERSION} \ - && ${FIND} -s * -type f -o -type l | \ - ${SED} -e 's:^:share/idl/${PORTNAME}/:' >> ${PLIST} \ - && ${FIND} -d * -type d | \ - ${SED} -e 's:^:@dirrm share/idl/${PORTNAME}/:' >> ${PLIST} - ${ECHO_CMD} "@dirrm share/idl/${PORTNAME}" >> ${PLIST} - ${ECHO_CMD} "@unexec ${RMDIR} %D/share/idl 2>/dev/null || true" >> ${PLIST} - -do-install: - ${MKDIR} ${PREFIX}/lib/${PORTNAME} - ${CHMOD} 755 ${PREFIX}/lib/${PORTNAME} - ${INSTALL_SCRIPT} ${FAKEDIR}/bin/${PORTNAME} ${PREFIX}/bin - ${INSTALL_SCRIPT} ${FAKEDIR}/bin/${PORTNAME}-config ${PREFIX}/bin - for pcfile in ${PKGCONFIG_FILES}; do \ - ${INSTALL_DATA} ${FAKEDIR}/lib/pkgconfig/$${pcfile}.pc \ - ${PREFIX}/libdata/pkgconfig/$${pcfile}.pc ; \ - done - -${RM} -fr ${PREFIX}/include/${PORTNAME} - ${MKDIR} ${PREFIX}/include/${PORTNAME} - ${CHMOD} 755 ${PREFIX}/include/${PORTNAME} - cd ${FAKEDIR}/include/${PORTNAME}-${PORTVERSION} && ${FIND} . | \ - ${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/include/${PORTNAME} - cd ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION} && ${FIND} . | \ - ${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${PORTNAME} - ${MKDIR} ${PREFIX}/share/idl/${PORTNAME} - cd ${FAKEDIR}/share/idl/${PORTNAME}-${PORTVERSION} && ${FIND} . | \ - ${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/idl/${PORTNAME} post-install: -.if !defined(PACKAGE_BUILDING) - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif ${MKDIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/${PORTNAME}/default.xpm \ diff --git a/mail/thunderbird/files/patch-build_unix_run-mozilla.sh b/mail/thunderbird/files/patch-build_unix_run-mozilla.sh index 28bbd1a11..37af6d18a 100644 --- a/mail/thunderbird/files/patch-build_unix_run-mozilla.sh +++ b/mail/thunderbird/files/patch-build_unix_run-mozilla.sh @@ -5,7 +5,7 @@ ## ## Set LD_LIBRARY_PATH -LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} -+LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:%%PREFIX%%/lib/browser_plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} ++LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:%%PREFIX%%/lib/browser_plugins:%%PREFIX%%/lib/browser_plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} if [ -n "$LD_LIBRARYN32_PATH" ] then LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"} diff --git a/mail/thunderbird/files/patch-config_autoconf.mk.in b/mail/thunderbird/files/patch-config_autoconf.mk.in new file mode 100644 index 000000000..29fe7f8fb --- /dev/null +++ b/mail/thunderbird/files/patch-config_autoconf.mk.in @@ -0,0 +1,18 @@ +--- config/autoconf.mk.in.orig Thu Jul 14 00:50:06 2005 ++++ config/autoconf.mk.in Thu Jul 14 00:50:40 2005 +@@ -50,13 +50,13 @@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = @includedir@/%%MOZILLA%% + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ + idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + +-mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++mozappdir = $(libdir)/%%MOZILLA%% + mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION) + mrelibdir = $(mredir)/lib + -- cgit v1.2.3