1 |
commit: 706f8aefe2cd3b48c7474dec3500e1650115aa4c |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 1 09:31:42 2019 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 1 11:34:59 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=706f8aef |
7 |
|
8 |
dev-java/openjfx: new package |
9 |
|
10 |
Quick howto to get openjdk with integrated javafx |
11 |
1) install openjdk-bin:11 |
12 |
2) install openjfx:11 |
13 |
3) install openjdk:11[javafx], it will pick up jfx libs |
14 |
4) Optional: remove openjdk-bin:11 |
15 |
|
16 |
no need to unmask gentoo-vm flag |
17 |
|
18 |
Bug: https://bugs.gentoo.org/547918 |
19 |
Package-Manager: Portage-2.3.67, Repoman-2.3.13 |
20 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
21 |
|
22 |
dev-java/openjfx/Manifest | 10 + |
23 |
.../openjfx/files/11/disable-buildSrc-tests.patch | 13 ++ |
24 |
.../openjfx/files/11/fix-build-on-gradle-5x.patch | 23 +++ |
25 |
.../openjfx/files/11/glibc-compatibility.patch | 15 ++ |
26 |
.../openjfx/files/11/respect-user-cflags.patch | 227 +++++++++++++++++++++ |
27 |
dev-java/openjfx/files/11/use-system-swt-jar.patch | 25 +++ |
28 |
dev-java/openjfx/metadata.xml | 19 ++ |
29 |
dev-java/openjfx/openjfx-11.0.3_p1.ebuild | 218 ++++++++++++++++++++ |
30 |
8 files changed, 550 insertions(+) |
31 |
|
32 |
diff --git a/dev-java/openjfx/Manifest b/dev-java/openjfx/Manifest |
33 |
new file mode 100644 |
34 |
index 00000000000..f582a7dc84d |
35 |
--- /dev/null |
36 |
+++ b/dev-java/openjfx/Manifest |
37 |
@@ -0,0 +1,10 @@ |
38 |
+DIST ST4-4.0.8.jar 239543 BLAKE2B 72d257c6d0f1b3bde0afce805128dd38d8520b2073377bbb995fed3b4e18a3ea69d508d6d7554755ec68bf50940082b896ed89998a5178272d24376404b389c5 SHA512 9877289297cd5b15ad464a19467699387f57c510fe8a476e07e9d2334bd11933f9bdb9c6caa4972d4d4c84b56740c6d885cd39300dd7ce35b7c5bde536238086 |
39 |
+DIST antlr-complete-3.5.2.jar 2456317 BLAKE2B d9afa08ad98dbff16d30425b97a0ddac7402055916e6a7dd290c3b9a2b26a4751c02f405d8d13c186333430c370c94bd73419b14c8e46df2971f68536cc484a0 SHA512 560f208e38759b5e626de56816e1fce9c191c526c04ca782513859d468ac444d1e8e62c03870a68f8f9d8daee0f45fca465150e2bbfc71b46e46b952519044b1 |
40 |
+DIST gradle-4.8-bin.zip 75885015 BLAKE2B eb6592afe122690f5e013abec2821beabac070563556ceec67ce02506582d4d9ac9c5d9f97ad2c464e442446f26ff90e9ead2c04e462a564411259564e3332c6 SHA512 4b351c9c5b0970bafb3b2b9b9e2ec9f37ff681cc3ac30004852d712cf8bb83061211a58e5b1f101813cde6a0aec914badf4ef0a806eec603418b851b64a06882 |
41 |
+DIST gunit-3.5.2.jar 287425 BLAKE2B 86e759c5bb164758b689d93bef4b6a0bcb39eb9fee28d2a8dc113a4c97e5e8516b55ada87c27738ffa0fc512805caa338d8649f6f5c9ba36490c4c3ebed86fdd SHA512 c9f14dacec2f22f62b7d3849d1c0e9d626b3dc20eb74a85b32f1901f6279b7b84af095107128bcbe80c49ac05448a713309b60d0c3d2f88e0bca8a14690292b2 |
42 |
+DIST lucene-core-7.1.0.jar 2779248 BLAKE2B 9edea1cfdeca2f2ec9e5c014e575774dc32fa5cf12ba02fd419fc252da10c03cd9f6cda989203211de4bc2ffcd2e79e8b97914e9792951bb0877a203760f07ad SHA512 0cd96016de2bc7ad94779e30348c443cf6028119fdae42c6f29e33d84495876a7519640f20680762324ea40c42e21b595f79cd606a6142b9875501f1e9179678 |
43 |
+DIST lucene-grouping-7.1.0.jar 87200 BLAKE2B 93f4ca6938b3fbc74752e22ee9d53022a60c57489017985448ddff46bc8c527b72e615e5f28d0301c28dc8119f0e6c75f4e8a711df3e6aaa418190b8ac8d1857 SHA512 41a85eafde03718efba7cf22598a430efbc6a6a68cf68058988f9eff648d19faa6cc4cf68293fe6e39783a7636eae571f27e04006f4607250dd9f6642184c61d |
44 |
+DIST lucene-queries-7.1.0.jar 243126 BLAKE2B 166c3efea04c19314be7fd8c1d6b1378b2b967243289d9bded5e9768cb441a35fabbe63641d00b72a8c14aace0bad402df49c21b853f620bf81bc1e829dcecdb SHA512 34df5eccf0577ed037ef347adc9c2552c49d57e35dbff629fdbb860926765be48f8b06fd693bdacfc2edcd9c6ad711c13fe98e5317cb1d1f2157dcab938e34ea |
45 |
+DIST lucene-queryparser-7.1.0.jar 384680 BLAKE2B adce2572de9f534323eead31dd30f97b853b2d5e4be6828c415f0c647460c361e00680d856ff9ffbba0fe45c3e4a425d68938a3d2dc01c76491bb65673e120fa SHA512 7151ef899e318679995138262c3450577ae33580708864581dc22a027f43ca4989825d434680925547e3c04ad4453a454e7045f605d7eee0da57d63db978ed68 |
46 |
+DIST lucene-sandbox-7.1.0.jar 182914 BLAKE2B 70c795f84d8f0908abe47db77f632eeb6571a77e1445b8ab04a75080cea40e3b8171071965ff7fd9f6d39a450dd33144e922d19c1f07c605de54b45e3e881323 SHA512 6faf9fd9c7c082bf062adb6a28d89447e6e27152eb3f0a325081e5f791196e5440334632ccbf9c458940220676f7e73390a174889d9b7a656d088b3dade5d500 |
47 |
+DIST openjfx-11.0.3_p1.tar.bz2 63272033 BLAKE2B 574a622b2b2587fcdc64c91cfef0fbcc6d97baa7827e84a540bf1c8493b9fbc3629bd131e5c0972fb82687d194ceb527dfdedd6c2a00edc16d9a76850699f9b6 SHA512 8f8e07d7588b1a5fbcdfcc2837ae0389fefea3a1d91f89fdd4aab03e0bc6f5b9a1e66a824ae9388b777b36e76beb19cb6c69c963c7d904d36cad40f36c5ef0c7 |
48 |
|
49 |
diff --git a/dev-java/openjfx/files/11/disable-buildSrc-tests.patch b/dev-java/openjfx/files/11/disable-buildSrc-tests.patch |
50 |
new file mode 100644 |
51 |
index 00000000000..39e24710799 |
52 |
--- /dev/null |
53 |
+++ b/dev-java/openjfx/files/11/disable-buildSrc-tests.patch |
54 |
@@ -0,0 +1,13 @@ |
55 |
+Description: Disables the buildSrc tests to work around a Gradle bug (UnsupportedOperationException: Cannot nest operations in the same thread) |
56 |
+Author: Emmanuel Bourg <ebourg@××××××.org> |
57 |
+Forwarded: not-needed |
58 |
+--- a/buildSrc/build.gradle |
59 |
++++ b/buildSrc/build.gradle |
60 |
+@@ -81,6 +81,7 @@ |
61 |
+ // Java 7 but when we switch to 8 this will be needed, and probably again when |
62 |
+ // we start building with Java 9. |
63 |
+ test { |
64 |
++ enabled = false; |
65 |
+ enableAssertions = true; |
66 |
+ testLogging.exceptionFormat = "full"; |
67 |
+ scanForTestClasses = false; |
68 |
|
69 |
diff --git a/dev-java/openjfx/files/11/fix-build-on-gradle-5x.patch b/dev-java/openjfx/files/11/fix-build-on-gradle-5x.patch |
70 |
new file mode 100644 |
71 |
index 00000000000..51fde6ad39a |
72 |
--- /dev/null |
73 |
+++ b/dev-java/openjfx/files/11/fix-build-on-gradle-5x.patch |
74 |
@@ -0,0 +1,23 @@ |
75 |
+From 2f74649395f0242d08b95572b7b30246457b1d6b Mon Sep 17 00:00:00 2001 |
76 |
+From: Ty Young <BlueGoliath@××××××××××××××××××××.com> |
77 |
+Date: Mon, 3 Dec 2018 20:34:07 -0600 |
78 |
+Subject: [PATCH] Remove final from HashSet instance |
79 |
+ |
80 |
+Removes final from HashSet instance at about line 107 which causes build failure |
81 |
+--- |
82 |
+ .../main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy | 2 +- |
83 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
84 |
+ |
85 |
+diff --git a/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy b/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy |
86 |
+index 10a85d62d1..13d573fe6e 100644 |
87 |
+--- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy |
88 |
++++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy |
89 |
+@@ -102,7 +102,7 @@ class NativeCompileTask extends DefaultTask { |
90 |
+ updateFiles(); |
91 |
+ def source = project.files(allFiles); |
92 |
+ boolean forceCompile = false; |
93 |
+- final Set<File> files = new HashSet<File>(); |
94 |
++ Set<File> files = new HashSet<File>(); |
95 |
+ source.each { File file -> |
96 |
+ final Map fileData = dependencies.get(file.toString()); |
97 |
+ final boolean isModified = fileData == null || |
98 |
|
99 |
diff --git a/dev-java/openjfx/files/11/glibc-compatibility.patch b/dev-java/openjfx/files/11/glibc-compatibility.patch |
100 |
new file mode 100644 |
101 |
index 00000000000..e7e9b173bb4 |
102 |
--- /dev/null |
103 |
+++ b/dev-java/openjfx/files/11/glibc-compatibility.patch |
104 |
@@ -0,0 +1,15 @@ |
105 |
+Description: Fixes the compatibility with the version of glibc in Debian |
106 |
+Author: Emmanuel Bourg <ebourg@××××××.org> |
107 |
+Forwarded: https://bugs.openjdk.java.net/browse/JDK-8211399 |
108 |
+--- a/modules/javafx.web/src/main/native/Source/ThirdParty/libxslt/src/libxslt/xsltlocale.h |
109 |
++++ b/modules/javafx.web/src/main/native/Source/ThirdParty/libxslt/src/libxslt/xsltlocale.h |
110 |
+@@ -25,9 +25,6 @@ |
111 |
+ #ifdef HAVE_LOCALE_H |
112 |
+ #include <locale.h> |
113 |
+ #endif |
114 |
+-#ifdef HAVE_XLOCALE_H |
115 |
+-#include <xlocale.h> |
116 |
+-#endif |
117 |
+ |
118 |
+ typedef locale_t xsltLocale; |
119 |
+ typedef xmlChar xsltLocaleChar; |
120 |
|
121 |
diff --git a/dev-java/openjfx/files/11/respect-user-cflags.patch b/dev-java/openjfx/files/11/respect-user-cflags.patch |
122 |
new file mode 100644 |
123 |
index 00000000000..2339f905b7f |
124 |
--- /dev/null |
125 |
+++ b/dev-java/openjfx/files/11/respect-user-cflags.patch |
126 |
@@ -0,0 +1,227 @@ |
127 |
+From a28f9aaab759d82384279c16d86bb98ab47412a3 Mon Sep 17 00:00:00 2001 |
128 |
+From: Georgy Yakovlev <gyakovlev@g.o> |
129 |
+Date: Sat, 1 Jun 2019 00:12:55 -0700 |
130 |
+Subject: [PATCH] respect user cflags |
131 |
+ |
132 |
+--- |
133 |
+ buildSrc/linux.gradle | 7 ++++++- |
134 |
+ .../gstreamer/projects/linux/avplugin/Makefile | 16 ++++++---------- |
135 |
+ .../gstreamer/projects/linux/fxplugins/Makefile | 17 ++++++----------- |
136 |
+ .../projects/linux/gstreamer-lite/Makefile | 16 ++++++---------- |
137 |
+ .../native/jfxmedia/projects/linux/Makefile | 16 ++++++---------- |
138 |
+ 5 files changed, 30 insertions(+), 42 deletions(-) |
139 |
+ |
140 |
+diff --git a/buildSrc/linux.gradle b/buildSrc/linux.gradle |
141 |
+index 7a7cbc72..6705a0f3 100644 |
142 |
+--- a/buildSrc/linux.gradle |
143 |
++++ b/buildSrc/linux.gradle |
144 |
+@@ -44,8 +44,11 @@ LINUX.library = { name -> return "lib${name}.so" as String } |
145 |
+ def commonFlags = [ |
146 |
+ "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags |
147 |
+ "-fstack-protector", |
148 |
++ "-Wno-error=cast-function-type", |
149 |
+ "-Wextra", "-Wall", "-Wformat-security", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags |
150 |
+ |
151 |
++commonFlags.addAll(System.getenv("CFLAGS").trim().split(" ")) |
152 |
++ |
153 |
+ if (!IS_64) { |
154 |
+ commonFlags += "-m32" |
155 |
+ } |
156 |
+@@ -61,6 +64,8 @@ def linkFlags = ["-static-libgcc", "-static-libstdc++", "-shared", commonFlags, |
157 |
+ "-z", "relro", |
158 |
+ "-Wl,--gc-sections"].flatten() |
159 |
+ |
160 |
++linkFlags.addAll(System.getenv("LDFLAGS").trim().split(" ")) |
161 |
++ |
162 |
+ if (IS_DEBUG_NATIVE) { |
163 |
+ linkFlags += "-g" |
164 |
+ } |
165 |
+@@ -294,7 +299,7 @@ LINUX.iio.nativeSource = [ |
166 |
+ LINUX.iio.compiler = compiler |
167 |
+ LINUX.iio.ccFlags = [ccFlags].flatten() |
168 |
+ LINUX.iio.linker = linker |
169 |
+-LINUX.iio.linkFlags = [linkFlags].flatten() |
170 |
++LINUX.iio.linkFlags = [linkFlags, "-ljpeg"].flatten() |
171 |
+ LINUX.iio.lib = "javafx_iio" |
172 |
+ |
173 |
+ LINUX.prismES2 = [:] |
174 |
+diff --git a/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile b/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile |
175 |
+index 450b55d3..f27b9479 100644 |
176 |
+--- a/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile |
177 |
++++ b/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile |
178 |
+@@ -17,7 +17,7 @@ TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so |
179 |
+ OBJBASE_DIR = $(BUILD_DIR)/obj/plugins/avplugin |
180 |
+ endif |
181 |
+ |
182 |
+-CFLAGS = -fPIC \ |
183 |
++CFLAGS := -fPIC \ |
184 |
+ -Wformat \ |
185 |
+ -Wextra \ |
186 |
+ -Wformat-security \ |
187 |
+@@ -29,13 +29,8 @@ CFLAGS = -fPIC \ |
188 |
+ -DLINUX \ |
189 |
+ -DGST_DISABLE_LOADSAVE \ |
190 |
+ -DGSTREAMER_LITE \ |
191 |
+- -ffunction-sections -fdata-sections |
192 |
+- |
193 |
+-ifeq ($(BUILD_TYPE), Release) |
194 |
+- CFLAGS += -Os |
195 |
+-else |
196 |
+- CFLAGS += -g -Wall |
197 |
+-endif |
198 |
++ -ffunction-sections -fdata-sections \ |
199 |
++ ${CFLAGS} |
200 |
+ |
201 |
+ PACKAGES_INCLUDES := $(shell pkg-config --cflags glib-2.0) |
202 |
+ PACKAGES_LIBS := $(shell pkg-config --libs glib-2.0 gobject-2.0) |
203 |
+@@ -46,11 +41,12 @@ INCLUDES= -I../../../plugins \ |
204 |
+ -I../../../gstreamer-lite/gstreamer/libs \ |
205 |
+ $(PACKAGES_INCLUDES) |
206 |
+ |
207 |
+-LDFLAGS = -L$(BUILD_DIR) \ |
208 |
++LDFLAGS := -L$(BUILD_DIR) \ |
209 |
+ -lgstreamer-lite \ |
210 |
+ $(PACKAGES_LIBS) \ |
211 |
+ -z relro \ |
212 |
+- -static-libgcc -static-libstdc++ -Wl,--gc-sections |
213 |
++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ |
214 |
++ ${LDFLAGS} |
215 |
+ |
216 |
+ ifneq ($(strip $(LIBAV_DIR)),) |
217 |
+ INCLUDES += -I$(LIBAV_DIR)/include |
218 |
+diff --git a/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile b/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile |
219 |
+index 1e58d4d3..627865f9 100644 |
220 |
+--- a/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile |
221 |
++++ b/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile |
222 |
+@@ -14,7 +14,7 @@ DIRLIST = progressbuffer \ |
223 |
+ |
224 |
+ TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so |
225 |
+ |
226 |
+-CFLAGS = -fPIC \ |
227 |
++CFLAGS := -fPIC \ |
228 |
+ -Wformat \ |
229 |
+ -Wextra \ |
230 |
+ -Wformat-security \ |
231 |
+@@ -30,14 +30,8 @@ CFLAGS = -fPIC \ |
232 |
+ -DGST_DISABLE_LOADSAVE \ |
233 |
+ -DGST_DISABLE_GST_DEBUG \ |
234 |
+ -DGSTREAMER_LITE \ |
235 |
+- -ffunction-sections -fdata-sections |
236 |
+- |
237 |
+-ifeq ($(BUILD_TYPE), Release) |
238 |
+- CFLAGS += -Os |
239 |
+-else |
240 |
+- CFLAGS += -g -Wall |
241 |
+-endif |
242 |
+- |
243 |
++ -ffunction-sections -fdata-sections \ |
244 |
++ ${CFLAGS} |
245 |
+ |
246 |
+ INCLUDES = -I$(SRCBASE_DIR) \ |
247 |
+ $(addprefix -I$(SRCBASE_DIR)/,$(DIRLIST)) \ |
248 |
+@@ -47,9 +41,10 @@ INCLUDES = -I$(SRCBASE_DIR) \ |
249 |
+ PACKAGES_INCLUDES := $(shell pkg-config --cflags glib-2.0) |
250 |
+ PACKAGES_LIBS := $(shell pkg-config --libs glib-2.0 gobject-2.0) |
251 |
+ |
252 |
+-LDFLAGS = -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \ |
253 |
++LDFLAGS := -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \ |
254 |
+ -z relro \ |
255 |
+- -static-libgcc -static-libstdc++ -Wl,--gc-sections |
256 |
++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ |
257 |
++ ${LDFLAGS} |
258 |
+ |
259 |
+ ifeq ($(ARCH), x32) |
260 |
+ CFLAGS += -m32 |
261 |
+diff --git a/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile b/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile |
262 |
+index 5baa30a1..ddf0e521 100644 |
263 |
+--- a/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile |
264 |
++++ b/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile |
265 |
+@@ -37,7 +37,7 @@ DIRLIST = gstreamer/gst \ |
266 |
+ |
267 |
+ TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so |
268 |
+ |
269 |
+-CFLAGS =-fPIC \ |
270 |
++CFLAGS :=-fPIC \ |
271 |
+ -Wformat \ |
272 |
+ -Wextra \ |
273 |
+ -Wformat-security \ |
274 |
+@@ -51,13 +51,8 @@ CFLAGS =-fPIC \ |
275 |
+ -DLINUX \ |
276 |
+ -DGST_DISABLE_GST_DEBUG \ |
277 |
+ -DGST_DISABLE_LOADSAVE \ |
278 |
+- -ffunction-sections -fdata-sections |
279 |
+- |
280 |
+-ifeq ($(BUILD_TYPE), Release) |
281 |
+- CFLAGS += -Os |
282 |
+-else |
283 |
+- CFLAGS += -g -Wall |
284 |
+-endif |
285 |
++ -ffunction-sections -fdata-sections \ |
286 |
++ ${CFLAGS} |
287 |
+ |
288 |
+ INCLUDES = -I$(BASE_DIR)/plugins \ |
289 |
+ -I$(SRCBASE_DIR)/projects/build/linux/common \ |
290 |
+@@ -75,9 +70,10 @@ INCLUDES = -I$(BASE_DIR)/plugins \ |
291 |
+ PACKAGES_INCLUDES := $(shell pkg-config --cflags alsa glib-2.0) |
292 |
+ PACKAGES_LIBS := $(shell pkg-config --libs alsa glib-2.0 gobject-2.0 gmodule-2.0 gthread-2.0) |
293 |
+ |
294 |
+-LDFLAGS = -L$(BUILD_DIR) -lm $(PACKAGES_LIBS) \ |
295 |
++LDFLAGS := -L$(BUILD_DIR) -lm $(PACKAGES_LIBS) \ |
296 |
+ -z relro \ |
297 |
+- -static-libgcc -static-libstdc++ -Wl,--gc-sections |
298 |
++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ |
299 |
++ ${LDFLAGS} |
300 |
+ |
301 |
+ ifeq ($(ARCH), x32) |
302 |
+ CFLAGS += -m32 |
303 |
+diff --git a/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile b/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile |
304 |
+index ecbd859f..5881cf53 100644 |
305 |
+--- a/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile |
306 |
++++ b/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile |
307 |
+@@ -17,7 +17,7 @@ DIRLIST = jni \ |
308 |
+ |
309 |
+ TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so |
310 |
+ |
311 |
+-CFLAGS = -DTARGET_OS_LINUX=1 \ |
312 |
++CFLAGS := -DTARGET_OS_LINUX=1 \ |
313 |
+ -D_GNU_SOURCE \ |
314 |
+ -DGST_REMOVE_DEPRECATED \ |
315 |
+ -DGST_DISABLE_GST_DEBUG \ |
316 |
+@@ -26,7 +26,8 @@ CFLAGS = -DTARGET_OS_LINUX=1 \ |
317 |
+ -DHAVE_CONFIG_H \ |
318 |
+ -DJFXMEDIA_JNI_EXPORTS \ |
319 |
+ -DLINUX \ |
320 |
+- -ffunction-sections -fdata-sections |
321 |
++ -ffunction-sections -fdata-sections \ |
322 |
++ ${CFLAGS} |
323 |
+ |
324 |
+ CPPFLAGS = -fno-rtti -ffunction-sections -fdata-sections |
325 |
+ |
326 |
+@@ -56,21 +57,16 @@ ifdef HOST_COMPILE |
327 |
+ -I$(GSTREAMER_LITE_DIR)/gstreamer/libs \ |
328 |
+ $(PACKAGES_INCLUDES) |
329 |
+ |
330 |
+- LDFLAGS = -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \ |
331 |
++ LDFLAGS := -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \ |
332 |
+ -z relro \ |
333 |
+- -static-libgcc -static-libstdc++ -Wl,--gc-sections |
334 |
++ -static-libgcc -static-libstdc++ -Wl,--gc-sections \ |
335 |
++ ${LDFLAGS} |
336 |
+ else |
337 |
+ CFLAGS += $(EXTRA_CFLAGS) |
338 |
+ INCLUDES = $(BASE_INCLUDES) |
339 |
+ LDFLAGS = -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) $(EXTRA_LDFLAGS) |
340 |
+ endif |
341 |
+ |
342 |
+-ifeq ($(BUILD_TYPE), Release) |
343 |
+- CFLAGS += -Os |
344 |
+-else |
345 |
+- CFLAGS += -g -Wall -D_DEBUG |
346 |
+-endif |
347 |
+- |
348 |
+ ifeq ($(ARCH), x32) |
349 |
+ CFLAGS += -m32 |
350 |
+ LDFLAGS += -m32 |
351 |
+-- |
352 |
+2.21.0 |
353 |
+ |
354 |
|
355 |
diff --git a/dev-java/openjfx/files/11/use-system-swt-jar.patch b/dev-java/openjfx/files/11/use-system-swt-jar.patch |
356 |
new file mode 100644 |
357 |
index 00000000000..34b4245bf0a |
358 |
--- /dev/null |
359 |
+++ b/dev-java/openjfx/files/11/use-system-swt-jar.patch |
360 |
@@ -0,0 +1,25 @@ |
361 |
+From c7a04feac8281cd3e53c8d0215a229bb6cd4fce8 Mon Sep 17 00:00:00 2001 |
362 |
+From: Georgy Yakovlev <gyakovlev@g.o> |
363 |
+Date: Sat, 1 Jun 2019 00:36:04 -0700 |
364 |
+Subject: [PATCH] use system swt jar |
365 |
+ |
366 |
+--- |
367 |
+ build.gradle | 2 +- |
368 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
369 |
+ |
370 |
+diff --git a/build.gradle b/build.gradle |
371 |
+index 1e414b7..3d967bb 100644 |
372 |
+--- a/build.gradle |
373 |
++++ b/build.gradle |
374 |
+@@ -2477,7 +2477,7 @@ project(":swt") { |
375 |
+ commonModuleSetup(project, [ 'base', 'graphics' ]) |
376 |
+ |
377 |
+ dependencies { |
378 |
+- compile name: SWT_FILE_NAME |
379 |
++ compile files("__gentoo_swt_jar__") |
380 |
+ } |
381 |
+ |
382 |
+ classes { |
383 |
+-- |
384 |
+2.21.0 |
385 |
+ |
386 |
|
387 |
diff --git a/dev-java/openjfx/metadata.xml b/dev-java/openjfx/metadata.xml |
388 |
new file mode 100644 |
389 |
index 00000000000..3ae08214552 |
390 |
--- /dev/null |
391 |
+++ b/dev-java/openjfx/metadata.xml |
392 |
@@ -0,0 +1,19 @@ |
393 |
+<?xml version="1.0" encoding="UTF-8"?> |
394 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
395 |
+<pkgmetadata> |
396 |
+ <maintainer type="person"> |
397 |
+ <email>gyakovlev@g.o</email> |
398 |
+ <name>Georgy Yakovlev</name> |
399 |
+ </maintainer> |
400 |
+ <maintainer type="project"> |
401 |
+ <email>java@g.o</email> |
402 |
+ </maintainer> |
403 |
+ <longdescription lang="en"> |
404 |
+ OpenJFX is an open source, next generation client application platform for desktop, |
405 |
+ mobile and embedded systems built on Java. |
406 |
+ </longdescription> |
407 |
+ <use> |
408 |
+ <flag name="media">Compile media module, based on gstreamer-minimal (does not pull gstreamer)</flag> |
409 |
+ <flag name="source">Install JavaFX sources</flag> |
410 |
+ </use> |
411 |
+</pkgmetadata> |
412 |
|
413 |
diff --git a/dev-java/openjfx/openjfx-11.0.3_p1.ebuild b/dev-java/openjfx/openjfx-11.0.3_p1.ebuild |
414 |
new file mode 100644 |
415 |
index 00000000000..24ca44ce797 |
416 |
--- /dev/null |
417 |
+++ b/dev-java/openjfx/openjfx-11.0.3_p1.ebuild |
418 |
@@ -0,0 +1,218 @@ |
419 |
+# Copyright 2019 Gentoo Authors |
420 |
+# Distributed under the terms of the GNU General Public License v2 |
421 |
+ |
422 |
+EAPI=6 |
423 |
+ |
424 |
+MY_PV=${PV/_p/+} |
425 |
+SLOT=${MY_PV%%[.+]*} |
426 |
+EGRADLE_VER="4.8" |
427 |
+ |
428 |
+inherit java-pkg-2 multiprocessing |
429 |
+ |
430 |
+DESCRIPTION="Java OpenJFX 8 client application platform" |
431 |
+HOMEPAGE="https://openjfx.io" |
432 |
+ |
433 |
+SRC_URI="https://hg.openjdk.java.net/${PN}/${SLOT}/rt/archive/${MY_PV}.tar.bz2 -> ${P}.tar.bz2 |
434 |
+ https://downloads.gradle.org/distributions/gradle-${EGRADLE_VER}-bin.zip |
435 |
+ https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-sandbox/7.1.0/lucene-sandbox-7.1.0.jar |
436 |
+ https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-grouping/7.1.0/lucene-grouping-7.1.0.jar |
437 |
+ https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-queryparser/7.1.0/lucene-queryparser-7.1.0.jar |
438 |
+ https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-queries/7.1.0/lucene-queries-7.1.0.jar |
439 |
+ https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-core/7.1.0/lucene-core-7.1.0.jar |
440 |
+ https://repo.maven.apache.org/maven2/org/antlr/gunit/3.5.2/gunit-3.5.2.jar |
441 |
+ https://repo.maven.apache.org/maven2/org/antlr/antlr-complete/3.5.2/antlr-complete-3.5.2.jar |
442 |
+ https://repo.maven.apache.org/maven2/org/antlr/ST4/4.0.8/ST4-4.0.8.jar |
443 |
+" |
444 |
+ |
445 |
+LICENSE="GPL-2-with-classpath-exception" |
446 |
+SLOT="$(ver_cut 1)" |
447 |
+KEYWORDS="-* ~amd64" |
448 |
+ |
449 |
+IUSE="cpu_flags_x86_sse2 debug doc source +media" |
450 |
+ |
451 |
+RDEPEND=" |
452 |
+ dev-java/swt:4.10[cairo,opengl] |
453 |
+ dev-libs/atk |
454 |
+ dev-libs/glib:2 |
455 |
+ dev-libs/libxml2:2 |
456 |
+ dev-libs/libxslt |
457 |
+ media-libs/freetype:2 |
458 |
+ media-libs/fontconfig:1.0 |
459 |
+ media-video/ffmpeg:0= |
460 |
+ x11-libs/gdk-pixbuf |
461 |
+ x11-libs/gtk+:2 |
462 |
+ x11-libs/gtk+:3 |
463 |
+ x11-libs/cairo[glib] |
464 |
+ x11-libs/libX11 |
465 |
+ x11-libs/libXtst |
466 |
+ x11-libs/libXxf86vm |
467 |
+ x11-libs/pango |
468 |
+ virtual/jpeg |
469 |
+ virtual/opengl |
470 |
+ || ( |
471 |
+ dev-java/openjdk-bin:${SLOT}[doc?] |
472 |
+ dev-java/openjdk:${SLOT}[doc?] |
473 |
+ ) |
474 |
+" |
475 |
+ |
476 |
+DEPEND="${RDEPEND} |
477 |
+ app-arch/unzip |
478 |
+ app-arch/zip |
479 |
+ >=dev-java/ant-core-1.10.5-r2:0 |
480 |
+ dev-java/antlr:0 |
481 |
+ dev-java/antlr:3.5 |
482 |
+ dev-java/hamcrest-core:0 |
483 |
+ dev-java/stringtemplate:0 |
484 |
+ virtual/ttf-fonts |
485 |
+ virtual/pkgconfig |
486 |
+" |
487 |
+ |
488 |
+REQUIRED_USE="cpu_flags_x86_sse2" |
489 |
+ |
490 |
+PATCHES=( |
491 |
+ "${FILESDIR}"/11/disable-buildSrc-tests.patch |
492 |
+ "${FILESDIR}"/11/glibc-compatibility.patch |
493 |
+ "${FILESDIR}"/11/respect-user-cflags.patch |
494 |
+ "${FILESDIR}"/11/use-system-swt-jar.patch |
495 |
+ "${FILESDIR}"/11/fix-build-on-gradle-5x.patch |
496 |
+) |
497 |
+ |
498 |
+S="${WORKDIR}/rt-${MY_PV}" |
499 |
+ |
500 |
+egradle() { |
501 |
+ local GRADLE_HOME="${WORKDIR}/gradle-${EGRADLE_VER}" |
502 |
+ local gradle="${GRADLE_HOME}/bin/gradle" |
503 |
+ local gradle_args=( |
504 |
+ --info |
505 |
+ --stacktrace |
506 |
+ --no-build-cache |
507 |
+ --no-daemon |
508 |
+ --offline |
509 |
+ --gradle-user-home "${T}/gradle_user_home" |
510 |
+ --project-cache-dir "${T}/gradle_project_cache" |
511 |
+ ) |
512 |
+ |
513 |
+ export GRADLE_HOME |
514 |
+ |
515 |
+ # FIXME: build.gradle believes $ANT_HOME/bin/ant shoud exist |
516 |
+ unset ANT_HOME |
517 |
+ |
518 |
+ einfo "gradle "${gradle_args[@]}" ${@}" |
519 |
+ "${gradle}" "${gradle_args[@]}" ${@} || die "gradle failed" |
520 |
+} |
521 |
+ |
522 |
+pkg_setup() { |
523 |
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}" |
524 |
+ JAVA_PKG_WANT_SOURCE="${SLOT}" |
525 |
+ JAVA_PKG_WANT_TARGET="${SLOT}" |
526 |
+ |
527 |
+ # The nastiness below is necessary while the gentoo-vm USE flag is |
528 |
+ # masked. First we call java-pkg-2_pkg_setup if it looks like the |
529 |
+ # flag was unmasked against one of the possible build VMs. If not, |
530 |
+ # we try finding one of them in their expected locations. This would |
531 |
+ # have been slightly less messy if openjdk-bin had been installed to |
532 |
+ # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env |
533 |
+ # file but disable it so that it would not normally be selectable. |
534 |
+ |
535 |
+ local vm |
536 |
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do |
537 |
+ if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then |
538 |
+ java-pkg-2_pkg_setup |
539 |
+ return |
540 |
+ fi |
541 |
+ done |
542 |
+ |
543 |
+ if has_version --host-root dev-java/openjdk:${SLOT}; then |
544 |
+ export JAVA_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} |
545 |
+ export JDK_HOME="${JAVA_HOME}" |
546 |
+ export ANT_RESPECT_JAVA_HOME=ture |
547 |
+ |
548 |
+ else |
549 |
+ if [[ ${MERGE_TYPE} != "binary" ]]; then |
550 |
+ JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) |
551 |
+ [[ -n ${JDK_HOME} ]] || die "Build VM not found!" |
552 |
+ JDK_HOME=${JDK_HOME#*/} |
553 |
+ JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} |
554 |
+ export JDK_HOME |
555 |
+ export JAVA_HOME="${JDK_HOME}" |
556 |
+ export ANT_RESPECT_JAVA_HOME=ture |
557 |
+ fi |
558 |
+ fi |
559 |
+} |
560 |
+ |
561 |
+src_unpack() { |
562 |
+ unpack "${P}.tar.bz2" |
563 |
+ unpack "gradle-${EGRADLE_VER}-bin.zip" |
564 |
+ |
565 |
+ mkdir "${T}/jars" || die |
566 |
+ |
567 |
+ local line jar |
568 |
+ for line in ${SRC_URI}; do |
569 |
+ if [[ ${line} =~ (http|https)://[a-zA-Z0-9.-_]*/(maven2|m2|eclipse)/(.*[.]jar)$ ]]; then |
570 |
+ jar=$(basename "${BASH_REMATCH[-1]}") |
571 |
+ cp -v "${DISTDIR}/${jar}" "${T}/jars/" || die |
572 |
+ fi |
573 |
+ done |
574 |
+} |
575 |
+ |
576 |
+src_prepare() { |
577 |
+ default |
578 |
+ |
579 |
+ local d="${T}/jars" |
580 |
+ |
581 |
+ java-pkg_jar-from --build-only --with-dependencies --into "${d}" antlr |
582 |
+ java-pkg_jar-from --build-only --with-dependencies --into "${d}" antlr-3.5 |
583 |
+ java-pkg_jar-from --build-only --with-dependencies --into "${d}" stringtemplate |
584 |
+ java-pkg_jar-from --build-only --with-dependencies --into "${d}" hamcrest-core |
585 |
+ |
586 |
+ sed -i "s#__gentoo_swt_jar__#$(java-pkg_getjars swt-4.10)#" "${S}"/build.gradle || die |
587 |
+} |
588 |
+ |
589 |
+src_configure() { |
590 |
+ #FIXME: still calls gcc, pkg-config etc by name without chost prefix |
591 |
+ #FIXME: should we enable webkit? doubt so |
592 |
+ |
593 |
+ # build is very sensetive to doc presense, take extra steps |
594 |
+ local jdk_doc |
595 |
+ if has_version --host-root dev-java/openjdk:${SLOT}[doc]; then |
596 |
+ jdk_doc="${EROOT%/}/usr/share/doc/openjdk-${SLOT}/html/api" |
597 |
+ elif has_version --host-root dev-java/java-sdk-docs:${SLOT}; then |
598 |
+ jdk_doc="${EROOT%/}/usr/share/doc/java-sdk-docs-${SLOT}/html/api" |
599 |
+ fi |
600 |
+ [[ -r ${jdk_doc}/element-list ]] || die "JDK Docs not found, terminating build early" |
601 |
+ |
602 |
+ cat <<- _EOF_ > "${S}"/gradle.properties |
603 |
+ COMPILE_TARGETS = linux |
604 |
+ COMPILE_WEBKIT = false |
605 |
+ COMPILE_MEDIA = $(usex media true false) |
606 |
+ JDK_DOCS = https://docs.oracle.com/en/java/javase/${SLOT}/docs/api |
607 |
+ JDK_DOCS_LINK = $(usex doc "${jdk_doc}" "") |
608 |
+ BUILD_LIBAV_STUBS = false |
609 |
+ GRADLE_VERSION_CHECK = false |
610 |
+ LINT = none |
611 |
+ CONF = $(usex debug DebugNative Release) |
612 |
+ NUM_COMPILE_THREADS = $(makeopts_jobs) |
613 |
+ JFX_DEPS_URL = ${T}/jars |
614 |
+ COMPANY_NAME = "Gentoo" |
615 |
+ _EOF_ |
616 |
+} |
617 |
+ |
618 |
+src_compile() { |
619 |
+ egradle zips $(usex doc "" "--exclude-task javadoc") |
620 |
+} |
621 |
+ |
622 |
+src_install() { |
623 |
+ if ! use source ; then |
624 |
+ rm -v build/sdk/lib/src.zip || die |
625 |
+ fi |
626 |
+ |
627 |
+ insinto "/usr/$(get_libdir)/${PN}-${SLOT}" |
628 |
+ doins -r build/sdk/. |
629 |
+ doins build/javafx-exports.zip |
630 |
+ |
631 |
+ if use doc; then |
632 |
+ insinto /usr/share/doc/"${PF}"/html |
633 |
+ doins -r build/javadoc/. |
634 |
+ dosym /usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}" |
635 |
+ fi |
636 |
+} |