2000-10-13 08:41:25 -04:00
# New ports collection makefile for: jdk12
# Date created: 10 October 2000
# Whom: Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME = jdk
PORTVERSION = ${ JDK_VERSION } b${ JDK_BETALEVEL }
CATEGORIES = java devel
MASTER_SITES = # http://www.sun.com/software/communitysource/java2/
2001-02-14 16:12:54 -05:00
# http://www.eyesbeyond.com/freebsddom/java/jdk.html
2000-10-13 08:41:25 -04:00
DISTFILES = ${ PORTNAME } ${ JDK_VERSION : S /./_/g } -src${ EXTRACT_SUFX } \
freebsd-jdk122-patches-${ JDK_BETALEVEL } .tar.gz
MAINTAINER = sobomax@FreeBSD.org
BUILD_DEPENDS = gm4:${ PORTSDIR } /devel/m4 \
zip:${ PORTSDIR } /archivers/zip \
${ JDK11DIR } /bin/javac:${ PORTSDIR } /java/jdk \
${ JDK12DIR } /bin/javac:${ PORTSDIR } /java/linux-jdk \
${ X11BASE } /lib/libMrm.a:${ PORTSDIR } /x11-toolkits/open-motif-devel \
${ NONEXISTENT } :${ PORTSDIR } /java/jfc:extract
LIB_DEPENDS = odbc.1:${ PORTSDIR } /databases/unixODBC
RUN_DEPENDS = ${ X11BASE } /lib/X11/fonts/URW/fonts.dir:${ PORTSDIR } /x11-fonts/urwfonts \
javavm:${ PORTSDIR } /java/javavmwrapper
WRKSRC = ${ WRKDIR } /build/freebsd
JDK_VERSION = 1.2.2
JDK_BETALEVEL = 10
JDK11DIR ?= ${ LOCALBASE } /jdk1.1.8
JFC11DIR ?= ${ WRKDIRPREFIX } ${ .CURDIR } /../../java/jfc/work/swing-1.1.1fcs
JDK12DIR ?= ${ LOCALBASE } /linux-jdk${ JDK_VERSION }
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"
MAKEFILE = GNUmakefile
MAKE_ENV = HAVE_DPS = "no" \
ALT_BOOTDIR = " ${ JDK12DIR } " \
ALT_ODBCDIR = " ${ LOCALBASE } " \
ALT_MOTIF_DIR = " ${ X11BASE } " \
OPENWINHOME = " ${ X11BASE } " \
_JDK11DIR = " ${ JDK11DIR } " \
2000-11-03 11:06:41 -05:00
SYS_CFLAGS = " ${ CFLAGS } " \
CLASSPATH = "" \
JAVA_COMPILER = ""
2000-10-13 08:41:25 -04:00
ALL_TARGET = release-images
PATCH_CMD = ${ PATCH } -p1 -s <
PLIST_SUB += JDK_VERSION = ${ JDK_VERSION }
JDKIMAGEDIR = ${ WRKSRC } /jdk-image-i386
JDKIMAGEDIR_G = ${ WRKSRC } /jdk-debug-image-i386
JREIMAGEDIR = ${ WRKSRC } /jre-image-i386
. 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
. 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 } )
IGNORE = You must manually fetch the source distribution and FreeBSD patches ( ${ DISTFILES } ) from http://www.sun.com/software/communitysource/java2/ and http://www.eyesbeyond.com/freebsddom/java/jdk.html, place it in ${ DISTDIR } and then run make again
. e n d i f
. e n d f o r
pre-patch :
@${ MKDIR } ${ WRKSRC }
. f o r d i r i n b u i l d s r c e x t / i 1 8 n / b u i l d e x t / i 1 8 n / s r c e x t / i i i m p / b u i l d
@cd ${ WRKDIR } /${ dir } && ${ RM } -rf freebsd && ${ CP } -R solaris freebsd
. e n d f o r
@cd ${ WRKSRC } && ${ PATCH_CMD } ${ WRKDIR } /build.patches && \
cd ../share && ${ PATCH_CMD } ${ WRKDIR } /buildshare.patches && \
cd ../../src/freebsd && ${ PATCH_CMD } ${ WRKDIR } /src.patches && \
cd ../share && ${ PATCH_CMD } ${ WRKDIR } /srcshare.patches && \
cd ../../ext && ${ PATCH_CMD } ${ WRKDIR } /ext.patches
@${ MKDIR } ${ WRKSRC } /1.1_libs
@${ CP } ${ JFC11DIR } /*.jar ${ WRKSRC } /1.1_libs
post-build :
for dir in ${ JDKIMAGEDIR } ${ JDKIMAGEDIR_G } ${ JREIMAGEDIR } ; do \
for file in ` find $$ { dir} -type f -name "*.so" ` ; do \
if [ -f $$ { file} .${ JDK_VERSION } ] ; then \
${ RM } $$ { file} .${ JDK_VERSION } ; \
${ LN } -sf ` ${ BASENAME } $$ { file} ` $$ { file} .${ JDK_VERSION } ; \
fi ; \
done ; \
done
for dir in ${ JDKIMAGEDIR } ${ JREIMAGEDIR } ; do \
find $$ { dir} -type f | xargs file | ${ GREP } 'not stripped$$' | \
${ SED } 's|:.*$$||' | xargs strip; \
done
. 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 }
( cd ${ JDKIMAGEDIR } && ${ TAR } -c -f - .) \
| ( cd ${ PREFIX } /jdk${ JDK_VERSION } && ${ TAR } --unlink -x -f -)
. i f ! d e f i n e d ( N O D E B U G )
( cd ${ JDKIMAGEDIR_G } && ${ TAR } -c -f - .) \
| ( cd ${ PREFIX } /jdk${ JDK_VERSION } && ${ TAR } --unlink -x -f -)
. e n d i f
post-install :
${ LOCALBASE } /bin/registervm " ${ PREFIX } /jdk ${ JDK_VERSION } /bin/java # JDK ${ JDK_VERSION } "
. i n c l u d e < b s d . p o r t . p o s t . m k >