From 97a50ef2c878c63f972704e031c6d2b88aa265cf Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Thu, 25 Jan 2024 03:27:52 +0100 Subject: [PATCH] Duplicate openjfx:8, implement ant-core changes --- dev-java/openjfx/Manifest | 3 + .../0000-Fix-wait-call-in-PosixPlatform.patch | 14 ++ .../openjfx/files/8/0001-Change-Lucene.patch | 79 +++++++ ...-between-incompatible-function-types.patch | 77 +++++++ .../files/8/0004-Fix-Compilation-Flags.patch | 23 ++ .../8/0005-don-t-include-xlocale.h.patch | 25 ++ ...06-disable-architecture-verification.patch | 21 ++ .../openjfx/files/8/10-javadoc-locale.patch | 21 ++ dev-java/openjfx/files/8/99-sysdeps.patch | 30 +++ dev-java/openjfx/files/8/Wno-error.patch | 90 ++++++++ .../files/8/disable-online-repos.patch | 54 +++++ .../openjfx/files/8/don-t-force-msse.patch | 51 +++++ ...-don-t-include-obsolete-sys-sysctl.h.patch | 24 ++ dev-java/openjfx/files/8/respect_flags.patch | 213 ++++++++++++++++++ dev-java/openjfx/metadata.xml | 19 ++ dev-java/openjfx/openjfx-8.1000-r2.ebuild | 195 ++++++++++++++++ 16 files changed, 939 insertions(+) create mode 100644 dev-java/openjfx/Manifest create mode 100644 dev-java/openjfx/files/8/0000-Fix-wait-call-in-PosixPlatform.patch create mode 100644 dev-java/openjfx/files/8/0001-Change-Lucene.patch create mode 100644 dev-java/openjfx/files/8/0003-fix-cast-between-incompatible-function-types.patch create mode 100644 dev-java/openjfx/files/8/0004-Fix-Compilation-Flags.patch create mode 100644 dev-java/openjfx/files/8/0005-don-t-include-xlocale.h.patch create mode 100644 dev-java/openjfx/files/8/06-disable-architecture-verification.patch create mode 100644 dev-java/openjfx/files/8/10-javadoc-locale.patch create mode 100644 dev-java/openjfx/files/8/99-sysdeps.patch create mode 100644 dev-java/openjfx/files/8/Wno-error.patch create mode 100644 dev-java/openjfx/files/8/disable-online-repos.patch create mode 100644 dev-java/openjfx/files/8/don-t-force-msse.patch create mode 100644 dev-java/openjfx/files/8/fxpackager-don-t-include-obsolete-sys-sysctl.h.patch create mode 100644 dev-java/openjfx/files/8/respect_flags.patch create mode 100644 dev-java/openjfx/metadata.xml create mode 100644 dev-java/openjfx/openjfx-8.1000-r2.ebuild diff --git a/dev-java/openjfx/Manifest b/dev-java/openjfx/Manifest new file mode 100644 index 0000000..12fe484 --- /dev/null +++ b/dev-java/openjfx/Manifest @@ -0,0 +1,3 @@ +DIST gradle-4.10.3-bin.zip 78422006 BLAKE2B f565e591751acb5b05c261b3d8dbc8e07f76b48c73516f6cb1b2846ebf0bbf38000b9a61790e9b3055bddd9f9846d61979d187f4a30c317a1de98546891d9d2d SHA512 fd3f4cfbd5262cc8514b7fb3e303ef46b9ca4b22901f1fe848ec4679f8d6bc283bde12ec584437624f0acf5486e5663966ad0736bf8ab341ac3e2667f514ceec +DIST openjfx-8.1000-backports.tar.bz2 9142182 BLAKE2B 58ea420ec015c49d2755105a3d11675a92ecab337c7bda5a1ad72e84d0b35f04ed4252cee24da89b1e7b1b5b8b8b9fea7db93364434800246b87827b21970cc3 SHA512 077392368947cb9da1b5c7e14b641d6edcddd9821eb4f16dbea33e8986568211e93799aca29e70b490c8ef2125d69f8372abd1b1ce428a95420f62ff15c414d6 +DIST openjfx-8.1000.tar.bz2 62286455 BLAKE2B c9a714a618d9ae02768dae6128756d64b2b6299a36a6ad9828bf2213dc641cbbcaa2d3f3e0b4913bb60893419a2d5c730ca2db88f759bbd94b3e83112199278c SHA512 6049730b72e569939fed3d62b46a409e949b4c2309f4355253c8c891799c7fb5138e20aa217454fbbd78b1dd99c254b34b3fe6c9cbb35854bd8656993655bf32 diff --git a/dev-java/openjfx/files/8/0000-Fix-wait-call-in-PosixPlatform.patch b/dev-java/openjfx/files/8/0000-Fix-wait-call-in-PosixPlatform.patch new file mode 100644 index 0000000..fee211f --- /dev/null +++ b/dev-java/openjfx/files/8/0000-Fix-wait-call-in-PosixPlatform.patch @@ -0,0 +1,14 @@ +--- rt-8u202-b02/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp 2018-10-29 16:26:04.000000000 +0100 ++++ rt-8u202-b02-patched/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp 2018-11-27 15:34:52.170181958 +0100 +@@ -232,10 +232,7 @@ + pid_t wpid = 0; + + //TODO Use waitpid instead of wait +-#ifdef LINUX +- wait(&status); +-#endif +-#ifdef MAC ++#if defined(LINUX) || defined(MAC) + wpid = wait(&status); + #endif + diff --git a/dev-java/openjfx/files/8/0001-Change-Lucene.patch b/dev-java/openjfx/files/8/0001-Change-Lucene.patch new file mode 100644 index 0000000..58d0c80 --- /dev/null +++ b/dev-java/openjfx/files/8/0001-Change-Lucene.patch @@ -0,0 +1,79 @@ +--- rt-8u202-b02/build.gradle ++++ rt-8u202-b02-patched/build.gradle +@@ -3268,38 +3268,38 @@ + // The apps build is Ant based, and gradle lets us "import" ant build.xml + // into our configuration. + +- ant.importBuild 'build.xml' ++ //ant.importBuild 'build.xml' + + // Download the Lucene libraries needed for the Ensemble8 app +- def luceneVersion = "7.4.0" +- getConfigurations().create("lucene"); +- dependencies { +- lucene group: "org.apache.lucene", name: "lucene-core", version: luceneVersion +- lucene group: "org.apache.lucene", name: "lucene-grouping", version: luceneVersion +- lucene group: "org.apache.lucene", name: "lucene-queryparser", version: luceneVersion +- } ++ //def luceneVersion = "7.4.0" ++ //getConfigurations().create("lucene"); ++ //dependencies { ++ // lucene group: "org.apache.lucene", name: "lucene-core", version: luceneVersion ++ // lucene group: "org.apache.lucene", name: "lucene-grouping", version: luceneVersion ++ // lucene group: "org.apache.lucene", name: "lucene-queryparser", version: luceneVersion ++ //} + + // Copy Lucene libraries into the Ensemble8/lib directory +- File ensembleLibDir = rootProject.file("apps/samples/Ensemble8/lib"); +- def libNames = [ "lucene-core-${luceneVersion}.jar", +- "lucene-grouping-${luceneVersion}.jar", +- "lucene-queryparser-${luceneVersion}.jar" ] +- +- +- task getLucene(type: Copy) { +- doFirst { +- ensembleLibDir.mkdirs(); +- } +- into ensembleLibDir +- includeEmptyDirs = false +- configurations.lucene.files.each { f -> +- libNames.each { name -> +- if (name == f.getName()) { +- from f.getPath() +- } +- } +- } +- } ++ //File ensembleLibDir = rootProject.file("apps/samples/Ensemble8/lib"); ++ //def libNames = [ "lucene-core-${luceneVersion}.jar", ++ // "lucene-grouping-${luceneVersion}.jar", ++ // "lucene-queryparser-${luceneVersion}.jar" ] ++ ++ ++ //task getLucene(type: Copy) { ++ // doFirst { ++ // ensembleLibDir.mkdirs(); ++ // } ++ // into ensembleLibDir ++ // includeEmptyDirs = false ++ // configurations.lucene.files.each { f -> ++ // libNames.each { name -> ++ // if (name == f.getName()) { ++ // from f.getPath() ++ // } ++ // } ++ // } ++ //} + + compileTargets { t -> + // The apps build is Ant based, and gradle lets us "import" ant apps/build.xml +@@ -3310,7 +3310,7 @@ + def jfxrtJar = "${rootProject.buildDir}/${sdkDirName}/rt/lib/ext/jfxrt.jar" + + def appsJar = project.task("appsJar${t.capital}") { +- dependsOn(sdk, getLucene) ++ dependsOn(sdk) + doLast() { + ant.properties['targetBld'] = "$t.name" + if (!rootProject.ext[t.upper].compileSwing) { + diff --git a/dev-java/openjfx/files/8/0003-fix-cast-between-incompatible-function-types.patch b/dev-java/openjfx/files/8/0003-fix-cast-between-incompatible-function-types.patch new file mode 100644 index 0000000..011e952 --- /dev/null +++ b/dev-java/openjfx/files/8/0003-fix-cast-between-incompatible-function-types.patch @@ -0,0 +1,77 @@ +From 36b952bdcdc301a600009308bff90440b6ceab5b Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Thu, 21 Jun 2018 15:57:01 +0100 +Subject: [PATCH 4/4] fix cast between incompatible function types + +--- + modules/graphics/src/main/native-glass/gtk/glass_dnd.cpp | 8 ++++++-- + .../src/main/native-glass/gtk/glass_window_ime.cpp | 9 +++------ + 2 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/modules/graphics/src/main/native-glass/gtk/glass_dnd.cpp b/modules/graphics/src/main/native-glass/gtk/glass_dnd.cpp +index f85b1dae..3b9225f7 100644 +--- a/modules/graphics/src/main/native-glass/gtk/glass_dnd.cpp ++++ b/modules/graphics/src/main/native-glass/gtk/glass_dnd.cpp +@@ -556,7 +556,7 @@ static GdkDragContext *get_drag_context() { + return ctx; + } + +-static gboolean dnd_finish_callback() { ++static gboolean dnd_finish_callback(gpointer data) { + if (dnd_window) { + dnd_set_performed_action( + translate_gdk_action_to_glass( +@@ -1079,6 +1079,10 @@ gboolean DragView::get_drag_image_offset(int* x, int* y) { + return offset_set; + } + ++static void on_pixbuf_destroy_notify(guchar *pixels, gpointer data) { ++ g_free(pixels); ++} ++ + GdkPixbuf* DragView::get_drag_image(gboolean* is_raw_image, gint* width, gint* height) { + GdkPixbuf *pixbuf = NULL; + gboolean is_raw = FALSE; +@@ -1106,7 +1110,7 @@ GdkPixbuf* DragView::get_drag_image(gboolean* is_raw_image, gint* width, gint* h + if (data) { + memcpy(data, (raw + whsz), nraw - whsz); + pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, TRUE, 8, +- w, h, w * 4, (GdkPixbufDestroyNotify) g_free, NULL); ++ w, h, w * 4, (GdkPixbufDestroyNotify) on_pixbuf_destroy_notify, NULL); + } + } + } +diff --git a/modules/graphics/src/main/native-glass/gtk/glass_window_ime.cpp b/modules/graphics/src/main/native-glass/gtk/glass_window_ime.cpp +index 82e54d11..51af2a6a 100644 +--- a/modules/graphics/src/main/native-glass/gtk/glass_window_ime.cpp ++++ b/modules/graphics/src/main/native-glass/gtk/glass_window_ime.cpp +@@ -122,15 +122,12 @@ bool WindowContextBase::filterIME(GdkEvent * event) { + } + } + +-//Note: this function must return int, despite the fact it doesn't conform to XIMProc type. +-// This is required in documentation of XIM +-static int im_preedit_start(XIM im_xim, XPointer client, XPointer call) { ++static void im_preedit_start(XIM im_xim, XPointer client, XPointer call) { + (void)im_xim; + (void)call; + + mainEnv->CallVoidMethod((jobject) client, jViewNotifyPreeditMode, JNI_TRUE); +- CHECK_JNI_EXCEPTION_RET(mainEnv, -1); +- return -1; // No restrictions ++ CHECK_JNI_EXCEPTION(mainEnv); + } + + static void im_preedit_done(XIM im_xim, XPointer client, XPointer call) { +@@ -234,7 +231,7 @@ void WindowContextBase::enableOrResetIME() { + return; + } + +- XIMCallback startCallback = {(XPointer) jview, (XIMProc) im_preedit_start}; ++ XIMCallback startCallback = {(XPointer) jview, im_preedit_start}; + XIMCallback doneCallback = {(XPointer) jview, im_preedit_done}; + XIMCallback drawCallback = {(XPointer) jview, im_preedit_draw}; + XIMCallback caretCallback = {(XPointer) jview, im_preedit_caret}; +-- +2.17.1 + diff --git a/dev-java/openjfx/files/8/0004-Fix-Compilation-Flags.patch b/dev-java/openjfx/files/8/0004-Fix-Compilation-Flags.patch new file mode 100644 index 0000000..17c91ab --- /dev/null +++ b/dev-java/openjfx/files/8/0004-Fix-Compilation-Flags.patch @@ -0,0 +1,23 @@ +--- rt-8u202-b07/buildSrc/linux.gradle ++++ rt-8u202-b07-patched/buildSrc/linux.gradle +@@ -54,7 +54,7 @@ + def ccFlags = [ + commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c", + "-ffunction-sections", "-fdata-sections", +- IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten() ++ IS_DEBUG_NATIVE ? ["-ggdb", "-DNDEBUG"] : ["-O2", "-DNDEBUG"]].flatten() + def ccFlagsGTK3 = ccFlags + //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"]) + def linkFlags = ["-static-libgcc", "-static-libstdc++", "-shared", commonFlags, + +--- rt-8u202-b07/buildSrc/x86egl.gradle ++++ rt-8u202-b07-patched/buildSrc/x86egl.gradle +@@ -99,7 +99,7 @@ + def ccFlags = [ + commonFlags, + "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c", +- IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten() ++ IS_DEBUG_NATIVE ? ["-ggdb", "-DNDEBUG"] : ["-O2", "-DNDEBUG"]].flatten() + //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"]) + def linkFlags = ["-shared", commonFlags].flatten() + diff --git a/dev-java/openjfx/files/8/0005-don-t-include-xlocale.h.patch b/dev-java/openjfx/files/8/0005-don-t-include-xlocale.h.patch new file mode 100644 index 0000000..883c3da --- /dev/null +++ b/dev-java/openjfx/files/8/0005-don-t-include-xlocale.h.patch @@ -0,0 +1,25 @@ +From 597f200762be416d5a62f1efd351cba6e47c1c4c Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Thu, 30 May 2019 12:07:30 -0700 +Subject: [PATCH] don't include xlocale.h + +--- + .../gstreamer/3rd_party/glib/glib-2.56.1/glib/gstrfuncs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.56.1/glib/gstrfuncs.c b/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.56.1/glib/gstrfuncs.c +index 72dc1301..32669789 100644 +--- a/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.56.1/glib/gstrfuncs.c ++++ b/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.56.1/glib/gstrfuncs.c +@@ -39,7 +39,7 @@ + + #ifdef HAVE_XLOCALE_H + /* Needed on BSD/OS X for e.g. strtod_l */ +-#include ++#include + #endif + + #ifdef G_OS_WIN32 +-- +2.21.0 + diff --git a/dev-java/openjfx/files/8/06-disable-architecture-verification.patch b/dev-java/openjfx/files/8/06-disable-architecture-verification.patch new file mode 100644 index 0000000..d10e628 --- /dev/null +++ b/dev-java/openjfx/files/8/06-disable-architecture-verification.patch @@ -0,0 +1,21 @@ +Description: Disable the architecture verification which is limited to i386 and amd64 +Author: Emmanuel Bourg +Forwarded: no +--- a/build.gradle ++++ b/build.gradle +@@ -699,6 +699,7 @@ + // 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_WINDOWS && OS_ARCH != "x86" && OS_ARCH != "amd64") { + throw new Exception("Unknown and unsupported build architecture: $OS_ARCH") +@@ -707,6 +708,7 @@ + } else if (IS_LINUX && OS_ARCH != "i386" && OS_ARCH != "amd64") { + throw new Exception("Unknown and unsupported build architecture: $OS_ARCH") + } ++*/ + + // Sanity check that we actually have a list of compile targets to execute + if (COMPILE_TARGETS == null || COMPILE_TARGETS == "") { diff --git a/dev-java/openjfx/files/8/10-javadoc-locale.patch b/dev-java/openjfx/files/8/10-javadoc-locale.patch new file mode 100644 index 0000000..39d346a --- /dev/null +++ b/dev-java/openjfx/files/8/10-javadoc-locale.patch @@ -0,0 +1,21 @@ +Description: Set the locale of the javadoc to make the build reproducible +Author: Emmanuel Bourg +Forwarded: no +--- a/build.gradle ++++ b/build.gradle +@@ -1218,6 +1218,7 @@ + } else { + options.links(JDK_DOCS); + } ++ options.locale("en"); + options.addBooleanOption("XDignore.symbol.file").setValue(true); + options.addBooleanOption("Xdoclint:none").setValue(!IS_DOC_LINT); + options.addBooleanOption("javafx").setValue(true); +@@ -2769,6 +2770,7 @@ + options.windowTitle("${javadocTitle}") + options.header("${javadocHeader}") + options.bottom("${javadocBottom}") ++ options.locale("en"); + if (BUILD_CLOSED) { + options.linksOffline(JDK_DOCS, JDK_DOCS_CLOSED); + } else { diff --git a/dev-java/openjfx/files/8/99-sysdeps.patch b/dev-java/openjfx/files/8/99-sysdeps.patch new file mode 100644 index 0000000..367d939 --- /dev/null +++ b/dev-java/openjfx/files/8/99-sysdeps.patch @@ -0,0 +1,30 @@ +diff --git a/build.gradle b/build.gradle +index 0914d7d..6bd9e78 100644 +--- a/build.gradle ++++ b/build.gradle +@@ -1309,6 +1309,7 @@ project(":graphics") { + 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 group: "antlr", name: "antlr", version: "2.7.7" + } + + // Create a single "native" task which will depend on all the individual native tasks for graphics +diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle +index 25f88d1..642450d 100644 +--- a/buildSrc/build.gradle ++++ b/buildSrc/build.gradle +@@ -82,10 +82,13 @@ getConfigurations().create("antlr3"); + + dependencies { + compile group: "org.antlr", name: "antlr", version: "3.1.3" ++ compile group: "org.antlr", name: "antlr-runtime", version: "3.1.3" ++ compile group: "org.antlr", name: "stringtemplate", version: "3.2" + testCompile group: "junit", name: "junit", version: "4.8.2" + antlr3 group: "org.antlr", name: "antlr-runtime", version: "3.1.3" + antlr3 group: "org.antlr", name: "stringtemplate", version: "3.2" + antlr3 group: "org.antlr", name: "antlr", version: "3.1.3" ++ antlr3 group: "antlr", name: "antlr", version: "2.7.7" + } + + // At the moment the ASM library shipped with Gradle that is used to diff --git a/dev-java/openjfx/files/8/Wno-error.patch b/dev-java/openjfx/files/8/Wno-error.patch new file mode 100644 index 0000000..edc9389 --- /dev/null +++ b/dev-java/openjfx/files/8/Wno-error.patch @@ -0,0 +1,90 @@ +From 822bf818933311327c5b73cb1b185484f22f55fb Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Sun, 26 Apr 2020 21:15:36 -0700 +Subject: [PATCH] Wno-error + +--- + buildSrc/armv5sf.gradle | 1 - + buildSrc/armv6hf.gradle | 1 - + buildSrc/armv6sf.gradle | 1 - + buildSrc/armv7hf.gradle | 1 - + buildSrc/armv7sf.gradle | 1 - + buildSrc/linux.gradle | 6 +++--- + buildSrc/x86egl.gradle | 1 - + 7 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/buildSrc/armv5sf.gradle b/buildSrc/armv5sf.gradle +index ee154182..bee6003e 100644 +--- a/buildSrc/armv5sf.gradle ++++ b/buildSrc/armv5sf.gradle +@@ -135,7 +135,6 @@ def dfbLFlags = ["-ldl"] + def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() + def monocleCFlags = [ + extraCFlags, +- "-Werror", + "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); + def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() + def glassCFlags = ["-ffast-math"] +diff --git a/buildSrc/armv6hf.gradle b/buildSrc/armv6hf.gradle +index dfdff237..0f090f23 100644 +--- a/buildSrc/armv6hf.gradle ++++ b/buildSrc/armv6hf.gradle +@@ -131,7 +131,6 @@ def extraLFlags = [ + def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() + def monocleCFlags = [ + extraCFlags, +- "-Werror", + "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); + def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() + +diff --git a/buildSrc/armv6sf.gradle b/buildSrc/armv6sf.gradle +index ee6615f0..6ebbdd90 100644 +--- a/buildSrc/armv6sf.gradle ++++ b/buildSrc/armv6sf.gradle +@@ -135,7 +135,6 @@ def dfbLFlags = ["-ldl"] + def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() + def monocleCFlags = [ + extraCFlags, +- "-Werror", + "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); + def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() + def glassCFlags = ["-ffast-math"] +diff --git a/buildSrc/armv7hf.gradle b/buildSrc/armv7hf.gradle +index e75bf8a9..092be817 100644 +--- a/buildSrc/armv7hf.gradle ++++ b/buildSrc/armv7hf.gradle +@@ -131,7 +131,6 @@ def extraLFlags = [ + def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() + def monocleCFlags = [ + extraCFlags, +- "-Werror", + "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); + def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() + +diff --git a/buildSrc/armv7sf.gradle b/buildSrc/armv7sf.gradle +index 0bb8a530..38e98303 100644 +--- a/buildSrc/armv7sf.gradle ++++ b/buildSrc/armv7sf.gradle +@@ -135,7 +135,6 @@ def dfbLFlags = ["-ldl"] + def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() + def monocleCFlags = [ + extraCFlags, +- "-Werror", + "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); + def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() + def glassCFlags = ["-ffast-math"] +diff --git a/buildSrc/x86egl.gradle b/buildSrc/x86egl.gradle +index 6bf6196b..ff24207d 100644 +--- a/buildSrc/x86egl.gradle ++++ b/buildSrc/x86egl.gradle +@@ -118,7 +118,6 @@ def extraLFlags = [ + def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() + def monocleCFlags = [ + extraCFlags, +- "-Werror", + "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); + def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() + +-- +2.26.2 + diff --git a/dev-java/openjfx/files/8/disable-online-repos.patch b/dev-java/openjfx/files/8/disable-online-repos.patch new file mode 100644 index 0000000..6b0afe4 --- /dev/null +++ b/dev-java/openjfx/files/8/disable-online-repos.patch @@ -0,0 +1,54 @@ +diff --git a/build.gradle b/build.gradle +index df82f63..3f920b6 100644 +--- a/build.gradle ++++ b/build.gradle +@@ -1135,17 +1135,17 @@ allprojects { + // "artifact" in the pattern below. Note that the closed builds use different repositories + // so if you are debugging a closed-build artifact related build issue, check out the + // closed gradle file instead. +- if (!BUILD_CLOSED) { +- repositories { +- mavenCentral() +- ivy { +- url "http://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/" +- layout "pattern", { +- artifact "[artifact].[ext]" +- } +- } +- } +- } ++ // if (!BUILD_CLOSED) { ++ // repositories { ++ // mavenCentral() ++ // ivy { ++ // url "http://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/" ++ // layout "pattern", { ++ // artifact "[artifact].[ext]" ++ // } ++ // } ++ // } ++ // } + + // We want to configure all projects as java projects and use the same compile settings + // etc, except for the root project which we just want to ignore (and for now media) +@@ -1785,13 +1785,13 @@ project(":fxpackager") { + } + // fxpackager has a dependency on ant in order to build the ant jar, + // and as such needs to point to the apache binary repository +- if (!BUILD_CLOSED) { +- repositories { +- maven { +- url "https://repository.apache.org" +- } +- } +- } ++ // if (!BUILD_CLOSED) { ++ // repositories { ++ // maven { ++ // url "https://repository.apache.org" ++ // } ++ // } ++ // } + + dependencies { + compile group: "org.apache.ant", name: "ant", version: "1.8.2" diff --git a/dev-java/openjfx/files/8/don-t-force-msse.patch b/dev-java/openjfx/files/8/don-t-force-msse.patch new file mode 100644 index 0000000..2f5d567 --- /dev/null +++ b/dev-java/openjfx/files/8/don-t-force-msse.patch @@ -0,0 +1,51 @@ +From 6483d73551590e8036cd5ec6d317e8114b403f36 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Sun, 26 Apr 2020 20:57:39 -0700 +Subject: [PATCH] don't force msse + +--- + .../main/native/gstreamer/projects/linux/avplugin/Makefile | 1 - + .../native/gstreamer/projects/linux/fxplugins/Makefile | 1 - + .../media/src/main/native/jfxmedia/projects/linux/Makefile | 1 - + modules/web/src/main/native/Tools/Scripts/webkitdirs.pm | 7 ------- + 4 files changed, 10 deletions(-) + +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile +index df9f7f21..f82f0537 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile +@@ -28,7 +28,6 @@ CFLAGS = -fPIC \ + -Wformat-security \ + -Werror=implicit-function-declaration \ + -fstack-protector \ +- -msse2 \ + -fbuiltin \ + -DHAVE_STDINT_H \ + -DLINUX \ +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile +index fd3847d0..3887ac6d 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile +@@ -25,7 +25,6 @@ CFLAGS = -fPIC \ + -Wformat-security \ + -Werror=implicit-function-declaration \ + -fstack-protector \ +- -msse2 \ + -fbuiltin \ + -DHAVE_STDINT_H \ + -DLINUX \ +diff --git a/modules/media/src/main/native/jfxmedia/projects/linux/Makefile b/modules/media/src/main/native/jfxmedia/projects/linux/Makefile +index 3d089501..10fad68f 100644 +--- a/modules/media/src/main/native/jfxmedia/projects/linux/Makefile ++++ b/modules/media/src/main/native/jfxmedia/projects/linux/Makefile +@@ -44,7 +44,6 @@ ifdef HOST_COMPILE + -Wformat-security \ + -fstack-protector \ + -Werror=implicit-function-declaration \ +- -msse2 \ + -DGSTREAMER_LITE + + INCLUDES = $(BASE_INCLUDES) \ +-- +2.26.2 + diff --git a/dev-java/openjfx/files/8/fxpackager-don-t-include-obsolete-sys-sysctl.h.patch b/dev-java/openjfx/files/8/fxpackager-don-t-include-obsolete-sys-sysctl.h.patch new file mode 100644 index 0000000..a01dd05 --- /dev/null +++ b/dev-java/openjfx/files/8/fxpackager-don-t-include-obsolete-sys-sysctl.h.patch @@ -0,0 +1,24 @@ +From 26d59b7c8cc2b40277756f55387606ba8a852b31 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Fri, 18 Sep 2020 21:43:57 -0700 +Subject: [PATCH] fxpackager: don't include obsolete sys/sysctl.h + +--- + .../fxpackager/src/main/native/library/common/PosixPlatform.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp b/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp +index 5ea3bc6..b5d167b 100644 +--- a/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp ++++ b/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +-- +2.28.0 + diff --git a/dev-java/openjfx/files/8/respect_flags.patch b/dev-java/openjfx/files/8/respect_flags.patch new file mode 100644 index 0000000..2a1b770 --- /dev/null +++ b/dev-java/openjfx/files/8/respect_flags.patch @@ -0,0 +1,213 @@ +From 102cfe6848fe3e67c3d85cca8f3c02c1f316845b Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Thu, 25 Mar 2021 10:06:49 -0700 +Subject: [PATCH] respect flags + +--- + buildSrc/linux.gradle | 4 ++++ + .../gstreamer/projects/linux/avplugin/Makefile | 16 ++++++---------- + .../gstreamer/projects/linux/fxplugins/Makefile | 17 ++++++----------- + .../gstreamer/projects/linux/glib-lite/Makefile | 11 +++-------- + .../projects/linux/gstreamer-lite/Makefile | 16 ++++++---------- + .../gstreamer/projects/linux/libffi/Makefile | 6 ------ + 6 files changed, 25 insertions(+), 45 deletions(-) + +diff --git a/buildSrc/linux.gradle b/buildSrc/linux.gradle +index a8886c16..e2397a54 100644 +--- a/buildSrc/linux.gradle ++++ b/buildSrc/linux.gradle +@@ -46,6 +46,9 @@ def commonFlags = [ + "-fstack-protector", + "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags + ++ ++commonFlags.addAll(System.getenv('CFLAGS').trim().split(" ")) ++ + if (!IS_64) { + commonFlags += "-m32" + } +@@ -61,6 +64,7 @@ def linkFlags = ["-static-libgcc", "-static-libstdc++", "-shared", commonFlags, + "-z", "relro", + "-Wl,--gc-sections"].flatten() + def defaultLinkFlags = linkFlags.flatten() ++linkFlags.addAll(System.getenv('LDFLAGS').trim().split(" ")) + + def toolchainDir + if (hasProperty('toolchainDir')) { +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile +index f82f0537..01e069b1 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile +@@ -22,7 +22,7 @@ TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so + OBJBASE_DIR = $(BUILD_DIR)/obj/plugins/avplugin + endif + +-CFLAGS = -fPIC \ ++CFLAGS := -fPIC \ + -Wformat \ + -Wextra \ + -Wformat-security \ +@@ -34,13 +34,8 @@ CFLAGS = -fPIC \ + -DGST_DISABLE_LOADSAVE \ + -DGSTREAMER_LITE \ + -DG_DISABLE_DEPRECATED \ +- -ffunction-sections -fdata-sections +- +-ifeq ($(BUILD_TYPE), Release) +- CFLAGS += -Os +-else +- CFLAGS += -g -Wall +-endif ++ -ffunction-sections -fdata-sections \ ++ ${CFLAGS} + + INCLUDES= -I../../../plugins \ + -I../../../plugins/av \ +@@ -50,11 +45,12 @@ INCLUDES= -I../../../plugins \ + -I$(GLIB_DIR)/glib \ + -I$(GLIB_DIR)/gmodule + +-LDFLAGS = -L$(BUILD_DIR) \ ++LDFLAGS := -L$(BUILD_DIR) \ + -z relro \ + -lgstreamer-lite \ + -lglib-lite \ +- -static-libgcc -static-libstdc++ -Wl,--gc-sections ++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ ++ ${LDFLAGS} + + ifneq ($(strip $(LIBAV_DIR)),) + INCLUDES += -I$(LIBAV_DIR)/include +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile +index 3887ac6d..99c82718 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile +@@ -19,7 +19,7 @@ DIRLIST = progressbuffer \ + + TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so + +-CFLAGS = -fPIC \ ++CFLAGS := -fPIC \ + -Wformat \ + -Wextra \ + -Wformat-security \ +@@ -35,14 +35,8 @@ CFLAGS = -fPIC \ + -DGST_DISABLE_GST_DEBUG \ + -DGSTREAMER_LITE \ + -DG_DISABLE_DEPRECATED \ +- -ffunction-sections -fdata-sections +- +-ifeq ($(BUILD_TYPE), Release) +- CFLAGS += -Os +-else +- CFLAGS += -g -Wall +-endif +- ++ -ffunction-sections -fdata-sections \ ++ ${CFLAGS} + + INCLUDES = -I$(SRCBASE_DIR) \ + $(addprefix -I$(SRCBASE_DIR)/,$(DIRLIST)) \ +@@ -52,9 +46,10 @@ INCLUDES = -I$(SRCBASE_DIR) \ + -I$(GLIB_DIR)/glib \ + -I$(GLIB_DIR)/gmodule + +-LDFLAGS = -L$(BUILD_DIR) -lgstreamer-lite -lglib-lite \ ++LDFLAGS := -L$(BUILD_DIR) -lgstreamer-lite -lglib-lite \ + -z relro \ +- -static-libgcc -static-libstdc++ -Wl,--gc-sections ++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ ++ ${LDFLAGS} + + ifeq ($(ARCH), x32) + CFLAGS += -m32 +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/glib-lite/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/glib-lite/Makefile +index c5b4b0a6..b0e6d6f9 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/glib-lite/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/glib-lite/Makefile +@@ -40,20 +40,15 @@ CFLAGS += -fPIC \ + -DMATCH_LIMIT=10000000 \ + -DMATCH_LIMIT_RECURSION=10000000 + +-ifeq ($(BUILD_TYPE), Release) +- CFLAGS += -Os +-else +- CFLAGS += -g -Wall +-endif +- + INCLUDES = -I$(SRCBASE_DIR) \ + -I$(SRCBASE_DIR)/glib \ + -I$(SRCBASE_DIR)/build/linux \ + -I$(LIBFFI_DIR)/include + +-LDFLAGS = -L$(BUILD_DIR) -lffi \ ++LDFLAGS := -L$(BUILD_DIR) -lffi \ + -z relro \ +- -static-libgcc -static-libstdc++ -Wl,--gc-sections ++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ ++ ${LDFLAGS} + + ifeq ($(ARCH), x32) + CFLAGS += -m32 +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile +index 8634b559..109375f5 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile +@@ -41,7 +41,7 @@ DIRLIST = gstreamer/gst \ + + TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so + +-CFLAGS =-fPIC \ ++CFLAGS :=-fPIC \ + -Wformat \ + -Wextra \ + -Wformat-security \ +@@ -56,13 +56,8 @@ CFLAGS =-fPIC \ + -DGST_DISABLE_GST_DEBUG \ + -DGST_DISABLE_LOADSAVE \ + -DG_DISABLE_DEPRECATED \ +- -ffunction-sections -fdata-sections +- +-ifeq ($(BUILD_TYPE), Release) +- CFLAGS += -Os +-else +- CFLAGS += -g -Wall +-endif ++ -ffunction-sections -fdata-sections \ ++ ${CFLAGS} + + INCLUDES = -I$(BASE_DIR)/plugins \ + -I$(SRCBASE_DIR)/projects/build/linux/common \ +@@ -83,9 +78,10 @@ INCLUDES = -I$(BASE_DIR)/plugins \ + PACKAGES_INCLUDES := $(shell pkg-config --cflags alsa) + PACKAGES_LIBS := $(shell pkg-config --libs alsa) + +-LDFLAGS = -L$(BUILD_DIR) -lm -lglib-lite $(PACKAGES_LIBS) \ ++LDFLAGS := -L$(BUILD_DIR) -lm -lglib-lite $(PACKAGES_LIBS) \ + -z relro \ +- -static-libgcc -static-libstdc++ -Wl,--gc-sections ++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ ++ ${LDFLAGS} + + ifeq ($(ARCH), x32) + CFLAGS += -m32 +diff --git a/modules/media/src/main/native/gstreamer/projects/linux/libffi/Makefile b/modules/media/src/main/native/gstreamer/projects/linux/libffi/Makefile +index 62f1b802..54e0a63b 100644 +--- a/modules/media/src/main/native/gstreamer/projects/linux/libffi/Makefile ++++ b/modules/media/src/main/native/gstreamer/projects/linux/libffi/Makefile +@@ -20,12 +20,6 @@ CFLAGS += -c \ + -DHAVE_AS_X86_PCREL \ + -DGSTREAMER_LITE + +-ifeq ($(BUILD_TYPE), Release) +- CFLAGS += -Os +-else +- CFLAGS += -O0 -g -Wall +-endif +- + INCLUDES = -I$(SRCBASE_DIR)/include + + C_SOURCES = src/closures.c \ +-- +2.31.0 + diff --git a/dev-java/openjfx/metadata.xml b/dev-java/openjfx/metadata.xml new file mode 100644 index 0000000..06173f6 --- /dev/null +++ b/dev-java/openjfx/metadata.xml @@ -0,0 +1,19 @@ + + + + + gyakovlev@gentoo.org + Georgy Yakovlev + + + java@gentoo.org + + + OpenJFX is an open source, next generation client application platform for desktop, + mobile and embedded systems built on Java. + + + Compile media module, based on gstreamer-minimal (does not pull gstreamer) + Install JavaFX sources + + diff --git a/dev-java/openjfx/openjfx-8.1000-r2.ebuild b/dev-java/openjfx/openjfx-8.1000-r2.ebuild new file mode 100644 index 0000000..46c063a --- /dev/null +++ b/dev-java/openjfx/openjfx-8.1000-r2.ebuild @@ -0,0 +1,195 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" + +inherit flag-o-matic java-pkg-2 java-pkg-simple multiprocessing toolchain-funcs + +EGRADLE_VER="4.10.3" +EHG_COMMIT="9f49e3b6147f" + +DESCRIPTION="Java OpenJFX 8 client application platform" +HOMEPAGE="https://openjfx.io" +SRC_URI=" + https://hg.openjdk.java.net/${PN}/8u-dev/rt/archive/${EHG_COMMIT}.tar.bz2 -> ${P}.tar.bz2 + https://dev.gentoo.org/~gyakovlev/distfiles/${P}-backports.tar.bz2 + https://downloads.gradle.org/distributions/gradle-${EGRADLE_VER}-bin.zip +" +# eclass overrides it, set back to normal +S="${WORKDIR}/${P}" + +LICENSE="GPL-2-with-classpath-exception" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~ppc64" +IUSE="debug doc media cpu_flags_x86_sse2" +REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 )" +RESTRICT="test" # needs junit version we don't have, fragile + +DEPEND=" + app-arch/unzip + >=dev-java/ant-1.8.2:0 + >=dev-java/antlr-2.7.7-r7:0 + dev-java/antlr:3 + dev-java/openjdk:8 + dev-java/stringtemplate:0 + dev-java/swt:4.10[cairo,opengl] + app-alternatives/yacc + app-alternatives/lex + virtual/jdk:1.8 + virtual/pkgconfig +" + +RDEPEND=" + dev-java/swt:4.10[cairo,opengl] + virtual/jre:1.8 +" + +# FIXME: majority of flags are honored, needs a bit more patching +QA_FLAGS_IGNORED=".*" + +JAVA_PKG_WANT_BUILD_VM="openjdk-8" +JAVA_PKG_WANT_SOURCE="1.8" +JAVA_PKG_WANT_TARGET="1.8" + +PATCHES=( + "${FILESDIR}"/8/99-sysdeps.patch + "${FILESDIR}"/8/disable-online-repos.patch + "${FILESDIR}"/8/respect_flags.patch + "${FILESDIR}"/8/0000-Fix-wait-call-in-PosixPlatform.patch + "${FILESDIR}"/8/0001-Change-Lucene.patch + "${FILESDIR}"/8/0003-fix-cast-between-incompatible-function-types.patch + "${FILESDIR}"/8/0004-Fix-Compilation-Flags.patch + "${FILESDIR}"/8/0005-don-t-include-xlocale.h.patch + "${FILESDIR}"/8/06-disable-architecture-verification.patch + "${FILESDIR}"/8/10-javadoc-locale.patch + "${FILESDIR}"/8/Wno-error.patch + "${FILESDIR}"/8/don-t-force-msse.patch + "${FILESDIR}"/8/fxpackager-don-t-include-obsolete-sys-sysctl.h.patch +) + +egradle() { + local GRADLE_HOME="${WORKDIR}/gradle-${EGRADLE_VER}" + local gradle="${GRADLE_HOME}/bin/gradle" + local gradle_args=( + --info + --stacktrace + --no-build-cache + --no-daemon + --offline + --gradle-user-home "${T}/gradle_user_home" + --project-cache-dir "${T}/gradle_project_cache" + ) + + export GRADLE_HOME + + # FIXME: build.gradle believes $ANT_HOME/bin/ant shoud exist + unset ANT_HOME + + einfo "gradle "${gradle_args[@]}" ${@}" + # TERM needed, otherwise gradle may fail on terms it does not know about + TERM="xterm" "${gradle}" "${gradle_args[@]}" ${@} || die "gradle failed" +} + +src_unpack() { + default + mv -v "rt-${EHG_COMMIT}" "${P}" || die +} + +src_prepare() { + eapply "${WORKDIR}/${P}-backports" + default + + # this will create local jar storage to be used as ivy repo + local d="${T}/jars" + mkdir "${d}" || die + + # we need jars subdir in every prokect so gradle can find them + # only system jars, no bundling + local target targets + targets=( + jars + buildSrc/jars + modules/{base,builders,controls,extensions,fxml}/jars + modules/{graphics,jmx,media,swing,swt,web,fxpackager}/jars + ) + einfo "Copying system jars" + for target in ${targets[@]}; do + ln -vs "${T}/jars" "${target}" || die + done + + local swt_file_name="$(java-pkg_getjars swt-4.10)" + java-pkg_jar-from --build-only --into "${d}" ant ant.jar ant-1.8.2.jar + java-pkg_jar-from --build-only --into "${d}" ant ant-launcher.jar ant-launcher-1.8.2.jar + java-pkg_jar-from --build-only --into "${d}" antlr antlr.jar antlr-2.7.7.jar + java-pkg_jar-from --build-only --into "${d}" antlr-3 antlr-tool.jar antlr-3.1.3.jar + java-pkg_jar-from --build-only --into "${d}" antlr-3 antlr-runtime.jar antlr-runtime-3.1.3.jar + java-pkg_jar-from --build-only --into "${d}" stringtemplate stringtemplate.jar stringtemplate-3.2.jar + sed -i "s#compile name: SWT_FILE_NAME#compile files(\"${swt_file_name}\")#" "${S}"/build.gradle || die + + sed -i 's/-rpath/-rpath-link/g' modules/media/src/main/native/jfxmedia/projects/linux/Makefile || die +} + +src_configure() { + # see gradle.properties.template in ${S} + cat <<- _EOF_ > "${S}"/gradle.properties + COMPILE_TARGETS = linux + GRADLE_VERSION_CHECK = false + COMPILE_AVPLUGIN = $(usex media true false) + COMPILE_MEDIA = $(usex media true false) + COMPILE_WEBKIT = false + BUILD_JAVADOC = $(usex doc true false) + BUILD_SRC_ZIP = $(usex source true false) + FULL_TEST = false + CONF = $(usex debug DebugNative Release) + NUM_COMPILE_THREADS = $(makeopts_jobs) + _EOF_ + + local repostring=' + repositories { + ivy { + url file("${projectDir}/jars") + layout "pattern", { + artifact "[artifact]-[revision].[ext]" + artifact "[artifact].[ext]" + } + } + mavenLocal() + }' + + cat <<- _EOF_ > "${S}"/buildSrc/gentoo.gradle + ${repostring} + _EOF_ + + cat <<- _EOF_ > "${S}"/gentoo.gradle + ${repostring} + allprojects { + ${repostring} + } + _EOF_ + + echo "apply from: 'gentoo.gradle'" >> build.gradle || die + echo "apply from: 'gentoo.gradle'" >> buildSrc/build.gradle || die + sed -i 's/mavenCentral/mavenLocal/g' build.gradle || die + sed -i 's/mavenCentral/mavenLocal/g' buildSrc/build.gradle || die + einfo "Configured with the following settings:" + cat gradle.properties || die + +} + +src_compile() { + append-cflags '-fcommon' + tc-export_build_env CC CXX PKG_CONFIG + rm -r tests buildSrc/src/test || die + egradle openExportLinux +} + +src_install() { + local dest="/usr/$(get_libdir)/openjdk-${SLOT}" + local ddest="${ED}${dest}" + dodir "${dest}" + pushd build/export/sdk > /dev/null || die + cp -pPRv * "${ddest}" || die + popd > /dev/null || die +}