tech-pkg archive

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

Re: Java for NetBSD/amd64



On Wed, 9 Jul 2008 16:26:59 +0000 Mike M. Volokhov wrote:
> On the other hand, I get wip/jdk16 working, and it's quite stable
> (successfully running about 20 minutes and got no faults :-)
...
> Attached quick and dirty patch...

... published just with this followup :-)

--
Mishka.
diff -ru jdk16/Makefile jdk16-mishka/Makefile
--- jdk16/Makefile      2008-07-07 17:35:57.000000000 +0300
+++ jdk16-mishka/Makefile       2008-07-09 18:32:56.000000000 +0300
@@ -22,15 +22,20 @@
 PLIST_SRC=             PLIST.common
 
 # XXX actually requires -current due to use of getpeereid()
-ONLY_FOR_PLATFORM=     NetBSD-[4-9]*-i386
+ONLY_FOR_PLATFORM=     NetBSD-[4-9]*-*
 
 JAVA_NAME=             jdk16
 JAVA_WRAPPERS=         appletviewer jar java javac javadoc javah javap
 
+.include "../../mk/java-vm.mk"
 .if exists(${LOCALBASE}/java/jdk-1.6.0/bin/javac)
 # don't depend on myself
 #BUILD_DEPENDS+=       jdk16>=1:../../wip/jdk16
 MAKE_ENV+=             ALT_BOOTDIR=${PREFIX}/java/jdk-1.6.0
+.elif exists(${PKG_JAVA_HOME}/bin/javac)
+# depend on what?
+#BUILD_DEPENDS+=       jdk15>=1:../../wip/jdk15 
+MAKE_ENV+=             ALT_BOOTDIR=${PKG_JAVA_HOME}
 .else
 BUILD_DEPENDS+=                jdk15>=1:../../wip/jdk15
 MAKE_ENV+=             ALT_BOOTDIR=${PREFIX}/java/jdk-1.5.0
@@ -58,8 +63,13 @@
 JRL_DOWNLOAD=  http://download.java.net/jdk6/6u3/
 PATCH_DOWNLOAD=        
http://www.eyesbeyond.com/freebsddom/java/JDK16JRLConfirm.html
 
+.if ${LOWER_ARCH} == "i386"
 JDKIMAGEDIR=           ${WRKDIR}/${BUILD_DIRS}/../build/bsd-i586/j2sdk-image
 # JDKIMAGEDIR_G=       
${WRKDIR}/${BUILD_DIRS}/../build/bsd-i586/j2sdk-debug-image
+.else
+JDKIMAGEDIR=           
${WRKDIR}/${BUILD_DIRS}/../build/bsd-${MACHINE_ARCH}/j2sdk-image
+# JDKIMAGEDIR_G=       
${WRKDIR}/${BUILD_DIRS}/../build/bsd-${MACHINE_ARCH}/j2sdk-debug-image
+.endif
 
 FETCH_MESSAGE+= " The source and patches for the Java (tm) 2 SDK require"
 FETCH_MESSAGE+= " a Sun Java Research License, and cannot be"
@@ -117,6 +127,9 @@
 
 PLIST_SRC+=            PLIST.common_end
 
+# seems JDK build infrastructure uses uname -m for architecture
+MACHINE_ARCH!=         ${UNAME} -m
+
 .include "../../wip/jdk16/license-extract.mk"
 
 # Don't attempt to patch mozilla headers if we don't have them
@@ -131,6 +144,7 @@
 
 post-patch:
        ${MKDIR} ${WRKSRC}/control/build/bsd-i586/lib/i386/server
+       ${MKDIR} 
${WRKSRC}/control/build/bsd-${MACHINE_ARCH}/lib/${MACHINE_ARCH}/server
 
 do-install:
        ${INSTALL_PROGRAM_DIR} ${DESTDIR}${JAVA_HOME}
diff -ru jdk16/Makefile.common jdk16-mishka/Makefile.common
--- jdk16/Makefile.common       2008-06-09 12:57:53.000000000 +0300
+++ jdk16-mishka/Makefile.common        2008-07-09 19:29:11.000000000 +0300
@@ -36,6 +36,7 @@
 BUILDLINK_PASSTHRU_DIRS+=      ${JAVA_HOME}
 BUILDLINK_PASSTHRU_DIRS+=      ${JVM_HOME}
 BUILDLINK_PASSTHRU_RPATHDIRS+= ${JAVA_HOME}/jre/lib/i386/server
+BUILDLINK_PASSTHRU_RPATHDIRS+= ${JAVA_HOME}/jre/lib/${MACHINE_ARCH}/server
 
 .include "../../mk/bsd.prefs.mk"
 


Home | Main Index | Thread Index | Old Index