summaryrefslogtreecommitdiffstats
path: root/www/mozilla/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'www/mozilla/Makefile.common')
-rw-r--r--www/mozilla/Makefile.common124
1 files changed, 124 insertions, 0 deletions
diff --git a/www/mozilla/Makefile.common b/www/mozilla/Makefile.common
new file mode 100644
index 000000000..a88db5d55
--- /dev/null
+++ b/www/mozilla/Makefile.common
@@ -0,0 +1,124 @@
+# $FreeBSD$
+# $MCom$
+
+BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip
+LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \
+ png.5:${PORTSDIR}/graphics/png \
+ nspr4:${PORTSDIR}/devel/nspr \
+ nss3:${PORTSDIR}/security/nss \
+ Xft.2:${PORTSDIR}/x11-fonts/libXft
+
+MAINTAINER?= gnome@FreeBSD.org
+
+MOZILLA?= ${PORTNAME}
+MOZILLA_VER?= ${PORTVERSION}
+USE_GNOME+= gtk20 libidl desktopfileutils
+USE_ICONV= yes
+USE_PERL5_BUILD=yes
+USE_X_PREFIX= yes
+
+WRKSRC?= ${WRKDIR}/mozilla
+PKGINSTALL?= ${WRKDIR}/pkg-install
+PKGDEINSTALL?= ${WRKDIR}/pkg-deinstall
+FAKEDIR?= ${WRKDIR}/fake
+PLIST?= ${WRKDIR}/plist
+
+KRB5_HOME?= /usr
+
+GENERIC_MOZCONFIG?= ${.CURDIR}/../../www/mozilla/files/mozconfig-generic.in
+PORT_MOZCONFIG?= ${FILESDIR}/files/mozconfig.in
+MOZCONFIG?= ${WRKSRC}/.mozconfig
+
+EXTRACT_AFTER_ARGS?= | ${TAR} -xf - --exclude */CVS/* \
+ --exclude */macbuild/* \
+ --exclude */package/* \
+ --exclude .cvsignore \
+ --exclude makefile.win \
+ --exclude MANIFEST \
+ --exclude */nsprpub/* \
+ --exclude */zlib/ \
+ --exclude mozilla/modules/libimg/png \
+ --exclude mozilla/jpeg \
+ --exclude mozilla/dbm \
+ --exclude mozilla/js/src/fdlibm \
+ --exclude mozilla/security/nss \
+ --exclude mozilla/gc/boehm \
+ --exclude mozilla/gfx/cairo
+
+JPI_LIST?=\
+ ${LOCALBASE}/jdk1.5.0/jre/plugin/${ARCH}/ns7/libjavaplugin_oji.so \
+ ${LOCALBASE}/jdk1.4.2/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so
+
+PKGCONFIG_FILES?= ${MOZILLA}-gtkmozembed ${MOZILLA}-js \
+ ${MOZILLA}-xpcom ${MOZILLA}-plugin
+
+.if defined(WITH_SMB)
+USE_GNOME+= gnomevfs2
+CONFIGURE_ENV+= WITH_SMB=yes
+.endif
+
+.if defined(WITH_DEBUG)
+CONFIGURE_ENV+= WITH_DEBUG=yes
+WITH_LOGGING= yes
+.endif
+
+.if defined(WITH_LOGGING)
+CONFIGURE_ENV+= WITH_LOGGING=yes
+.endif
+
+.if defined(WITH_OPTIMIZED_CFLAGS)
+CFLAGS:= -O2 -fno-strict-aliasing ${CFLAGS:N-O*}
+.else
+CFLAGS:= ${CFLAGS:N-O*:N-m*} -O
+CONFIGURE_ENV+= WITH_OPTIMIZE=-O
+.endif
+
+.if exists(${LOCALBASE}/include/freetype/freetype.h)
+BROKEN= "You must upgrade your freetype port to 1.3.1_2 or higher before \
+ installing ${PORTNAME}. If you have 1.3.1_2 installed, please remove \
+ ${LOCALBASE}/include/freetype, then build ${PORTNAME}"
+.endif
+
+# Makefile.common defines
+MOZCONFIG_SED= ${SED} -e 's|@CPPFLAGS@|${CPPFLAGS}|' \
+ -e 's|@CFLAGS@|${CFLAGS}|' \
+ -e 's|@LDFLAGS@|${LDFLAGS}|' \
+ -e 's|@LIBS@|${LIBS}|' \
+ -e 's|@X11BASE@|${X11BASE}|' \
+ -e 's|@LOCALBASE@|${LOCALBASE}|' \
+ -e 's|@FAKEDIR@|${FAKEDIR}|' \
+ -e 's|@PERL@|${PERL5}|' \
+ -e 's|@KRB5_HOME@|${KRB5_HOME}|' \
+ -e 's|@MOZDIR@|${PREFIX}/lib/${MOZILLA}|' \
+ -e 's|%%CFLAGS%%|${CFLAGS}|' \
+ -e 's|%%LDFLAGS%%|${LDFLAGS}|' \
+ -e 's|%%LIBS%%|${LIBS}|' \
+ -e 's|%%X11BASE%%|${X11BASE}|' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ -e 's|%%FAKEDIR%%|${FAKEDIR}|' \
+ -e 's|%%PERL%%|${PERL5}|' \
+ -e 's|%%KRB5_HOME%%|${KRB5_HOME}|' \
+ -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|'
+
+pre-configure:
+.if exists(${.CURDIR}/pkg-install.in)
+ @${MOZCONFIG_SED} < ${.CURDIR}/pkg-install.in > ${PKGINSTALL}
+.endif
+.if exists(${.CURDIR}/pkg-deinstall.in)
+ @${MOZCONFIG_SED} < ${.CURDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
+.endif
+ @${RM} -f ${MOZCONFIG}
+.if exists(${GENERIC_MOZCONFIG})
+ @${MOZCONFIG_SED} < ${GENERIC_MOZCONFIG} >> ${MOZCONFIG}
+.endif
+.if exists(${PORT_MOZCONFIG})
+ @${MOZCONFIG_SED} < ${PORT_MOZCONFIG} >> ${MOZCONFIG}
+.endif
+ @${REINPLACE_CMD} -e 's/%{idldir}/%idldir%/g ; \
+ s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \
+ s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \
+ ${WRKSRC}/build/unix/mozilla-config.in
+ @if [ -n "`${PKG_INFO} -xI '^bind[0-9]*-base-[0-9]'`" ]; then \
+ ${ECHO_CMD} "${PKGNAME}: bind installed with PORT_REPLACES_BASE_BIND causes build problems."; \
+ ${FALSE}; \
+ fi