summaryrefslogtreecommitdiff
path: root/lang/sun-jre14
diff options
context:
space:
mode:
Diffstat (limited to 'lang/sun-jre14')
-rw-r--r--lang/sun-jre14/Makefile33
1 files changed, 31 insertions, 2 deletions
diff --git a/lang/sun-jre14/Makefile b/lang/sun-jre14/Makefile
index bf5cb162381..f9a55458c3d 100644
--- a/lang/sun-jre14/Makefile
+++ b/lang/sun-jre14/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.44 2007/08/22 14:03:48 jlam Exp $
+# $NetBSD: Makefile,v 1.45 2007/08/27 21:51:22 jlam Exp $
# Note: Regen distinfo with PKG_DEFAULT_OPTIONS+=sun-jre-jce
DISTNAME= j2re-1_4_2_14-linux-${DIST_ARCH}
PKGNAME= sun-jre14-2.14
-PKGREVISION= 2
+PKGREVISION= 3
MASTER_SITES= # empty
COMMENT= Sun's Java(tm) 2 Runtime Environment 1.4.2
@@ -56,6 +56,35 @@ END_MESSAGE= \
PLIST_SUBST+= SUN_JRE14_USE_JCE="@comment "
.endif
+# Some of the binaries require libX11, so ensure that requirement is
+# satisfied when the package is installed on the native OS.
+#
+.if defined(EMUL_IS_NATIVE)
+. if ${X11_TYPE} == "native"
+. if ${EMUL_ARCH} == "x86_64"
+LIBX11= ${X11PREFIX}/lib64/libX11.so.6
+. else
+LIBX11= ${X11PREFIX}/lib/libX11.so.6
+. endif
+. if !exists(${LIBX11})
+PKG_FAIL_REASON+= "${LIBX11} does not exist. Please install the" \
+ "X11 library packages for your system."
+. endif
+. else
+. include "../../x11/libX11/buildlink3.mk"
+LIBX11= ${X11PREFIX}/lib/libX11.so.6
+. endif
+
+PLIST_SUBST+= LIBX11=
+
+.PHONY: create-library-symlinks
+post-install: create-library-symlinks
+create-library-symlinks:
+ ${RUN}${LN} -fs ${LIBX11} ${JAVA_HOME}/lib/${EMUL_ARCH}
+.else
+PLIST_SUBST+= LIBX11="@comment "
+.endif
+
post-extract:
cd ${WRKSRC} && ${CHMOD} -R go-w .