summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2006-10-12 17:32:06 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2006-10-12 17:32:06 +0800
commit27d5140a4156cded994e573ce88b4e1caf0f515a (patch)
treeb999ed1faa0d3602470dfc7ab26f49e248209a60 /www
parent3bef469ff354beb1531881738c274a3ae36b505f (diff)
downloadmarcuscom-ports-27d5140a4156cded994e573ce88b4e1caf0f515a.tar.gz
marcuscom-ports-27d5140a4156cded994e573ce88b4e1caf0f515a.tar.zst
marcuscom-ports-27d5140a4156cded994e573ce88b4e1caf0f515a.zip
- Add new WITH_JAVA to OPTIONS, this builds java-xpcom extension.
- Make OPTIONS handleing more robust with the ability to turn on/off per-option options with ease git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@7733 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'www')
-rw-r--r--www/mozilla/Makefile.common39
1 files changed, 27 insertions, 12 deletions
diff --git a/www/mozilla/Makefile.common b/www/mozilla/Makefile.common
index 5496907a3..f89f4cf72 100644
--- a/www/mozilla/Makefile.common
+++ b/www/mozilla/Makefile.common
@@ -4,7 +4,7 @@
# Whom: Michael Johnson <ahze@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/www/mozilla/Makefile.common,v 1.26 2006/10/05 21:37:18 mezz Exp $
+# $MCom: ports/www/mozilla/Makefile.common,v 1.27 2006/10/09 04:30:01 ahze Exp $
# This file contains some reusable components for mozilla ports. It's of
# use primarily to apps from the mozilla project itself (such as Firefox,
@@ -59,10 +59,6 @@ LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \
nss3:${PORTSDIR}/security/nss \
Xft.2:${PORTSDIR}/x11-fonts/libXft
-OPTIONS+= DEBUG "Build a debugging image" off \
- LOGGING "Enable additional log messages" off \
- OPTIMIZED_CFLAGS "Enable some additional optimizations" off
-
MAINTAINER?= gnome@FreeBSD.org
MOZILLA?= ${PORTNAME}
@@ -125,6 +121,23 @@ CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= -L${X11BASE}/lib -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
LIBS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib -liconv
+_USE_GECKO_OPTIONS_ALL= java debug logging optimized_cflags
+
+.if !defined(USE_GECKO_OPTIONS)
+USE_GECKO_OPTIONS= debug logging optimized_cflags
+.endif
+
+debug_OPTION= "Build a debugging image" off
+java_OPTION= "Enable JAVA xpcom" off
+logging_OPTION= "Enable additional log messages" off
+optimized_cflags_OPTION= "Enable some additional optimizations" off
+
+.for option in ${USE_GECKO_OPTIONS:L}
+.if ${_USE_GECKO_OPTIONS_ALL:M${option}}!=""
+OPTIONS+= ${option:U} ${${option}_OPTION}
+.endif
+.endfor
+
# Standard options from README
MOZ_OPTIONS+= --enable-crypto \
--disable-tests \
@@ -172,13 +185,6 @@ MOZ_OPTIONS+= --with-system-jpeg=${LOCALBASE} \
--enable-xinerama
MOZ_MK_OPTIONS+= XP_UNIX=1 \
PERL=${PERL}
-#MOZ_EXPORT+= CPPFLAGS=${CPPFLAGS} \
-# CFLAGS=$$CFLAGS \
-# LIBS=$$LIBS \
-# LDFLAGS=$$LDFLAGS \
-# CONFIG_SH=$$SH \
-# XP_UNIX=1 \
-# PERL=$$PERL5
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS:= ${CFLAGS} -O2 -fno-strict-aliasing ${EXTRA_CFLAGS}
@@ -203,6 +209,15 @@ MOZ_OPTIONS+= --disable-debug \
--enable-strip
.endif
+.if defined(WITH_JAVA)
+USE_JAVA= yes
+JAVA_VERSION+= 1.4+
+JAVA_OS+= native
+CONFIGURE_ENV+= JAVA_HOME="${JAVA_HOME}"
+MOZ_OPTIONS+= --enable-javaxpcom
+CFLAGS+= -DJNIIMPORT
+.endif
+
.if defined(WITH_LOGGING)
MOZ_OPTIONS+= --enable-logging
.else