--- java/openjfx14/Makefile (revision 543245) +++ java/openjfx14/Makefile (working copy) @@ -1,49 +1,47 @@ -# Created by: Tobias Kortkamp # $FreeBSD$ -PORTNAME= openjfx8 -DISTVERSION= 8u202-b07 -PORTREVISION= 7 -PORTEPOCH= 1 -CATEGORIES= java x11-toolkits devel -MASTER_SITES= https://github.com/t6/openjfx/releases/download/release/ \ - http://hg.openjdk.java.net/openjfx/8u/rt/archive/${DISTVERSION}${EXTRACT_SUFX}?dummy=/ -PKGNAMESUFFIX= -devel +PORTNAME= openjfx +DISTVERSION= 14.0.2.1+1 +CATEGORIES= x11-toolkits java devel +PKGNAMESUFFIX= 14 -MAINTAINER= tobik@FreeBSD.org -COMMENT= JavaFX SDK overlay for OpenJDK 8 +MAINTAINER= mikael@FreeBSD.org +COMMENT= JavaFX SDK overlay for OpenJDK 11 LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -DEPRECATED= No longer maintained upstream -EXPIRATION_DATE= 2020-11-30 -ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 -BUILD_DEPENDS= apache-ant>0:devel/apache-ant \ - antlr3>0:devel/antlr3 \ - gradle4>=4.8:devel/gradle4 \ +BUILD_DEPENDS= zip:archivers/zip \ + apache-ant>0:devel/apache-ant \ + antlr4>0:devel/antlr4 \ + gradle62>=6.2:devel/gradle62 \ ${JAVALIBDIR}/junit.jar:java/junit -LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ +LIB_DEPENDS= libasound.so:audio/alsa-lib \ + libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 -USES= gettext-runtime gl gnome jpeg localbase:ldflags pkgconfig \ +USES= gettext-runtime gl gnome jpeg localbase:ldflags ninja pkgconfig \ sqlite xorg + +USE_GITHUB= yes +GH_ACCOUNT= openjdk +GH_PROJECT= jfx USE_GL= gl USE_GNOME= atk cairo gdkpixbuf2 glib20 gtk20 gtk30 pango USE_JAVA= yes -JAVA_VERSION= 1.8 +JAVA_VERSION= 11 USE_LDCONFIG= yes USE_XORG= x11 xtst xxf86vm CFLAGS+= -Wno-unused-command-line-argument -WRKSRC= ${WRKDIR}/rt-${DISTVERSION} +PLIST_SUB= JAVA_HOME=${JAVA_HOME} -PLIST_SUB= ARCH=${ARCH} \ - JAVA_HOME=${JAVA_HOME} - OPTIONS_DEFINE= MEDIA SWT TEST WEBKIT +OPTIONS_EXCLUDE_aarch64= WEBKIT +OPTIONS_EXCLUDE_powerpc64= WEBKIT OPTIONS_DEFAULT= MEDIA WEBKIT OPTIONS_SUB= yes @@ -66,7 +64,7 @@ WEBKIT_IMPLIES= MEDIA WEBKIT_BUILD_DEPENDS= cmake:devel/cmake WEBKIT_LIB_DEPENDS= libicui18n.so:devel/icu -WEBKIT_USES= bison compiler:c++14-lang gmake gperf perl5 python:2.7,build +WEBKIT_USES= bison gmake gperf perl5 python:2.7,build WEBKIT_USE= GNOME=libxslt,libxml2 \ PERL5=build \ RUBY=yes \ @@ -76,56 +74,48 @@ # Move Gradle's home below ${WRKDIR} instead of using ${HOME}/.gradle _GRADLE_ENV= CC=${WRKDIR}/bin/ccwrapper \ CXX=${WRKDIR}/bin/cxxwrapper \ - GRADLE_USER_HOME=${WRKDIR}/gradle-home -_GRADLE_RUN= ${SETENV} ${_GRADLE_ENV} gradle4 --no-daemon + GRADLE_USER_HOME=${WRKDIR}/gradle-home \ + JAVA_VERSION=${JAVA_VERSION} +_GRADLE_RUN= ${SETENV} ${_GRADLE_ENV} gradle62 --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. - # The BSD Makefiles for GStreamer-lite and Jfxmedia are based on the # Linux versions. Prepare the tree, so that we only see the changes # from Linux's Makefile in our own patches. pre-patch: - @${CP} -r ${WRKSRC}/modules/media/src/main/native/jfxmedia/projects/linux \ - ${WRKSRC}/modules/media/src/main/native/jfxmedia/projects/bsd - @${CP} -r ${WRKSRC}/modules/media/src/main/native/gstreamer/projects/linux \ - ${WRKSRC}/modules/media/src/main/native/gstreamer/projects/bsd + @${CP} -r ${WRKSRC}/modules/javafx.media/src/main/native/jfxmedia/projects/linux \ + ${WRKSRC}/modules/javafx.media/src/main/native/jfxmedia/projects/bsd + @${CP} -r ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/projects/linux \ + ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/projects/bsd post-patch: @${MKDIR} ${WRKDIR}/bin - @${PRINTF} '#!/bin/sh\nexec ${CC} ${CFLAGS} ${LDFLAGS} "$$@"\n' > ${WRKDIR}/bin/ccwrapper - @${PRINTF} '#!/bin/sh\nexec ${CXX} ${CXXFLAGS} ${LDFLAGS} "$$@"\n' > ${WRKDIR}/bin/cxxwrapper + @${PRINTF} '#!/bin/sh\nexec ${CCACHE_BIN} ${CC} ${CFLAGS} ${LDFLAGS} "$$@"\n' > ${WRKDIR}/bin/ccwrapper + @${PRINTF} '#!/bin/sh\nexec ${CCACHE_BIN} ${CXX} ${CXXFLAGS} ${LDFLAGS} "$$@"\n' > ${WRKDIR}/bin/cxxwrapper @${CHMOD} +x ${WRKDIR}/bin/ccwrapper ${WRKDIR}/bin/cxxwrapper - @${SED} -e 's@/linux@/freebsd@g' -e 's@-DLINUX@-DFREEBSD@g' -e 's@LINUX@BSD@g' \ - -e 's@linux_@bsd_@g' -e 's@"-static-libgcc", "-static-libstdc++",@@g' \ - -e 's@"gcc"@"${WRKDIR}/bin/ccwrapper"@g' -e 's@"g\+\+"@"${WRKDIR}/bin/cxxwrapper"@g' \ - ${WRKSRC}/buildSrc/linux.gradle > ${WRKSRC}/buildSrc/bsd.gradle + @${REINPLACE_CMD} -e 's|gcc|${WRKDIR}/bin/ccwrapper|g' \ + -e 's|g\+\+|${WRKDIR}/bin/cxxwrapper|g' \ + ${WRKSRC}/buildSrc/bsd.gradle # Add a *BSD native audio sink to GStreamer-lite instead of using the # bundled ALSA sink. Currently we add an sndio sink, but this is an extension # point for eventually adding an OSS backend (or others) as an option as well. # If you add a new one make sure it registers itself as "bsdaudiosink" as defined # in modules/media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.cpp - @${MKDIR} ${WRKSRC}/modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base/ext/bsdaudio + @${MKDIR} ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base/ext/bsdaudio @${CP} ${FILESDIR}/gstsndio.* ${FILESDIR}/sndiosink.* \ - ${WRKSRC}/modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base/ext/bsdaudio - @cd ${WRKSRC}/modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base/ext/bsdaudio && \ + ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base/ext/bsdaudio + @cd ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base/ext/bsdaudio && \ ${LN} -s gstsndio.c gstbsdaudio.c && \ ${LN} -s sndiosink.c bsdaudiosink.c # Pull Java dependencies from LOCALBASE - @${REINPLACE_CMD} 's@/usr/local@${LOCALBASE}@g' \ + @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/build.gradle ${WRKSRC}/buildSrc/build.gradle -# Remove bundled libraries. We use the system's versions instead. - @cd ${WRKSRC}/modules/web/src/main/native/Source/ThirdParty && \ +# Remove bundled libraries. We use the system's versions instead. + @cd ${WRKSRC}/modules/javafx.web/src/main/native/Source/ThirdParty && \ ${RM} -r icu libxml libxslt sqlite - @${RM} -r ${WRKSRC}/modules/web/src/main/native/Source/WTF/icu - @cd ${WRKSRC}/modules/media/src/main/native/gstreamer/3rd_party && \ + @${RM} -r ${WRKSRC}/modules/javafx.web/src/main/native/Source/WTF/icu + @cd ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/3rd_party && \ ${RM} -r glib libffi -post-patch-SWT-off: - @${RM} -r ${WRKSRC}/modules/graphics/src/main/java/com/sun/glass/ui/swt - do-configure: @${MKDIR} ${WRKDIR}/gradle-home @${ECHO_CMD} "NUM_COMPILE_THREADS = ${MAKE_JOBS_NUMBER}" > ${WRKSRC}/gradle.properties @@ -135,13 +125,14 @@ @${ECHO_CMD} "BSD.compileSWT = ${COMPILE_SWT:Ufalse};" >> ${WRKSRC}/buildSrc/bsd.gradle do-build: - @cd ${WRKSRC} && ${_GRADLE_RUN} zips + @cd ${WRKSRC} && ${SETENV} ${_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} \{\} \; + @${MKDIR} ${STAGEDIR}${JAVA_HOME}/lib ${STAGEDIR}${JAVA_HOME}/jmods + (cd ${WRKSRC}/build/artifacts/javafx-sdk-14.0.2.1/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${JAVA_HOME}/lib) + @${MV} ${STAGEDIR}${JAVA_HOME}/lib/src.zip ${STAGEDIR}${JAVA_HOME}/lib/javafx-src.zip + (cd ${WRKSRC}/build/artifacts/javafx-jmods-14.0.2.1 && ${COPYTREE_SHARE} . ${STAGEDIR}${JAVA_HOME}/jmods) + @${FIND} ${STAGEDIR}${JAVA_HOME}/lib -name '*.so' -exec ${STRIP_CMD} \{\} \; do-test-TEST-on: @cd ${WRKSRC} && ${_GRADLE_RUN} check test --- java/openjfx14/distinfo (revision 543245) +++ java/openjfx14/distinfo (working copy) @@ -1,3 +1,3 @@ -TIMESTAMP = 1563779003 -SHA256 (openjfx8-8u202-b07.tar.gz) = ca98b6d0721a0e4b91d62672e81594c80a47cfb5ded241de50f10ade9884c400 -SIZE (openjfx8-8u202-b07.tar.gz) = 70669594 +TIMESTAMP = 1595085795 +SHA256 (openjdk-jfx-14.0.2.1+1_GH0.tar.gz) = 08830d79dbdaadf66a1feae356caed6d70636dfdbf47598dd48a59f407d05ef1 +SIZE (openjdk-jfx-14.0.2.1+1_GH0.tar.gz) = 67975108 --- java/openjfx14/files/patch-build.gradle (revision 543245) +++ java/openjfx14/files/patch-build.gradle (working copy) @@ -1,16 +1,25 @@ ---- build.gradle.orig 2018-12-10 16:30:22 UTC +--- build.gradle.orig 2020-07-17 10:21:33 UTC +++ build.gradle -@@ -253,6 +253,7 @@ ext.IS_64 = OS_ARCH.toLowerCase().contains("64") +@@ -295,6 +295,7 @@ ext.IS_64 = OS_ARCH.toLowerCase().contains("64") ext.IS_MAC = OS_NAME.contains("mac") || OS_NAME.contains("darwin") ext.IS_WINDOWS = OS_NAME.contains("windows") ext.IS_LINUX = OS_NAME.contains("linux") +ext.IS_BSD = OS_NAME.contains("freebsd") || OS_NAME.contains("dragonfly") - // Get the JDK_HOME automatically based on the version of Java used to execute gradle. Or, if specified, - // use a user supplied JDK_HOME, STUB_RUNTIME, JAVAC, and/or JAVAH, all of which may be specified -@@ -313,7 +314,7 @@ defineProperty("COMPILE_MEDIA", "false") - ext.IS_COMPILE_MEDIA = Boolean.parseBoolean(COMPILE_MEDIA) + ext.MAVEN_GROUP_ID = "org.openjfx" +@@ -302,7 +303,7 @@ ext.MAVEN_GROUP_ID = "org.openjfx" + // at present building on PI is not supported, but we would only need to make + // some changes on assumptions on what should be built (like SWT / Swing) and + // such and we could probably make it work. +-if (!IS_MAC && !IS_WINDOWS && !IS_LINUX) fail("Unsupported build OS ${OS_NAME}") ++if (!IS_MAC && !IS_WINDOWS && !IS_LINUX && !IS_BSD) fail("Unsupported build OS ${OS_NAME}") + if (IS_WINDOWS && OS_ARCH != "x86" && OS_ARCH != "amd64") { + fail("Unknown and unsupported build architecture: $OS_ARCH") + } else if (IS_MAC && OS_ARCH != "x86_64") { +@@ -385,7 +386,7 @@ defineProperty("BUILD_WORKING_LIBAV", "false") + ext.IS_BUILD_WORKING_LIBAV = IS_LINUX ? Boolean.parseBoolean(BUILD_WORKING_LIBAV) : false + // COMPILE_PANGO specifies whether to build javafx_font_pango. -defineProperty("COMPILE_PANGO", "${IS_LINUX}") +defineProperty("COMPILE_PANGO", "${IS_LINUX || IS_BSD}") @@ -17,7 +26,7 @@ ext.IS_COMPILE_PANGO = Boolean.parseBoolean(COMPILE_PANGO) // COMPILE_HARFBUZZ specifies whether to use Harfbuzz. -@@ -344,7 +345,8 @@ ext.SWT_FILE_NAME = IS_MAC ? "org.eclipse.swt.cocoa.ma +@@ -413,7 +414,8 @@ ext.SWT_FILE_NAME = IS_MAC ? "org.eclipse.swt.cocoa.ma IS_WINDOWS && IS_64 ? "org.eclipse.swt.win32.win32.x86_64_3.105.3.v20170228-0512" : IS_WINDOWS && !IS_64 ? "org.eclipse.swt.win32.win32.x86_3.105.3.v20170228-0512" : IS_LINUX && IS_64 ? "org.eclipse.swt.gtk.linux.x86_64_3.105.3.v20170228-0512" : @@ -25,9 +34,9 @@ + IS_LINUX && !IS_64 ? "org.eclipse.swt.gtk.linux.x86_3.105.3.v20170228-0512" : + IS_BSD ? "/usr/local/share/java/classes/swt.jar" : "" - // Build javadocs only if BUILD_JAVADOC=true - defineProperty("BUILD_JAVADOC", "false") -@@ -404,6 +406,12 @@ if (IS_MAC) { + // Specifies whether to run full tests (true) or smoke tests (false) + defineProperty("FULL_TEST", "false") +@@ -495,6 +497,12 @@ if (IS_MAC) { defineProperty("NUM_COMPILE_THREADS", "${Runtime.runtime.availableProcessors()}") } @@ -40,7 +49,7 @@ // // The next three sections of properties are used to generate the // VersionInfo class, and the Windows DLL manifest. -@@ -444,7 +452,7 @@ defineProperty("RELEASE_MILESTONE", jfxReleaseMileston +@@ -558,7 +566,7 @@ defineProperty("MAVEN_VERSION", IS_MILESTONE_FCS ? "${ // Check whether the COMPILE_TARGETS property has been specified (if so, it was done by // the user and not by this script). If it has not been defined then default // to building the normal desktop build for this machine @@ -49,16 +58,16 @@ defineProperty("COMPILE_TARGETS", "$defaultHostTarget") // Flag indicating whether to import cross compile tools -@@ -551,7 +559,7 @@ void fetchExternalTools(String configName, List packag +@@ -704,7 +712,7 @@ void fetchExternalTools(String configName, List packag def File pkgdir = file("$destdir/$basename") - if (pkgname.endsWith(".tgz")) { + if (pkgname.endsWith(".tgz") || pkgname.endsWith("tar.gz")) { - if (IS_LINUX || IS_MAC) { -+ if (IS_BSD || IS_LINUX || IS_MAC) { ++ if (IS_LINUX || IS_MAC || IS_BSD) { // use native tar to support symlinks pkgdir.mkdirs() exec { -@@ -676,7 +684,7 @@ compileTargets { t -> +@@ -1180,7 +1188,7 @@ compileTargets { t -> if (!targetProperties.containsKey('includeMonocle')) targetProperties.includeMonocle = false if (!targetProperties.containsKey('includeEGL')) targetProperties.includeEGL = false @@ -65,107 +74,76 @@ - if (!targetProperties.containsKey('includeGTK')) targetProperties.includeGTK = IS_LINUX + if (!targetProperties.containsKey('includeGTK')) targetProperties.includeGTK = IS_LINUX || IS_BSD - // This value is used to under ./build/${sdkDirName} to allow for - // a common name for the hosted build (for use when building apps) -@@ -708,7 +716,7 @@ compileTargets { t -> - // at present building on PI is not supported, but we would only need to make - // some changes on assumptions on what should be built (like SWT / Swing) and - // such and we could probably make it work. --if (!IS_MAC && !IS_WINDOWS && !IS_LINUX) logger.error("Unsupported build OS ${OS_NAME}") -+if (!IS_MAC && !IS_WINDOWS && !IS_LINUX && !IS_BSD) logger.error("Unsupported build OS ${OS_NAME}") - if (IS_WINDOWS && OS_ARCH != "x86" && OS_ARCH != "amd64") { - throw new Exception("Unknown and unsupported build architecture: $OS_ARCH") - } else if (IS_MAC && OS_ARCH != "x86_64") { -@@ -1165,7 +1173,8 @@ allprojects { - // By default all of our projects require junit for testing so we can just - // setup this dependency here. - dependencies { -- testCompile group: "junit", name: "junit", version: "4.8.2" -+ testCompile files("/usr/local/share/java/classes/junit4.jar", -+ "/usr/local/share/java/classes/hamcrest.jar") - if (BUILD_CLOSED && DO_JCOV) { - testCompile name: "jcov" - } -@@ -1303,12 +1312,15 @@ project(":graphics") { + if (!targetProperties.containsKey('modLibDest')) targetProperties.modLibDest = targetProperties.libDest +@@ -2067,6 +2075,11 @@ project(":graphics") { + } + dependencies { - compile project(":base"), BUILD_SRC -- compile name: SWT_FILE_NAME -- stubCompile group: "junit", name: "junit", version: "4.8.2", + if (IS_BSD) { + compile files(SWT_FILE_NAME) + } else { + compile name: SWT_FILE_NAME + } -+ stubCompile files("/usr/local/share/java/classes/junit4.jar", -+ "/usr/local/share/java/classes/hamcrest.jar"), - project(":base").sourceSets.test.output, sourceSets.main.output -- antlr3 group: "org.antlr", name: "antlr", version: "3.1.3" -- antlr3 group: "org.antlr", name: "antlr-runtime", version: "3.1.3" -- antlr3 group: "org.antlr", name: "stringtemplate", version: "3.2" -+ antlr3 files("/usr/local/share/java/classes/antlr-3.5.2-complete.jar") - } + stubCompile group: "junit", name: "junit", version: "4.8.2" - // Create a single "native" task which will depend on all the individual native tasks for graphics -@@ -1599,9 +1611,7 @@ project(":graphics") { + antlr group: "org.antlr", name: "antlr4", version: "4.7.2", classifier: "complete" +@@ -2456,7 +2469,7 @@ project(":graphics") { + libsDir.mkdirs(); + + def allLibsPresent = true +- def libNames = [ "antlr4-4.7.2-complete.jar" ] ++ def libNames = [ "antlr-4.8-complete.jar" ] + libNames.each { name -> + File f = new File(libsDir, name) + if (!f.exists()) allLibsPresent = false +@@ -2467,7 +2480,7 @@ project(":graphics") { copy { into libsDir from f.getParentFile() -- include "**/antlr-3.1.3.jar" -- include "**/stringtemplate-3.2.jar" -- include "**/antlr-runtime-3.1.3.jar" -+ include "**/antlr-3.5.2-complete.jar" +- include "**/antlr4-4.7.2-complete.jar" ++ include "**/antlr-4.8-complete.jar" includeEmptyDirs = false } - // Have to rename the swt jar because it is some platform specific name but -@@ -1688,7 +1698,11 @@ project(":swt") { - } + } +@@ -2602,31 +2615,10 @@ project(":swt") { + commonModuleSetup(project, [ 'base', 'graphics' ]) + dependencies { - compile BUILD_SRC, project(":base"), project(":graphics") - compile name: SWT_FILE_NAME -+ if (IS_BSD) { -+ compile files(SWT_FILE_NAME) -+ } else { -+ compile name: SWT_FILE_NAME -+ } - } - } - -@@ -1794,7 +1808,7 @@ project(":fxpackager") { - } - - dependencies { -- compile group: "org.apache.ant", name: "ant", version: "1.8.2" -+ compile files("/usr/local/share/java/apache-ant/lib/ant.jar") - } - - // When producing the jar, we need to relocate a few class files -@@ -2055,23 +2069,6 @@ project(":fxpackager") { - jar.dependsOn buildJavaPackager - jar.dependsOn packagerJar - +- } +- - classes { - doLast { - // Copy all of the download libraries to libs directory for the sake of the IDEs - File libsDir = rootProject.file("build/libs"); -- File antLib = new File(libsDir, "ant-1.8.2.jar") +- File swtLib = new File(libsDir, "swt-debug.jar") - libsDir.mkdirs(); +- +- // Skip copy if file is present. +- if (swtLib.exists()) return; +- - for (File f : configurations.compile.files) { +- // Have to rename the swt jar because it is some platform specific name but +- // for the sake of the IDEs we need to have a single stable name that works +- // on every platform - copy { - into libsDir - from f.getParentFile() -- include "**/ant-1.8.2.jar" +- include "**/*swt*.jar" - includeEmptyDirs = false +- rename ".*swt.*jar", "swt-debug\\.jar" - } - } -- } -- } -- - task packagerFakeJar(type: Jar) { - dependsOn compileTestJava - from compileTestJava.destinationDir -@@ -2250,7 +2247,7 @@ project(":media") { ++ if (IS_BSD) { ++ compile files(SWT_FILE_NAME) ++ } else { ++ compile name: SWT_FILE_NAME + } + } +@@ -2809,7 +2801,7 @@ project(":media") { + doLast { exec { - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/jfxmedia/projects/${projectDir}") @@ -172,71 +150,71 @@ + commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/jfxmedia/projects/${projectDir}") args("JAVA_HOME=${JDK_HOME}", "GENERATED_HEADERS_DIR=${generatedHeadersDir}", "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=jfxmedia", - "COMPILE_PARFAIT=${compileParfait}") -@@ -2260,7 +2257,7 @@ project(":media") { - args(IS_64 ? "ARCH=x64" : "ARCH=x32", "RESOURCE=${nativeOutputDir}/${buildType}/${WIN.media.jfxmediaRcFile}") - } else { - args ("CC=${mediaProperties.compiler}", "LINK=${mediaProperties.linker}", "LIB=${mediaProperties.lib}") -- if (t.name == "linux") { -+ if (t.name == "linux" || t.name == "bsd") { - args(IS_64 ? "ARCH=x64" : "ARCH=x32") - } - -@@ -2282,7 +2279,7 @@ project(":media") { + "COMPILE_PARFAIT=${compileParfait}", +@@ -2838,7 +2830,7 @@ project(":media") { enabled = IS_COMPILE_MEDIA doLast { exec { - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/gstreamer-lite") + commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/gstreamer-lite") - args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=gstreamer-lite") + args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=gstreamer-lite", + IS_64 ? "ARCH=x64" : "ARCH=x32", "CC=${mediaProperties.compiler}", + "AR=${mediaProperties.ar}", "LINKER=${mediaProperties.linker}") +@@ -2856,7 +2848,7 @@ project(":media") { - if (t.name == "win") { -@@ -2290,7 +2287,7 @@ project(":media") { - args(IS_64 ? "ARCH=x64" : "ARCH=x32", "RESOURCE=${nativeOutputDir}/${buildType}/${WIN.media.gstreamerRcFile}") - } else { - args ("CC=${mediaProperties.compiler}", "LINK=${mediaProperties.linker}", "LIB=${mediaProperties.lib}") -- if (t.name == "linux") { -+ if (t.name == "linux" || t.name == "bsd") { - args(IS_64 ? "ARCH=x64" : "ARCH=x32") - } - } -@@ -2311,7 +2308,7 @@ project(":media") { - doLast { exec { - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/fxplugins") + commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/fxplugins") args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=fxplugins", - "ON2_SRCDIR=${project.ext.ON2_SRCDIR}", "ON2_LIB=${project.ext.ON2_LIB}") + IS_64 ? "ARCH=x64" : "ARCH=x32", + "CC=${mediaProperties.compiler}", "AR=${mediaProperties.ar}", "LINKER=${mediaProperties.linker}") +@@ -2879,7 +2871,7 @@ project(":media") { -@@ -2328,7 +2325,7 @@ project(":media") { - args(IS_64 ? "ARCH=x64" : "ARCH=x32", "RESOURCE=${nativeOutputDir}/${buildType}/${WIN.media.fxpluginsRcFile}") - } else { - args ("CC=${mediaProperties.compiler}", "LINK=${mediaProperties.linker}", "LIB=${mediaProperties.lib}") -- if (t.name == "linux") { -+ if (t.name == "linux" || t.name == "bsd") { - args(IS_64 ? "ARCH=x64" : "ARCH=x32") - } - } -@@ -2338,7 +2335,7 @@ project(":media") { - buildNative.dependsOn buildPlugins - if (t.name == "linux") { + if (t.name == "linux" || t.name == "bsd") { - def buildAVPlugin = task( "buildAVPlugin", dependsOn: [buildPlugins]) { - enabled = IS_COMPILE_MEDIA - -@@ -2349,7 +2346,7 @@ project(":media") { + // Pre-defined command line arguments + def cfgCMDArgs = ["sh", "configure"] + def commonCfgArgs = ["--enable-shared", "--disable-debug", "--disable-static", "--disable-yasm", "--disable-doc", "--disable-programs", "--disable-everything"] +@@ -2984,7 +2976,7 @@ project(":media") { + } + exec { + workingDir("$libavDir") +- commandLine("make") ++ commandLine(MAKE_CMD) + } + } + } +@@ -3052,7 +3044,7 @@ project(":media") { + } + exec { + workingDir("$libavDir") +- commandLine("make") ++ commandLine(MAKE_CMD) + } + } + } +@@ -3138,7 +3130,7 @@ project(":media") { + } + exec { + workingDir("$libavDir") +- commandLine("make") ++ commandLine(MAKE_CMD) + } + } + } +@@ -3172,7 +3164,7 @@ project(":media") { File dir = file(libavDir) if (dir.exists()) { exec { - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin") -+ commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${t.name}/avplugin") - args("CC=${mediaProperties.compiler}", "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", ++ commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin") + args("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}", + "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=avplugin", "VERSION=${version}", "LIBAV_DIR=${libavDir}", - "SUFFIX=", IS_64 ? "ARCH=x64" : "ARCH=x32") -@@ -2362,7 +2359,7 @@ project(":media") { +@@ -3186,7 +3178,7 @@ project(":media") { File dir = file(libavDir) if (dir.exists()) { exec { @@ -245,16 +223,25 @@ args("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}", "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=avplugin", "VERSION=${version}", "LIBAV_DIR=${libavDir}", -@@ -2373,7 +2370,7 @@ project(":media") { +@@ -3200,7 +3192,7 @@ project(":media") { + File dir = file(libavDir) + if (dir.exists()) { + exec { +- commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin") ++ commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin") + args("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}", + "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", + "BASE_NAME=avplugin", "VERSION=${version}", "LIBAV_DIR=${libavDir}", +@@ -3211,7 +3203,7 @@ project(":media") { } else { // Building fxavcodec plugin (libav plugin) exec { - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin") -+ commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${t.name}/avplugin") - args("CC=${mediaProperties.compiler}", "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", ++ commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin") + args("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}", + "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=avplugin", IS_64 ? "ARCH=x64" : "ARCH=x32") - } -@@ -2423,7 +2420,7 @@ project(":media") { +@@ -3262,7 +3254,7 @@ project(":media") { doLast { exec { environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT) @@ -261,18 +248,18 @@ - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/glib-lite") + commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/glib-lite") args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=glib-lite", - IS_64 ? "ARCH=x64" : "ARCH=x32", "RESOURCE=${nativeOutputDir}/${buildType}/${WIN.media.glibRcFile}") + IS_64 ? "ARCH=x64" : "ARCH=x32", "RESOURCE=${nativeOutputDir}/${buildType}/${WIN.media.glibRcFile}", + "CC=${mediaProperties.compiler}", "AR=${mediaProperties.ar}", "LINKER=${mediaProperties.linker}") +@@ -3282,7 +3274,7 @@ project(":media") { } -@@ -2442,7 +2439,7 @@ project(":media") { - } exec { - commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/glib-lite") + commandLine (MAKE_CMD, "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/glib-lite") args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=glib-lite") - args ("CC=${mediaProperties.compiler}", "LINK=${mediaProperties.linker}", "LIB=${mediaProperties.lib}") + args ("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}") } -@@ -2562,7 +2559,7 @@ project(":web") { +@@ -3407,7 +3399,7 @@ project(":web") { compileTargets { t -> def targetProperties = project.rootProject.ext[t.upper] def webkitProperties = targetProperties.webkit @@ -281,57 +268,47 @@ IS_64 ? "${t.name}-amd64" : "${t.name}-i586" def webkitOutputDir = cygpath("$buildDir/${t.name}") -@@ -2638,6 +2635,9 @@ project(":web") { +@@ -3436,8 +3428,12 @@ project(":web") { + environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT) + } else if (t.name == "mac") { + cmakeArgs = " $cmakeArgs -DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION -DCMAKE_OSX_SYSROOT=$MACOSX_SDK_PATH" +- } else if (t.name == "linux") { +- cmakeArgs = " $cmakeArgs -DCMAKE_SYSTEM_NAME=Linux" ++ } else if (t.name == "linux" || t.name == "bsd") { ++ if (t.name == "linux") { ++ cmakeArgs = " $cmakeArgs -DCMAKE_SYSTEM_NAME=Linux" ++ } else { ++ cmakeArgs = " $cmakeArgs -DCMAKE_SYSTEM_NAME=FreeBSD" ++ } + if (IS_64) { + cmakeArgs = "$cmakeArgs -DCMAKE_SYSTEM_PROCESSOR=x86_64" + } else { +@@ -3479,6 +3475,10 @@ project(":web") { + targetCpuBitDepthSwitch = "--32-bit" } - - cmakeArgs += " -DJAVAFX_RELEASE_VERSION=8.0" + cmakeArgs += " -DJAVAFX_RELEASE_VERSION=${jfxReleaseMajorVersion}" + cmakeArgs += " -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" + cmakeArgs += " -DCMAKE_C_COMPILER:STRING=${System.getenv("CC")}" + cmakeArgs += " -DCMAKE_CXX_COMPILER:STRING=${System.getenv("CXX")}" ++ commandLine("perl", "$projectDir/src/main/native/Tools/Scripts/build-webkit", "--java", "--icu-unicode", targetCpuBitDepthSwitch, - "--cmakeargs=${cmakeArgs}") -@@ -3132,7 +3132,7 @@ compileTargets { t -> - // OSX media natives - [ "jfxmedia_qtkit", "jfxmedia_avf" ].each { name -> - from ("modules/media/build/native/${t.name}/${mediaBuildType}/${library(name)}") } -- } else if (t.name == "linux") { -+ } else if (t.name == "linux" || t.name == "bsd") { - from("modules/media/build/native/${t.name}/${mediaBuildType}") { include "libavplugin*.so" } - } - } else { -@@ -3145,7 +3145,7 @@ compileTargets { t -> - // copy libjfxmedia_{avf,qtkit}.dylib if they exist - [ "jfxmedia_qtkit", "jfxmedia_avf" ].each { name -> - from ("$LIBRARY_STUB/${library(name)}") } -- } else if (t.name == "linux") { -+ } else if (t.name == "linux" || t.name == "bsd") { - from(LIBRARY_STUB) { include "libavplugin*.so" } - } + "--no-experimental-features", "--cmakeargs=${cmakeArgs}") +@@ -4928,7 +4928,7 @@ compileTargets { t -> + // OSX media natives + [ "jfxmedia_qtkit", "jfxmedia_avf", "glib-lite" ].each { name -> + from ("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}/${library(name)}") } +- } else if (t.name == "linux") { ++ } else if (t.name == "linux" || t.name == "bsd") { + from("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}") { include "libavplugin*.so" } + } else from ("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}/${library("glib-lite")}") + } else { +@@ -4941,7 +4941,7 @@ compileTargets { t -> + // copy libjfxmedia_{avf,qtkit}.dylib if they exist + [ "jfxmedia_qtkit", "jfxmedia_avf", "glib-lite" ].each { name -> + from ("$MEDIA_STUB/${library(name)}") } +- } else if (t.name == "linux") { ++ } else if (t.name == "linux" || t.name == "bsd") { + from(MEDIA_STUB) { include "libavplugin*.so" } } -@@ -3207,7 +3207,7 @@ compileTargets { t -> - } - - // Copy over the javapackager executable -- if (t.name == "win" || t.name == "linux" || t.name == "mac") { -+ if (t.name == "win" || t.name == "linux" || t.name == "bsd" || t.name == "mac") { - copy { - from "modules/fxpackager/build/javapackager" - into "build/${sdkDirName}/bin" -@@ -3264,6 +3264,7 @@ ext.JFXRT_CP = - "modules/web/build/classes/java/main", - ) - -+/* - project(":apps") { - // The apps build is Ant based, and gradle lets us "import" ant build.xml - // into our configuration. -@@ -3341,7 +3342,7 @@ project(":apps") { - } - rootProject.clean.dependsOn(appsClean) - } --} -+} */ - - /****************************************************************************** - * * + else if (t.name != "android" && t.name != "dalvik" ) { --- java/openjfx14/files/patch-buildSrc_bsd.gradle (nonexistent) +++ java/openjfx14/files/patch-buildSrc_bsd.gradle (working copy) @@ -0,0 +1,332 @@ +--- buildSrc/bsd.gradle.orig 2020-07-21 10:33:26 UTC ++++ buildSrc/bsd.gradle +@@ -0,0 +1,329 @@ ++/* ++ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. Oracle designates this ++ * particular file as subject to the "Classpath" exception as provided ++ * by Oracle in the LICENSE file that accompanied this code. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++ext.BSD = [:] ++ ++// Declare whether this particular target file applies to the current system ++BSD.canBuild = IS_BSD; ++if (!BSD.canBuild) return; ++ ++// All desktop related packages should be built ++BSD.compileSwing = true; ++BSD.compileSWT = true; ++ ++// Libraries end up in the lib/$OS_ARCH directory for Linux ++BSD.libDest = "lib" ++ ++// Lambda for naming the generated libs ++BSD.library = { name -> return (IS_STATIC_BUILD ? "lib${name}.a" : "lib${name}.so") as String } ++ ++// A set of common parameters to use for both compiling and linking ++def commonFlags = [ ++ "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags ++ "-fstack-protector", ++ "-Wextra", "-Wall", "-Wformat-security", "-Wno-unused", "-Wno-parentheses"] // warning flags ++ ++if (!IS_64) { ++ commonFlags += "-m32" ++} ++ ++if (IS_STATIC_BUILD) { ++ commonFlags += "-DSTATIC_BUILD" ++} ++ ++// Specify the compilation parameters and link parameters ++def ccFlags = [ ++ commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/freebsd", "-c", ++ "-ffunction-sections", "-fdata-sections", ++ IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten() ++def ccFlagsGTK3 = ccFlags ++//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"]) ++def dynamicLinkFlags = [ "-shared", commonFlags, ++ "-z", "relro", ++ "-Wl,--gc-sections"].flatten() ++ ++def staticLinkFlags = [].flatten() ++ ++def linkFlags = IS_STATIC_BUILD ? staticLinkFlags : dynamicLinkFlags; ++ ++if (IS_DEBUG_NATIVE) { ++ linkFlags += "-g" ++} ++ ++def toolchainDir ++if (hasProperty('toolchainDir')) { ++ toolchainDir = ext.toolchainDir + "/" ++} else { ++ toolchainDir = "" ++} ++ ++def gtk2CCFlags = [ ]; ++def gtk3CCFlags = [ "-Wno-deprecated-declarations" ]; ++def gtk2LinkFlags = [ ]; ++def gtk3LinkFlags = [ ]; ++ ++// Create $buildDir/freebsd_tools.properties file and load props from it ++setupTools("bsd_gtk2", ++ { propFile -> ++ ByteArrayOutputStream results1 = new ByteArrayOutputStream(); ++ exec { ++ commandLine("${toolchainDir}pkg-config", "--cflags", "gtk+-2.0", "gthread-2.0", "xtst") ++ setStandardOutput(results1); ++ } ++ propFile << "cflagsGTK2=" << results1.toString().trim() << "\n"; ++ ++ ByteArrayOutputStream results3 = new ByteArrayOutputStream(); ++ exec { ++ commandLine("${toolchainDir}pkg-config", "--libs", "gtk+-2.0", "gthread-2.0", "xtst") ++ setStandardOutput(results3); ++ } ++ propFile << "libsGTK2=" << results3.toString().trim() << "\n"; ++ }, ++ { properties -> ++ def cflagsGTK2 = properties.getProperty("cflagsGTK2") ++ def libsGTK2 = properties.getProperty("libsGTK2") ++ if (cflagsGTK2 && libsGTK2) { ++ gtk2CCFlags.addAll(cflagsGTK2.split(" ")) ++ gtk2LinkFlags.addAll(libsGTK2.split(" ")) ++ } else { ++ throw new IllegalStateException("GTK2 development packages not found. If GTK2 packages are installed, please remove the build directory and try again.") ++ } ++ } ++) ++ ++setupTools("bsd_gtk3", ++ { propFile -> ++ ByteArrayOutputStream results2 = new ByteArrayOutputStream(); ++ exec { ++ commandLine("${toolchainDir}pkg-config", "--cflags", "gtk+-3.0", "gthread-2.0", "xtst") ++ setStandardOutput(results2); ++ } ++ propFile << "cflagsGTK3=" << results2.toString().trim() << "\n"; ++ ++ ByteArrayOutputStream results4 = new ByteArrayOutputStream(); ++ exec { ++ commandLine("${toolchainDir}pkg-config", "--libs", "gtk+-3.0", "gthread-2.0", "xtst") ++ setStandardOutput(results4); ++ } ++ propFile << "libsGTK3=" << results4.toString().trim() << "\n"; ++ ++ }, ++ { properties -> ++ def cflagsGTK3 = properties.getProperty("cflagsGTK3") ++ def libsGTK3 = properties.getProperty("libsGTK3") ++ if (cflagsGTK3 && libsGTK3) { ++ gtk3CCFlags.addAll(cflagsGTK3.split(" ")) ++ gtk3LinkFlags.addAll(libsGTK3.split(" ")) ++ } else { ++ throw new IllegalStateException("GTK3 development packages not found. If GTK3 packages are installed, please remove the build directory and try again.") ++ } ++ } ++) ++ ++def pangoCCFlags = ["-D_ENABLE_PANGO"]; ++def pangoLinkFlags = []; ++setupTools("bsd_pango_tools", ++ { propFile -> ++ ByteArrayOutputStream results = new ByteArrayOutputStream(); ++ exec { ++ commandLine "${toolchainDir}pkg-config", "--cflags", "pangoft2" ++ standardOutput = results ++ } ++ propFile << "cflags=" << results.toString().trim() << "\n"; ++ ++ results = new ByteArrayOutputStream(); ++ exec { ++ commandLine "${toolchainDir}pkg-config", "--libs", "pangoft2" ++ standardOutput = results ++ } ++ propFile << "libs=" << results.toString().trim(); ++ }, ++ { properties -> ++ def cflags = properties.getProperty("cflags") ++ def libs = properties.getProperty("libs") ++ if (cflags && libs) { ++ pangoCCFlags.addAll(cflags.split(" ")) ++ pangoLinkFlags.addAll(libs.split(" ")) ++ } else { ++ throw new IllegalStateException("Linux pango packages not found.\nIf pango packages are installed, please remove the build directory and try again.") ++ } ++ } ++) ++ ++def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" : ++ ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""] ++def freetypeLinkFlags = [] ++setupTools("bsd_freetype_tools", ++ { propFile -> ++ ByteArrayOutputStream results = new ByteArrayOutputStream(); ++ exec { ++ commandLine "${toolchainDir}pkg-config", "--cflags", "freetype2" ++ standardOutput = results ++ } ++ propFile << "cflags=" << results.toString().trim() << "\n"; ++ ++ results = new ByteArrayOutputStream(); ++ exec { ++ commandLine "${toolchainDir}pkg-config", "--libs", "freetype2" ++ standardOutput = results ++ } ++ propFile << "libs=" << results.toString().trim(); ++ }, ++ { properties -> ++ def cflags = properties.getProperty("cflags") ++ def libs = properties.getProperty("libs") ++ if (cflags && libs) { ++ freetypeCCFlags.addAll(cflags.split(" ")) ++ if (!IS_STATIC_BUILD) { ++ freetypeLinkFlags.addAll(libs.split(" ")) ++ } ++ } else { ++ throw new IllegalStateException("Linux freetype packages not found.\nIf freetype pacakges are installed, please remove the build directory and try again.") ++ } ++ } ++) ++ ++def compiler = IS_COMPILE_PARFAIT ? "parfait-gcc" : "${toolchainDir}gcc"; ++def linker = IS_STATIC_BUILD ? "ar" : IS_COMPILE_PARFAIT ? "parfait-g++" : "${toolchainDir}g++"; ++ ++BSD.glass = [:] ++BSD.glass.variants = ["glass", "glassgtk2", "glassgtk3"] ++ ++FileTree ft_gtk_launcher = fileTree("${project(":graphics").projectDir}/src/main/native-glass/gtk/") { ++ include("**/launcher.c") ++} ++ ++FileTree ft_gtk = fileTree("${project(":graphics").projectDir}/src/main/native-glass/gtk/") { ++ exclude("**/launcher.c") ++} ++ ++BSD.glass.glass = [:] ++BSD.glass.glass.nativeSource = ft_gtk_launcher.getFiles() ++BSD.glass.glass.compiler = compiler ++BSD.glass.glass.ccFlags = [ccFlags].flatten() ++BSD.glass.glass.linker = linker ++BSD.glass.glass.linkFlags = IS_STATIC_BUILD? linkFlags : [linkFlags, "-lX11", "-ldl"].flatten() ++BSD.glass.glass.lib = "glass" ++ ++BSD.glass.glassgtk2 = [:] ++BSD.glass.glassgtk2.nativeSource = ft_gtk.getFiles() ++BSD.glass.glassgtk2.compiler = compiler ++BSD.glass.glassgtk2.ccFlags = IS_STATIC_BUILD ? ++ ["-fno-threadsafe-statics", ccFlags, gtk2CCFlags].flatten() : ++ [ccFlags, gtk2CCFlags].flatten() ++BSD.glass.glassgtk2.linker = linker ++BSD.glass.glassgtk2.linkFlags = IS_STATIC_BUILD ? linkFlags : [linkFlags, gtk2LinkFlags].flatten() ++BSD.glass.glassgtk2.lib = "glassgtk2" ++ ++BSD.glass.glassgtk3 = [:] ++BSD.glass.glassgtk3.nativeSource = ft_gtk.getFiles() ++BSD.glass.glassgtk3.compiler = compiler ++BSD.glass.glassgtk3.ccFlags = IS_STATIC_BUILD ? ++ ["-fno-threadsafe-statics", ccFlags, gtk3CCFlags].flatten() : ++ [ccFlags, gtk3CCFlags].flatten() ++BSD.glass.glassgtk3.linker = linker ++BSD.glass.glassgtk3.linkFlags = IS_STATIC_BUILD ? linkFlags : [linkFlags, gtk3LinkFlags].flatten() ++BSD.glass.glassgtk3.lib = "glassgtk3" ++ ++BSD.decora = [:] ++BSD.decora.compiler = compiler ++BSD.decora.ccFlags = [ccFlags, "-ffast-math"].flatten() ++BSD.decora.linker = linker ++BSD.decora.linkFlags = [linkFlags].flatten() ++BSD.decora.lib = "decora_sse" ++ ++BSD.prism = [:] ++BSD.prism.nativeSource = file("${project(":graphics").projectDir}/src/main/native-prism") ++BSD.prism.compiler = compiler ++BSD.prism.ccFlags = [ccFlags, "-DINLINE=inline"].flatten() ++BSD.prism.linker = linker ++BSD.prism.linkFlags = [linkFlags].flatten() ++BSD.prism.lib = "prism_common" ++ ++BSD.prismSW = [:] ++BSD.prismSW.nativeSource = file("${project(":graphics").projectDir}/src/main/native-prism-sw") ++BSD.prismSW.compiler = compiler ++BSD.prismSW.ccFlags = [ccFlags, "-DINLINE=inline"].flatten() ++BSD.prismSW.linker = linker ++BSD.prismSW.linkFlags = [linkFlags].flatten() ++BSD.prismSW.lib = "prism_sw" ++ ++BSD.iio = [:] ++BSD.iio.nativeSource = [ ++ file("${project("graphics").projectDir}/src/main/native-iio"), ++ file("${project("graphics").projectDir}/src/main/native-iio/libjpeg")] ++BSD.iio.compiler = compiler ++BSD.iio.ccFlags = [ccFlags].flatten() ++BSD.iio.linker = linker ++BSD.iio.linkFlags = [linkFlags].flatten() ++BSD.iio.lib = "javafx_iio" ++ ++BSD.prismES2 = [:] ++BSD.prismES2.nativeSource = [ ++ file("${project("graphics").projectDir}/src/main/native-prism-es2"), ++ file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"), ++ file("${project("graphics").projectDir}/src/main/native-prism-es2/x11") ++] ++BSD.prismES2.compiler = compiler ++BSD.prismES2.ccFlags = ["-DFREEBSD", ccFlags].flatten() ++BSD.prismES2.linker = linker ++BSD.prismES2.linkFlags =IS_STATIC_BUILD ? linkFlags : [linkFlags, "-lX11", "-lXxf86vm", "-lGL"].flatten() ++BSD.prismES2.lib = "prism_es2" ++ ++def closedDir = file("$projectDir/../rt-closed") ++BSD.font = [:] ++BSD.font.compiler = compiler ++BSD.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")] ++BSD.font.ccFlags = ["-DJFXFONT_PLUS", ccFlags].flatten() ++BSD.font.linker = linker ++BSD.font.linkFlags = [linkFlags].flatten() ++BSD.font.lib = "javafx_font" ++ ++BSD.fontFreetype = [:] ++BSD.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"] ++BSD.fontFreetype.compiler = compiler ++BSD.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, freetypeCCFlags].flatten() ++BSD.fontFreetype.linker = linker ++BSD.fontFreetype.linkFlags = IS_STATIC_BUILD ? linkFlags : [linkFlags, freetypeLinkFlags].flatten() ++BSD.fontFreetype.lib = "javafx_font_freetype" ++ ++BSD.fontPango = [:] ++BSD.fontPango.nativeSource = ["src/main/native-font/pango.c"] ++BSD.fontPango.compiler = compiler ++BSD.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten() ++BSD.fontPango.linker = linker ++BSD.fontPango.linkFlags =IS_STATIC_BUILD ? linkFlags : [linkFlags, pangoLinkFlags].flatten() ++BSD.fontPango.lib = "javafx_font_pango" ++ ++BSD.media = [:] ++BSD.media.compiler = compiler ++BSD.media.linker = linker ++BSD.media.ar = "${toolchainDir}ar" ++ ++BSD.webkit = [:] ++BSD.webkit.compiler = compiler ++BSD.webkit.linker = linker ++BSD.webkit.ccFlags = commonFlags.flatten() ++BSD.webkit.linkFlags = linkFlags.flatten() --- java/openjfx14/files/patch-modules_javafx.base_src_main_java_com_sun_javafx_PlatformUtil.java (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.base_src_main_java_com_sun_javafx_PlatformUtil.java (working copy) @@ -0,0 +1,37 @@ +--- modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java +@@ -69,6 +69,7 @@ public class PlatformUtil { + private static final boolean WINDOWS_7_OR_LATER = WINDOWS && versionNumberGreaterThanOrEqualTo(6.1f); + private static final boolean MAC = os.startsWith("Mac"); + private static final boolean LINUX = os.startsWith("Linux") && !ANDROID; ++ private static final boolean FREEBSD = os.startsWith("FreeBSD"); + private static final boolean SOLARIS = os.startsWith("SunOS"); + private static final boolean IOS = os.startsWith("iOS"); + +@@ -124,6 +125,13 @@ public class PlatformUtil { + return LINUX; + } + ++ /** ++ * Returns true if the operating system is a form of FreeBSD. ++ */ ++ public static boolean isFreeBSD(){ ++ return FREEBSD; ++ } ++ + public static boolean useEGL() { + return useEGL; + } +@@ -150,10 +158,10 @@ public class PlatformUtil { + } + + /** +- * Returns true if the operating system is a form of Linux or Solaris ++ * Returns true if the operating system is a form of Unix + */ + public static boolean isUnix(){ +- return LINUX || SOLARIS; ++ return LINUX || SOLARIS || FREEBSD; + } + + /** --- java/openjfx14/files/patch-modules_javafx.controls_src_main_java_com_sun_javafx_scene_TextInputControlBehavior.java (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.controls_src_main_java_com_sun_javafx_scene_TextInputControlBehavior.java (working copy) @@ -0,0 +1,36 @@ +--- modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java +@@ -54,6 +54,7 @@ import javafx.scene.input.MouseEvent; + import java.text.Bidi; + import java.util.function.Predicate; + ++import static com.sun.javafx.PlatformUtil.isFreeBSD; + import static com.sun.javafx.PlatformUtil.isLinux; + import static com.sun.javafx.PlatformUtil.isMac; + import static com.sun.javafx.PlatformUtil.isWindows; +@@ -122,6 +123,7 @@ public abstract class TextInputControlBehavior validWhenEditable = e -> !c.isEditable(); + final Predicate validOnWindows = e -> !PlatformUtil.isWindows(); + final Predicate validOnLinux = e -> !PlatformUtil.isLinux(); ++ final Predicate validOnFreeBSD = e -> !PlatformUtil.isFreeBSD(); + + KeyMapping cancelEditMapping; + KeyMapping fireMapping; +@@ -550,7 +552,7 @@ public abstract class TextInputControlBehavior + #include --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-font_freetype.c (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-font_freetype.c (working copy) @@ -0,0 +1,15 @@ +--- modules/javafx.graphics/src/main/native-font/freetype.c.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-font/freetype.c +@@ -23,7 +23,6 @@ + * questions. + */ + +-#if defined __linux__ || ANDROID_NDK + #if defined _ENABLE_PANGO || _ENABLE_HARFBUZZ + + #include +@@ -650,4 +649,3 @@ JNIEXPORT jboolean JNICALL JNICALL OS_NATIVE(isHarfbuz + } + + #endif /* ENABLE_PANGO || ENABLE_HARFBUZZ */ +-#endif /* __linux__ || ANDROID_NDK */ --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-font_pango.c (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-font_pango.c (working copy) @@ -0,0 +1,15 @@ +--- modules/javafx.graphics/src/main/native-font/pango.c.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-font/pango.c +@@ -23,7 +23,6 @@ + * questions. + */ + +-#if defined __linux__ + #if defined _ENABLE_PANGO + + #include +@@ -432,4 +431,3 @@ JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1descript + } + + #endif /* ENABLE_PANGO */ +-#endif /* __linux__ */ --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_GlassApplication.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_GlassApplication.cpp (working copy) @@ -0,0 +1,10 @@ +--- modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp +@@ -111,6 +111,7 @@ JNIEXPORT jint JNICALL Java_com_sun_glass_ui_gtk_GtkAp + + gdk_threads_enter(); + gtk_init(NULL, NULL); ++ gdk_threads_leave(); + + return JNI_TRUE; + } --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_glass__evloop.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_glass__evloop.cpp (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.graphics/src/main/native-glass/gtk/glass_evloop.cpp.orig 2020-07-24 17:23:31 UTC ++++ modules/javafx.graphics/src/main/native-glass/gtk/glass_evloop.cpp +@@ -25,7 +25,7 @@ + #include "glass_evloop.h" + + #include +-#include ++#include + + static GSList * evloopHookList; + --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_glass__window.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_glass__window.h (working copy) @@ -0,0 +1,16 @@ +--- modules/javafx.graphics/src/main/native-glass/gtk/glass_window.h.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-glass/gtk/glass_window.h +@@ -366,7 +366,7 @@ class WindowContextTop: public WindowContextBase { + jlong screen; + WindowFrameType frame_type; + WindowType window_type; +- struct WindowContext *owner; ++ WindowContext *owner; + WindowGeometry geometry; + struct _Resizable{// we can't use set/get gtk_window_resizable function + _Resizable(): request(REQUEST_NONE), value(true), prev(false), +@@ -472,4 +472,3 @@ class EventsCounterHelper { (public) + }; + + #endif /* GLASS_WINDOW_H */ +- --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_launcher.c (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_launcher.c (working copy) @@ -0,0 +1,10 @@ +--- modules/javafx.graphics/src/main/native-glass/gtk/launcher.c.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-glass/gtk/launcher.c +@@ -25,7 +25,6 @@ + + #include + #include +-#include + #include + #ifndef __USE_GNU // required for dladdr() & Dl_info + #define __USE_GNU --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_wrapped.c (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-glass_gtk_wrapped.c (working copy) @@ -0,0 +1,10 @@ +--- modules/javafx.graphics/src/main/native-glass/gtk/wrapped.c.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-glass/gtk/wrapped.c +@@ -24,7 +24,6 @@ + */ + + #include +-#include + #include + #ifndef __USE_GNU // required for dladdr() & Dl_info + #define __USE_GNU --- java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-prism-es2_PrismES2Defs.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.graphics_src_main_native-prism-es2_PrismES2Defs.h (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.graphics/src/main/native-prism-es2/PrismES2Defs.h.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.graphics/src/main/native-prism-es2/PrismES2Defs.h +@@ -26,7 +26,7 @@ + #ifndef _Prism_es2_defs_h_ + #define _Prism_es2_defs_h_ + +-#if defined(SOLARIS) || defined(LINUX) || defined(ANDROID_NDK) /* SOLARIS || LINUX */ ++#if defined(SOLARIS) || defined(LINUX) || defined(ANDROID_NDK) || defined(FREEBSD) /* SOLARIS || LINUX */ + #define GLX_GLEXT_PROTOTYPES + #define GLX_GLXEXT_PROTOTYPES + #define UNIX --- java/openjfx14/files/patch-modules_javafx.media_src_main_java_com_sun_media_jfxmediaimpl_HostUtils.java (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.media_src_main_java_com_sun_media_jfxmediaimpl_HostUtils.java (working copy) @@ -0,0 +1,13 @@ +--- modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/HostUtils.java.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/HostUtils.java +@@ -66,6 +66,10 @@ public class HostUtils { + return osName.startsWith("linux"); + } + ++ public static boolean isFreeBSD() { ++ return osName.startsWith("freebsd"); ++ } ++ + public static boolean isIOS() { + return osName.startsWith("ios"); + } --- java/openjfx14/files/patch-modules_javafx.media_src_main_java_com_sun_media_jfxmediaimpl_NativeMediaManager.java (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.media_src_main_java_com_sun_media_jfxmediaimpl_NativeMediaManager.java (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java +@@ -110,7 +110,7 @@ public class NativeMediaManager { + NativeLibLoader.loadLibrary("glib-lite"); + } + +- if (!HostUtils.isLinux() && !HostUtils.isIOS()) { ++ if (!HostUtils.isFreeBSD() && !HostUtils.isLinux() && !HostUtils.isIOS()) { + NativeLibLoader.loadLibrary("gstreamer-lite"); + } else { + dependencies.add("gstreamer-lite"); --- java/openjfx14/files/patch-modules_javafx.media_src_main_native_gstreamer_projects_build_linux_common_config.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.media_src_main_native_gstreamer_projects_build_linux_common_config.h (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/projects/build/linux/common/config.h.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/projects/build/linux/common/config.h +@@ -376,7 +376,7 @@ + #define HAVE_SYS_POLL_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_SYS_PRCTL_H 1 ++#undef HAVE_SYS_PRCTL_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_RESOURCE_H --- java/openjfx14/files/patch-modules_javafx.media_src_main_native_jfxmedia_platform_gstreamer_GstPipelineFactory.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.media_src_main_native_jfxmedia_platform_gstreamer_GstPipelineFactory.cpp (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.cpp.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.cpp +@@ -338,6 +338,8 @@ GstElement* CGstPipelineFactory::CreateAudioSinkElemen + return CreateElement("directsoundsink"); + #elif TARGET_OS_MAC + return CreateElement("osxaudiosink"); ++#elif TARGET_OS_BSD ++ return CreateElement("bsdaudiosink"); + #elif TARGET_OS_LINUX + return CreateElement("alsasink"); + #else --- java/openjfx14/files/patch-modules_javafx.media_src_main_native_jfxmedia_projects_bsd_Makefile (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.media_src_main_native_jfxmedia_projects_bsd_Makefile (working copy) @@ -0,0 +1,42 @@ +--- modules/javafx.media/src/main/native/jfxmedia/projects/bsd/Makefile.orig 2020-07-19 18:30:00 UTC ++++ modules/javafx.media/src/main/native/jfxmedia/projects/bsd/Makefile +@@ -1,5 +1,5 @@ + # +-# Linux/ARM jfxmedia makefile ++# BSD jfxmedia makefile + # + + BUILD_DIR = $(OUTPUT_DIR)/$(BUILD_TYPE) +@@ -18,6 +18,7 @@ DIRLIST = jni \ + TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so + + CFLAGS = -DTARGET_OS_LINUX=1 \ ++ -DTARGET_OS_BSD=1 \ + -D_GNU_SOURCE \ + -DGST_REMOVE_DEPRECATED \ + -DGST_DISABLE_GST_DEBUG \ +@@ -26,6 +27,7 @@ CFLAGS = -DTARGET_OS_LINUX=1 \ + -DHAVE_CONFIG_H \ + -DJFXMEDIA_JNI_EXPORTS \ + -DLINUX \ ++ -DG_DISABLE_DEPRECATED \ + -ffunction-sections -fdata-sections + + CPPFLAGS = -fno-rtti -ffunction-sections -fdata-sections +@@ -42,7 +44,6 @@ ifdef HOST_COMPILE + -Wformat-security \ + -fstack-protector \ + -Werror=implicit-function-declaration \ +- -Werror=trampolines \ + -msse2 \ + -DGSTREAMER_LITE + +@@ -51,7 +52,7 @@ ifdef HOST_COMPILE + + INCLUDES = $(BASE_INCLUDES) \ + -I$(JAVA_HOME)/include \ +- -I$(JAVA_HOME)/include/linux \ ++ -I$(JAVA_HOME)/include/freebsd \ + -I$(GSTREAMER_LITE_DIR)/gstreamer \ + -I$(GSTREAMER_LITE_DIR)/gst-plugins-base/gst-libs \ + -I$(GSTREAMER_LITE_DIR)/gstreamer/libs \ --- java/openjfx14/files/patch-modules_javafx.swing_src_main_java_javafx_embed_swing_JFXPanel.java (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.swing_src_main_java_javafx_embed_swing_JFXPanel.java (working copy) @@ -0,0 +1,20 @@ +--- modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java +@@ -1043,7 +1043,7 @@ public class JFXPanel extends JComponent { + public boolean grabFocus() { + // On X11 grab is limited to a single XDisplay connection, + // so we can't delegate it to another GUI toolkit. +- if (PlatformUtil.isLinux()) return true; ++ if (PlatformUtil.isLinux() || PlatformUtil.isFreeBSD()) return true; + + invokeOnClientEDT(() -> { + Window window = SwingUtilities.getWindowAncestor(JFXPanel.this); +@@ -1059,7 +1059,7 @@ public class JFXPanel extends JComponent { + public void ungrabFocus() { + // On X11 grab is limited to a single XDisplay connection, + // so we can't delegate it to another GUI toolkit. +- if (PlatformUtil.isLinux()) return; ++ if (PlatformUtil.isLinux() || PlatformUtil.isFreeBSD()) return; + + invokeOnClientEDT(() -> { + Window window = SwingUtilities.getWindowAncestor(JFXPanel.this); --- java/openjfx14/files/patch-modules_javafx.swing_src_main_java_javafx_embed_swing_SwingNode.java (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.swing_src_main_java_javafx_embed_swing_SwingNode.java (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.swing/src/main/java/javafx/embed/swing/SwingNode.java.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.swing/src/main/java/javafx/embed/swing/SwingNode.java +@@ -807,7 +807,7 @@ public class SwingNode extends Node { + private void ungrabFocus(boolean postUngrabEvent) { + // On X11 grab is limited to a single XDisplay connection, + // so we can't delegate it to another GUI toolkit. +- if (PlatformUtil.isLinux()) return; ++ if (PlatformUtil.isLinux() || PlatformUtil.isFreeBSD()) return; + + if (grabbed && + getScene() != null && --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_PlatformJava.cmake (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_PlatformJava.cmake (working copy) @@ -0,0 +1,8 @@ +--- modules/javafx.web/src/main/native/Source/PlatformJava.cmake.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/PlatformJava.cmake +@@ -1,4 +1 @@ +-add_subdirectory(ThirdParty/sqlite) +-add_subdirectory(ThirdParty/icu) +-add_subdirectory(ThirdParty/libxml) +-add_subdirectory(ThirdParty/libxslt) ++ --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_MemoryPressureHandler.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_MemoryPressureHandler.cpp (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/MemoryPressureHandler.cpp.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/MemoryPressureHandler.cpp +@@ -49,7 +49,7 @@ MemoryPressureHandler& MemoryPressureHandler::singleto + } + + MemoryPressureHandler::MemoryPressureHandler() +-#if OS(LINUX) ++#if OS(LINUX) || OS(FREEBSD) + : m_holdOffTimer(RunLoop::main(), this, &MemoryPressureHandler::holdOffTimerFired) + #elif OS(WINDOWS) + : m_windowsMeasurementTimer(RunLoop::main(), this, &MemoryPressureHandler::windowsMeasurementTimerFired) --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_MemoryPressureHandler.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_MemoryPressureHandler.h (working copy) @@ -0,0 +1,20 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/MemoryPressureHandler.h.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/MemoryPressureHandler.h +@@ -66,7 +66,7 @@ class MemoryPressureHandler { (public) + + WTF_EXPORT_PRIVATE void setShouldUsePeriodicMemoryMonitor(bool); + +-#if OS(LINUX) ++#if OS(LINUX) || OS(FREEBSD) + WTF_EXPORT_PRIVATE void triggerMemoryPressureEvent(bool isCritical); + #endif + +@@ -200,7 +200,7 @@ class MemoryPressureHandler { (public) + Win32Handle m_lowMemoryHandle; + #endif + +-#if OS(LINUX) ++#if OS(LINUX) || OS(FREEBSD) + RunLoop::Timer m_holdOffTimer; + void holdOffTimerFired(); + #endif --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_PlatformJava.cmake (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_PlatformJava.cmake (working copy) @@ -0,0 +1,14 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/PlatformJava.cmake.orig 2020-07-24 19:01:56 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/PlatformJava.cmake +@@ -83,9 +83,8 @@ elseif (UNIX) + list(APPEND WTF_SOURCES + generic/RunLoopGeneric.cpp + generic/WorkQueueGeneric.cpp +- linux/CurrentProcessMemoryStatus.cpp +- linux/MemoryFootprintLinux.cpp +- linux/MemoryPressureHandlerLinux.cpp ++ generic/MemoryFootprintGeneric.cpp ++ unix/MemoryPressureHandlerUnix.cpp + unix/CPUTimeUnix.cpp + unix/LanguageUnix.cpp + ) --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_generic_MemoryFootprintGeneric.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_generic_MemoryFootprintGeneric.cpp (working copy) @@ -0,0 +1,22 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp +@@ -25,8 +25,9 @@ + + #include "config.h" + #include ++#include + +-#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX) ++#if !USE(SYSTEM_MALLOC) && (OS(LINUX) || OS(FREEBSD)) + #include + #endif + +@@ -34,7 +35,7 @@ namespace WTF { + + size_t memoryFootprint() + { +-#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX) ++#if !USE(SYSTEM_MALLOC) && (OS(LINUX) || OS(FREEBSD)) + return bmalloc::api::memoryFootprint(); + #else + return 0; --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_linux_MemoryPressureHandlerLinux.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_linux_MemoryPressureHandlerLinux.cpp (working copy) @@ -0,0 +1,54 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp.orig 2020-07-17 12:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp +@@ -28,13 +28,20 @@ + #include "config.h" + #include + +-#include ++#include + #include + #include + #include +-#include + #include + ++#if OS(LINUX) ++#include ++#elif OS(FREEBSD) ++#include ++#include ++#include ++#endif ++ + #define LOG_CHANNEL_PREFIX Log + + namespace WTF { +@@ -105,9 +112,28 @@ void MemoryPressureHandler::holdOff(Seconds seconds) + + static size_t processMemoryUsage() + { ++#if OS(LINUX) + ProcessMemoryStatus memoryStatus; + currentProcessMemoryStatus(memoryStatus); + return (memoryStatus.resident - memoryStatus.shared); ++#elif OS(FREEBSD) ++ static size_t pageSize = sysconf(_SC_PAGE_SIZE); ++ struct kinfo_proc info; ++ size_t infolen = sizeof(info); ++ ++ int mib[4]; ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_PROC; ++ mib[2] = KERN_PROC_PID; ++ mib[3] = getpid(); ++ ++ if (sysctl(mib, 4, &info, &infolen, nullptr, 0)) ++ return 0; ++ ++ return static_cast(info.ki_rssize - info.ki_tsize) * pageSize; ++#else ++#error "Missing a platform specific way of determining the memory usage" ++#endif + } + + void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchronous synchronous) --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_unicode_java_UnicodeJava.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_unicode_java_UnicodeJava.h (working copy) @@ -0,0 +1,24 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h +@@ -37,21 +37,6 @@ + + #define CharProp(p) com_sun_webkit_dom_CharacterDataImpl_##p + +-#if PLATFORM(JAVA) && OS(WINDOWS) +-typedef wchar_t UChar; +-#else +-typedef uint16_t UChar; +-#endif +- +-// #ifdef UChar32 +-// #undef UChar32 +-// #endif +- +-#ifndef __UMACHINE_H__ //XXX: recheck +-typedef uint32_t UChar32; +-#endif +- +-#define U_MASK(x) ((uint32_t)1<<(x)) + #define USE_FAST_PATH(c, fast, slow) ((c) <= 0x7F ? fast((char)c) : slow(c)) + + #define CHECK_PROPERTY(c, mask, isSet) \ --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp (working copy) @@ -0,0 +1,168 @@ +--- modules/javafx.web/src/main/native/Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp.orig 2020-07-19 18:56:35 UTC ++++ modules/javafx.web/src/main/native/Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp +@@ -0,0 +1,165 @@ ++/* ++ * Copyright (C) 2011, 2012 Apple Inc. All Rights Reserved. ++ * Copyright (C) 2014 Raspberry Pi Foundation. All Rights Reserved. ++ * Copyright (C) 2018 Igalia S.L. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY ++ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY ++ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include "config.h" ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#if OS(LINUX) ++#include ++#elif OS(FREEBSD) ++#include ++#include ++#include ++#endif ++ ++#define LOG_CHANNEL_PREFIX Log ++ ++namespace WTF { ++ ++// Disable memory event reception for a minimum of s_minimumHoldOffTime ++// seconds after receiving an event. Don't let events fire any sooner than ++// s_holdOffMultiplier times the last cleanup processing time. Effectively ++// this is 1 / s_holdOffMultiplier percent of the time. ++// If after releasing the memory we don't free at least s_minimumBytesFreedToUseMinimumHoldOffTime, ++// we wait longer to try again (s_maximumHoldOffTime). ++// These value seems reasonable and testing verifies that it throttles frequent ++// low memory events, greatly reducing CPU usage. ++static const Seconds s_minimumHoldOffTime { 5_s }; ++static const Seconds s_maximumHoldOffTime { 30_s }; ++static const size_t s_minimumBytesFreedToUseMinimumHoldOffTime = 1 * MB; ++static const unsigned s_holdOffMultiplier = 20; ++ ++void MemoryPressureHandler::triggerMemoryPressureEvent(bool isCritical) ++{ ++ if (!m_installed) ++ return; ++ ++ if (ReliefLogger::loggingEnabled()) ++ LOG(MemoryPressure, "Got memory pressure notification (%s)", isCritical ? "critical" : "non-critical"); ++ ++ setUnderMemoryPressure(true); ++ ++ if (isMainThread()) ++ respondToMemoryPressure(isCritical ? Critical::Yes : Critical::No); ++ else ++ RunLoop::main().dispatch([this, isCritical] { ++ respondToMemoryPressure(isCritical ? Critical::Yes : Critical::No); ++ }); ++ ++ if (ReliefLogger::loggingEnabled() && isUnderMemoryPressure()) ++ LOG(MemoryPressure, "System is no longer under memory pressure."); ++ ++ setUnderMemoryPressure(false); ++} ++ ++void MemoryPressureHandler::install() ++{ ++ if (m_installed || m_holdOffTimer.isActive()) ++ return; ++ ++ m_installed = true; ++} ++ ++void MemoryPressureHandler::uninstall() ++{ ++ if (!m_installed) ++ return; ++ ++ m_holdOffTimer.stop(); ++ ++ m_installed = false; ++} ++ ++void MemoryPressureHandler::holdOffTimerFired() ++{ ++ install(); ++} ++ ++void MemoryPressureHandler::holdOff(Seconds seconds) ++{ ++ m_holdOffTimer.startOneShot(seconds); ++} ++ ++static size_t processMemoryUsage() ++{ ++#if OS(LINUX) ++ ProcessMemoryStatus memoryStatus; ++ currentProcessMemoryStatus(memoryStatus); ++ return (memoryStatus.resident - memoryStatus.shared); ++#elif OS(FREEBSD) ++ static size_t pageSize = sysconf(_SC_PAGE_SIZE); ++ struct kinfo_proc info; ++ size_t infolen = sizeof(info); ++ ++ int mib[4]; ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_PROC; ++ mib[2] = KERN_PROC_PID; ++ mib[3] = getpid(); ++ ++ if (sysctl(mib, 4, &info, &infolen, nullptr, 0)) ++ return 0; ++ ++ return static_cast(info.ki_rssize - info.ki_tsize) * pageSize; ++#else ++#error "Missing a platform specific way of determining the memory usage" ++#endif ++} ++ ++void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchronous synchronous) ++{ ++ uninstall(); ++ ++ MonotonicTime startTime = MonotonicTime::now(); ++ int64_t processMemory = processMemoryUsage(); ++ releaseMemory(critical, synchronous); ++ int64_t bytesFreed = processMemory - processMemoryUsage(); ++ Seconds holdOffTime = s_maximumHoldOffTime; ++ if (bytesFreed > 0 && static_cast(bytesFreed) >= s_minimumBytesFreedToUseMinimumHoldOffTime) ++ holdOffTime = (MonotonicTime::now() - startTime) * s_holdOffMultiplier; ++ holdOff(std::max(holdOffTime, s_minimumHoldOffTime)); ++} ++ ++void MemoryPressureHandler::platformReleaseMemory(Critical) ++{ ++#if HAVE(MALLOC_TRIM) ++ malloc_trim(0); ++#endif ++} ++ ++Optional MemoryPressureHandler::ReliefLogger::platformMemoryUsage() ++{ ++ return MemoryUsage {processMemoryUsage(), memoryFootprint()}; ++} ++ ++} // namespace WTF --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_bmalloc_bmalloc_AvailableMemory.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_bmalloc_bmalloc_AvailableMemory.cpp (working copy) @@ -0,0 +1,45 @@ +--- modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/AvailableMemory.cpp.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/AvailableMemory.cpp +@@ -47,6 +47,11 @@ + #if BOS(LINUX) + #include + #include ++#elif BOS(FREEBSD) ++#include "VMAllocate.h" ++#include ++#include ++#include + #endif + #include + #endif +@@ -184,7 +189,7 @@ size_t availableMemory() + return availableMemory; + } + +-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) ++#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) + MemoryStatus memoryStatus() + { + #if BPLATFORM(IOS_FAMILY) +@@ -200,6 +205,21 @@ MemoryStatus memoryStatus() + auto& memory = LinuxMemory::singleton(); + size_t memoryFootprint = memory.footprint(); + double percentInUse = static_cast(memoryFootprint) / static_cast(memory.availableMemory); ++#elif BOS(FREEBSD) ++ struct kinfo_proc info; ++ size_t infolen = sizeof(info); ++ ++ int mib[4]; ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_PROC; ++ mib[2] = KERN_PROC_PID; ++ mib[3] = getpid(); ++ ++ size_t memoryFootprint = 0; ++ if (!sysctl(mib, 4, &info, &infolen, nullptr, 0)) ++ memoryFootprint = static_cast(info.ki_rssize) * vmPageSize(); ++ ++ double percentInUse = static_cast(memoryFootprint) / static_cast(availableMemory()); + #endif + + double percentAvailableMemoryInUse = std::min(percentInUse, 1.0); --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_bmalloc_bmalloc_AvailableMemory.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_bmalloc_bmalloc_AvailableMemory.h (working copy) @@ -0,0 +1,20 @@ +--- modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/AvailableMemory.h.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/AvailableMemory.h +@@ -32,7 +32,7 @@ namespace bmalloc { + + size_t availableMemory(); + +-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) ++#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) + struct MemoryStatus { + MemoryStatus(size_t memoryFootprint, double percentAvailableMemoryInUse) + : memoryFootprint(memoryFootprint) +@@ -61,7 +61,7 @@ inline double percentAvailableMemoryInUse() + + inline bool isUnderMemoryPressure() + { +-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) ++#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) + return percentAvailableMemoryInUse() > memoryPressureThreshold; + #else + return false; --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_bmalloc_bmalloc_bmalloc.h (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_bmalloc_bmalloc_bmalloc.h (working copy) @@ -0,0 +1,11 @@ +--- modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/bmalloc.h.orig 2020-07-24 18:56:22 UTC ++++ modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/bmalloc.h +@@ -111,7 +111,7 @@ inline size_t availableMemory() + return bmalloc::availableMemory(); + } + +-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) ++#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) + inline size_t memoryFootprint() + { + return bmalloc::memoryFootprint(); --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_cmake_OptionsJava.cmake (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_cmake_OptionsJava.cmake (working copy) @@ -0,0 +1,21 @@ +--- modules/javafx.web/src/main/native/Source/cmake/OptionsJava.cmake.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/cmake/OptionsJava.cmake +@@ -31,14 +31,10 @@ endif () + set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory") + set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory") + +-set(SQLITE_LIBRARIES SqliteJava) +-set(LIBXML2_LIBRARIES XMLJava) +-set(LIBXSLT_LIBRARIES XSLTJava) +- +-set(ICU_LIBRARIES icuuc icudata) +-set(ICU_I18N_LIBRARIES icui18n icuuc icudata) +-set(ICU_DATA_LIBRARIES icudata) +- ++find_package(LibXml2 2.8.0 REQUIRED) ++find_package(LibXslt REQUIRED) ++find_package(Sqlite REQUIRED) ++find_package(ICU REQUIRED) + find_package(JNI REQUIRED) + find_package(Threads REQUIRED) + --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_cmake_WebKitCompilerFlags.cmake (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Source_cmake_WebKitCompilerFlags.cmake (working copy) @@ -0,0 +1,13 @@ +--- modules/javafx.web/src/main/native/Source/cmake/WebKitCompilerFlags.cmake.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Source/cmake/WebKitCompilerFlags.cmake +@@ -231,10 +231,6 @@ if (NOT MSVC) + string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS}) + endif () + +-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS) +- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") +-endif () +- + + # CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS only matters with GCC >= 4.7.0. Since this + # version, -P does not output empty lines, which currently breaks make_names.pl in --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Tools_DumpRenderTree_TestRunner.cpp (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Tools_DumpRenderTree_TestRunner.cpp (working copy) @@ -0,0 +1,18 @@ +https://github.com/WebKit/webkit/commit/35a79bf4c2e0ecb4a37e672de347a25254ea0601 + +* DumpRenderTree/TestRunner.cpp: +(TestRunner::runUIScript): +Manually convert between UChar and UniChar/unichar where needed. + + +--- modules/javafx.web/src/main/native/Tools/DumpRenderTree/TestRunner.cpp.orig 2020-07-19 19:13:03 UTC ++++ modules/javafx.web/src/main/native/Tools/DumpRenderTree/TestRunner.cpp +@@ -2463,7 +2463,7 @@ void TestRunner::runUIScript(JSContextRef context, JSS + if (!m_UIScriptContext) + m_UIScriptContext = makeUniqueWithoutFastMallocCheck(*this); + +- String scriptString(JSStringGetCharactersPtr(script), JSStringGetLength(script)); ++ String scriptString(reinterpret_cast(JSStringGetCharactersPtr(script)), JSStringGetLength(script)); + m_UIScriptContext->runUIScript(scriptString, callbackID); + } + --- java/openjfx14/files/patch-modules_javafx.web_src_main_native_Tools_DumpRenderTree_java_CMakeLists.txt (nonexistent) +++ java/openjfx14/files/patch-modules_javafx.web_src_main_native_Tools_DumpRenderTree_java_CMakeLists.txt (working copy) @@ -0,0 +1,12 @@ +--- modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt.orig 2020-07-17 10:21:33 UTC ++++ modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt +@@ -72,9 +72,5 @@ add_library(DumpRenderTreeJava SHARED ${DumpRenderTree + add_definitions(-DWEBCORE_EXPORT=WTF_IMPORT -DWEBCORE_TESTSUPPORT_EXPORT=WTF_IMPORT) + add_dependencies(DumpRenderTreeJava DumpRenderTreeBindings) + +-if (UNIX AND NOT APPLE) +- set_target_properties(DumpRenderTreeJava PROPERTIES LINK_FLAGS "-Wl,--no-undefined") +-endif () +- + set_target_properties(DumpRenderTreeJava PROPERTIES OUTPUT_NAME "DumpRenderTreeJava") + target_link_libraries(DumpRenderTreeJava ${DumpRenderTree_LIBRARIES}) --- java/openjfx14/pkg-plist (revision 543245) +++ java/openjfx14/pkg-plist (working copy) @@ -1,24 +1,33 @@ -%%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 -%%JAVA_HOME%%/jre/lib/%%ARCH%%/libglassgtk2.so -%%JAVA_HOME%%/jre/lib/%%ARCH%%/libglassgtk3.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 -%%JAVA_HOME%%/jre/lib/ext/jfxrt.jar -%%JAVA_HOME%%/jre/lib/javafx.properties -%%SWT%%%%JAVA_HOME%%/jre/lib/jfxswt.jar -%%JAVA_HOME%%/lib/ant-javafx.jar -%%JAVA_HOME%%/lib/javafx-mx.jar -%%JAVA_HOME%%/lib/packager.jar +%%JAVA_HOME%%/jmods/javafx.base.jmod +%%JAVA_HOME%%/jmods/javafx.controls.jmod +%%JAVA_HOME%%/jmods/javafx.fxml.jmod +%%JAVA_HOME%%/jmods/javafx.graphics.jmod +%%JAVA_HOME%%/jmods/javafx.media.jmod +%%JAVA_HOME%%/jmods/javafx.swing.jmod +%%JAVA_HOME%%/jmods/javafx.web.jmod +%%JAVA_HOME%%/lib/javafx.base.jar +%%JAVA_HOME%%/lib/javafx.controls.jar +%%JAVA_HOME%%/lib/javafx.fxml.jar +%%JAVA_HOME%%/lib/javafx.graphics.jar +%%JAVA_HOME%%/lib/javafx.media.jar +%%JAVA_HOME%%/lib/javafx.properties +%%JAVA_HOME%%/lib/javafx.swing.jar +%%JAVA_HOME%%/lib/javafx.web.jar +%%MEDIA%%%%JAVA_HOME%%/lib/libavplugin.so +%%JAVA_HOME%%/lib/libdecora_sse.so +%%MEDIA%%%%JAVA_HOME%%/lib/libfxplugins.so +%%JAVA_HOME%%/lib/libglass.so +%%JAVA_HOME%%/lib/libglassgtk2.so +%%JAVA_HOME%%/lib/libglassgtk3.so +%%MEDIA%%%%JAVA_HOME%%/lib/libgstreamer-lite.so +%%JAVA_HOME%%/lib/libjavafx_font.so +%%JAVA_HOME%%/lib/libjavafx_font_freetype.so +%%JAVA_HOME%%/lib/libjavafx_font_pango.so +%%JAVA_HOME%%/lib/libjavafx_iio.so +%%MEDIA%%%%JAVA_HOME%%/lib/libjfxmedia.so +%%WEBKIT%%%%JAVA_HOME%%/lib/libjfxwebkit.so +%%JAVA_HOME%%/lib/libprism_common.so +%%JAVA_HOME%%/lib/libprism_es2.so +%%JAVA_HOME%%/lib/libprism_sw.so +%%JAVA_HOME%%/lib/javafx-src.zip +%%SWT%%%%JAVA_HOME%%/lib/javafx-swt.jar