Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 1998 06:02:32 +0100 (CET)
From:      girgen@partitur.se
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/9150: Ports depending on jdk?
Message-ID:  <199812210502.GAA18127@stordatan>

next in thread | raw e-mail | index | archive | help

>Number:         9150
>Category:       ports
>Synopsis:       Ports depending on jdk need to know where to find it.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 20 21:50:00 PST 1998
>Last-Modified:
>Originator:     Palle Girgensohn
>Organization:
Partitur
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:
FreeBSD stordatan 3.0-CURRENT FreeBSD 3.0-CURRENT #2: Sun Dec 20 19:27:37 CET 1998     girgen@stordatan:/usr/src/sys/compile/PALLE3  i386

	

>Description:
I'm fiddling with some ports that depend on the jdk port (they're
written in java... ;-)

It appears to me that putting a 
BUILD_DEPENDS: ${PREFIX}/java/bin/javac:${PORTSDIR}/lang/jdk in the Makefile 
is rather uncertain, and exchanging java for jdk1.1.7 isn't much better.
You can't be sure it's there, since the jdk port doesn't put a symlink from
java -> jdk1.1.7, and new versions of the jdk will break the port depending on jdk.

Rather, I propose that the jdk port creates a symlink 
/usr/local/java -> /usr/local/jdk

	

>How-To-Repeat:
Try cd /usr/ports/lang/jdk && make install
	

>Fix:
The patch below add creation of the symlink to the Makefile, and does
some checking in case there already exists a $PREFIX/java node.

diff -urN jdk.old/Makefile jdk/Makefile
--- jdk.old/Makefile	Mon Nov 16 07:28:41 1998
+++ jdk/Makefile	Mon Dec 21 05:23:55 1998
@@ -21,6 +21,19 @@
 
 do-install:
 	${MKDIR} ${PREFIX}/jdk1.1.7
+.if exists(${PREFIX}/java)
+	@(cd ${PREFIX}; \
+	  if [ -h java ]; then \
+		${RM} java; \
+	  elif [ -d java ]; then \
+		${ECHO_MSG} ; \
+		${ECHO_MSG} "Need to create symlink ${PREFIX}/java -> ${PREFIX}/jdk1.1.7"; \
+		${ECHO_MSG} "Please move present ${PREFIX}/java out of the way!"; \
+		${ECHO_MSG} ; \
+		${FALSE}; \
+	  fi)
+.endif
+	(cd ${PREFIX} && ${LN} -s jdk1.1.7 java)
 	(cd ${WRKSRC} && tar -c -f - .) \
 		| (cd ${PREFIX}/jdk1.1.7 && tar fx -)
 
diff -urN jdk.old/pkg/PLIST jdk/pkg/PLIST
--- jdk.old/pkg/PLIST	Sat Dec  5 00:01:33 1998
+++ jdk/pkg/PLIST	Mon Dec 21 05:07:48 1998
@@ -589,3 +589,4 @@
 @dirrm jdk1.1.7/bin/i386
 @dirrm jdk1.1.7/bin
 @dirrm jdk1.1.7
+java
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812210502.GAA18127>