summaryrefslogtreecommitdiff
path: root/lang/jdk/Makefile
blob: ebda1cfa8ebb9c4d53aa8b28e9ca30306e194eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# $NetBSD: Makefile,v 1.32 2003/02/11 04:23:14 jlam Exp $
#

VERSION=	1.1.8
PKGNAME=	jdk-${VERSION}
PKGREVISION=	4
CATEGORIES=	lang
MASTER_SITES=	ftp://ftp.netbsd.org/pub/NetBSD/misc/java/i386/${VERSION}/ \
		ftp://ftp.de.netbsd.org/pub/NetBSD/misc/java/i386/${VERSION}/
EXTRACT_SUFX=	.tgz

MAINTAINER=	jwise@netbsd.org
COMMENT=	Sun's Java(tm) Development Kit

LICENSE=	jdk-license

.include "../../mk/bsd.prefs.mk"

JVM_HOME=	${LOCALBASE}/java/jdk-${VERSION}

.if ${OBJECT_FMT} == "ELF"
DISTNAME=	jdk${VERSION}-rc1-elf
WRKSRC=		${WRKDIR}/jdk${VERSION}-elf
PLIST_SRC=	${PKGDIR}/PLIST-elf
.else
DISTNAME=	jdk${VERSION}-rc1
WRKSRC=		${WRKDIR}/jdk${VERSION}
PLIST_SRC=	${PKGDIR}/PLIST-aout
.endif
PLIST_SRC+=	${PKGDIR}/PLIST

CHECK_SHLIBS=	no

USE_BUILDLINK2=	yes
USE_PKGINSTALL=	yes
NO_BUILD=	yes
NO_MTREE=	yes	# since we change PREFIX below

ONLY_FOR_PLATFORM= NetBSD-*-i386 Linux-*-i[3-6]86
RESTRICTED=	"No redistribution of the Java(tm) Development Kit"
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}
NO_SRC_ON_FTP=		${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}

OWN_DIRS=	${PREFIX} ${PREFIX}/lib ${PREFIX}/lib/security
SFILES=		appletviewer.properties		awt.properties
SFILES+=	content-types.properties	font.properties
SFILES+=	font.properties.ISO8859_15_FDIS	font.properties.cs
SFILES+=	font.properties.el		font.properties.hu
SFILES+=	font.properties.ja		font.properties.ko
SFILES+=	font.properties.lt		font.properties.lv
SFILES+=	font.properties.pl		font.properties.ru
SFILES+=	font.properties.tr		font.properties.zh_EUC_CN
SFILES+=	font.properties.zh_TW_Big5	font.properties.zh_TW_EUC_TW
SFILES+=	psfont.properties.ja		serialver.properties
SFILES+=	security/java.security
SUPPORT_FILES=	# empty
.for FILE in ${SFILES}
SUPPORT_FILES+=	${PREFIX}/lib/${FILE}.default ${PREFIX}/lib/${FILE}
.endfor

do-configure:
	cd ${WRKSRC}/lib; for file in ${SFILES}; do			\
		${MV} -f $$file $$file.default;				\
	done

.if ${OBJECT_FMT} == "ELF"
# This gross hack normalizes the shlib names so that automatic
# shared library handling will work.
pre-install:
	@(cd ${WRKSRC}/lib/i386/green_threads;				\
	${LN} -s libXm.so libXm.so.2;					\
	for X in lib*.so ;do						\
		if [ "$$X" = "libXm.so" ]; then continue; fi;		\
		if [ -f $$X.* ] ;then					\
			${MV} $$X $$X.* ;				\
			${LN} -s $$X.* $$X; 				\
		elif [ -f "$$X" ] ;then					\
			${MV} $$X $$X.${VERSION} ;			\
			${LN} -s $$X.${VERSION} $$X;			\
		fi ;							\
	done)
	${LN} -sf . ${WRKSRC}/jre
.endif

do-install:
	${RM} -f ${WRKSRC}/*.orig
	${INSTALL_PROGRAM_DIR} ${PREFIX}
	cd ${WRKSRC} && ${PAX} -rw . ${PREFIX}

.include "../../mk/bsd.pkg.mk"

# This needs to be after bsd.pkg.mk 
PREFIX=		${JVM_HOME}