summaryrefslogtreecommitdiff
path: root/lang/sun-jre14
diff options
context:
space:
mode:
authorjlam <jlam>2007-08-27 21:51:22 +0000
committerjlam <jlam>2007-08-27 21:51:22 +0000
commitc8d76da2892c786934e7006fae53cabea599a684 (patch)
treee45bd94c8b7babfdebe4ea0c195679c227190746 /lang/sun-jre14
parent659d22ff4a96f46cfa9163c8c7a42389ac49a6e9 (diff)
downloadpkgsrc-c8d76da2892c786934e7006fae53cabea599a684.tar.gz
If running native Linux, fail to install if the X11 libraries aren't
available "somehow" -- for X11_TYPE == "native", then just fail, otherwise for X11_TYPE == "modular", then build the libX11 package to satisfy the library requirements for "javaws" and "policytool". This fixes pkg/36838 reported by Ondrej Tuma. Bump the PKGREVISIONs for sun-jre14, sun-jre15, and sun-jre6.
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 .