From: Florian Schmaus <flow@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Florian Schmaus <flow@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/2] dev-java/openjfx: switch to gradle.eclass
Date: Wed, 28 Jun 2023 09:52:45 +0200 [thread overview]
Message-ID: <20230628075245.892402-3-flow@gentoo.org> (raw)
In-Reply-To: <20230628075245.892402-1-flow@gentoo.org>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
---
dev-java/openjfx/openjfx-11.0.11_p1.ebuild | 46 +++++++---------------
1 file changed, 15 insertions(+), 31 deletions(-)
diff --git a/dev-java/openjfx/openjfx-11.0.11_p1.ebuild b/dev-java/openjfx/openjfx-11.0.11_p1.ebuild
index 7d61ff67f2c2..a99111598f7c 100644
--- a/dev-java/openjfx/openjfx-11.0.11_p1.ebuild
+++ b/dev-java/openjfx/openjfx-11.0.11_p1.ebuild
@@ -1,19 +1,19 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
MY_PV="${PV/_p/+}"
SLOT="${MY_PV%%[.+]*}"
-EGRADLE_VER="4.10.3"
+EGRADLE_BUNDLED_VER="4.10.3"
-inherit flag-o-matic java-pkg-2 multiprocessing
+inherit flag-o-matic gradle java-pkg-2 multiprocessing
DESCRIPTION="Java OpenJFX client application platform"
HOMEPAGE="https://openjfx.io"
-SRC_URI="https://hg.openjdk.java.net/${PN}/${SLOT}-dev/rt/archive/${MY_PV}.tar.bz2 -> ${P}.tar.bz2
- https://downloads.gradle.org/distributions/gradle-${EGRADLE_VER}-bin.zip
+SRC_URI="
+ https://hg.openjdk.java.net/${PN}/${SLOT}-dev/rt/archive/${MY_PV}.tar.bz2 -> ${P}.tar.bz2
https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-sandbox/7.1.0/lucene-sandbox-7.1.0.jar
https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-grouping/7.1.0/lucene-grouping-7.1.0.jar
https://repo.maven.apache.org/maven2/org/apache/lucene/lucene-queryparser/7.1.0/lucene-queryparser-7.1.0.jar
@@ -22,6 +22,7 @@ SRC_URI="https://hg.openjdk.java.net/${PN}/${SLOT}-dev/rt/archive/${MY_PV}.tar.b
https://repo.maven.apache.org/maven2/org/antlr/gunit/3.5.2/gunit-3.5.2.jar
https://repo1.maven.org/maven2/org/antlr/antlr4/4.7.2/antlr4-4.7.2-complete.jar
https://repo.maven.apache.org/maven2/org/antlr/ST4/4.0.8/ST4-4.0.8.jar
+ $(gradle-src_uri)
"
LICENSE="GPL-2-with-classpath-exception"
@@ -84,28 +85,8 @@ PATCHES=(
S="${WORKDIR}/rt-${MY_PV}"
-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"
-}
+# Fails to build if gradle is invoked with --parallel.
+EGRADLE_PARALLEL=false
pkg_setup() {
JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
@@ -148,7 +129,7 @@ pkg_setup() {
src_unpack() {
unpack "${P}.tar.bz2"
- unpack "gradle-${EGRADLE_VER}-bin.zip"
+ gradle-src_unpack
mkdir "${T}/jars" || die
@@ -171,7 +152,7 @@ src_prepare() {
java-pkg_jar-from --build-only --with-dependencies --into "${d}" stringtemplate
java-pkg_jar-from --build-only --with-dependencies --into "${d}" hamcrest-core
- sed -i "s#__gentoo_swt_jar__#$(java-pkg_getjars swt-4.10)#" "${S}"/build.gradle || die
+ sed -i "s#__gentoo_swt_jar__#$(java-pkg_getjars swt-4.10)#" build.gradle || die
}
src_configure() {
@@ -189,7 +170,7 @@ src_configure() {
[[ -r ${jdk_doc}/element-list ]] || die "JDK Docs not found, terminating build early"
fi
- cat <<- _EOF_ > "${S}"/gradle.properties
+ cat <<- _EOF_ > gradle.properties
COMPILE_TARGETS = linux
COMPILE_WEBKIT = false
COMPILE_MEDIA = $(usex media true false)
@@ -206,6 +187,9 @@ src_configure() {
}
src_compile() {
+ # FIXME: build.gradle believes $ANT_HOME/bin/ant shoud exist
+ unset ANT_HOME
+
egradle zips $(usex doc "" "--exclude-task javadoc")
}
--
2.39.3
next prev parent reply other threads:[~2023-06-28 7:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 17:20 [gentoo-dev] RFC: new gradle.eclass Florian Schmaus
2023-01-06 17:20 ` [gentoo-dev] [PATCH] gradle.eclass: add new eclass Florian Schmaus
2023-01-07 4:29 ` Sam James
2023-01-07 10:58 ` Florian Schmaus
2023-01-07 6:07 ` Anna
2023-01-06 17:51 ` [gentoo-dev] RFC: new gradle.eclass Maciej Barć
2023-01-06 18:52 ` Yuan Liao (Leo)
2023-01-06 19:40 ` Florian Schmaus
2023-06-28 7:52 ` [gentoo-dev] [PATCH 0/2] " Florian Schmaus
2023-06-28 7:52 ` [gentoo-dev] [PATCH 1/2] gradle.eclass: add new eclass Florian Schmaus
2023-06-28 8:51 ` Michał Górny
2023-06-28 9:21 ` Ulrich Mueller
2023-06-28 7:52 ` Florian Schmaus [this message]
2023-06-30 8:39 ` [gentoo-dev] [PATCH 0/2] new gradle.eclass Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230628075245.892402-3-flow@gentoo.org \
--to=flow@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox