diff options
author | tobik <tobik@FreeBSD.org> | 2017-07-23 06:05:21 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2017-07-23 06:05:21 +0800 |
commit | bd715cac97cec32333b41d6e55b29b4d569ad1b0 (patch) | |
tree | 33891eac18915535f2b8f6e458c8a109f0df447a /java/openjfx8-devel | |
parent | 7738675aba157da3c8b1e3bbdfd0b51f2ea2e60c (diff) | |
download | freebsd-ports-gnome-bd715cac97cec32333b41d6e55b29b4d569ad1b0.tar.gz freebsd-ports-gnome-bd715cac97cec32333b41d6e55b29b4d569ad1b0.tar.zst freebsd-ports-gnome-bd715cac97cec32333b41d6e55b29b4d569ad1b0.zip |
java/openjfx8-devel: Update to a more recent snapshot
- Add new default options MEDIA and WEBKIT to enable building of the
media and web modules
- Take back maintainership
Running e.g. AsciidocFX on FreeBSD should be possible now.
PR: 218014
Reported by: Dr. Jochen Raßler <jochen.rassler@gmail.com>, mr (via mail)
Diffstat (limited to 'java/openjfx8-devel')
-rw-r--r-- | java/openjfx8-devel/Makefile | 90 | ||||
-rw-r--r-- | java/openjfx8-devel/distinfo | 5 | ||||
-rw-r--r-- | java/openjfx8-devel/files/patch-build.gradle | 42 | ||||
-rw-r--r-- | java/openjfx8-devel/files/patch-buildSrc_build.gradle | 10 | ||||
-rw-r--r-- | java/openjfx8-devel/files/patch-modules_graphics_src_main_native-font_pango.c | 11 | ||||
-rw-r--r-- | java/openjfx8-devel/files/patch-modules_web_src_main_native_Source_cmake_OptionsJava.cmake | 10 | ||||
-rw-r--r-- | java/openjfx8-devel/pkg-message | 3 | ||||
-rw-r--r-- | java/openjfx8-devel/pkg-plist | 5 |
8 files changed, 108 insertions, 68 deletions
diff --git a/java/openjfx8-devel/Makefile b/java/openjfx8-devel/Makefile index c9437251a5c0..b81bbcdbc402 100644 --- a/java/openjfx8-devel/Makefile +++ b/java/openjfx8-devel/Makefile @@ -2,63 +2,101 @@ # $FreeBSD$ PORTNAME= openjfx8 -PORTVERSION= 20160228 -PORTREVISION= 3 +PORTVERSION= 20170722 CATEGORIES= java x11-toolkits devel -MASTER_SITES= https://bitbucket.org/tobik/openjfx-rt/get/ \ - http://bitbucket.org/tobik/openjfx-rt/get/ +MASTER_SITES= https://bitbucket.org/tobik/openjfx-rt/get/freebsd${PORTVERSION}${EXTRACT_SUFX}?dummy=/ PKGNAMESUFFIX= -devel -DISTNAME= freebsd${PORTVERSION} -DIST_SUBDIR= ${PORTNAME} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= tobik@FreeBSD.org COMMENT= JavaFX (OpenJFX) SDK overlay for OpenJDK 8 LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE +ONLY_FOR_ARCHS= amd64 i386 + BUILD_DEPENDS= apache-ant>0:devel/apache-ant \ antlr3>0:devel/antlr3 \ gradle:devel/gradle \ ${JAVALIBDIR}/junit.jar:java/junit \ swt-devel>0:x11-toolkits/swt-devel +LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 RUN_DEPENDS= swt-devel>0:x11-toolkits/swt-devel -USES= jpeg -USE_GL= yes -USE_GNOME= gtk20 +USES= gettext-runtime jpeg sqlite +USE_GL= gl +USE_GNOME= atk cairo gdkpixbuf2 glib20 gtk20 pango USE_JAVA= yes USE_LDCONFIG= yes +USE_XORG= x11 xtst xxf86vm JAVA_VERSION= 1.8 -ONLY_FOR_ARCHS= i386 amd64 +OPTIONS_DEFINE= MEDIA TEST WEBKIT +OPTIONS_DEFAULT= MEDIA WEBKIT +OPTIONS_SUB= yes + +MEDIA_DESC= Build media module + +MEDIA_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ + libsndio.so:audio/sndio +MEDIA_USES= gmake +MEDIA_VARS= COMPILE_MEDIA=true + +TEST_USES= display:test +TEST_VARS= AWT_TEST=true FULL_TEST=true + +# Gradle calls CMake during the build +WEBKIT_BUILD_DEPENDS= cmake:devel/cmake +WEBKIT_IMPLIES= MEDIA +WEBKIT_LIB_DEPENDS= libicui18n.so:devel/icu +WEBKIT_USES= bison compiler:c++11-lib gmake gperf perl5 pkgconfig \ + python:2.7,build +WEBKIT_USE= GNOME=libxslt,libxml2 \ + PERL5=build \ + RUBY=yes \ + XORG=xcomposite,xdamage,xfixes,xrender,xt +WEBKIT_VARS= RUBY_NO_RUN_DEPENDS=yes COMPILE_WEBKIT=true + PLIST_SUB= ARCH=${ARCH} \ JAVA_HOME=${JAVA_HOME} -WRKSRC= ${WRKDIR}/tobik-openjfx-rt-2de985ca8377 +WRKSRC= ${WRKDIR}/tobik-openjfx-rt-9ccdaef460fa -# NOTE: This port won't build if openjfx8-devel is currently -# installed. This is not a problem in Poudriere or Synth but -# something to be aware of if you're trying to build this port in a -# non-pristine environment. +GRADLE_ENV= GRADLE_USER_HOME=${WRKDIR}/gradle-home +GRADLE_RUN= ${SETENV} ${GRADLE_ENV} gradle --no-daemon + +# NOTE: This port won't build if ${JAVA_HOME}/jre/lib/ext/jfxrt.jar +# already exists on your system. This is not a problem in Poudriere +# or Synth but something to be aware of if you're trying to build this +# port in a non-pristine environment. post-patch: -# Fix build directories which are now language specific with Gradle 4.0 @${REINPLACE_CMD} -E -e 's|%%PREFIX%%|${PREFIX}|g' \ - -e 's|"(\$$buildDir/classes)/main"|"\1/java/main"|g' \ - -e 's|"(modules/.*/build/classes)/main"|"\1/java/main"|g' \ ${WRKSRC}/build.gradle ${WRKSRC}/buildSrc/build.gradle +# Remove the bundled libicu and libsqlite3. We use the system's +# versions instead. + @${RM} -r ${WRKSRC}/modules/web/src/main/native/Source/ThirdParty/icu \ + ${WRKSRC}/modules/web/src/main/native/Source/ThirdParty/sqlite -do-build: +do-configure: # Gradle creates ${HOME}/.gradle, pretend home is somewhere else - @${MKDIR} ${WRKDIR}/dot-gradle - @(cd ${WRKSRC}; ${SETENV} GRADLE_USER_HOME=${WRKDIR}/dot-gradle gradle --no-daemon zips) + @${MKDIR} ${WRKDIR}/gradle-home + @${ECHO_CMD} "NUM_COMPILE_THREADS = ${MAKE_JOBS_NUMBER}" > ${WRKSRC}/gradle.properties +.for prop in COMPILE_MEDIA COMPILE_WEBKIT AWT_TEST FULL_TEST + @${ECHO_CMD} "${prop} = ${${prop}:Ufalse}" >> ${WRKSRC}/gradle.properties +.endfor -do-install: - @(${MKDIR} ${STAGEDIR}${JAVA_HOME} \ - && ${TAR} -C ${STAGEDIR}${JAVA_HOME} \ - -xf ${WRKSRC}/build/bundles/javafx-sdk-overlay.zip) +do-build: + @cd ${WRKSRC} && ${GRADLE_RUN} zips +do-install: + @${MKDIR} ${STAGEDIR}${JAVA_HOME} + @${TAR} -C ${STAGEDIR}${JAVA_HOME} \ + -xf ${WRKSRC}/build/bundles/javafx-sdk-overlay.zip @${FIND} ${STAGEDIR}${JAVA_HOME}/jre -name '*.so' -exec ${STRIP_CMD} \{\} \; +do-test-TEST-on: + @cd ${WRKSRC} && ${GRADLE_RUN} check test + .include <bsd.port.mk> diff --git a/java/openjfx8-devel/distinfo b/java/openjfx8-devel/distinfo index bbdad3fa7477..f6df02d2af5d 100644 --- a/java/openjfx8-devel/distinfo +++ b/java/openjfx8-devel/distinfo @@ -1,2 +1,3 @@ -SHA256 (openjfx8/freebsd20160228.tar.gz) = 7940021340d87d68259a812d329670ed3841aa4055cfdee8bddbddd1d4c6ad02 -SIZE (openjfx8/freebsd20160228.tar.gz) = 77469908 +TIMESTAMP = 1500739313 +SHA256 (openjfx8-20170722.tar.gz) = b11fb19e7a05802754505c95dc247013941eb0beb5b1221ed8477997aad1344b +SIZE (openjfx8-20170722.tar.gz) = 109167999 diff --git a/java/openjfx8-devel/files/patch-build.gradle b/java/openjfx8-devel/files/patch-build.gradle index 4293bae728ff..2cca1c17a65d 100644 --- a/java/openjfx8-devel/files/patch-build.gradle +++ b/java/openjfx8-devel/files/patch-build.gradle @@ -1,15 +1,15 @@ ---- build.gradle.orig 2016-02-28 12:54:50 UTC +--- build.gradle.orig 2017-07-20 23:39:54 UTC +++ build.gradle -@@ -125,7 +125,7 @@ void loadProperties(String sourceFileNam - def propFile = new File(sourceFileName) - if (propFile.canRead()) { - config.load(new FileInputStream(propFile)) -- for (Map.Entry property in config) { -+ for (property in config) { - def keySplit = property.key.split("\\."); - def key = keySplit[0]; - for (int i = 1; i < keySplit.length; i++) { -@@ -1167,7 +1167,8 @@ allprojects { +@@ -344,7 +344,7 @@ ext.SWT_FILE_NAME = IS_MAC ? "org.eclipse.swt.cocoa.ma + IS_WINDOWS && !IS_64 ? "org.eclipse.swt.win32.win32.x86_3.7.2.v3740f" : + IS_LINUX && IS_64 ? "org.eclipse.swt.gtk.linux.x86_64_3.7.2.v3740f" : + IS_LINUX && !IS_64 ? "org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f" : +- IS_BSD ? "/usr/local/share/java/classes/swt-devel.jar" : "" ++ IS_BSD ? "%%PREFIX%%/share/java/classes/swt-devel.jar" : "" + + // Build javadocs only if BUILD_JAVADOC=true + defineProperty("BUILD_JAVADOC", "false") +@@ -1163,7 +1163,8 @@ allprojects { // By default all of our projects require junit for testing so we can just // setup this dependency here. dependencies { @@ -19,10 +19,10 @@ if (BUILD_CLOSED && DO_JCOV) { testCompile name: "jcov" } -@@ -1307,11 +1308,10 @@ project(":graphics") { - dependencies { - compile project(":base"), BUILD_SRC - compile files("/usr/local/share/java/classes/swt-devel.jar") +@@ -1306,11 +1307,10 @@ project(":graphics") { + } else { + compile name: SWT_FILE_NAME + } - stubCompile group: "junit", name: "junit", version: "4.8.2", + stubCompile files("%%PREFIX%%/share/java/classes/junit4.jar", + "%%PREFIX%%/share/java/classes/hamcrest.jar"), @@ -34,7 +34,7 @@ } // Create a single "native" task which will depend on all the individual native tasks for graphics -@@ -1601,9 +1601,7 @@ project(":graphics") { +@@ -1600,9 +1600,7 @@ project(":graphics") { copy { into libsDir from f.getParentFile() @@ -45,7 +45,7 @@ includeEmptyDirs = false } // Have to rename the swt jar because it is some platform specific name but -@@ -1787,7 +1785,7 @@ project(":fxpackager") { +@@ -1789,7 +1787,7 @@ project(":fxpackager") { } dependencies { @@ -54,10 +54,11 @@ } // When producing the jar, we need to relocate a few class files -@@ -2048,21 +2046,6 @@ project(":fxpackager") { +@@ -2049,21 +2047,6 @@ project(":fxpackager") { + jar.dependsOn buildJavaPackager jar.dependsOn packagerJar - +- - classes << { - // Copy all of the download libraries to libs directory for the sake of the IDEs - File libsDir = rootProject.file("build/libs"); @@ -72,7 +73,6 @@ - } - } - } -- + task packagerFakeJar(type: Jar) { dependsOn compileTestJava - from compileTestJava.destinationDir diff --git a/java/openjfx8-devel/files/patch-buildSrc_build.gradle b/java/openjfx8-devel/files/patch-buildSrc_build.gradle index c073b19efb9b..51546c2e06ae 100644 --- a/java/openjfx8-devel/files/patch-buildSrc_build.gradle +++ b/java/openjfx8-devel/files/patch-buildSrc_build.gradle @@ -1,4 +1,4 @@ ---- buildSrc/build.gradle.orig 2016-02-28 12:54:50 UTC +--- buildSrc/build.gradle.orig 2017-07-20 23:39:54 UTC +++ buildSrc/build.gradle @@ -81,11 +81,10 @@ sourceSets { getConfigurations().create("antlr3"); @@ -9,10 +9,10 @@ - antlr3 group: "org.antlr", name: "antlr-runtime", version: "3.1.3" - antlr3 group: "org.antlr", name: "stringtemplate", version: "3.2" - antlr3 group: "org.antlr", name: "antlr", version: "3.1.3" -+ compile files("%%PREFIX%%/share/java/classes/antlr-3.5.2-complete.jar") -+ testCompile files("%%PREFIX%%/share/java/classes/junit4.jar", -+ "%%PREFIX%%/share/java/classes/hamcrest.jar") -+ antlr3 files("%%PREFIX%%/share/java/classes/antlr-3.5.2-complete.jar") ++ compile files("/usr/local/share/java/classes/antlr-3.5.2-complete.jar") ++ testCompile files("/usr/local/share/java/classes/junit4.jar", ++ "/usr/local/share/java/classes/hamcrest.jar") ++ antlr3 files("/usr/local/share/java/classes/antlr-3.5.2-complete.jar") } // At the moment the ASM library shipped with Gradle that is used to diff --git a/java/openjfx8-devel/files/patch-modules_graphics_src_main_native-font_pango.c b/java/openjfx8-devel/files/patch-modules_graphics_src_main_native-font_pango.c deleted file mode 100644 index 369562a9ffe2..000000000000 --- a/java/openjfx8-devel/files/patch-modules_graphics_src_main_native-font_pango.c +++ /dev/null @@ -1,11 +0,0 @@ ---- modules/graphics/src/main/native-font/pango.c.orig 2017-07-08 13:12:21 UTC -+++ modules/graphics/src/main/native-font/pango.c -@@ -23,7 +23,7 @@ - * questions. - */ - --#if defined __linux__ -+#if defined __linux__ || defined(__FreeBSD__) - #if defined _ENABLE_PANGO - - #include <jni.h> diff --git a/java/openjfx8-devel/files/patch-modules_web_src_main_native_Source_cmake_OptionsJava.cmake b/java/openjfx8-devel/files/patch-modules_web_src_main_native_Source_cmake_OptionsJava.cmake new file mode 100644 index 000000000000..8fe77bbc6619 --- /dev/null +++ b/java/openjfx8-devel/files/patch-modules_web_src_main_native_Source_cmake_OptionsJava.cmake @@ -0,0 +1,10 @@ +--- modules/web/src/main/native/Source/cmake/OptionsJava.cmake.orig 2017-07-22 15:59:03 UTC ++++ modules/web/src/main/native/Source/cmake/OptionsJava.cmake +@@ -264,6 +264,7 @@ if (CMAKE_MAJOR_VERSION LESS 3) + endif () + + set(ICU_INCLUDE_DIRS ++ "${CMAKE_INSTALL_PREFIX}/include" + "${THIRDPARTY_DIR}/icu/source/common" + "${THIRDPARTY_DIR}/icu/source/i18n" + ) diff --git a/java/openjfx8-devel/pkg-message b/java/openjfx8-devel/pkg-message deleted file mode 100644 index 3971bc87d118..000000000000 --- a/java/openjfx8-devel/pkg-message +++ /dev/null @@ -1,3 +0,0 @@ -If you've previously used IntelliJ IDEA for Java development make sure -to recreate your Java SDK under "Platform Settings -> SDKs" so that -the JavaFX runtime libraries are picked up correctly by IDEA. diff --git a/java/openjfx8-devel/pkg-plist b/java/openjfx8-devel/pkg-plist index e357659bd7b8..9ee8b6e64bf1 100644 --- a/java/openjfx8-devel/pkg-plist +++ b/java/openjfx8-devel/pkg-plist @@ -1,11 +1,16 @@ %%JAVA_HOME%%/bin/javafxpackager %%JAVA_HOME%%/bin/javapackager +%%MEDIA%%%%JAVA_HOME%%/jre/lib/%%ARCH%%/libavplugin.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libdecora_sse.so +%%MEDIA%%%%JAVA_HOME%%/jre/lib/%%ARCH%%/libfxplugins.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libglass.so +%%MEDIA%%%%JAVA_HOME%%/jre/lib/%%ARCH%%/libgstreamer-lite.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libjavafx_font.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libjavafx_font_freetype.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libjavafx_font_pango.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libjavafx_iio.so +%%MEDIA%%%%JAVA_HOME%%/jre/lib/%%ARCH%%/libjfxmedia.so +%%WEBKIT%%%%JAVA_HOME%%/jre/lib/%%ARCH%%/libjfxwebkit.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libprism_common.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libprism_es2.so %%JAVA_HOME%%/jre/lib/%%ARCH%%/libprism_sw.so |