aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-12-10 04:30:53 +0800
committerasomers <asomers@FreeBSD.org>2016-12-10 04:30:53 +0800
commitfb3bcba18b3f10e8a8f3f495764f3ac1e38db0ad (patch)
treeb2cd3f51249f5082e509e4dda629debcf18fa1bb /java
parent914ac45760ac062f4a5076c959cc687e0b2709ec (diff)
downloadfreebsd-ports-gnome-fb3bcba18b3f10e8a8f3f495764f3ac1e38db0ad.tar.gz
freebsd-ports-gnome-fb3bcba18b3f10e8a8f3f495764f3ac1e38db0ad.tar.zst
freebsd-ports-gnome-fb3bcba18b3f10e8a8f3f495764f3ac1e38db0ad.zip
Add an X11 option to java/openjdk[78]
It defaults to on. Disabling it will remove X support from Java, and reduce X-related dependencies. PR: 210000 Reviewed by: brd Approved by: brd (ports) Approved by: glewis (maintainer timeout) Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6698
Diffstat (limited to 'java')
-rw-r--r--java/openjdk7/Makefile22
-rw-r--r--java/openjdk8/Makefile35
2 files changed, 46 insertions, 11 deletions
diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile
index b4df2b8027dc..c835fe57969b 100644
--- a/java/openjdk7/Makefile
+++ b/java/openjdk7/Makefile
@@ -3,7 +3,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${PORT_MINOR_VERSION}.${PORT_BUILD_NUMBER}
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/ \
@@ -41,11 +41,25 @@ LICENSE= GPLv2
WRKSRC= ${WRKDIR}/${PORTNAME}
USES= compiler dos2unix iconv gmake zip
-USE_XORG+= x11 xext xi xrender xt xtst
+# Even when not building with X11 support, openjdk7 requires Xrender, X11, and
+# Xt headers.
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/x11.pc:x11/libX11
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/xext.pc:x11/libXext
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/xrender.pc:x11/libXrender
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/xt.pc:x11-toolkits/libXt
+# Add more X11 build deps and runtime deps when X11 is enabled
+X11_LIB_DEPENDS+= libX11.so.6:x11/libX11
+X11_LIB_DEPENDS+= libXext.so.6:x11/libXext
+X11_LIB_DEPENDS+= libXi.so.6:x11/libXi
+X11_LIB_DEPENDS+= libXrender.so.1:x11/libXrender
+X11_LIB_DEPENDS+= libXt.so.6:x11-toolkits/libXt
+X11_LIB_DEPENDS+= libXtst.so.6:x11/libXtst
+X11_MAKE_ENV_OFF= BUILD_HEADLESS_ONLY=1
+
MAKE_ARGS= CC=${CC:Q} CXX=${CXX:Q} HOST_CC=${CC:Q}
-OPTIONS_DEFINE= POLICY TZUPDATE
-OPTIONS_DEFAULT= POLICY TZUPDATE
+OPTIONS_DEFINE= POLICY TZUPDATE X11
+OPTIONS_DEFAULT= POLICY TZUPDATE X11
DEBUG_DESC= Enable extra debugging info
POLICY_DESC= Install the Unlimited Strength Policy Files
TZUPDATE_DESC= Update the time zone data
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile
index f45ad533cd19..09df28d03bd9 100644
--- a/java/openjdk8/Makefile
+++ b/java/openjdk8/Makefile
@@ -2,6 +2,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${DIST_BUILD_NUMBER}/:jdk \
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \
@@ -37,8 +38,8 @@ BUILD_DEPENDS= zip:archivers/zip \
${LOCALBASE}/include/cups/cups.h:print/cups \
bash:shells/bash
LIB_DEPENDS= libasound.so:audio/alsa-lib \
- libfontconfig.so:x11-fonts/fontconfig \
- libfreetype.so:print/freetype2 \
+ libfreetype.so:print/freetype2
+X11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libgif.so:graphics/giflib
RUN_DEPENDS= javavm:java/javavmwrapper \
dejavu>0:x11-fonts/dejavu
@@ -46,7 +47,19 @@ RUN_DEPENDS= javavm:java/javavmwrapper \
USES= compiler:features dos2unix gmake iconv pkgconfig \
shebangfix
USE_AUTOTOOLS= autoconf
-USE_XORG= x11 xext xi xrender xt xtst
+# Even when not building with X11 support, openjdk8 requires Xrender, X11,
+# Xext, and Xt headers.
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/x11.pc:x11/libX11
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/xext.pc:x11/libXext
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/xrender.pc:x11/libXrender
+X11_BUILD_DEPENDS_OFF+= ${LOCALBASE}/libdata/pkgconfig/xt.pc:x11-toolkits/libXt
+# Add more X11 build deps and runtime deps when X11 is enabled
+X11_LIB_DEPENDS+= libX11.so.6:x11/libX11
+X11_LIB_DEPENDS+= libXext.so.6:x11/libXext
+X11_LIB_DEPENDS+= libXi.so.6:x11/libXi
+X11_LIB_DEPENDS+= libXrender.so.1:x11/libXrender
+X11_LIB_DEPENDS+= libXt.so.6:x11-toolkits/libXt
+X11_LIB_DEPENDS+= libXtst.so.6:x11/libXtst
.if !exists(/usr/bin/unzip)
BUILD_DEPENDS+= ${UNZIP_CMD}:archivers/unzip
@@ -185,9 +198,14 @@ _MAKE_JOBS= #
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV= LANG="C" LC_ALL="C"
-MAKE_ENV+= CLASSPATH="" JAVA_HOME="" LD_LIBRARY_PATH="" MAKEFLAGS=""
+MAKE_ENV+= CLASSPATH="" JAVA_HOME="" LD_LIBRARY_PATH=""
MAKE_ENV+= IGNORE_OLD_CONFIG=true
MAKE_ENV+= COMPILER_WARNINGS_FATAL="false"
+# openjdk8 normally sets X_CFLAGS in the ./configure script, but it won't do
+# that if you say --disable-headful, even though it still needs some X headers.
+# Set it here instead.
+X11_MAKE_ENV_OFF= MAKEFLAGS="X_CFLAGS=-I${LOCALBASE}/include" \
+ BUILD_HEADLESS_ONLY=1
JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}-normal-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE}
.if !defined(BUILD_JRE)
@@ -225,18 +243,21 @@ CONFIGURE_ARGS+= --disable-ccache \
--with-debug-level=${JDK_BUILD_TYPE} \
--with-freetype=${LOCALBASE} \
--with-freetype-include=${LOCALBASE}/include/freetype2 \
- --with-giflib=system \
--with-jobs=${MAKE_JOBS_NUMBER} \
--with-jvm-variants=${JDK_BUILD_JVM} \
--with-milestone=fcs \
--with-package-path=${LOCALBASE} \
--with-zlib=system
+X11_CONFIGURE_ON= --with-giflib=system \
+ --x-libraries=${LOCALBASE}/lib \
+ --x-includes=${LOCALBASE}/include
+X11_CONFIGURE_OFF= --disable-headful
CONFIGURE_SCRIPT= ../../configure
CONFIGURE_WRKSRC= ${WRKSRC}/common/autoconf
-OPTIONS_DEFINE= POLICY TZUPDATE
+OPTIONS_DEFINE= POLICY TZUPDATE X11
OPTIONS_DEFINE_armv6= FPUHACK
-OPTIONS_DEFAULT= POLICY TZUPDATE
+OPTIONS_DEFAULT= POLICY TZUPDATE X11
OPTIONS_DEFAULT_armv6= FPUHACK
FPUHACK_DESC= Hack denormalized numbers in flush-to-zero mode
POLICY_DESC= Install the Unlimited Strength Policy Files