pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/openjfx23: import openjfx23-23
Module Name: pkgsrc-wip
Committed By: Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By: ryoon
Date: Tue Aug 12 13:06:05 2025 +0900
Changeset: acecdbae2d2d0b88f18e45b27c3bc114dbcf10a7
Added Files:
openjfx23/DESCR
openjfx23/Makefile
openjfx23/PLIST
openjfx23/TODO
openjfx23/buildlink3.mk
openjfx23/distinfo
openjfx23/files/netbsd.gradle
Log Message:
wip/openjfx23: import openjfx23-23
OpenJFX is an open source, next generation client application
platform for desktop, mobile and embedded systems based on JavaSE.
It is a collaborative effort by many individuals and companies with
the goal of producing a modern, efficient, and fully featured
toolkit for developing rich client applications. This is the open
source project where we develop JavaFX.
OpenJFX is free software, licensed under GPL v2 with the Classpath
exception, just like the JDK. Anybody is welcome to contribute to
this project, port it to other platforms or devices, or do anything
else that a free software license allows you to do!
This package tacks OpenJFX 23.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=acecdbae2d2d0b88f18e45b27c3bc114dbcf10a7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
openjfx23/DESCR | 13 ++
openjfx23/Makefile | 106 +++++++++++++++
openjfx23/PLIST | 27 ++++
openjfx23/TODO | 1 +
openjfx23/buildlink3.mk | 13 ++
openjfx23/distinfo | 40 ++++++
openjfx23/files/netbsd.gradle | 296 ++++++++++++++++++++++++++++++++++++++++++
7 files changed, 496 insertions(+)
diffs:
diff --git a/openjfx23/DESCR b/openjfx23/DESCR
new file mode 100644
index 0000000000..297c486035
--- /dev/null
+++ b/openjfx23/DESCR
@@ -0,0 +1,13 @@
+OpenJFX is an open source, next generation client application
+platform for desktop, mobile and embedded systems based on JavaSE.
+It is a collaborative effort by many individuals and companies with
+the goal of producing a modern, efficient, and fully featured
+toolkit for developing rich client applications. This is the open
+source project where we develop JavaFX.
+
+OpenJFX is free software, licensed under GPL v2 with the Classpath
+exception, just like the JDK. Anybody is welcome to contribute to
+this project, port it to other platforms or devices, or do anything
+else that a free software license allows you to do!
+
+This package tacks OpenJFX 23.
diff --git a/openjfx23/Makefile b/openjfx23/Makefile
new file mode 100644
index 0000000000..bf09426c88
--- /dev/null
+++ b/openjfx23/Makefile
@@ -0,0 +1,106 @@
+# $NetBSD$
+
+DISTNAME= jfx-23-ga
+PKGNAME= openjfx23-23
+CATEGORIES= x11
+MASTER_SITES= ${MASTER_SITE_GITHUB:=openjdk/}
+GITHUB_PROJECT= jfx
+GITHUB_TAG= 23-ga
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://github.com/openjdk/jfx/
+COMMENT= TODO: Short description of the package
+LICENSE= gnu-gpl-v2
+
+JARS+= lucene-core-7.7.3.jar
+JARS+= lucene-grouping-7.7.3.jar
+JARS+= lucene-queryparser-7.7.3.jar
+JARS+= antlr4-4.7.2-complete.jar
+
+DISTFILES= ${DEFAULT_DISTFILES} ${JARS}
+
+SITES.lucene-core-7.7.3.jar= https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-core/7.7.3/
+SITES.lucene-grouping-7.7.3.jar= https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-grouping/7.7.3/
+SITES.lucene-queryparser-7.7.3.jar= https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-queryparser/7.7.3/
+SITES.antlr4-4.7.2-complete.jar= https://repo1.maven.org/maven2/org/antlr/antlr4/4.7.2/
+
+DEPENDS+= swt-[0-9]*:../../x11/swt
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+USE_JAVA= yes
+USE_JAVA2= 21
+
+
+PKGCONFIG_OVERRIDE+= modules/javafx.web/src/main/native/Source/JavaScriptCore/javascriptcoregtk.pc.in
+PKGCONFIG_OVERRIDE+= modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/libxml-2.0.pc.in
+PKGCONFIG_OVERRIDE+= modules/javafx.web/src/main/native/Source/ThirdParty/libxslt/src/libexslt.pc.in
+PKGCONFIG_OVERRIDE+= modules/javafx.web/src/main/native/Source/ThirdParty/libxslt/src/libxslt.pc.in
+
+TOOL_DEPENDS+= gradle-[0-9]*:../../devel/gradle
+MAKE_ENV+= GRADLE_USER_HOME=${WRKDIR}/.gradle
+
+# Use pkg-config for libX11 inside gradle instead.
+CXX_LDFLAGS+= -L${PREFIX}/lib
+CXX_LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+_WRAP_EXTRA_ARGS.CXX+= ${CXX_LDFLAGS}
+CWRAPPERS_PREPEND.cxx+= ${CXX_LDFLAGS}
+
+# For pipewire header file
+CC_CPPFLAGS+= -I${BUILDLINK_DIR}/include/pipewire-0.3
+CC_CPPFLAGS+= -I${BUILDLINK_DIR}/include/spa-0.2
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} == "NetBSD"
+CC_CPPFLAGS+= -D__LOCALE_C_ONLY
+.endif
+_WRAP_EXTRA_ARGS.CC+= ${CC_CPPFLAGS}
+CWRAPPERS_PREPEND.cc+= ${CC_CPPFLAGS}
+
+post-patch:
+ # Do not verify swt jar.
+ ${RM} ${WRKSRC}/gradle/verification-metadata.xml
+ # build file for NetBSD
+ ${CP} ${FILESDIR}/netbsd.gradle ${WRKSRC}/buildSrc
+ # Gstreamer build for NetBSD
+ ${CP} -r ${WRKSRC}/modules/javafx.media/src/main/native/jfxmedia/projects/linux \
+ ${WRKSRC}/modules/javafx.media/src/main/native/jfxmedia/projects/netbsd
+ ${CP} -r ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/projects/linux \
+ ${WRKSRC}/modules/javafx.media/src/main/native/gstreamer/projects/netbsd
+
+pre-configure:
+ ${MKDIR} ${WRKDIR}/deps
+ ${LN} -sf ${PREFIX}/lib/java/swt.jar \
+ ${WRKDIR}/deps/org.eclipse.swt.gtk.linux.x86_64_3.124.200.v20231113-1355.jar
+.for d in ${JARS}
+ ${LN} -sf ${WRKDIR}/${d} ${WRKDIR}/deps
+.endfor
+
+do-configure:
+ ${ECHO} "JFX_DEPS_URL = ${WRKDIR}/deps" >> ${WRKSRC}/gradle.properties
+
+do-build:
+ cd ${WRKSRC} && \
+ ${SETENV} ${MAKE_ENV} gradle --no-daemon all \
+ --exclude-task javadoc --warning-mode all --info
+
+INSTALLATION_DIRS+= openjfx23/lib
+INSTALLATION_DIRS+= openjfx23/jmods
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/build/javafx-exports.zip \
+ ${DESTDIR}${PREFIX}/openjfx23
+ ${INSTALL_DATA} ${WRKSRC}/build/artifacts/javafx-sdk-23/lib/* \
+ ${DESTDIR}${PREFIX}/openjfx23/lib
+ ${INSTALL_DATA} ${WRKSRC}/build/artifacts/javafx-sdk-23/src.zip \
+ ${DESTDIR}${PREFIX}/openjfx23
+ ${INSTALL_DATA} ${WRKSRC}/build/artifacts/javafx-jmods-23/* \
+ ${DESTDIR}${PREFIX}/openjfx23/jmods
+
+.include "../../lang/openjdk21/buildlink3.mk"
+.include "../../multimedia/pipewire/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+#.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+.include "../../mk/java-vm.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/openjfx23/PLIST b/openjfx23/PLIST
new file mode 100644
index 0000000000..c90714ffc9
--- /dev/null
+++ b/openjfx23/PLIST
@@ -0,0 +1,27 @@
+@comment $NetBSD$
+openjfx23/javafx-exports.zip
+openjfx23/jmods/javafx.base.jmod
+openjfx23/jmods/javafx.controls.jmod
+openjfx23/jmods/javafx.fxml.jmod
+openjfx23/jmods/javafx.graphics.jmod
+openjfx23/jmods/javafx.media.jmod
+openjfx23/jmods/javafx.swing.jmod
+openjfx23/jmods/javafx.web.jmod
+openjfx23/lib/javafx-swt.jar
+openjfx23/lib/javafx.base.jar
+openjfx23/lib/javafx.controls.jar
+openjfx23/lib/javafx.fxml.jar
+openjfx23/lib/javafx.graphics.jar
+openjfx23/lib/javafx.media.jar
+openjfx23/lib/javafx.properties
+openjfx23/lib/javafx.swing.jar
+openjfx23/lib/javafx.web.jar
+openjfx23/lib/libdecora_sse.so
+openjfx23/lib/libglass.so
+openjfx23/lib/libglassgtk3.so
+openjfx23/lib/libjavafx_font.so
+openjfx23/lib/libjavafx_iio.so
+openjfx23/lib/libprism_common.so
+openjfx23/lib/libprism_es2.so
+openjfx23/lib/libprism_sw.so
+openjfx23/src.zip
diff --git a/openjfx23/TODO b/openjfx23/TODO
new file mode 100644
index 0000000000..edc5d66040
--- /dev/null
+++ b/openjfx23/TODO
@@ -0,0 +1 @@
+* Fix runtime errors.
diff --git a/openjfx23/buildlink3.mk b/openjfx23/buildlink3.mk
new file mode 100644
index 0000000000..54dff493d7
--- /dev/null
+++ b/openjfx23/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD$
+
+BUILDLINK_TREE+= openjfx23
+
+.if !defined(OPENJFX23_BUILDLINK3_MK)
+OPENJFX23_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.openjfx23+= openjfx23>=23
+BUILDLINK_PKGSRCDIR.openjfx23?= ../../x11/openjfx23
+
+.endif # OPENJFX23_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -openjfx23
diff --git a/openjfx23/distinfo b/openjfx23/distinfo
new file mode 100644
index 0000000000..95744a8d30
--- /dev/null
+++ b/openjfx23/distinfo
@@ -0,0 +1,40 @@
+$NetBSD$
+
+BLAKE2s (antlr4-4.7.2-complete.jar) = 1da05850745a85da90415159aae16f357751af3696a39387d6f8053acf1155f3
+SHA512 (antlr4-4.7.2-complete.jar) = e788d28796c8925a158f0a09048590bdcf6730d46dcb8a12b362cbcc80a7ceb76374b2675987c953faecd3cf4a847b1571485a71081a84684170d25d05176a11
+Size (antlr4-4.7.2-complete.jar) = 2079769 bytes
+BLAKE2s (jfx-23-ga.tar.gz) = de5a27d9737fc3173e40a0f01dfc455571afdcd2ad97166828fd6b025ae660d4
+SHA512 (jfx-23-ga.tar.gz) = 06eb7d7b6e75cb58ae24ada250de1beeb92ada0e6d4e005ee6bb4ce09290643fdce6b8f8b16991c206d11fd866e91e0a6b59ed7060036ea0ae52130b33f82edf
+Size (jfx-23-ga.tar.gz) = 72610504 bytes
+BLAKE2s (lucene-core-7.7.3.jar) = 8501f20801667fc14b3b4f72b1f89f07a1ec60cf79a0736a5bb61ad3fd9f87a6
+SHA512 (lucene-core-7.7.3.jar) = 19d5e29d048b6dabd87fba7e5e12fefd443fe1b67ede6644b7c268e290ee8b3c47cb5fe4a90a9e4b140df9325ca6db0c1ee057d5b343f4d3616351d04d6a740a
+Size (lucene-core-7.7.3.jar) = 3089727 bytes
+BLAKE2s (lucene-grouping-7.7.3.jar) = d2627ebbcc40552cb9f79300c97b5d78fe087fd054d26652d9cf3fab08764cd6
+SHA512 (lucene-grouping-7.7.3.jar) = a0974c199bfb699e4e059290ca81cb765d5e093a3083239cb2b8e6668bf06e6a85c61e0ccba607eedab14760eb1a7595779bed24f51659b6d736b5c7cd900a38
+Size (lucene-grouping-7.7.3.jar) = 87265 bytes
+BLAKE2s (lucene-queryparser-7.7.3.jar) = 8ce768c348e42ce7309d6e4d9edd261e7f9160902d5e6a1c45a86a91a10e426c
+SHA512 (lucene-queryparser-7.7.3.jar) = eed3d5c9b83f740e665eb44fe483f76a1f5cf181fa42e65f5106bebd7026d1518d626e146c2c6c4da46c64e080e6b466c0542c1c9f49bbd46c9c6f0d8e193e6f
+Size (lucene-queryparser-7.7.3.jar) = 381935 bytes
+SHA1 (patch-apps_samples_Ensemble8_src_app_java_ensemble_PlatformFeatures.java) = c1409353ef8cd851a6e9a6c6d3484aeed18f8c9e
+SHA1 (patch-build.gradle) = 864fc127b5866320875355525bf5250b333c84d6
+SHA1 (patch-modules_javafx.base_src_main_java_com_sun_javafx_PlatformUtil.java) = c24b952e290711d28e4d87a09c1547c5be93f55b
+SHA1 (patch-modules_javafx.controls_src_main_java_com_sun_javafx_scene_control_behavior_TextInputControlBehavior.java) = 53e97b1ca68f70d878012f8fb2727012034f48d3
+SHA1 (patch-modules_javafx.controls_src_test_java_test_javafx_scene_control_behavior_BehaviorTestBase.java) = ff0f14af29ab11d8520322ff21e6dadadf9bc7c1
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_glass_ui_Platform.java) = 9f0253bb645b3d49047c518da3135977a2a0c854
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_glass_utils_NativeLibLoader.java) = 486225058abc7552807b8d23942550cbcb09b95d
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_javafx_font_LogicalFont.java) = 06a06dce90af4e0b5db186ecb5d7e2971728a687
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_javafx_font_PrismFontFactory.java) = 59efea4859dd8d73096cfa94d7f6ff95102d8582
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_javafx_tk_Toolkit.java) = cda8079591dcd79429528e4866b5d92e5640965c
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_javafx_tk_quantum_GlassSystemMenu.java) = 6fca0b4e5e99cf43d7870249433d0071a4168d3c
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_javafx_tk_quantum_WindowStage.java) = 3937bc794f13010df045054d76bc2076881b5d0d
+SHA1 (patch-modules_javafx.graphics_src_main_java_com_sun_prism_impl_PrismSettings.java) = 5c48515862b775b3144686c0e1d445c4d56e2b6b
+SHA1 (patch-modules_javafx.graphics_src_main_native-glass_gtk_launcher.c) = b0bf6679145ac8f380cdfd0b16e622768a0130d7
+SHA1 (patch-modules_javafx.graphics_src_main_native-glass_gtk_wrapped.c) = ff0a0e690a5306c0ec717637044e107ca9e02b7f
+SHA1 (patch-modules_javafx.graphics_src_main_native-prism-es2_PrismES2Defs.h) = 6f79e4b7141b5afeb8b4520f47eb7f1d3d7d0ab8
+SHA1 (patch-modules_javafx.web_src_main_native_Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = 092012a6df9cda7851d5acd0cce342703431f448
+SHA1 (patch-modules_javafx.web_src_main_native_Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 4b9fb1ce4d7302326925ab3c89088d1c4fd3ddc6
+SHA1 (patch-modules_javafx.web_src_main_native_Source_WebCore_Scripts_check-xcfilelists.sh) = 04dec3caf2fbd04a79e1efd99a152340e1d76450
+SHA1 (patch-modules_javafx.web_src_main_native_Source_WebCore_Scripts_generate-unified-sources.sh) = ea7ccc822cf27c43f7d03a8c0a0d875856cbabe9
+SHA1 (patch-modules_javafx.web_src_main_native_Source_WebKitLegacy_scripts_check-xcfilelists.sh) = bbb9462132ff67dcb27689d64653551ddd8c5b0b
+SHA1 (patch-modules_javafx.web_src_main_native_Source_WebKitLegacy_scripts_generate-unified-sources.sh) = 26993bf489e14d9187cdb63135ea22c9b44f9e4f
+SHA1 (patch-modules_javafx.web_src_main_native_Tools_DumpRenderTree_Scripts_check-xcfilelists.sh) = a92eecfe47f57ef6a981bd0ca2f3f54545d5c10b
diff --git a/openjfx23/files/netbsd.gradle b/openjfx23/files/netbsd.gradle
new file mode 100644
index 0000000000..d4b80bf5b2
--- /dev/null
+++ b/openjfx23/files/netbsd.gradle
@@ -0,0 +1,296 @@
+/*
+ * Copyright (c) 2013, 2024, 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.NETBSD = [:]
+
+// Declare whether this particular target file applies to the current system
+NETBSD.canBuild = IS_NETBSD;
+if (!NETBSD.canBuild) return;
+
+// All desktop related packages should be built
+NETBSD.compileSwing = true;
+NETBSD.compileSWT = true;
+
+// Libraries end up in the lib/$OS_ARCH directory for Linux
+NETBSD.libDest = "lib"
+
+// Lambda for naming the generated libs
+NETBSD.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", "-Werror=trampolines"] // warning flags
+
+if (OS_ARCH == "i386") {
+ commonFlags += "-m32"
+}
+
+if (IS_STATIC_BUILD) {
+ commonFlags += "-DSTATIC_BUILD"
+}
+
+// Specify the compilation parameters and link parameters
+def cppFlags = [
+ commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/netbsd", "-c",
+ "-ffunction-sections", "-fdata-sections",
+ IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
+
+def cFlags = [cppFlags, "-Werror=implicit-function-declaration"].flatten()
+
+def ccFlagsGTK3 = cppFlags
+//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 gtk3CCFlags = [ "-Wno-deprecated-declarations" ];
+def gtk3LinkFlags = [ ];
+
+setupTools("netbsd_gtk3",
+ { propFile ->
+ ByteArrayOutputStream results2 = new ByteArrayOutputStream();
+ exec {
+ commandLine("${toolchainDir}pkg-config", "--cflags", "gtk+-3.0", "gthread-2.0", "xtst", "gio-unix-2.0")
+ 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", "gio-unix-2.0")
+ 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("netbsd_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("netbsd_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 packages 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++";
+
+// Strip native .so shared libraries as a postprocess step when copying them
+NETBSD.strip = "${toolchainDir}strip"
+NETBSD.stripArgs = [ "-x" ]
+
+NETBSD.glass = [:]
+// glassgtk3 support is practically essential for NetBSD.
+NETBSD.glass.variants = ["glass", "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")
+}
+
+NETBSD.glass.glass = [:]
+NETBSD.glass.glass.nativeSource = ft_gtk_launcher.getFiles()
+NETBSD.glass.glass.compiler = compiler
+NETBSD.glass.glass.ccFlags = [cppFlags, "-Werror"].flatten()
+NETBSD.glass.glass.linker = linker
+NETBSD.glass.glass.linkFlags = IS_STATIC_BUILD? linkFlags : [linkFlags, "-lX11"].flatten()
+NETBSD.glass.glass.lib = "glass"
+
+NETBSD.glass.glassgtk3 = [:]
+NETBSD.glass.glassgtk3.nativeSource = ft_gtk.getFiles()
+NETBSD.glass.glassgtk3.compiler = compiler
+NETBSD.glass.glassgtk3.ccFlags = IS_STATIC_BUILD ?
+ ["-fno-threadsafe-statics", cppFlags, gtk3CCFlags].flatten() :
+ [cppFlags, gtk3CCFlags, "-Werror"].flatten()
+NETBSD.glass.glassgtk3.linker = linker
+NETBSD.glass.glassgtk3.linkFlags = IS_STATIC_BUILD ? linkFlags : [linkFlags, gtk3LinkFlags].flatten()
+NETBSD.glass.glassgtk3.lib = "glassgtk3"
+
+NETBSD.decora = [:]
+NETBSD.decora.compiler = compiler
+NETBSD.decora.ccFlags = [cppFlags, "-ffast-math"].flatten()
+NETBSD.decora.linker = linker
+NETBSD.decora.linkFlags = [linkFlags].flatten()
+NETBSD.decora.lib = "decora_sse"
+
+NETBSD.prism = [:]
+NETBSD.prism.nativeSource = file("${project(":graphics").projectDir}/src/main/native-prism")
+NETBSD.prism.compiler = compiler
+NETBSD.prism.ccFlags = [cFlags, "-DINLINE=inline"].flatten()
+NETBSD.prism.linker = linker
+NETBSD.prism.linkFlags = [linkFlags].flatten()
+NETBSD.prism.lib = "prism_common"
+
+NETBSD.prismSW = [:]
+NETBSD.prismSW.nativeSource = file("${project(":graphics").projectDir}/src/main/native-prism-sw")
+NETBSD.prismSW.compiler = compiler
+NETBSD.prismSW.ccFlags = [cFlags, "-DINLINE=inline"].flatten()
+NETBSD.prismSW.linker = linker
+NETBSD.prismSW.linkFlags = [linkFlags].flatten()
+NETBSD.prismSW.lib = "prism_sw"
+
+NETBSD.iio = [:]
+NETBSD.iio.nativeSource = [
+ file("${project("graphics").projectDir}/src/main/native-iio"),
+ file("${project("graphics").projectDir}/src/main/native-iio/libjpeg")]
+NETBSD.iio.compiler = compiler
+NETBSD.iio.ccFlags = [cFlags, "-fvisibility=hidden"].flatten()
+NETBSD.iio.linker = IS_STATIC_BUILD ? "ld" : linker
+NETBSD.iio.linkFlags = [linkFlags].flatten()
+NETBSD.iio.lib = "javafx_iio"
+
+NETBSD.prismES2 = [:]
+NETBSD.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")
+]
+NETBSD.prismES2.compiler = compiler
+NETBSD.prismES2.ccFlags = ["-DLINUX", cFlags].flatten()
+NETBSD.prismES2.linker = linker
+NETBSD.prismES2.linkFlags =IS_STATIC_BUILD ? linkFlags : [linkFlags, "-lX11", "-lXxf86vm", "-lGL"].flatten()
+NETBSD.prismES2.lib = "prism_es2"
+
+def closedDir = file("$projectDir/../rt-closed")
+NETBSD.font = [:]
+NETBSD.font.compiler = compiler
+NETBSD.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
+NETBSD.font.ccFlags = ["-DJFXFONT_PLUS", cppFlags].flatten()
+NETBSD.font.linker = linker
+NETBSD.font.linkFlags = [linkFlags].flatten()
+NETBSD.font.lib = "javafx_font"
+
+NETBSD.fontFreetype = [:]
+NETBSD.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
+NETBSD.fontFreetype.compiler = compiler
+NETBSD.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", cFlags, freetypeCCFlags].flatten()
+NETBSD.fontFreetype.linker = linker
+NETBSD.fontFreetype.linkFlags = IS_STATIC_BUILD ? linkFlags : [linkFlags, freetypeLinkFlags].flatten()
+NETBSD.fontFreetype.lib = "javafx_font_freetype"
+
+NETBSD.fontPango = [:]
+NETBSD.fontPango.nativeSource = ["src/main/native-font/pango.c"]
+NETBSD.fontPango.compiler = compiler
+NETBSD.fontPango.ccFlags = ["-DJFXFONT_PLUS", cFlags, pangoCCFlags].flatten()
+NETBSD.fontPango.linker = linker
+NETBSD.fontPango.linkFlags =IS_STATIC_BUILD ? linkFlags : [linkFlags, pangoLinkFlags].flatten()
+NETBSD.fontPango.lib = "javafx_font_pango"
+
+NETBSD.media = [:]
+NETBSD.media.compiler = compiler
+NETBSD.media.linker = linker
+NETBSD.media.ar = "${toolchainDir}ar"
+
+NETBSD.webkit = [:]
+NETBSD.webkit.compiler = compiler
+NETBSD.webkit.linker = linker
+NETBSD.webkit.ccFlags = commonFlags.flatten()
+NETBSD.webkit.linkFlags = linkFlags.flatten()
Home |
Main Index |
Thread Index |
Old Index