From 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Apr 2021 20:21:43 +0100 Subject: gentoo resync : 28.04.2021 --- dev-java/openjfx/Manifest | 9 +- ...07-disable-assembler-on-unsupported-archs.patch | 18 -- dev-java/openjfx/files/8/Wno-error.patch | 31 ---- dev-java/openjfx/openjfx-8.1000.ebuild | 199 ++++++++++++++++++++ dev-java/openjfx/openjfx-8.999.ebuild | 200 --------------------- 5 files changed, 203 insertions(+), 254 deletions(-) delete mode 100644 dev-java/openjfx/files/8/07-disable-assembler-on-unsupported-archs.patch create mode 100644 dev-java/openjfx/openjfx-8.1000.ebuild delete mode 100644 dev-java/openjfx/openjfx-8.999.ebuild (limited to 'dev-java/openjfx') diff --git a/dev-java/openjfx/Manifest b/dev-java/openjfx/Manifest index 6bf843f7755f..530b201cbb86 100644 --- a/dev-java/openjfx/Manifest +++ b/dev-java/openjfx/Manifest @@ -12,10 +12,9 @@ AUX 8/0003-fix-cast-between-incompatible-function-types.patch 3383 BLAKE2B 5a0f9 AUX 8/0004-Fix-Compilation-Flags.patch 1126 BLAKE2B 0f3d17a5ce7c501c55c7af0c39c48eda76812052ebdf0ec315663d71faf8d7435c8a88ca7b28900e512bbe6c6e4ebb7a580aa34ab6f0a1031cabd62180fa4701 SHA512 56a83b8aeae1f2767d1013e1ccab8acc0bbce172148b80c9c6121784f7ea35cc69f5d4a924f74720fe3d5b98bc6128a6db75c6f950a72b17202e5b9078e94d9e AUX 8/0005-don-t-include-xlocale.h.patch 886 BLAKE2B e55a1695618136442f50bb7c57e0928d8a70154d54cdffcb65a5bc8923a967eabcce74f00c7cbf75f1a583a685fac136b3c0433e096df4809c925f80c7d540fc SHA512 a7959a25c3102c022c16cd259152b64f3edbad9085d93d5146cdaa891db1a3e573afcbc47a1ecfc1b338876fd1cac25d22633001cd3357c254f4c6701e8aa531 AUX 8/06-disable-architecture-verification.patch 950 BLAKE2B 7cb4a1bb01d347203c3640c541ceb9d1a88b4e1ce6ba4300153e6b66ee010f96c6c392c86e56049283d49a1a28d2a7818f038481143ef1f0afada7999bc46fb0 SHA512 ee8c18fb10eeabe75cfc1d4894fff21ae9d2b0d34e1ffc596a6e58a8fad6159df9ac2fe13d2bdcbd061295a804c56dd4f98f81696bbe6b3318ed427aaffd08d0 -AUX 8/07-disable-assembler-on-unsupported-archs.patch 664 BLAKE2B 516eff1fca4580ba9073603586d7262d7d7dd0f0f6cf0862d4ca0e967b321a8423be0b7c141c2577a61152132ed45a167bd77a70ee78b53b0d9b078d3863f543 SHA512 96405afc3cf4718b32042e2c373370af219d4d0c52f6d4c63d4f71c22ba962b48603799ea7e3a043ea08ccea0d7e48b85001cf6bd8fd72ba3ce314b59457b948 AUX 8/10-javadoc-locale.patch 768 BLAKE2B e674c8c613eb518dd5de7b6cb253d7f0d6dafd0e8a5f3ae9b619c99b9a87ec0e565f4908aabba8f996d960c2c6fe7010457da5a5bd3c6a9313e9e83843e9df05 SHA512 b97de0f5bcd1a8dcfab8e39694d02c7cdc20619efd5bb1d5fc5928a47e1495e3682ba0474ae064a1db42b9f79d0caab5214747214bacb512ed657773ce510aef AUX 8/99-sysdeps.patch 1467 BLAKE2B afb49b067754e93ea3309b10217fd67589f3838a3772f425fac5f3c985cbca8f305bdedd7b9792059e62046d05687e9652047ff83eff01fe52dd3f5fe5ad86e3 SHA512 26d4ca4cc9c860c5d8d1ca9f2d6a13821498bb0f9a709b46b9e1d6fb04d90e74efb35093c1d084099d71343f158a122a2936297883294bc743a65ae81fff4b74 -AUX 8/Wno-error.patch 5055 BLAKE2B 07061a25ac190d3f0546eb7811b98a1b634d7e58686a48e5de5497fe244076e745250d860d577213a14bbf52e8db3b9e7cadfd78cf74b895d171ef5d9a1cc692 SHA512 cd61c99c275648399a0c779aa8efabd8b58320ac939fc305bbca75f4cb33b7a43246251ef9e3e3848d801a3c3588d4508796a2f97eea94a61d2b3f63906cf423 +AUX 8/Wno-error.patch 3491 BLAKE2B 6f39fe018b8cb3e89d77ee937bba38907115bac7736b44d7da9955a9276d81b4757d64b291256178ee18a33c8e1c837423a57b0026d3eba0225ac7331f8eb629 SHA512 0efd318a36ab69b119b4824c229d89e64205d58d21d2dd44f97d80e3df87e1899ba4e8b7e35e535c0c76ee3f748f750fbee717681d644270333421e0c6dd39e0 AUX 8/disable-online-repos.patch 1886 BLAKE2B 2959fd2d324a66430ada639890de5563c987dfea4878d21666df54d0e107f021dfd47e6c29da44c23b934603f543f839f16af67c9e35526990cf11b6092c0455 SHA512 ce377c6fc25157e4e8b7ebc7a030411cef1c9fe0f8051ec4b02c8c6fa0505adc4ae3ed3a62a562019652b4d9d6279d168c0df1acc5a2a36272fea6fe114aea83 AUX 8/don-t-force-msse.patch 2416 BLAKE2B 20380651c8c05b116aa936776a96b4fab390dce4e054fb75c902a51987a9c7ed9be09d8a419863c7d693e4363c274df65ea3d2fca459379ea3099613590e5e80 SHA512 5a94ed21a7d7ffc55c69f8d956351a0ba162d7ceb7ede5c85e53f39a4c48cd7fc4fea9665d2c60dfe2942250b2fd3be92b79bc47d8ee340a514bb35271ef295c AUX 8/fxpackager-don-t-include-obsolete-sys-sysctl.h.patch 842 BLAKE2B 7c7b5d5291f51dbedba6b836b3adf863533cc1cac53b17ae39e0c045a0d902a622f71339dd31614c6a0a9ca43528f973a037c0e645b9010c90b721c5d468e259 SHA512 ea2f6b9171ba8c19e92b0972e06ac7774bcce3dfd1e76ce845f387670da3894cbb4236fcef4587f1ed4889cf49c777a4e443eea7578fca06ab03a4387bb293f7 @@ -30,8 +29,8 @@ DIST lucene-queries-7.1.0.jar 243126 BLAKE2B 166c3efea04c19314be7fd8c1d6b1378b2b DIST lucene-queryparser-7.1.0.jar 384680 BLAKE2B adce2572de9f534323eead31dd30f97b853b2d5e4be6828c415f0c647460c361e00680d856ff9ffbba0fe45c3e4a425d68938a3d2dc01c76491bb65673e120fa SHA512 7151ef899e318679995138262c3450577ae33580708864581dc22a027f43ca4989825d434680925547e3c04ad4453a454e7045f605d7eee0da57d63db978ed68 DIST lucene-sandbox-7.1.0.jar 182914 BLAKE2B 70c795f84d8f0908abe47db77f632eeb6571a77e1445b8ab04a75080cea40e3b8171071965ff7fd9f6d39a450dd33144e922d19c1f07c605de54b45e3e881323 SHA512 6faf9fd9c7c082bf062adb6a28d89447e6e27152eb3f0a325081e5f791196e5440334632ccbf9c458940220676f7e73390a174889d9b7a656d088b3dade5d500 DIST openjfx-11.0.9_p0.tar.bz2 64148934 BLAKE2B 317fb1c9ea99816ecbd8ab64ed3a6ad0aaa319bedd17bf71ee192c5e610fea14611f3938302f1caf666980bcc7d4787f770e36aec1884a73dac3ddba8e1a878f SHA512 8b6d339131f096b4490d7a8c4a20c15362b4f6c6aa4ddd74f610f3b5a8b8c7aac3ab123dcdd5488cc37dc38f1536ce1db95286f4233ee4db1845d1bd560b2236 -DIST openjfx-8.999-backports.tar.xz 2794912 BLAKE2B cdcef2e443dce274b90ce5d0d148e7d10e73eebd9a62ec1514bc13017defa624ce6486f00de80f03d055d2294c9656de9bd3965bb07393d4397a201023a52a69 SHA512 eabbce2f230ef37d392d564d272a95d0f5225cfad0441268b020200e63fbb15b1883df3f21b5f75e34e8b2cf61bc3d843451315a51f1ec2cd487abaae3ee7893 -DIST openjfx-8.999.tar.bz2 62286455 BLAKE2B c9a714a618d9ae02768dae6128756d64b2b6299a36a6ad9828bf2213dc641cbbcaa2d3f3e0b4913bb60893419a2d5c730ca2db88f759bbd94b3e83112199278c SHA512 6049730b72e569939fed3d62b46a409e949b4c2309f4355253c8c891799c7fb5138e20aa217454fbbd78b1dd99c254b34b3fe6c9cbb35854bd8656993655bf32 +DIST openjfx-8.1000-backports.tar.bz2 9142182 BLAKE2B 58ea420ec015c49d2755105a3d11675a92ecab337c7bda5a1ad72e84d0b35f04ed4252cee24da89b1e7b1b5b8b8b9fea7db93364434800246b87827b21970cc3 SHA512 077392368947cb9da1b5c7e14b641d6edcddd9821eb4f16dbea33e8986568211e93799aca29e70b490c8ef2125d69f8372abd1b1ce428a95420f62ff15c414d6 +DIST openjfx-8.1000.tar.bz2 62286455 BLAKE2B c9a714a618d9ae02768dae6128756d64b2b6299a36a6ad9828bf2213dc641cbbcaa2d3f3e0b4913bb60893419a2d5c730ca2db88f759bbd94b3e83112199278c SHA512 6049730b72e569939fed3d62b46a409e949b4c2309f4355253c8c891799c7fb5138e20aa217454fbbd78b1dd99c254b34b3fe6c9cbb35854bd8656993655bf32 EBUILD openjfx-11.0.9_p0.ebuild 6529 BLAKE2B ff736eb45f3c448c54c918da73ca36b49b917a0e4e7181f79bd3d0665fed434295e43ec09c9054f07d546a28312ab7bb92d28e4d2714608b355080dd5471e476 SHA512 1e34a7876c9dadf87edc96ae2e3c3159069c9fb2d057f2a98546f231e67724c338fb06e1a9c7045e5da390c45d2c84232fb7241d6442d5fc48f14b0581c493aa -EBUILD openjfx-8.999.ebuild 5657 BLAKE2B 824c9b5160602081472cb794ecbe0c52ffc26522c10c5bf7eb3b4fae26aa034cfc22d17728af3368512dee369a427f9621ab3173c752a9113d6f272b45cd0917 SHA512 c5d595cc267cd76e9309cd88557444848fe7f6f0ae9613e50645222ad7faaf203ea91031aaaa91658366f9f37aaae0e99aea542fd45aa72bc294d96ff22fa036 +EBUILD openjfx-8.1000.ebuild 5593 BLAKE2B 94aa4d3f54e66afb33d0abf7a46c3adfefb8d0bc3cc4150798502f967f69df37a88bdd3c915e1169ad616b188c4a7f6bb59d1c12f0fb61e5347a4281db85ce25 SHA512 ef058af9f7fdc56f8f5d1ea80e11180ec3c8a35403e555143ea3181336946d347d5b307ac77bb66bf3695fb62eece9737e5a552c9c0745269aff6a93744834b4 MISC metadata.xml 678 BLAKE2B 2b7537a59f3d6cb5b465322c68d374e664291178dad94a527a625243c1abe5846b3d0e066e9a715ccf8d5b12a9a58c46c58d00b13881265973e20a29c4f5b720 SHA512 889ad3984e64acb24e01041d98c1f9273d02256bf89810c8e84607911ba35bcac239fdc8341e839b91d7af999e575d06249d87a64c78a3684f63ad5a3003bd8d diff --git a/dev-java/openjfx/files/8/07-disable-assembler-on-unsupported-archs.patch b/dev-java/openjfx/files/8/07-disable-assembler-on-unsupported-archs.patch deleted file mode 100644 index 551a1e82ba50..000000000000 --- a/dev-java/openjfx/files/8/07-disable-assembler-on-unsupported-archs.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Disable assembler in WebKit on unsupported architectures -Author: Emmanuel Bourg -Forwarded: no ---- a/modules/web/src/main/native/Source/WTF/wtf/Platform.h -+++ b/modules/web/src/main/native/Source/WTF/wtf/Platform.h -@@ -325,6 +325,12 @@ - #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 - #endif - -+#if !CPU(ARM_THUMB2) && !CPU(ARM_TRADITIONAL) && !CPU(MIPS) && !CPU(X86) && !CPU(X86_64) && !CPU(SH4) -+#define ENABLE_ASSEMBLER 0 -+#define ENABLE_JIT 0 -+#define ENABLE_YARR_JIT 0 -+#endif -+ - /* ==== OS() - underlying operating system; only to be used for mandated low-level services like - virtual memory, not to choose a GUI toolkit ==== */ - diff --git a/dev-java/openjfx/files/8/Wno-error.patch b/dev-java/openjfx/files/8/Wno-error.patch index 208411508d87..edc9389ee9ce 100644 --- a/dev-java/openjfx/files/8/Wno-error.patch +++ b/dev-java/openjfx/files/8/Wno-error.patch @@ -73,37 +73,6 @@ index 0bb8a530..38e98303 100644 "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() def glassCFlags = ["-ffast-math"] -diff --git a/buildSrc/linux.gradle b/buildSrc/linux.gradle -index f233b817..0f9d5252 100644 ---- a/buildSrc/linux.gradle -+++ b/buildSrc/linux.gradle -@@ -203,7 +203,7 @@ LINUX.glass.javahInclude = [ - "com/sun/glass/ui/gtk/*"] - LINUX.glass.glass.nativeSource = ft_gtk_launcher.getFiles() - LINUX.glass.glass.compiler = compiler --LINUX.glass.glass.ccFlags = [ccFlags, gtk2CCFlags, "-Werror"].flatten() -+LINUX.glass.glass.ccFlags = [ccFlags, gtk2CCFlags].flatten() - LINUX.glass.glass.linker = linker - LINUX.glass.glass.linkFlags = [linkFlags, "-lX11", "-ldl" ].flatten() - LINUX.glass.glass.lib = "glass" -@@ -211,7 +211,7 @@ LINUX.glass.glass.lib = "glass" - LINUX.glass.glassgtk2 = [:] - LINUX.glass.glassgtk2.nativeSource = ft_gtk.getFiles() - LINUX.glass.glassgtk2.compiler = compiler --LINUX.glass.glassgtk2.ccFlags = [ccFlags, gtk2CCFlags, "-Werror"].flatten() -+LINUX.glass.glassgtk2.ccFlags = [ccFlags, gtk2CCFlags].flatten() - LINUX.glass.glassgtk2.linker = linker - LINUX.glass.glassgtk2.linkFlags = [linkFlags, gtk2LinkFlags ].flatten() - LINUX.glass.glassgtk2.lib = "glassgtk2" -@@ -219,7 +219,7 @@ LINUX.glass.glassgtk2.lib = "glassgtk2" - LINUX.glass.glassgtk3 = [:] - LINUX.glass.glassgtk3.nativeSource = ft_gtk.getFiles() - LINUX.glass.glassgtk3.compiler = compiler --LINUX.glass.glassgtk3.ccFlags = [ccFlags, gtk3CCFlags, "-Werror"].flatten() -+LINUX.glass.glassgtk3.ccFlags = [ccFlags, gtk3CCFlags].flatten() - LINUX.glass.glassgtk3.linker = linker - LINUX.glass.glassgtk3.linkFlags = [linkFlags, gtk3LinkFlags ].flatten() - LINUX.glass.glassgtk3.lib = "glassgtk3" diff --git a/buildSrc/x86egl.gradle b/buildSrc/x86egl.gradle index 6bf6196b..ff24207d 100644 --- a/buildSrc/x86egl.gradle diff --git a/dev-java/openjfx/openjfx-8.1000.ebuild b/dev-java/openjfx/openjfx-8.1000.ebuild new file mode 100644 index 000000000000..4763fb1c16ee --- /dev/null +++ b/dev-java/openjfx/openjfx-8.1000.ebuild @@ -0,0 +1,199 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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://services.gradle.org/distributions/gradle-${EGRADLE_VER}-bin.zip +" + +LICENSE="GPL-2-with-classpath-exception" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~ppc64" + +IUSE="debug doc media cpu_flags_x86_sse2" + +DEPEND=" + app-arch/unzip + >=dev-java/ant-core-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] + sys-devel/bison + sys-devel/flex + virtual/jdk:1.8 + virtual/pkgconfig +" + +RDEPEND=" + dev-java/swt:4.10[cairo,opengl] + virtual/jre:1.8 +" + +REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 )" + +RESTRICT="test" # needs junit version we don't have, fragile + +# eclass overrides it, set back to normal +S="${WORKDIR}/${P}" + +# 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-core ant.jar ant-1.8.2.jar + java-pkg_jar-from --build-only --into "${d}" ant-core 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 +} diff --git a/dev-java/openjfx/openjfx-8.999.ebuild b/dev-java/openjfx/openjfx-8.999.ebuild deleted file mode 100644 index ce6834e5b30a..000000000000 --- a/dev-java/openjfx/openjfx-8.999.ebuild +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright 2020-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -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.xz - https://services.gradle.org/distributions/gradle-${EGRADLE_VER}-bin.zip -" - -LICENSE="GPL-2-with-classpath-exception" -SLOT="$(ver_cut 1)" -KEYWORDS="~amd64 ~ppc64" - -IUSE="debug doc media cpu_flags_x86_sse2" - -DEPEND=" - app-arch/unzip - >=dev-java/ant-core-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] - sys-devel/bison - sys-devel/flex - virtual/jdk:1.8 - virtual/pkgconfig -" - -RDEPEND=" - dev-java/swt:4.10[cairo,opengl] - virtual/jre:1.8 -" - -REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 )" - -RESTRICT="test" # needs junit version we don't have, fragile - -# eclass overrides it, set back to normal -S="${WORKDIR}/${P}" - -# 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/07-disable-assembler-on-unsupported-archs.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-core ant.jar ant-1.8.2.jar - java-pkg_jar-from --build-only --into "${d}" ant-core 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 -} -- cgit v1.2.3