pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/37220: Patch to use builtin sun-jre15 on Solaris



>Number:         37220
>Category:       pkg
>Synopsis:       Patch to use builtin sun-jre15 on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 26 07:40:00 +0000 2007
>Originator:     Naoto Morishima
>Release:        
>Organization:
>Environment:
SunOS XXX 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V210
>Description:
Currently pkgsrc does not try to use builtin java VM on Solaris even when it is 
available.
>How-To-Repeat:
Try to install www/apache-tomcat55, for instance, on Solaris.
>Fix:
Following patch will allow pkgsrc on Solaris to use builtin java VM, 
however it still seems to be a little bit ad-hoc....

Index: lang/sun-jre15/builtin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/sun-jre15/builtin.mk,v
retrieving revision 1.3
diff -u -r1.3 builtin.mk
--- lang/sun-jre15/builtin.mk   7 Jul 2006 02:55:28 -0000       1.3
+++ lang/sun-jre15/builtin.mk   26 Oct 2007 03:49:21 -0000
@@ -4,7 +4,8 @@
 
 BUILTIN_FIND_FILES_VAR:=               JAVAVM15
 BUILTIN_FIND_FILES.JAVAVM15=   \
-       /System/Library/Frameworks/JavaVM.framework/Versions/1.5
+       /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home \
+       /usr/java
 
 .include "../../mk/buildlink3/bsd.builtin.mk"
 
@@ -29,7 +30,7 @@
     !empty(IS_BUILTIN.sun-jre15:M[yY][eE][sS]) && \
     empty(JAVAVM15:M__nonexistent__)
 BUILTIN_VERSION.sun-jre15!=                                            \
-       ${BASENAME} /System/Library/Frameworks/JavaVM.framework/Versions/1.5.*
+       java -version 2>&1 | ${SED} -n "/^java version/s/java version 
\"\([0-9.]*\)_[0-9]*\"/\1/p"
 BUILTIN_PKG.sun-jre15= sun-jre15-${BUILTIN_VERSION.sun-jre15}
 .endif
 MAKEVARS+=     BUILTIN_PKG.sun-jre15
@@ -68,7 +69,8 @@
 CHECK_BUILTIN.sun-jre15?=      no
 .if !empty(CHECK_BUILTIN.sun-jre15:M[nN][oO])
 .  if !empty(USE_BUILTIN.sun-jre15:M[yY][eE][sS])
-PKG_JAVA_HOME= \
-       /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
+PKG_JAVA_HOME= ${JAVAVM15}
+JAVA_BINPREFIX=        ${PKG_JAVA_HOME}/bin
+JAVA_BINPREFIX=        ${BUILTIN_VERSION.sun-jre152}
 .  endif
 .endif
Index: mk/java-vm.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/java-vm.mk,v
retrieving revision 1.60
diff -u -r1.60 java-vm.mk
--- mk/java-vm.mk       2 Aug 2007 18:04:49 -0000       1.60
+++ mk/java-vm.mk       26 Oct 2007 03:49:30 -0000
@@ -95,7 +95,8 @@
 _PKG_JVM_DEFAULT?=     sun-jdk
 .  elif !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
 _PKG_JVM_DEFAULT?=     blackdown-jdk13
-.  elif !empty(MACHINE_PLATFORM:MDarwin-*-*)
+.  elif !empty(MACHINE_PLATFORM:MDarwin-*-*) || \
+       !empty(MACHINE_PLATFORM:MSunOS-*-*)
 _PKG_JVM_DEFAULT?=     sun-jdk
 .  else
 _PKG_JVM_DEFAULT?=     kaffe
@@ -140,6 +141,7 @@
        NetBSD-*-i386
 _ONLY_FOR_PLATFORMS.sun-jdk15= \
        Darwin-8.*-* \
+       SunOS-*-* \
        DragonFly-*-i386 \
        FreeBSD-6.*-i386 \
        Linux-*-i[3-6]86 \




Home | Main Index | Thread Index | Old Index