2005-01-20 09:41:13 +01:00
# New ports collection makefile for: jdk15
# Date created: 12 January 2005
2003-03-07 00:18:24 +01:00
# Whom: Alexey Zelkin <phantom@FreeBSD.org>
2000-10-13 14:41:25 +02:00
#
# $FreeBSD$
#
PORTNAME = jdk
2007-06-09 07:14:56 +02:00
PORTVERSION = ${ JDK_VERSION } .${ JDK_UPDATE_VERSION } p${ JDK_PATCHSET_VERSION }
2010-04-20 04:55:36 +02:00
PORTREVISION = 6
2007-06-09 07:14:56 +02:00
PORTEPOCH = 1
2000-10-13 14:41:25 +02:00
CATEGORIES = java devel
2007-06-09 07:14:56 +02:00
MASTER_SITES = # http://download.java.net/tiger/
2005-01-20 09:41:13 +01:00
# http://www.eyesbeyond.com/freebsddom/java/jdk15.html
2006-07-19 00:50:37 +02:00
# http://java.sun.com/javase/downloads/index.jsp
2007-06-09 07:14:56 +02:00
DISTFILES = ${ JRL_SRCFILE } ${ JRL_BINFILE } ${ PATCHSETFILE }
EXTRACT_ONLY = ${ JRL_SRCFILE } ${ JRL_BINFILE }
2000-10-13 14:41:25 +02:00
2006-03-31 10:47:17 +02:00
MAINTAINER = glewis@FreeBSD.org
2005-01-20 09:41:13 +01:00
COMMENT = Java Development Kit 1.5.0
2000-10-13 14:41:25 +02:00
BUILD_DEPENDS = gm4:${ PORTSDIR } /devel/m4 \
zip:${ PORTSDIR } /archivers/zip \
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
${ LOCALBASE } /lib/libXm.so:${ PORTSDIR } /x11-toolkits/open-motif
2004-01-28 15:00:27 +01:00
RUN_DEPENDS = javavm:${ PORTSDIR } /java/javavmwrapper
2005-01-20 09:41:13 +01:00
2006-08-01 20:30:37 +02:00
OPTIONS = DEBUG "Enable debugging support" off \
2008-02-14 17:30:24 +01:00
IPV6 "Enable IPv6 support" off \
WEB "Enable the browser plugin and Java Web Start" on \
POLICY "Install the Unlimited Strength Policy Files" off \
2007-02-26 01:22:20 +01:00
TZUPDATE "Update the time zone data" on \
2006-08-01 20:30:37 +02:00
JAIL "Port is being built within a jail" off
2005-09-20 22:00:08 +02:00
2006-07-19 00:50:37 +02:00
WANT_GNOME = yes
2005-01-20 09:41:13 +01:00
PKGINSTALL = ${ WRKDIR } /pkg-install
2005-11-23 11:12:33 +01:00
PKGDEINSTALL = ${ WRKDIR } /pkg-deinstall
SUB_FILES += pkg-install \
pkg-deinstall
SUB_LIST += JRE_HOME = ${ PREFIX } /jdk${ JDK_VERSION } /jre \
ARCH = ${ MACHINE_ARCH }
2000-10-13 14:41:25 +02:00
2003-03-07 00:18:24 +01:00
WRKSRC = ${ WRKDIR } /control/make
2000-10-13 14:41:25 +02:00
2006-07-19 00:50:37 +02:00
USE_ZIP = YES
2007-06-09 07:14:56 +02:00
JRL_SRCFILE = jdk-${ JDK_VERSION : S /./_/g } _${ JDK_UPDATE_VERSION } -fcs-src-b${ JDK_BUILD_NUMBER } -jrl-${ JDK_BUILD_DATE } .jar
JRL_BINFILE = jdk-${ JDK_VERSION : S /./_/g } _${ JDK_UPDATE_VERSION } -fcs-bin-b${ JDK_BUILD_NUMBER } -jrl-${ JDK_BUILD_DATE } .jar
2006-07-19 00:50:37 +02:00
PATCHSETFILE = bsd-jdk15-patches-${ JDK_PATCHSET_VERSION } .tar.bz2
POLICYFILE = jce_policy-${ JDK_VERSION : S /./_/g } .zip
2008-01-13 00:25:35 +01:00
TZUPDATEFILE = tzupdater-${ TZUPDATE_VERSION } -${ TZUPDATE_TZVERSION } .zip
2006-07-19 00:50:37 +02:00
2005-01-20 09:41:13 +01:00
JDK_VERSION = 1.5.0
2009-03-09 21:18:28 +01:00
JDK_UPDATE_VERSION = 16
JDK_PATCHSET_VERSION = 9
JDK_BUILD_NUMBER = 02
JDK_BUILD_DATE = 28_may_2008
2005-01-20 09:41:13 +01:00
LATEST_LINK = jdk15
2000-10-13 14:41:25 +02:00
2010-04-20 04:55:36 +02:00
TZUPDATE_VERSION = 1_3_29
TZUPDATE_TZVERSION = 2010f
2007-02-24 16:38:12 +01:00
2008-08-19 20:50:20 +02:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2003-11-11 17:16:20 +01:00
. i f ! d e f i n e d ( W I T H _ L I N U X _ B O O T S T R A P )
2008-08-25 05:25:31 +02:00
NATIVE_BOOTSTRAP_JDKS = ${ LOCALBASE } /diablo-jdk1.6.0 \
${ LOCALBASE } /diablo-jdk1.5.0 \
${ LOCALBASE } /jdk1.5.0 \
${ LOCALBASE } /jdk1.6.0 \
${ LOCALBASE } /jdk1.4.2
2003-11-11 17:16:20 +01:00
. e n d i f
2003-07-21 09:31:05 +02:00
2008-08-25 05:25:31 +02:00
LINUX_BOOTSTRAP_JDKS = ${ LOCALBASE } /linux-sun-jdk1.5.0 \
${ LOCALBASE } /linux-sun-jdk1.6.0 \
${ LOCALBASE } /linux-sun-jdk1.4.2
2003-11-11 17:16:20 +01:00
2006-12-11 18:10:52 +01:00
. i f d e f i n e d ( W I T H _ I P V 6 )
CATEGORIES += ipv6
. e n d i f
2006-07-19 00:50:37 +02:00
. i f d e f i n e d ( W I T H _ P O L I C Y )
DISTFILES += ${ POLICYFILE }
EXTRACT_ONLY += ${ POLICYFILE }
. e n d i f
2007-02-24 16:38:12 +01:00
. i f d e f i n e d ( W I T H _ T Z U P D A T E )
DISTFILES += ${ TZUPDATEFILE }
EXTRACT_ONLY += ${ TZUPDATEFILE }
. e n d i f
2003-11-12 13:38:03 +01:00
# do we have valid native jdk installed?
2003-11-11 17:16:20 +01:00
. i f ! d e f i n e d ( W I T H _ L I N U X _ B O O T S T R A P )
. f o r C J D K i n $ { N A T I V E _ B O O T S T R A P _ J D K S }
2008-08-25 05:25:31 +02:00
. i f ! d e f i n e d ( B O O T S T R A P J D K D I R ) & & e x i s t s ( $ { C J D K } / b i n / j a v a c )
BOOTSTRAPJDKDIR = ${ CJDK }
2003-11-11 17:16:20 +01:00
. e n d i f
. e n d f o r
. e n d i f
2003-11-12 13:38:03 +01:00
# do we have valid linux jdk installed?
2007-06-09 07:14:56 +02:00
. i f ! d e f i n e d ( B O O T S T R A P J D K D I R )
2003-11-11 17:16:20 +01:00
. f o r C J D K i n $ { L I N U X _ B O O T S T R A P _ J D K S }
2008-08-25 05:25:31 +02:00
. i f ! d e f i n e d ( B O O T S T R A P J D K D I R ) & & e x i s t s ( $ { C J D K } / b i n / j a v a c )
BOOTSTRAPJDKDIR = ${ CJDK }
2003-11-11 17:16:20 +01:00
WITH_LINUX_BOOTSTRAP = YES
. e n d i f
. e n d f o r
. e n d i f
2003-11-12 13:38:03 +01:00
# if no valid jdk found, set dependency
2008-06-25 06:51:30 +02:00
. i f ! d e f i n e d ( B O O T S T R A P J D K D I R ) | | ! e x i s t s ( $ { B O O T S T R A P J D K D I R } / b i n / j a v a c )
2008-08-19 20:50:20 +02:00
BOOTSTRAPJDKDIR = ${ LOCALBASE } /diablo-jdk1.6.0
BUILD_DEPENDS += ${ BOOTSTRAPJDKDIR } /bin/javac:${ PORTSDIR } /java/diablo-jdk16
2002-05-03 07:36:11 +02:00
. e n d i f
2000-10-13 14:41:25 +02:00
2006-07-19 00:50:37 +02:00
. i f d e f i n e d ( W I T H O U T _ W E B )
MAKE_ENV += DONT_BUILD_DEPLOY = "YES"
. e l s e
USE_GNOME = desktopfileutils
2007-01-22 17:50:22 +01:00
LIB_DEPENDS = nspr4.1:$( PORTSDIR) /devel/nspr
2006-07-19 00:50:37 +02:00
. e n d i f
2003-03-07 00:18:24 +01:00
2005-01-20 09:41:13 +01:00
ONLY_FOR_ARCHS = i386 amd64
2003-03-07 00:18:24 +01:00
USE_GMAKE = YES
2006-01-29 22:24:59 +01:00
USE_ICONV = YES
2007-10-21 16:57:14 +02:00
USE_XORG += x11 xext xi xmu xp xt xtst
2008-08-19 20:50:20 +02:00
RESTRICTED = Redistribution of pre-compiled binaries is not permitted
NO_CDROM = Redistribution of pre-compiled binaries is not permitted
2005-01-20 09:41:13 +01:00
2007-06-09 07:14:56 +02:00
MAKE_ENV += ALT_BOOTDIR = " ${ BOOTSTRAPJDKDIR } " \
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
ALT_MOTIF_DIR = " ${ LOCALBASE } " \
2009-03-09 21:18:28 +01:00
X11DIR = " ${ LOCALBASE } " \
LOCALDIR = " ${ LOCALBASE } " \
2007-09-20 05:35:30 +02:00
DEFAULT_LD_LIBRARY_PATH = " /usr/lib: ${ LOCALBASE } /lib " \
2000-11-03 17:06:41 +01:00
SYS_CFLAGS = " ${ CFLAGS } " \
2003-03-07 00:18:24 +01:00
LANG = "C" \
JAVA_HOME = "" \
2000-11-03 17:06:41 +01:00
CLASSPATH = "" \
2004-08-18 09:06:03 +02:00
LD_LIBRARY_PATH = "" \
2005-01-20 09:41:13 +01:00
MAKEFLAGS = "" \
2005-09-20 22:00:08 +02:00
SKIP_COMPARE_IMAGES = "YES"
2004-01-28 15:00:27 +01:00
. i f ! d e f i n e d ( W I T H _ I P V 6 )
2005-01-20 09:41:13 +01:00
MAKE_ENV += DONT_ENABLE_IPV6 = "YES"
2004-01-28 15:00:27 +01:00
. e n d i f
2006-02-02 17:27:44 +01:00
. i f d e f i n e d ( H O T S P O T _ B U I L D _ J O B S )
MAKE_ENV += HOTSPOT_BUILD_JOBS = ${ HOTSPOT_BUILD_JOBS }
. e n d i f
2004-01-28 15:00:27 +01:00
2005-01-20 09:41:13 +01:00
ALL_TARGET = all
2004-01-28 15:00:27 +01:00
2005-03-30 18:51:59 +02:00
PLIST_FILES = jdk${ JDK_VERSION } /jre/.systemPrefs/.system.lock \
2005-09-20 22:00:08 +02:00
jdk${ JDK_VERSION } /jre/.systemPrefs/.systemRootModFile
2006-01-29 22:24:59 +01:00
. i f ! d e f i n e d ( W I T H O U T _ W E B )
PLIST_FILES += share/applications/sun_java15.desktop
. e n d i f
2005-03-30 18:51:59 +02:00
PLIST_DIRS = jdk${ JDK_VERSION } /jre/.systemPrefs
2005-01-20 09:41:13 +01:00
. i f (${ARCH} = = amd64)
HOTSPOTARCH = amd64
2003-11-11 17:16:20 +01:00
. e l s e
2005-01-20 09:41:13 +01:00
HOTSPOTARCH = i586
2000-10-13 14:41:25 +02:00
. e n d i f
2005-01-20 09:41:13 +01:00
JDKIMAGEDIR = ${ WRKSRC } /../build/bsd-${ HOTSPOTARCH } /j2sdk-image
JDKIMAGEDIR_G = ${ WRKSRC } /../build/bsd-${ HOTSPOTARCH } /j2sdk-debug-image
2004-01-28 15:00:27 +01:00
PTHREAD_FILES = ../../hotspot/build/bsd/makefiles/vm.make \
2005-01-20 09:41:13 +01:00
../../j2se/make/com/sun/java/pack/Makefile \
../../j2se/make/common/Defs.gmk \
2004-01-28 15:00:27 +01:00
../../j2se/make/common/Defs-bsd.gmk \
2005-01-20 09:41:13 +01:00
../../j2se/make/common/Program.gmk \
2004-01-28 15:00:27 +01:00
../../j2se/make/java/hpi/native/Makefile \
../../j2se/make/java/net/Makefile \
2005-01-20 09:41:13 +01:00
../../j2se/make/java/nio/Makefile \
../../j2se/make/jpda/transport/socket/Makefile \
../../j2se/make/sun/cmm/Makefile \
../../j2se/make/sun/xawt/Makefile
2006-12-11 18:10:52 +01:00
X11_FILES = ../../j2se/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java \
2009-03-09 21:18:28 +01:00
../../j2se/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java
2004-01-28 15:00:27 +01:00
2005-12-14 17:52:32 +01:00
# Check for JDK sources and patch file
2007-06-09 07:14:56 +02:00
. i f ! d e f i n e d ( P A C K A G E _ B U I L D I N G ) & & ( ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ S R C F I L E } ) | | ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ B I N F I L E } ) | | ( d e f i n e d ( W I T H _ P O L I C Y ) & & ! e x i s t s ( $ { D I S T D I R } / $ { P O L I C Y F I L E } ) ) | | ( d e f i n e d ( W I T H _ T Z U P D A T E ) & & ! e x i s t s ( $ { D I S T D I R } / $ { T Z U P D A T E F I L E } ) ) | | ! e x i s t s ( $ { D I S T D I R } / $ { P A T C H S E T F I L E } ) ) #{
2008-08-20 06:03:51 +02:00
DISTFILE_INSTRUCTIONS = \n \
2005-12-14 17:52:32 +01:00
D u e t o l i c e n s i n g r e s t r i c t i o n s , c e r t a i n f i l e s m u s t b e f e t c h e d m a n u a l l y . \ n \ n
2007-06-09 07:14:56 +02:00
. i f ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ S R C F I L E } ) | | ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ B I N F I L E } ) #{
2009-03-09 21:18:28 +01:00
DISTFILE_INSTRUCTIONS += Please open http://download.java.net/tiger/\n \
2007-06-09 07:14:56 +02:00
i n a w e b b r o w s e r . D o w n l o a d t h e \ n
. i f ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ S R C F I L E } ) #{
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += Update ${ JDK_UPDATE_VERSION } Source, ${ JRL_SRCFILE }
2005-12-14 17:52:32 +01:00
. e n d i f #}
2007-06-09 07:14:56 +02:00
. i f ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ B I N F I L E } ) #{
. i f ! e x i s t s ( $ { D I S T D I R } / $ { J R L _ S R C F I L E } ) #{
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += and the\n
2005-12-14 17:52:32 +01:00
. e n d i f #}
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += Source Binaries, ${ JRL_BINFILE }
2005-12-14 17:52:32 +01:00
. e n d i f #}
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += .\n \n
2005-12-14 17:52:32 +01:00
. e n d i f #}
2006-07-19 00:50:37 +02:00
. i f d e f i n e d ( W I T H _ P O L I C Y ) & & ! e x i s t s ( $ { D I S T D I R } / $ { P O L I C Y F I L E } ) #{
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += Please open http://java.sun.com/javase/downloads/index_jdk5.jsp\n \
2006-07-19 00:50:37 +02:00
i n a w e b b r o w s e r a n d f o l l o w t h e \ " D o w n l o a d \ " l i n k f o r \ n \
2007-07-27 17:07:41 +02:00
\ " J a v a C r y p t o g r a p h y E x t e n s i o n ( J C E ) U n l i m i t e d S t r e n g t h J u r i s d i c t i o n P o l i c y \ n \
F i l e s 5 . 0 \ " t o o b t a i n t h e J C E p o l i c y f i l e , $ { P O L I C Y F I L E } . \ n \ n
2006-07-19 00:50:37 +02:00
. e n d i f #}
2007-02-24 16:38:12 +01:00
. i f d e f i n e d ( W I T H _ T Z U P D A T E ) & & ! e x i s t s ( $ { D I S T D I R } / $ { T Z U P D A T E F I L E } ) #{
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += Please open http://java.sun.com/javase/downloads/index.jsp\n \
2007-02-24 16:38:12 +01:00
i n a w e b b r o w s e r a n d f o l l o w t h e \ " D o w n l o a d \ " l i n k f o r \ n \
\ " J D K U S D S T T i m e z o n e U p d a t e T o o l - $ { T Z U P D A T E _ V E R S I O N } \ " t o o b t a i n t h e \ n \
t i m e z o n e u p d a t e f i l e , $ { T Z U P D A T E F I L E } . \ n \ n
2006-07-19 00:50:37 +02:00
. e n d i f #}
2005-12-14 17:52:32 +01:00
. i f ! e x i s t s ( $ { D I S T D I R } / $ { P A T C H S E T F I L E } ) #{
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += Please download the patchset, ${ PATCHSETFILE } , from\n \
2005-12-14 17:52:32 +01:00
http : //www .eyesbeyond .com /freebsddom /java /jdk 15.html .\n \n
. e n d i f #}
2008-08-19 20:50:20 +02:00
DISTFILE_INSTRUCTIONS += Please place the downloaded file( s) in ${ DISTDIR }
DISTFILE_INSTRUCTIONS += \n and restart the build.\n \n
2005-12-14 17:52:32 +01:00
. e n d i f #}
2000-10-13 14:41:25 +02:00
2005-01-20 09:41:13 +01:00
pre-fetch :
2003-03-15 10:57:58 +01:00
@${ ECHO_MSG }
2008-08-19 20:50:20 +02:00
@${ ECHO_MSG } "IMPORTANT: To build the JDK 1.5.0 port, you should have at least"
@${ ECHO_MSG } "2.5Gb of free disk space in the build area!"
2003-03-13 12:24:42 +01:00
@${ ECHO_MSG }
2003-11-11 17:16:20 +01:00
. i f d e f i n e d ( W I T H _ L I N U X _ B O O T S T R A P )
2008-08-19 20:50:20 +02:00
@${ ECHO_MSG } "IMPORTANT: To build the JDK 1.5.0 port, you should have linux emulation"
@${ ECHO_MSG } "enabled in the kernel and the linux procfs (linprocfs) filesystem"
2003-08-04 10:53:42 +02:00
@${ ECHO_MSG } "mounted."
@${ ECHO_MSG }
2003-11-11 17:16:20 +01:00
. e n d i f
2008-08-19 20:50:20 +02:00
. i f d e f i n e d ( D I S T F I L E _ I N S T R U C T I O N S )
2008-08-20 06:03:51 +02:00
@${ PRINTF } " ${ DISTFILE_INSTRUCTIONS } "
2008-08-19 20:50:20 +02:00
@exit 1
. e n d i f
2003-03-13 12:24:42 +01:00
2007-06-09 07:14:56 +02:00
# Get JRL agreement
. i f ! d e f i n e d ( P A C K A G E _ B U I L D I N G )
pre-extract :
2007-08-13 06:57:47 +02:00
${ SH } ${ FILESDIR } /license.sh
2007-06-09 07:14:56 +02:00
. e n d i f
# Extract the files
do-extract :
@${ RM } -rf ${ WRKDIR }
@${ MKDIR } ${ WRKDIR }
@${ CC } ${ CFLAGS } -o ${ WRKDIR } /x_x2zip ${ FILESDIR } /x_x2zip.c
@for file in ${ EXTRACT_ONLY } ; do \
if ! ( cd ${ WRKDIR } && ${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } " ${ DISTDIR } / $$ file " ${ EXTRACT_AFTER_ARGS } ) ; \
then \
exit 1; \
fi ; \
if [ ` basename $$ file .jar` != $$ file ] ; \
then \
if ! ( cd ${ WRKDIR } && ${ WRKDIR } /x_x2zip 'YES I ACCEPT THE CLICK THROUGH LICENSE. ' X_X && ${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } ${ WRKDIR } /X_X.zip ${ EXTRACT_AFTER_ARGS } ) ; \
then \
exit 1; \
fi ; \
fi \
done
2008-01-14 07:08:08 +01:00
post-extract :
cd ${ WRKDIR } && ${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } \
j2se/make/tools/crypto/pkcs11/sunpkcs11_src.zip \
${ EXTRACT_AFTER_ARGS }
-${ MKDIR } ${ WRKDIR } /j2se/make/sun/security
-${ MKDIR } ${ WRKDIR } /j2se/src/share/classes/sun/security
-${ MKDIR } ${ WRKDIR } /j2se/src/share/native/sun/security
-${ MKDIR } ${ WRKDIR } /j2se/src/solaris/native/sun/security
${ MV } ${ WRKDIR } /make/sun/security/pkcs11 \
${ WRKDIR } /j2se/make/sun/security/pkcs11
${ MV } ${ WRKDIR } /src/share/classes/sun/security/pkcs11 \
${ WRKDIR } /j2se/src/share/classes/sun/security/pkcs11
${ MV } ${ WRKDIR } /src/share/native/sun/security/pkcs11 \
${ WRKDIR } /j2se/src/share/native/sun/security/pkcs11
${ MV } ${ WRKDIR } /src/solaris/native/sun/security/pkcs11 \
${ WRKDIR } /j2se/src/solaris/native/sun/security/pkcs11
cd ${ WRKDIR } && ${ RM } -rf src
2000-10-13 14:41:25 +02:00
pre-patch :
2001-10-16 14:43:07 +02:00
@cd ${ WRKDIR } && \
2005-01-20 09:41:13 +01:00
${ BZIP2_CMD } -dc ${ DISTDIR } /${ PATCHSETFILE } | ${ TAR } -xf - && \
2002-02-14 17:01:23 +01:00
${ CHMOD } -R u+w * && \
2005-01-20 09:41:13 +01:00
${ PATCH } -p0 < ${ WRKDIR } /jdk15.patches
2003-02-28 18:54:40 +01:00
2004-01-28 15:00:27 +01:00
post-patch :
@for file in ${ PTHREAD_FILES } ; do \
2005-01-20 09:41:13 +01:00
${ REINPLACE_CMD } -e " s:-pthread: ${ PTHREAD_LIBS } :g " \
2004-01-28 15:00:27 +01:00
${ WRKSRC } /$$ { file} ; \
done
2006-12-11 18:10:52 +01:00
@for file in ${ X11_FILES } ; do \
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
${ REINPLACE_CMD } -e " s:%%LOCALBASE%%: ${ LOCALBASE } : " \
2006-12-11 18:10:52 +01:00
${ WRKSRC } /$$ { file} ; \
done
2006-01-29 22:24:59 +01:00
${ REINPLACE_CMD } -e " s:%%PREFIX%%: ${ PREFIX } :g " \
-e " s:%%JDK_VERSION%%: ${ JDK_VERSION } :g " \
${ WRKSRC } /../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop
2004-01-28 15:00:27 +01:00
2003-11-11 17:16:20 +01:00
. i f d e f i n e d ( W I T H _ L I N U X _ B O O T S T R A P )
2002-06-27 07:34:39 +02:00
pre-build :
@if [ " $$ {WRKDIRPREFIX} " -a \
-L " /compat/linux/ $$ {WRKDIRPREFIX} " -a \
2008-08-19 20:50:20 +02:00
x` ${ LS } -ld " /compat/linux/ $$ {WRKDIRPREFIX} " 2>/dev/null | ${ AWK } '/->/{print $$NF;exit 0}END{exit 1}' ` = x" $$ {WRKDIRPREFIX} " ] ; \
2002-06-27 07:34:39 +02:00
then \
2002-10-25 07:54:09 +02:00
${ ECHO_MSG } "Please set WRKDIRPREFIX to something which doesn't" ; \
${ ECHO_MSG } "have a matching symbolic link in /compat/linux." ; \
${ ECHO_MSG } "This is known to cause problems during bootstrapping." ; \
2002-06-27 07:34:39 +02:00
exit 1; \
fi
2008-08-19 20:50:20 +02:00
@if [ ` ${ SYSCTL } -n compat.linux.osname` != "Linux" ] ; \
2002-08-06 18:36:21 +02:00
then \
2002-10-25 07:54:09 +02:00
${ ECHO_MSG } "Please set the value of the sysctl compat.linux.osname" ; \
${ ECHO_MSG } "to 'Linux' with the command:" ; \
2008-08-19 20:50:20 +02:00
${ ECHO_MSG } " ${ SYSCTL } compat.linux.osname=Linux " ; \
2002-10-25 07:54:09 +02:00
${ ECHO_MSG } "Having it set to other values, such as 'FreeBSD'," ; \
${ ECHO_MSG } "is known to cause problems during bootstrapping." ; \
2002-08-06 18:36:21 +02:00
exit 1; \
fi
2007-03-07 19:34:00 +01:00
. i f ! d e f i n e d ( W I T H _ J A I L ) #{
2008-08-19 20:50:20 +02:00
@if [ " `/sbin/mount | ${ GREP } ^linprocfs` " = "" ] ; \
2003-08-04 10:53:42 +02:00
then \
2005-04-08 17:33:00 +02:00
${ ECHO_MSG } "ERROR: You must have LINPROCFS mounted before" ; \
${ ECHO_MSG } "starting to build the native JDK 1.5.0." ; \
2003-08-04 10:53:42 +02:00
${ ECHO_MSG } "" ; \
2005-04-08 17:33:00 +02:00
${ ECHO_MSG } "You may do it with the following commands:" ; \
2003-08-04 10:53:42 +02:00
${ ECHO_MSG } "" ; \
${ ECHO_MSG } "# kldload linprocfs" ; \
${ ECHO_MSG } "" ; \
${ ECHO_MSG } "and" ; \
${ ECHO_MSG } "" ; \
${ ECHO_MSG } "# mount -t linprocfs linprocfs /compat/linux/proc" ; \
${ ECHO_MSG } "" ; \
exit 1 ; \
fi
2006-08-01 20:30:37 +02:00
. e n d i f #}
2002-06-27 07:34:39 +02:00
. e n d i f
2003-02-28 18:54:40 +01:00
do-build :
# Start of jdk build
@( cd ${ BUILD_WRKSRC } ; ${ SETENV } ${ MAKE_ENV } ${ GMAKE } ${ MAKE_FLAGS } ${ MAKEFILE } ${ MAKE_ARGS } ${ ALL_TARGET } )
2002-03-13 16:06:16 +01:00
post-build :
2003-11-11 17:16:20 +01:00
@# XXX don' t install japanese manpages
@${ RM } -rf ${ JDKIMAGEDIR } /man/ja
@${ RM } -rf ${ JDKIMAGEDIR } /man/ja_JP.eucJP
2007-02-24 16:38:12 +01:00
. i f d e f i n e d ( W I T H _ T Z U P D A T E )
@# Update time zones
@-${ JDKIMAGEDIR } /bin/java -jar \
2008-05-03 17:52:45 +02:00
${ WRKDIR } /tzupdater-${ TZUPDATE_VERSION : S /_/./g } -${ TZUPDATE_TZVERSION } /tzupdater.jar -u -bc
2007-03-06 05:33:14 +01:00
@-${ RM } -rf ${ JDKIMAGEDIR } /jre/lib/zi.tzdata*
2007-02-24 16:38:12 +01:00
. e n d i f
2002-03-13 16:06:16 +01:00
2000-10-13 14:41:25 +02:00
do-install :
${ MKDIR } ${ PREFIX } /jdk${ JDK_VERSION }
2002-06-13 18:01:25 +02:00
cd ${ JDKIMAGEDIR } && ${ FIND } . \
| ${ CPIO } -pdmu -R ${ LIBOWN } :${ LIBGRP } ${ PREFIX } /jdk${ JDK_VERSION }
2006-01-29 22:24:59 +01:00
. i f ! d e f i n e d ( W I T H O U T _ W E B )
${ INSTALL_DATA } ${ JDKIMAGEDIR } /jre/plugin/desktop/sun_java.desktop \
${ PREFIX } /share/applications/sun_java15.desktop
. e n d i f
2005-02-18 18:21:52 +01:00
@${ ECHO_MSG } " @unexec ${ LOCALBASE } /bin/unregistervm ${ PREFIX } /jdk ${ JDK_VERSION } /bin/java " >> ${ TMPPLIST }
2005-01-20 09:41:13 +01:00
@${ FIND } -s ${ JDKIMAGEDIR } -not -type d | \
2005-01-29 13:19:15 +01:00
${ SED } -ne 's#^${JDKIMAGEDIR}#jdk${JDK_VERSION}#p' >> ${ TMPPLIST }
2006-01-29 22:24:59 +01:00
. i f ! d e f i n e d ( W I T H O U T _ W E B )
@${ ECHO_MSG } '@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${ TMPPLIST }
. e n d i f
2003-11-11 17:16:20 +01:00
. i f d e f i n e d ( W I T H _ D E B U G )
2002-06-13 18:01:25 +02:00
cd ${ JDKIMAGEDIR_G } && ${ FIND } . \
| ${ CPIO } -pdmu -R ${ LIBOWN } :${ LIBGRP } ${ PREFIX } /jdk${ JDK_VERSION }
2005-01-20 09:41:13 +01:00
@${ FIND } -s ${ JDKIMAGEDIR_G } -not -type d | \
2005-09-20 22:00:08 +02:00
${ SED } -ne 's#^${JDKIMAGEDIR_G}#jdk${JDK_VERSION}#p' >> ${ TMPPLIST }
2000-10-13 14:41:25 +02:00
. e n d i f
2006-02-02 17:27:44 +01:00
${ INSTALL_DATA } ${ FILESDIR } /cacerts \
${ PREFIX } /jdk${ JDK_VERSION } /jre/lib/security/cacerts
2006-07-19 00:50:37 +02:00
. i f d e f i n e d ( W I T H _ P O L I C Y )
${ INSTALL_DATA } ${ WRKDIR } /jce/*.jar ${ PREFIX } /jdk${ JDK_VERSION } /jre/lib/security
. e n d i f
2005-01-20 09:41:13 +01:00
@${ FIND } -s -d ${ PREFIX } /jdk${ JDK_VERSION } -type d | \
2005-01-29 13:19:15 +01:00
${ SED } -ne 's#^${PREFIX}/#@dirrm #p' >> ${ TMPPLIST }
@${ ECHO_MSG } " @exec ${ LOCALBASE } /bin/registervm ${ PREFIX } /jdk ${ JDK_VERSION } /bin/java # FREEBSD-JDK ${ JDK_VERSION } " >> ${ TMPPLIST }
2006-01-29 22:24:59 +01:00
. i f ! d e f i n e d ( W I T H O U T _ W E B )
@${ ECHO_MSG } '@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${ TMPPLIST }
. e n d i f
2000-10-13 14:41:25 +02:00
2005-01-20 09:41:13 +01:00
# XXX: put unregistervm into install script ?
2000-10-13 14:41:25 +02:00
post-install :
2002-03-13 16:06:16 +01:00
@${ LOCALBASE } /bin/registervm " ${ PREFIX } /jdk ${ JDK_VERSION } /bin/java # FREEBSD-JDK ${ JDK_VERSION } "
2006-01-29 22:24:59 +01:00
. i f ! d e f i n e d ( W I T H O U T _ W E B )
@-update-desktop-database
. e n d i f
2003-10-11 07:16:50 +02:00
@${ SETENV } PKG_PREFIX = ${ PREFIX } ${ SH } ${ PKGINSTALL } ${ PKGNAME } POST-INSTALL
2000-10-13 14:41:25 +02:00
. i n c l u d e < b s d . p o r t . p o s t . m k >