2001-08-27 14:58:46 -04:00
# New ports collection makefile for: jdk13
2000-10-13 08:41:25 -04:00
# Date created: 10 October 2000
# Whom: Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME = jdk
2001-08-27 14:58:46 -04:00
PORTVERSION = ${ JDK_VERSION } p${ JDK_PATCHSET_VERSION }
2002-04-06 15:41:28 -05:00
PORTREVISION = 3
2000-10-13 08:41:25 -04:00
CATEGORIES = java devel
2001-05-03 10:25:51 -04:00
MASTER_SITES = # http://www.sun.com/software/java2/download.html
2001-08-27 14:58:46 -04:00
# http://www.eyesbeyond.com/freebsddom/java/jdk13.html
DISTFILES = j2sdk-${ JDK_VERSION : S /./_/g } -src${ EXTRACT_SUFX } \
bsd-jdk131-patches-${ JDK_PATCHSET_VERSION } .tar.gz
2000-10-13 08:41:25 -04:00
2001-12-14 03:26:44 -05:00
MAINTAINER = java@FreeBSD.org
2000-10-13 08:41:25 -04:00
BUILD_DEPENDS = gm4:${ PORTSDIR } /devel/m4 \
zip:${ PORTSDIR } /archivers/zip \
2001-08-27 14:58:46 -04:00
gtar:${ PORTSDIR } /archivers/gtar \
${ JDK13DIR } /bin/javac:${ PORTSDIR } /java/linux-jdk13 \
${ X11BASE } /lib/libMrm.a:${ PORTSDIR } /x11-toolkits/open-motif-devel
2002-02-14 07:52:08 -05:00
. i f ! d e f i n e d ( W I T H O U T _ P L U G I N )
2002-02-19 13:19:30 -05:00
LIB_DEPENDS = glib12.3:$( PORTSDIR) /devel/glib12 \
2002-02-20 03:12:38 -05:00
gtk12.2:$( PORTSDIR) /x11-toolkits/gtk12 \
2002-02-14 07:52:08 -05:00
nspr4.1:$( PORTSDIR) /devel/nspr
. e n d i f
2002-03-06 05:26:47 -05:00
RUN_DEPENDS = javavm:${ PORTSDIR } /java/javavmwrapper \
${ X11BASE } /lib/X11/fonts/URW/fonts.dir:${ PORTSDIR } /x11-fonts/urwfonts
2000-10-13 08:41:25 -04:00
2001-08-27 14:58:46 -04:00
WRKSRC = ${ WRKDIR } /j2sdk1.3.1/make
2000-10-13 08:41:25 -04:00
2001-08-27 14:58:46 -04:00
JDK_VERSION = 1.3.1
2002-02-14 07:52:08 -05:00
JDK_PATCHSET_VERSION = 6
2000-10-13 08:41:25 -04:00
2001-08-27 14:58:46 -04:00
JDK13DIR ?= ${ LOCALBASE } /linux-jdk${ JDK_VERSION }
2000-10-13 08:41:25 -04:00
2000-10-14 07:58:04 -04:00
ONLY_FOR_ARCHS = i386
2000-10-13 08:41:25 -04:00
USE_GMAKE = yes
RESTRICTED = "Redistribution of pre-compiled binaries isn't permitted"
2001-08-27 14:58:46 -04:00
MAKE_ENV = ALT_BOOTDIR = " ${ JDK13DIR } " \
2000-10-13 08:41:25 -04:00
ALT_MOTIF_DIR = " ${ X11BASE } " \
OPENWINHOME = " ${ X11BASE } " \
2000-11-03 11:06:41 -05:00
SYS_CFLAGS = " ${ CFLAGS } " \
CLASSPATH = "" \
2001-08-27 14:58:46 -04:00
LD_LIBRARY_PATH = "" \
2000-11-03 11:06:41 -05:00
JAVA_COMPILER = ""
2002-02-14 07:52:08 -05:00
. i f ! d e f i n e d ( W I T H O U T _ P L U G I N )
MAKE_ENV += LIBG_HDRS = " ${ LOCALBASE } /include/glib12 " \
GTK_HDRS = " ${ X11BASE } /include/gtk12 " \
LIBIDL_HDRS =
. e n d i f
. i f ! d e f i n e d ( W I T H O U T _ P L U G I N )
ALL_TARGET = all plugin images
. e l s e
2001-08-27 14:58:46 -04:00
ALL_TARGET = all images
2002-02-14 07:52:08 -05:00
. e n d i f
2001-09-10 07:43:08 -04:00
TAR = gtar # Necessary for proper extraction of sources
2001-08-27 14:58:46 -04:00
BSD_TAR = /usr/bin/tar
2000-10-13 08:41:25 -04:00
PLIST_SUB += JDK_VERSION = ${ JDK_VERSION }
2001-08-27 14:58:46 -04:00
JDKIMAGEDIR = ${ WRKSRC } /../build/bsd-i386/jdk-image-i386
JDKIMAGEDIR_G = ${ WRKSRC } /../build/bsd-i386/jdk-debug-image-i386
2000-10-13 08:41:25 -04:00
. i f d e f i n e d ( N O D E B U G )
PLIST_SUB += DEBUG:= "@comment "
PKGNAMESUFFIX = -nodebug
. e l s e
PLIST_SUB += DEBUG:= ""
. e n d i f
2002-02-14 07:52:08 -05:00
. i f d e f i n e d ( W I T H _ N A T I V E _ T H R E A D S )
PLIST_SUB += NATIVE:= ""
MAKE_ARGS += HPIS = "green native"
. e l s e
PLIST_SUB += NATIVE:= "@comment "
. e n d i f
. i f d e f i n e d ( W I T H O U T _ P L U G I N )
PLIST_SUB += PLUGIN:= "@comment "
. e l s e
PLIST_SUB += PLUGIN:= ""
. e n d i f
2000-10-13 08:41:25 -04:00
. i f d e f i n e d ( B A T C H ) | | d e f i n e d ( P A C K A G E _ B U I L D I N G )
IGNORE = "You can not legally distribute pre-compiled binaries"
. e n d i f
. i n c l u d e < b s d . p o r t . p r e . m k >
. f o r f i l e i n $ { D I S T F I L E S }
. i f ! e x i s t s ( $ { D I S T D I R } / $ { f i l e } )
2001-08-27 14:58:46 -04:00
IGNORE = You must manually fetch the source distribution and FreeBSD patches ( ${ DISTFILES } ) from http://www.sun.com/software/java2/download.html and http://www.eyesbeyond.com/freebsddom/java/jdk13.html, place it in ${ DISTDIR } and then run make again
2000-10-13 08:41:25 -04:00
. e n d i f
. e n d f o r
pre-patch :
2001-10-16 08:43:07 -04:00
@cd ${ WRKDIR } && \
2002-02-14 11:01:23 -05:00
${ CHMOD } -R u+w * && \
2001-10-16 08:43:07 -04:00
${ MKDIR } -p j2sdk1.3.1/ext/plugin/oji-plugin/include/bsd/jdk12 && \
${ MKDIR } -p j2sdk1.3.1/ext/plugin/oji-plugin/include/solaris/navig5/private && \
${ MKDIR } -p j2sdk1.3.1/src/bsd/doc/man && \
2002-02-14 11:01:23 -05:00
${ MKDIR } -p hotspot1.3.1/build/bsd && \
${ MKDIR } -p hotspot1.3.1/build/bsd/makefiles && \
${ MKDIR } -p hotspot1.3.1/build/bsd/package && \
${ MKDIR } -p hotspot1.3.1/src/os/bsd/launcher && \
${ MKDIR } -p hotspot1.3.1/src/os/bsd/vm && \
${ MKDIR } -p hotspot1.3.1/src/os_cpu/bsd_i486/vm && \
2001-10-16 08:43:07 -04:00
${ PATCH } < ${ WRKDIR } /jdk131.patches
2000-10-13 08:41:25 -04:00
2002-03-13 10:06:16 -05:00
post-build :
# Prune empty dirs
${ FIND } ${ JDKIMAGEDIR } -type d | /usr/bin/sort -r | \
${ XARGS } ${ RMDIR } 2> /dev/null || ${ TRUE }
${ FIND } ${ JDKIMAGEDIR_G } -type d | /usr/bin/sort -r | \
${ XARGS } ${ RMDIR } 2> /dev/null || ${ TRUE }
2000-10-13 08:41:25 -04:00
. i f ! d e f i n e d ( N O D E B U G )
pre-install :
@${ ECHO_MSG }
@${ ECHO_MSG } "Please use \`make -DNODEBUG' if you don't want to install libraries and binaries"
@${ ECHO_MSG } "with debugging support."
@${ ECHO_MSG }
. e n d i f
do-install :
${ MKDIR } ${ PREFIX } /jdk${ JDK_VERSION }
2001-08-27 14:58:46 -04:00
( cd ${ JDKIMAGEDIR } && ${ BSD_TAR } -c -f - .) \
| ( cd ${ PREFIX } /jdk${ JDK_VERSION } && ${ BSD_TAR } --unlink -x -f -)
2000-10-13 08:41:25 -04:00
. i f ! d e f i n e d ( N O D E B U G )
2001-08-27 14:58:46 -04:00
( cd ${ JDKIMAGEDIR_G } && ${ BSD_TAR } -c -f - .) \
| ( cd ${ PREFIX } /jdk${ JDK_VERSION } && ${ BSD_TAR } --unlink -x -f -)
2000-10-13 08:41:25 -04:00
. e n d i f
2002-04-06 15:41:28 -05:00
${ MKDIR } ${ PREFIX } /jdk${ JDK_VERSION } /jre/lib/ext
2000-10-13 08:41:25 -04:00
post-install :
2002-03-13 10:06:16 -05:00
@${ LOCALBASE } /bin/registervm " ${ PREFIX } /jdk ${ JDK_VERSION } /bin/java # FREEBSD-JDK ${ JDK_VERSION } "
2002-02-14 07:52:08 -05:00
. i f ! d e f i n e d ( W I T H O U T _ P L U G I N )
@${ ECHO_MSG }
@${ ECHO_MSG } The use the Java plugin with Mozilla you must create a
@${ ECHO_MSG } symbolic link from
@${ ECHO_MSG }
@${ ECHO_MSG } ${ PREFIX } /jdk${ JDK_VERSION } /jre/plugin/i386/ns600/libjavaplugin_oji.so
@${ ECHO_MSG }
@${ ECHO_MSG } to your Mozilla plugins directory, which is usually found at
@${ ECHO_MSG }
@${ ECHO_MSG } ${ X11BASE } /lib/mozilla/plugins
@${ ECHO_MSG }
. e n d i f
2000-10-13 08:41:25 -04:00
. i n c l u d e < b s d . p o r t . p o s t . m k >