2011-04-08 20:38:09 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.22 2011/04/09 00:38:09 ian Exp $
|
2007-11-18 22:19:43 -05:00
|
|
|
|
|
|
|
SHARED_ONLY= Yes
|
|
|
|
ONLY_FOR_ARCHS= amd64 i386
|
|
|
|
|
|
|
|
COMMENT-main= Java2(TM) Standard Edition Dev Kit v${V}
|
|
|
|
COMMENT-jre= Java2(TM) Standard Edition Runtime Environment v${V}
|
|
|
|
V= 1.6.0.03
|
|
|
|
PKGNAME= jdk-${V}
|
2010-11-15 14:45:56 -05:00
|
|
|
PKGNAME-main= jdk-${V}
|
2011-04-08 20:38:09 -04:00
|
|
|
REVISION-main = 13
|
2010-11-15 14:45:56 -05:00
|
|
|
PKGNAME-jre= jre-${V}
|
2011-04-08 20:38:09 -04:00
|
|
|
REVISION-jre = 13
|
2007-11-18 22:19:43 -05:00
|
|
|
|
|
|
|
CATEGORIES= devel/jdk java
|
|
|
|
|
|
|
|
MULTI_PACKAGES= -main -jre
|
|
|
|
|
|
|
|
HOMEPAGE= https://jdk6.dev.java.net/
|
|
|
|
|
|
|
|
MAINTAINER= Kurt Miller <kurt@openbsd.org>
|
|
|
|
|
|
|
|
JRLSRC= jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar
|
|
|
|
JRLBIN= jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar
|
|
|
|
JRLMOZ= jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar
|
2008-03-16 23:28:26 -04:00
|
|
|
PATCHSET= bsd-jdk16-patches-4.tar.bz2
|
2007-11-18 22:19:43 -05:00
|
|
|
|
|
|
|
DISTFILES= ${JRLSRC} \
|
|
|
|
${JRLBIN} \
|
|
|
|
${JRLMOZ} \
|
|
|
|
${PATCHSET}
|
|
|
|
|
|
|
|
MASTER_SITES= http://download.java.net/jdk6/6u3/promoted/b05/
|
|
|
|
|
|
|
|
# Java Research License
|
|
|
|
# http://www.java.net/jrl.csp
|
|
|
|
PERMIT_PACKAGE_CDROM= JRL
|
|
|
|
PERMIT_PACKAGE_FTP= JRL
|
|
|
|
PERMIT_DISTFILES_CDROM= JRL
|
|
|
|
PERMIT_DISTFILES_FTP= JRL
|
|
|
|
|
|
|
|
NO_REGRESS= Yes
|
|
|
|
|
|
|
|
VMEM_WARNING= Yes
|
2010-11-15 14:45:56 -05:00
|
|
|
BUILD_DEPENDS= archivers/gtar \
|
|
|
|
archivers/zip \
|
|
|
|
archivers/unzip \
|
|
|
|
archivers/bzip2 \
|
|
|
|
print/cups \
|
|
|
|
x11/openmotif
|
2007-11-18 22:19:43 -05:00
|
|
|
MODULES= converters/libiconv
|
2009-08-10 02:29:51 -04:00
|
|
|
WANTLIB= X11 Xext Xi Xtst c m ossaudio pthread pthread-stubs \
|
sndio support. note, there are two different audio API APIs in jdk1.6,
one, HAE, is not portable to APIs that don't use file descriptors as
their handle, so it's still using ossaudio. the other, DirectAudio,
is more portable, and is the one that this commit is converting to
sndio. DirectAudio is preferred by jdk, and if it's supported, it will
be used. in other words, your java apps on OpenBSD will now be using
sndio (assuing you're using jdk1.6, sndio for jdk1.7 coming soon).
just wanted to explain why this still links with libossaudio ...
ok ajacoutot
2010-07-01 21:43:12 -04:00
|
|
|
sndio stdc++ xcb z
|
2007-11-18 22:19:43 -05:00
|
|
|
|
|
|
|
USE_GMAKE= Yes
|
2010-11-15 14:45:56 -05:00
|
|
|
USE_GROFF = Yes
|
2007-11-18 22:19:43 -05:00
|
|
|
|
|
|
|
TAR= ${LOCALBASE}/bin/gtar
|
|
|
|
|
|
|
|
MAKE_ENV= ALT_MOTIF_DIR="${LOCALBASE}" \
|
|
|
|
ALT_CUPS_HEADERS_PATH="${LOCALBASE}/include" \
|
|
|
|
ALT_DEVTOOLS_PATH="${LOCALBASE}/bin" \
|
|
|
|
SKIP_FASTDEBUG_BUILD=true \
|
|
|
|
DEV_ONLY=true \
|
|
|
|
NO_DOCS=true \
|
|
|
|
CC="${CC}" \
|
|
|
|
CXX="${CXX}" \
|
|
|
|
DEFAULT_LIBPATH="/usr/lib:${X11BASE}/lib:${LOCALBASE}/lib" \
|
|
|
|
USER="${USER}" \
|
2008-12-20 22:59:44 -05:00
|
|
|
HOTSPOT_BUILD_JOBS=${HOTSPOT_BUILD_JOBS}
|
2007-11-18 22:19:43 -05:00
|
|
|
|
|
|
|
# Error message for distfile.
|
|
|
|
FETCH_MANUALLY= "You must manually fetch the distribution files, place"
|
|
|
|
FETCH_MANUALLY+= "them in ${FULLDISTDIR} and then run make again."
|
|
|
|
FETCH_MANUALLY+= "Get the JDK 6u3 Source file:"
|
2009-01-07 08:34:21 -05:00
|
|
|
FETCH_MANUALLY+= " http://download.java.net/jdk6/6u3/promoted/b05/${JRLSRC}"
|
2007-11-18 22:19:43 -05:00
|
|
|
FETCH_MANUALLY+= "and the JDK Binaries file:"
|
2009-01-07 08:34:21 -05:00
|
|
|
FETCH_MANUALLY+= " http://download.java.net/jdk6/6u3/promoted/b05/${JRLBIN}"
|
2007-11-18 22:19:43 -05:00
|
|
|
FETCH_MANUALLY+= "and the Mozilla Binaries file:"
|
2009-01-07 08:34:21 -05:00
|
|
|
FETCH_MANUALLY+= " http://download.java.net/jdk6/6u3/promoted/b05/${JRLMOZ}"
|
2007-11-18 22:19:43 -05:00
|
|
|
FETCH_MANUALLY+= ""
|
|
|
|
FETCH_MANUALLY+= "Get the BSD patchset file:"
|
|
|
|
FETCH_MANUALLY+= " ${PATCHSET}"
|
|
|
|
FETCH_MANUALLY+= "from http://www.eyesbeyond.com/freebsddom/java/jdk16.html"
|
|
|
|
|
|
|
|
FLAVORS= no_web with_ipv6
|
2010-02-05 08:10:31 -05:00
|
|
|
PSEUDO_FLAVORS= native_bootstrap
|
2007-11-18 22:19:43 -05:00
|
|
|
FLAVOR?=
|
|
|
|
|
|
|
|
.if !${FLAVOR:L:Mwith_ipv6}
|
|
|
|
MAKE_ENV+= DONT_ENABLE_IPV6=YES
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# handle jar files in post-extract
|
|
|
|
EXTRACT_CASES+= *.jar) true ;;
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mnative_bootstrap}
|
2009-05-15 13:41:04 -04:00
|
|
|
INSTALLED!= (pkg_info -e "jdk->=1.6,<1.7" -q && echo yes) || echo no
|
|
|
|
.if ${INSTALLED:L} != "yes"
|
|
|
|
ERRORS += "Fatal: This flavor requires an installed 1.6 jdk package"
|
|
|
|
.endif
|
2010-11-15 14:45:56 -05:00
|
|
|
BUILD_DEPENDS+= jdk->=1.6,<1.7:devel/jdk/1.6
|
2007-11-18 22:19:43 -05:00
|
|
|
MAKE_ENV+= ALT_BOOTDIR="${LOCALBASE}/${JDKHOME}"
|
|
|
|
.else
|
2010-11-15 14:45:56 -05:00
|
|
|
BUILD_DEPENDS+= jdk->=1.5,<1.6:devel/jdk/1.5
|
2007-11-18 22:19:43 -05:00
|
|
|
MAKE_ENV+= ALT_BOOTDIR="${LOCALBASE}/jdk-1.5.0"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !${FLAVOR:L:Mno_web}
|
|
|
|
MAKE_ENV+= BUILD_DEPLOY=true
|
|
|
|
.else
|
|
|
|
MAKE_ENV+= BUILD_DEPLOY=false
|
|
|
|
MESSAGE= ${PKGDIR}/MESSAGE-no_web
|
|
|
|
.endif
|
|
|
|
|
|
|
|
JDKHOME= jdk-1.6.0
|
|
|
|
JREHOME= jre-1.6.0
|
|
|
|
|
|
|
|
SUBST_VARS= JDKHOME JREHOME
|
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
PKG_ARGS+= -Dclient_vm=1
|
|
|
|
.else
|
|
|
|
PKG_ARGS+= -Dclient_vm=0
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Deal with Sun's internal build structure
|
|
|
|
WRKDIST= ${WRKDIR}
|
|
|
|
WRKSRC= ${WRKDIR}/control/make
|
|
|
|
OUTPUTDIR= ${WRKDIR}/control/build/bsd-${MACHINE_ARCH:S/i386/i586/}
|
|
|
|
JDKIMAGEDIR= ${OUTPUTDIR}/j2sdk-image
|
|
|
|
JREIMAGEDIR= ${OUTPUTDIR}/j2re-image
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
ACCEPT_JRL_LICENSE ?= No
|
|
|
|
|
|
|
|
.if ${ACCEPT_JRL_LICENSE:L} != "yes"
|
|
|
|
BROKEN += \n
|
|
|
|
BROKEN += You must read and accept Sun's JRL license located\n
|
|
|
|
BROKEN += at ${FILESDIR}/JavaResearchLicense.txt\n
|
|
|
|
BROKEN += To indicate your acceptance of the JRL add ACCEPT_JRL_LICENSE=Yes\n
|
|
|
|
BROKEN += to /etc/mk.conf and restart the build
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
@rm -rf ${WRKDIR}/tmp
|
|
|
|
@mkdir ${WRKDIR}/tmp && \
|
|
|
|
${CC} ${CFLAGS} -o ${WRKDIR}/tmp/x_x2zip ${FILESDIR}/x_x2zip.c
|
|
|
|
.for jar in ${JRLSRC} ${JRLBIN} ${JRLMOZ}
|
|
|
|
@cd ${WRKDIR}/tmp && \
|
|
|
|
unzip -qo ${FULLDISTDIR}/${jar} X_X && \
|
|
|
|
./x_x2zip "YES I ACCEPT THE CLICK THROUGH LICENSE. " X_X && \
|
|
|
|
cd ${WRKDIR} && \
|
|
|
|
unzip -q ${WRKDIR}/tmp/X_X.zip -x */lib*.so
|
|
|
|
.endfor
|
|
|
|
@cd ${WRKDIR} && \
|
|
|
|
mkdir deploy/src/plugin/share/plugin && \
|
|
|
|
mv share/plugin/mozilla_headers_18 deploy/src/plugin/share/plugin
|
|
|
|
@cp -f ${FILESDIR}/cacerts ${WRKDIR}/j2se/src/share/lib/security
|
sndio support. note, there are two different audio API APIs in jdk1.6,
one, HAE, is not portable to APIs that don't use file descriptors as
their handle, so it's still using ossaudio. the other, DirectAudio,
is more portable, and is the one that this commit is converting to
sndio. DirectAudio is preferred by jdk, and if it's supported, it will
be used. in other words, your java apps on OpenBSD will now be using
sndio (assuing you're using jdk1.6, sndio for jdk1.7 coming soon).
just wanted to explain why this still links with libossaudio ...
ok ajacoutot
2010-07-01 21:43:12 -04:00
|
|
|
@cp ${FILESDIR}/PLATFORM_API_BSDOS_PCM.c ${WRKDIR}/j2se/src/solaris/native/com/sun/media/sound/engine
|
2007-11-18 22:19:43 -05:00
|
|
|
@rm -rf ${WRKDIR}/tmp ${WRKDIR}/share
|
|
|
|
|
|
|
|
pre-patch:
|
|
|
|
@cd ${WRKDIR} && \
|
|
|
|
${PATCH} -p0 -z .orig.bsd --quiet < ${WRKDIR}/jdk16.patches
|
|
|
|
|
|
|
|
post-build:
|
|
|
|
@rm -rf ${JDKIMAGEDIR}/man/ja \
|
|
|
|
${JDKIMAGEDIR}/man/ja_JP.eucJP \
|
|
|
|
${JREIMAGEDIR}/man/ja \
|
|
|
|
${JREIMAGEDIR}/man/ja_JP.eucJP
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/${JDKHOME}
|
|
|
|
cd ${JDKIMAGEDIR} && tar -cf - * | tar -C ${PREFIX}/${JDKHOME} -xf -
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/${JREHOME}
|
|
|
|
cd ${JREIMAGEDIR} && tar -cf - * | tar -C ${PREFIX}/${JREHOME} -xf -
|
|
|
|
cd ${WRKDIR} && \
|
|
|
|
${INSTALL_DATA} JavaResearchLicense.txt ${PREFIX}/${JDKHOME}/LICENSE && \
|
|
|
|
${INSTALL_DATA} JavaResearchLicense.txt ${PREFIX}/${JDKHOME}/jre/LICENSE && \
|
|
|
|
${INSTALL_DATA} JavaResearchLicense.txt ${PREFIX}/${JREHOME}/LICENSE
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|