2013-05-14 21:16:43 +02:00
|
|
|
# $NetBSD: Makefile,v 1.46 2013/05/14 19:16:43 joerg Exp $
|
2009-10-14 13:26:15 +02:00
|
|
|
|
2011-08-22 00:57:54 +02:00
|
|
|
DISTNAME= openjdk-7-fcs-src-b147-27_jun_2011
|
|
|
|
PKGNAME= openjdk7-1.7.0.147.20110811
|
2013-02-16 12:18:58 +01:00
|
|
|
PKGREVISION= 9
|
2009-10-14 13:26:15 +02:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= ${MASTER_SITE_LOCAL:=openjdk7/}
|
|
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
|
2013-02-01 23:21:05 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2009-10-14 13:26:15 +02:00
|
|
|
HOMEPAGE= http://openjdk.java.net/
|
|
|
|
COMMENT= Open-source implementation of the Java Platform, Standard Edition
|
2012-05-16 10:55:45 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
2009-10-14 13:26:15 +02:00
|
|
|
|
|
|
|
DISTFILES= ${DEFAULT_DISTFILES}
|
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
|
|
|
|
# diff between distfile and bsd-port branch. To check out, use:
|
|
|
|
# "hg fclone http://hg.openjdk.java.net/bsd-port/bsd-port/"
|
2011-08-22 00:57:54 +02:00
|
|
|
PATCHFILES+= jdk-7-bsd-port-147.20110811.diff.bz2
|
2009-10-14 13:26:15 +02:00
|
|
|
PATCH_SITES+= ${MASTER_SITE_LOCAL:=openjdk7/}
|
|
|
|
|
|
|
|
CACERTS= cacerts-20091013.tar.bz2
|
|
|
|
DISTFILES+= ${CACERTS}
|
|
|
|
EXTRACT_ONLY+= ${CACERTS}
|
|
|
|
|
|
|
|
JAVA_NAME= openjdk7
|
|
|
|
JAVA_HOME= ${PREFIX}/java/${JAVA_NAME}
|
|
|
|
JAVA_WRAPPERS= jar java javac javadoc javah javap keytool orbd \
|
|
|
|
policytool rmid rmiregistry servertool tnameserv
|
|
|
|
|
2012-01-14 03:09:35 +01:00
|
|
|
MAKE_ENV+= PKGSRC_ZIPEXE=${TOOLS_PATH.zip}
|
2012-02-16 23:14:12 +01:00
|
|
|
MAKE_ENV+= PKGSRC_UNZIP=${TOOLS_PATH.unzip}
|
|
|
|
MAKE_ENV+= PKGSRC_UNZIPSFX=${TOOLS_PATH.unzip}sfx
|
2009-10-14 13:26:15 +02:00
|
|
|
|
2009-10-21 12:31:46 +02:00
|
|
|
DEPENDS+= dejavu-ttf-[0-9]*:../../fonts/dejavu-ttf
|
|
|
|
#DEPENDS+= ja-sazanami-ttf-[0-9]*:../../fonts/ja-sazanami-ttf
|
|
|
|
#DEPENDS+= baekmuk-ttf-[0-9]*:../../fonts/baekmuk-ttf
|
|
|
|
|
2009-10-14 13:26:15 +02:00
|
|
|
NO_CONFIGURE= yes
|
|
|
|
USE_LANGUAGES= c c++
|
2012-05-16 10:55:45 +02:00
|
|
|
USE_TOOLS+= gmake pax unzip:run zip:run patch
|
2009-10-14 13:26:15 +02:00
|
|
|
UNLIMIT_RESOURCES= datasize stacksize
|
|
|
|
WRKSRC= ${WRKDIR}/openjdk
|
|
|
|
|
|
|
|
BUILDLINK_PASSTHRU_DIRS+= ${ALT_BOOTDIR}
|
|
|
|
PREPEND_PATH+= ${ALT_BOOTDIR}/bin
|
|
|
|
|
|
|
|
MAKE_ENV+= ALT_BOOTDIR=${ALT_BOOTDIR}
|
2011-08-22 00:57:54 +02:00
|
|
|
MAKE_ENV+= ALT_DROPS_DIR=${DISTDIR}/${DIST_SUBDIR}
|
2009-10-14 13:26:15 +02:00
|
|
|
MAKE_ENV+= ALT_FREETYPE_LIB_PATH=${BUILDLINK_PREFIX.freetype2}/lib
|
|
|
|
MAKE_ENV+= ALT_FREETYPE_HEADERS_PATH=${BUILDLINK_PREFIX.freetype2}/include
|
|
|
|
MAKE_ENV+= ALT_CUPS_HEADERS_PATH=${BUILDLINK_PREFIX.cups}/include
|
|
|
|
MAKE_ENV+= ALT_COMPILER_PATH=${WRAPPER_DIR}/bin
|
2009-10-24 15:11:01 +02:00
|
|
|
MAKE_ENV+= ALT_PACKAGE_PATH=${PREFIX}
|
2009-10-14 13:26:15 +02:00
|
|
|
MAKE_ENV+= ALT_X11_PATH=${X11BASE}
|
2011-08-22 00:57:54 +02:00
|
|
|
MAKE_ENV+= RHINO_JAR=${WRKDIR}/${RHINO}/js.jar
|
2009-10-14 13:26:15 +02:00
|
|
|
|
|
|
|
MAKE_ENV+= ALT_PARALLEL_COMPILE_JOBS=${MAKE_JOBS:U1}
|
2012-05-12 23:01:47 +02:00
|
|
|
MAKE_ENV+= HOTSPOT_BUILD_JOBS=${MAKE_JOBS}
|
2009-10-14 13:26:15 +02:00
|
|
|
|
|
|
|
MAKE_ENV+= HOTSPOT_BUILD_USER=pkgsrc
|
|
|
|
MAKE_ENV+= NO_DOCS=true
|
|
|
|
MAKE_ENV+= SKIP_COMPARE_IMAGES=true
|
|
|
|
MAKE_ENV+= SKIP_FASTDEBUG_BUILD=yes
|
|
|
|
MAKE_ENV+= SKIP_DEBUG_BUILD=yes
|
|
|
|
|
2012-05-04 13:00:43 +02:00
|
|
|
# Avoid build errors when JAVA_HOME and CLASSPATH are defined by user.
|
|
|
|
MAKE_ENV+= JAVA_HOME=
|
|
|
|
MAKE_ENV+= CLASSPATH=
|
|
|
|
|
2010-02-03 00:12:53 +01:00
|
|
|
MAKE_ENV+= EXTRA_CFLAGS="-DDEFAULT_LIBPATH=\\\"${PREFIX}/lib/jni:${PREFIX}/lib:/lib:/usr/lib\\\""
|
2009-10-18 14:30:54 +02:00
|
|
|
BUILDDIR= ${WRKSRC}/build/${OPSYS:C/.*BSD/bsd/:S/DragonFly/bsd/}-${MACHINE_ARCH:S/i386/i586/:S/x86_64/amd64/}
|
2012-05-22 07:57:50 +02:00
|
|
|
MAKE_ENV+= LD_LIBRARY_PATH=${BUILDDIR}/lib/${MACHINE_ARCH:S/i386/i586/:S/x86_64/amd64/}
|
|
|
|
BUILDLINK_PASSTHRU_RPATHDIRS+= ${PREFIX}/java/openjdk7/jre/lib/${MACHINE_ARCH:S/x86_64/amd64/}
|
|
|
|
|
2009-10-14 13:26:15 +02:00
|
|
|
PLIST_SUBST+= ARCH=${MACHINE_ARCH:S/x86_64/amd64/}
|
|
|
|
PLIST_SUBST+= LOWER_OPSYS=${LOWER_OPSYS}
|
|
|
|
|
2011-09-05 13:46:14 +02:00
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
|
2011-08-31 16:48:04 +02:00
|
|
|
.if !empty(PKGSRC_COMPILER:Mclang)
|
|
|
|
_WRAP_EXTRA_ARGS.CXX+= -Wno-parentheses -Wno-sign-conversion \
|
|
|
|
-Wno-shorten-64-to-32 -Wno-conversion \
|
2012-05-04 18:25:59 +02:00
|
|
|
-Wno-unused-value -Wno-switch-enum -Wno-switch \
|
2011-08-31 16:48:04 +02:00
|
|
|
-Wno-tautological-compare \
|
|
|
|
-Wno-delete-non-virtual-dtor \
|
2011-09-08 02:14:34 +02:00
|
|
|
-Wno-return-type -Wno-unused-parameter \
|
2012-05-04 18:25:59 +02:00
|
|
|
-Wno-parentheses-equality -Wno-empty-body
|
2013-05-14 21:16:43 +02:00
|
|
|
. if ${MACHINE_ARCH} == "x86_64"
|
|
|
|
_WRAP_EXTRA_ARGS.CXX+= -mstackrealign
|
|
|
|
. endif
|
2011-08-31 16:48:04 +02:00
|
|
|
.endif
|
2009-10-14 13:26:15 +02:00
|
|
|
.include "bootstrap.mk"
|
|
|
|
.include "icedtea-extras.mk"
|
|
|
|
|
2010-12-07 23:23:23 +01:00
|
|
|
.include "options.mk"
|
|
|
|
|
2009-10-14 13:26:15 +02:00
|
|
|
SUBST_CLASSES+= add-rpaths
|
|
|
|
SUBST_STAGE.add-rpaths= pre-build
|
|
|
|
SUBST_MESSAGE.add-rpaths= adding X11 run path flags to Makefiles
|
|
|
|
SUBST_FILES.add-rpaths= jdk/make/sun/awt/Makefile \
|
|
|
|
jdk/make/sun/awt/mawt.gmk \
|
|
|
|
jdk/make/sun/jawt/Makefile \
|
|
|
|
jdk/make/sun/jdga/Makefile \
|
|
|
|
jdk/make/sun/splashscreen/Makefile \
|
|
|
|
jdk/make/sun/xawt/Makefile
|
|
|
|
SUBST_SED.add-rpaths= -e 's|-L$$(OPENWIN_LIB)|-L$$(OPENWIN_LIB) -Wl,-R$$(OPENWIN_LIB)|g'
|
|
|
|
|
2009-10-21 12:31:46 +02:00
|
|
|
SUBST_CLASSES+= fontpaths
|
|
|
|
SUBST_STAGE.fontpaths= pre-build
|
|
|
|
SUBST_MESSAGE.fontpaths= fixing font paths
|
|
|
|
SUBST_FILES.fontpaths= jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties
|
2009-10-21 12:35:09 +02:00
|
|
|
SUBST_FILES.fontpaths+= jdk/src/solaris/native/sun/awt/fontpath.c
|
2009-11-08 18:57:46 +01:00
|
|
|
SUBST_SED.fontpaths= -e 's|@PREFIX@|${PREFIX}|g'
|
|
|
|
SUBST_SED.fontpaths+= -e 's|@BUILDLINK_PREFIX.fontconfig@|${BUILDLINK_PREFIX.fontconfig}|g'
|
2009-10-21 12:31:46 +02:00
|
|
|
|
2010-12-07 23:23:23 +01:00
|
|
|
PLIST_VARS+= i386 jce
|
2009-10-14 13:26:15 +02:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
PLIST.i386= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
chmod +x ${ANT_BIN}/ant
|
2011-08-22 00:57:54 +02:00
|
|
|
cd ${WRKDIR}/${ICEDTEA_WEB}/plugin/icedteanp/java && pax -rw . \
|
2009-10-14 13:26:15 +02:00
|
|
|
${WRKSRC}/jdk/src/share/classes
|
2011-08-22 00:57:54 +02:00
|
|
|
cd ${WRKDIR}/${ICEDTEA_WEB}/netx && pax -rw . \
|
2009-10-14 13:26:15 +02:00
|
|
|
${WRKSRC}/jdk/src/share/classes
|
2011-08-22 00:57:54 +02:00
|
|
|
cd ${WRKSRC} && patch -s -p1 < ${WRKDIR}/${ICEDTEA}/patches/rhino.patch
|
2012-11-02 23:28:54 +01:00
|
|
|
mv ${WRKDIR}/bootstrap/bin/java ${WRKDIR}/bootstrap/bin/java-real
|
|
|
|
printf '#!/bin/sh\nexec %s/bootstrap/bin/java-real -mx256m "$$@"\n' \
|
|
|
|
${WRKDIR} > ${WRKDIR}/bootstrap/bin/java
|
|
|
|
chmod a+x ${WRKDIR}/bootstrap/bin/java
|
2013-04-06 15:24:18 +02:00
|
|
|
.for t in idlj jar javac javah javap native2ascii rmic
|
|
|
|
mv ${WRKDIR}/bootstrap/bin/${t} ${WRKDIR}/bootstrap/bin/${t}-real
|
|
|
|
printf '#!/bin/sh\n\nexec %s/bootstrap/bin/${t}-real -J-mx256m "$$@"\n' \
|
|
|
|
${WRKDIR} > ${WRKDIR}/bootstrap/bin/${t}
|
|
|
|
chmod a+x ${WRKDIR}/bootstrap/bin/${t}
|
2012-11-02 23:28:54 +01:00
|
|
|
.endfor
|
2009-10-14 13:26:15 +02:00
|
|
|
|
|
|
|
do-build: ${WRKDIR}/stage3-done
|
|
|
|
|
|
|
|
# stage 1 builds a native JDK using the bootstrap binaries
|
|
|
|
${WRKDIR}/stage1-done:
|
2009-10-14 15:44:26 +02:00
|
|
|
${_ULIMIT_CMD} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM}
|
2009-10-14 13:26:15 +02:00
|
|
|
rm -rf ${WRKDIR}/bootstrap
|
|
|
|
cd ${BUILDDIR} && mv j2sdk-image ${WRKDIR}/bootstrap
|
|
|
|
rm -rf ${BUILDDIR}
|
|
|
|
touch ${WRKDIR}/stage1-done
|
|
|
|
|
|
|
|
# stage 2 rebuilds the JDK using native tools
|
|
|
|
${WRKDIR}/stage2-done: ${WRKDIR}/stage1-done
|
2009-10-14 15:44:26 +02:00
|
|
|
${_ULIMIT_CMD} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM}
|
2009-10-14 13:26:15 +02:00
|
|
|
touch ${BUILDDIR}/j2sdk-image/jre/lib/applet/.keep
|
|
|
|
touch ${WRKDIR}/stage2-done
|
|
|
|
|
|
|
|
# stage 3 builds third party add-ons
|
|
|
|
${WRKDIR}/stage3-done: ${WRKDIR}/stage2-done ${WRKDIR}/cacerts.out
|
|
|
|
touch ${WRKDIR}/stage3-done
|
|
|
|
|
|
|
|
${WRKDIR}/cacerts.out:
|
|
|
|
for cert in ${WRKDIR}/cacerts/*.crt; do \
|
2009-10-15 10:47:32 +02:00
|
|
|
${ECHO} yes | LC_ALL=C ${BUILDDIR}/bin/keytool \
|
2009-10-14 13:26:15 +02:00
|
|
|
-importcert \
|
|
|
|
-keystore ${.TARGET} \
|
|
|
|
-alias `${ECHO} $$cert | sed 's,.*/\\([^/]*\\)\\.crt,\\1,'` \
|
|
|
|
-file $$cert \
|
|
|
|
-storepass pkgsrc; \
|
|
|
|
done
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${JAVA_HOME}
|
|
|
|
cd ${BUILDDIR}/j2sdk-image && pax -rwpp . \
|
|
|
|
${DESTDIR}${JAVA_HOME}/.
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/cacerts.out \
|
|
|
|
${DESTDIR}${JAVA_HOME}/jre/lib/security/cacerts
|
2009-12-15 16:16:15 +01:00
|
|
|
rm -f ${DESTDIR}${JAVA_HOME}/include/jni_md.h
|
|
|
|
ln -s ${LOWER_OPSYS}/jni_md.h \
|
|
|
|
${DESTDIR}${JAVA_HOME}/include/jni_md.h
|
2009-10-14 13:26:15 +02:00
|
|
|
|
2009-12-16 22:54:27 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-4.*-*)
|
|
|
|
MAKE_ENV+= PTHREAD_STACKSIZE=1024
|
|
|
|
.endif
|
|
|
|
|
2012-02-16 23:14:12 +01:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
TOOLS_PLATFORM.unzip=
|
|
|
|
.endif
|
|
|
|
|
2009-11-08 18:57:46 +01:00
|
|
|
.include "../../fonts/fontconfig/buildlink3.mk"
|
2009-10-14 13:26:15 +02:00
|
|
|
.include "../../graphics/freetype2/buildlink3.mk"
|
|
|
|
BUILDLINK_DEPMETHOD.cups?= build
|
|
|
|
.include "../../print/cups/buildlink3.mk"
|
|
|
|
.include "../../x11/libXext/buildlink3.mk"
|
|
|
|
.include "../../x11/libXi/buildlink3.mk"
|
|
|
|
BUILDLINK_DEPMETHOD.libXp?= build
|
|
|
|
.include "../../x11/libXp/buildlink3.mk"
|
|
|
|
BUILDLINK_DEPMETHOD.libXt?= build
|
|
|
|
.include "../../x11/libXt/buildlink3.mk"
|
|
|
|
.include "../../x11/libXtst/buildlink3.mk"
|
|
|
|
.include "../../x11/libXrender/buildlink3.mk"
|
|
|
|
.include "../../mk/java-env.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|