aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2004-01-20 04:38:23 +0800
committerglewis <glewis@FreeBSD.org>2004-01-20 04:38:23 +0800
commit87858e6f3ae7d06ae6fd07a3df43867a4c2ad441 (patch)
tree64f80aa073b8f85dac499698c779053ffa62f915
parentab6eb1174396392de7c4d7a40eee169d139a2d8f (diff)
downloadfreebsd-ports-gnome-87858e6f3ae7d06ae6fd07a3df43867a4c2ad441.tar.gz
freebsd-ports-gnome-87858e6f3ae7d06ae6fd07a3df43867a4c2ad441.tar.zst
freebsd-ports-gnome-87858e6f3ae7d06ae6fd07a3df43867a4c2ad441.zip
. Add ${LOCALBASE}/lib to the default search path for libraries when using
JNI. XXX: Maybe ${X11BASE}/lib and /lib (5.x dynamic root support) should also be added? /lib is part of the default search path on Linux. Requested by: marcus
-rw-r--r--java/jdk12/Makefile7
-rw-r--r--java/jdk12/files/patch-javai_md.c13
2 files changed, 19 insertions, 1 deletions
diff --git a/java/jdk12/Makefile b/java/jdk12/Makefile
index c84b9f31c753..64b828da2b28 100644
--- a/java/jdk12/Makefile
+++ b/java/jdk12/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk.html
@@ -38,6 +38,7 @@ JFC11DIR?= ${WRKDIRPREFIX}${.CURDIR}/../../java/jfc/work/swing-1.1.1fcs
ONLY_FOR_ARCHS= i386
USE_GMAKE= yes
+USE_REINPLACE= yes
RESTRICTED= "Redistribution of pre-compiled binaries is not permitted"
NO_CDROM= "Redistribution of pre-compiled binaries is not permitted"
MAKEFILE= GNUmakefile
@@ -116,6 +117,10 @@ pre-patch:
@${MKDIR} ${WRKSRC}/1.1_libs
@${CP} ${JFC11DIR}/*.jar ${WRKSRC}/1.1_libs
+post-patch:
+ @${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" \
+ ${WRKSRC}/../../src/bsd/javavm/runtime/javai_md.c
+
.if defined(WITH_LINUX_BOOTSTRAP) || !exists(${PREFIX}/jdk${JDK_VERSION}/bin/javac)
# Some checks for bootstrapping with a Linux JDK
pre-build:
diff --git a/java/jdk12/files/patch-javai_md.c b/java/jdk12/files/patch-javai_md.c
new file mode 100644
index 000000000000..a3dde4d9de48
--- /dev/null
+++ b/java/jdk12/files/patch-javai_md.c
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- ../../src/bsd/javavm/runtime/javai_md.c Mon Jan 19 12:37:59 2004
++++ ../../src/bsd/javavm/runtime/javai_md.c Mon Jan 19 12:32:23 2004
+@@ -147,7 +147,7 @@
+ }
+
+ /* Where to look for native libraries */
+-#define DEFAULT_LD_LIBRARY_PATH "/usr/lib" /* See ld.so.1(1) */
++#define DEFAULT_LD_LIBRARY_PATH "/usr/lib:%%LOCALBASE%%/lib" /* See ld.so.1(1) */
+ {
+ /* Get the user setting of LD_LIBRARY_PATH */
+ v = getenv("LD_LIBRARY_PATH");