Date: Mon, 1 Jan 2018 14:27:56 +0100 From: Ruediger Gad <r.c.g@gmx.de> To: "freebsd-java@FreeBSD.org" <freebsd-java@FreeBSD.org> Subject: Update JOGL to 2.3.2 (for Running SweetHome3D) Message-ID: <bc53ce4c-d204-c982-94bb-52c7d3784090@gmx.de>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi, I am sending this in hope it is helpful for others. For running SweetHome3D (http://www.sweethome3d.com), I had to use JOGL 2.3.2. For updating JOGL to 2.3.2, I modified jogamp-jogl from the ports tree. Just bumping the version was not sufficient as some more things had to be adjusted. Attached, I send a diff against the original version that shows the modifications. Just in case, I also include the modified start script for SweetHome3D. If it is helpful, I could also prepare a pull request or so to include the modifications in the ports tree. Unfortunately, I am new to FreeBSD and do not know the processes etc. Cheers, Ruediger -- https://ruedigergad.com/ [-- Attachment #2 --] #!/bin/sh # Retrieve Sweet Home 3D directory PROGRAM=`readlink "$0"` if [ "$PROGRAM" = "" ]; then PROGRAM=$0 fi PROGRAM_DIR=`dirname "$PROGRAM"` # Run Sweet Home 3D java -Xmx1024m -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1b.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dcore.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dutils.jar:"$PROGRAM_DIR"/lib/java3d-1.6/vecmath.jar:/usr/local/share/java/classes/gluegen2-rt.jar:"$PROGRAM_DIR"/lib/java3d-1.6/jogl-java3d.jar:"$PROGRAM_DIR"/jre8/lib/javaws.jar -Djava.library.path=/usr/local/lib -Djogamp.gluegen.UseTempJarCache=false -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer com.eteks.sweethome3d.SweetHome3D -open "$1" [-- Attachment #3 --] diff -rupN /usr/ports/graphics/jogamp-jogl/Makefile jogamp-jogl/Makefile --- /usr/ports/graphics/jogamp-jogl/Makefile 2017-09-10 22:55:38.000000000 +0200 +++ jogamp-jogl/Makefile 2018-01-01 13:32:39.014448000 +0100 @@ -2,18 +2,18 @@ # $FreeBSD: head/graphics/jogamp-jogl/Makefile 449591 2017-09-10 20:55:38Z gerald $ PORTNAME= jogamp-jogl -PORTVERSION= 2.2.4 -PORTREVISION= 3 +PORTVERSION= 2.3.2 +PORTREVISION= 1 CATEGORIES= graphics devel java MASTER_SITES= http://jogamp.org/deployment/jogamp-current/archive/Sources/ \ http://jogamp.org/deployment/v${PORTVERSION}/archive/Sources/ -DISTFILES= jogl-v${PORTVERSION}.tar.7z \ - gluegen-v${PORTVERSION}.tar.7z +DISTFILES= jogl-v${PORTVERSION}.tar.xz \ + gluegen-v${PORTVERSION}.tar.xz \ + jcpp-v${PORTVERSION}.tar.xz MAINTAINER= makc@FreeBSD.org COMMENT= Java bindings for OpenGL -EXTRACT_DEPENDS= ${7Z_CMD}:archivers/p7zip BUILD_DEPENDS= ${JAVALIBDIR}/swt-devel.jar:x11-toolkits/swt-devel RUN_DEPENDS= ${JAVALIBDIR}/swt-devel.jar:x11-toolkits/swt-devel @@ -24,10 +24,8 @@ USE_GCC= yes USE_JAVA= yes USE_XORG= x11 xcursor xrandr xrender xxf86vm -7Z_CMD= ${LOCALBASE}/bin/7z -EXTRACT_CMD= ${7Z_CMD} -EXTRACT_BEFORE_ARGS= x -so -EXTRACT_AFTER_ARGS= | ${TAR} -xf - +EXTRACT_CMD= ${TAR} +EXTRACT_BEFORE_ARGS= xf PATCH_WRKSRC= ${WRKDIR} BUILD_WRKSRC= ${WRKDIR}/jogl/make @@ -36,6 +34,7 @@ MAKE_ENV+= PATH="${BUILD_BINPATH}:${PATH post-extract: ${MV} ${WRKDIR}/gluegen-v${PORTVERSION} ${WRKDIR}/gluegen + ${MV} ${WRKDIR}/jcpp-v${PORTVERSION}/src ${WRKDIR}/gluegen/jcpp/src ${MV} ${WRKDIR}/jogl-v${PORTVERSION} ${WRKDIR}/jogl ${MKDIR} ${BUILD_BINPATH} ${LN} -sf ${LOCALBASE}/bin/${CC} ${BUILD_BINPATH}/gcc diff -rupN /usr/ports/graphics/jogamp-jogl/distinfo jogamp-jogl/distinfo --- /usr/ports/graphics/jogamp-jogl/distinfo 2015-07-31 12:29:18.000000000 +0200 +++ jogamp-jogl/distinfo 2018-01-01 13:32:39.014608000 +0100 @@ -1,4 +1,6 @@ -SHA256 (jogl-v2.2.4.tar.7z) = 39d53fc4c4c3f8e3a5287646bc10457cfaa6fcc88f07c0b0c7817a95cb1f282b -SIZE (jogl-v2.2.4.tar.7z) = 33454202 -SHA256 (gluegen-v2.2.4.tar.7z) = 6ad7b35f7c8fc81ec57d986f54b93c5c93127cd6c2b0efc2fb3950022feb15da -SIZE (gluegen-v2.2.4.tar.7z) = 39334025 +SHA256 (jogl-v2.3.2.tar.xz) = 88cd468a1401ac6e32f6fb850b59328aff6808ddfa0a579fae53e2fe3b446c06 +SIZE (jogl-v2.3.2.tar.xz) = 35467924 +SHA256 (gluegen-v2.3.2.tar.xz) = d235d5d4c9b8e17d9029be2d9b9e3f2839a67f4f23dd3871fe10c4b5f04091d3 +SIZE (gluegen-v2.3.2.tar.xz) = 64053832 +SHA256 (jcpp-v2.3.2.tar.xz) = 67f889200e438789b2987d4e6c876a1ad6b8cfe3d5cb07a5f9de0d250ab73c46 +SIZE (jcpp-v2.3.2.tar.xz) = 39024 diff -rupN /usr/ports/graphics/jogamp-jogl/files/patch-gluegen2 jogamp-jogl/files/patch-gluegen2 --- /usr/ports/graphics/jogamp-jogl/files/patch-gluegen2 2015-07-31 12:29:18.000000000 +0200 +++ jogamp-jogl/files/patch-gluegen2 2018-01-01 13:32:39.015482000 +0100 @@ -9,8 +9,8 @@ <condition property="output.lib.name.os" value="lib${output.lib.name}.so"><isset property="isUnix"/></condition> <condition property="output.lib.name.os" value="${output.lib.name}.dll"><isset property="isWindows"/></condition> <condition property="output.lib.name.os" value="lib${output.lib.name}.jnilib"><isset property="isOSX"/></condition> -@@ -604,14 +604,14 @@ - <srcfiles dir= "${src.java}" includes="**"/> +@@ -605,7 +605,7 @@ + <srcfiles dir= "${src.jcpp}" includes="**"/> <srcfiles dir= "${c.grammar}" includes="*.g"/> <srcfiles dir= "${j.grammar}" includes="*.g"/> - <mapper type="merge" to="${build}/gluegen.jar"/> @@ -18,7 +18,8 @@ </uptodate> <uptodate property="gluegen.build.skip.java2"> <srcfiles dir= "." includes="*.xml"/> - <srcfiles dir= "${src.java}" includes="**"/> +@@ -613,7 +613,7 @@ + <srcfiles dir= "${src.jcpp}" includes="**"/> <srcfiles dir= "${c.grammar}" includes="*.g"/> <srcfiles dir= "${j.grammar}" includes="*.g"/> - <mapper type="merge" to="${build}/gluegen-rt.jar"/> @@ -57,14 +58,14 @@ // static initialization order: --- gluegen/src/junit/com/jogamp/common/util/TestTempJarCache.java.orig 2014-10-10 13:20:51 UTC +++ gluegen/src/junit/com/jogamp/common/util/TestTempJarCache.java -@@ -197,8 +197,8 @@ public class TestTempJarCache extends Ju +@@ -196,8 +196,8 @@ public class TestTempJarCache extends SingletonJunitCase { @Test public void testTempJarCache02AddNativeLibs() throws IOException, IllegalArgumentException, URISyntaxException { if(AndroidVersion.isAvailable) { System.err.println("n/a on Android"); return; } -- final String nativeJarName = "gluegen-rt-natives-"+Platform.getOSAndArch()+".jar"; +- final Uri.Encoded nativeJarName = Uri.Encoded.cast("gluegen-rt-natives-"+Platform.getOSAndArch()+".jar"); - final String libBaseName = "gluegen-rt"; -+ final String nativeJarName = "gluegen2-rt-natives-"+Platform.getOSAndArch()+".jar"; ++ final Uri.Encoded nativeJarName = Uri.Encoded.cast("gluegen2-rt-natives-"+Platform.getOSAndArch()+".jar"); + final String libBaseName = "gluegen2-rt"; final ClassLoader cl = getClass().getClassLoader(); - URI jarUriRoot = JarUtil.getJarSubURI(TempJarCache.class.getName(), cl); + final Uri jarUri = JarUtil.getJarUri(TempJarCache.class.getName(), cl);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bc53ce4c-d204-c982-94bb-52c7d3784090>
