public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-06-28  7:38 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-06-28  7:38 UTC (permalink / raw
  To: gentoo-commits

commit:     405da11dfd1d79f8766dcae6ecbba9397c0ee799
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 28 07:24:23 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jun 28 07:25:56 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=405da11d

gradle.eclass: add gradle-src_unpack

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 7595923d..91c8299d 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -32,6 +32,10 @@
 #     ...
 #     $(gradle_src_uri)
 # "
+# src_unpack() {
+#    default
+#    gradle-src_unpack
+# }
 # @CODE
 #
 # Afterwards, use egradle to invoke gradle.
@@ -160,6 +164,18 @@ gradle-src_uri() {
 	echo "https://services.gradle.org/distributions/gradle-${EGRADLE_BUNDLED_VER}-bin.zip"
 }
 
+# @FUNCTION: gradle-src_unpack
+# @DESCRIPTION:
+# Unpack the "bundled" gradle version.  You must have
+# EGRADLE_BUNDLED_VER set when calling this function.
+gradle-src_unpack() {
+	if [[ -z ${EGRADLE_BUNDLED_VER} ]]; then
+		die "Must set EGRADLE_BUNDLED_VER when calling gradle-src_unpack"
+	fi
+
+	unpack "gradle-${EGRADLE_BUNDLED_VER}-bin.zip"
+}
+
 # @FUNCTION: egradle
 # @USAGE: [gradle-args]
 # @DESCRIPTION:


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-06-28  7:38 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-06-28  7:38 UTC (permalink / raw
  To: gentoo-commits

commit:     27eec8a39f8bcfac00a292667273cc60100cd97b
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 28 07:11:47 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jun 28 07:11:47 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=27eec8a3

gradle.eclass: drop usage of compgen

Bash's compgen builtin is only available if bash was built with readline
support. And PMS does not require that this is the case.

See also https://bugs.gentoo.org/909163

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 070a3e12..7595923d 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -105,20 +105,14 @@ gradle-set_EGRADLE() {
 		return
 	fi
 
-	local candidates candidate selected selected_ver
+	local candidate selected selected_ver ver
 
-	candidates=$(compgen -c gradle-)
-	for candidate in ${candidates}; do
-		if [[ ! ${candidate} =~ gradle(-bin)?-([.0-9]+) ]]; then
+	for candidate in "${BROOT}"/usr/bin/gradle-; do
+		if [[ ${candidate} != */gradle?(-bin)-+([.0-9]) ]]; then
 			continue
 		fi
 
-		local ver
-		if (( ${#BASH_REMATCH[@]} == 3 )); then
-			ver="${BASH_REMATCH[2]}"
-		else
-			ver="${BASH_REMATCH[1]}"
-		fi
+		ver=${candidate##*-}
 
 		if [[ -n ${EGRADLE_EXACT_VER} ]]; then
 			ver_test "${ver}" -ne "${EGRADLE_EXACT_VER}" && continue
@@ -150,7 +144,7 @@ gradle-set_EGRADLE() {
 	done
 
 	if [[ -z ${selected} ]]; then
-		die "Could not find (suitable) gradle installation in PATH"
+		die "Could not find (suitable) gradle installation in ${BROOT}/usr/bin"
 	fi
 
 	EGRADLE="${selected}"


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-03-16 13:40 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-03-16 13:40 UTC (permalink / raw
  To: gentoo-commits

commit:     5bd9cb384e338cebb87e5e49921e96f70550167a
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 16 13:40:12 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar 16 13:40:12 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=5bd9cb38

gradle.eclass: drop unnecessary export

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 4a7cf440..070a3e12 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -96,12 +96,12 @@ gradle-set_EGRADLE() {
 	[[ -n ${EGRADLE} ]] && return
 
 	if [[ -n ${EGRADLE_OVERWRITE} ]]; then
-		export EGRADLE="${EGRADLE_OVERWRITE}"
+		EGRADLE="${EGRADLE_OVERWRITE}"
 		return
 	fi
 
 	if [[ -n ${EGRADLE_BUNDLED_VER} ]]; then
-		export EGRADLE="${WORKDIR}/gradle-${EGRADLE_BUNDLED_VER}/bin/gradle"
+		EGRADLE="${WORKDIR}/gradle-${EGRADLE_BUNDLED_VER}/bin/gradle"
 		return
 	fi
 
@@ -153,7 +153,7 @@ gradle-set_EGRADLE() {
 		die "Could not find (suitable) gradle installation in PATH"
 	fi
 
-	export EGRADLE="${selected}"
+	EGRADLE="${selected}"
 }
 
 # @FUNCTION: gradle-src_uri


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-03-16 10:49 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-03-16 10:49 UTC (permalink / raw
  To: gentoo-commits

commit:     0b1bba57eee6e98d6b787e22f9ededf562214e90
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 16 10:49:41 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar 16 10:49:41 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=0b1bba57

gradle.eclass: add more documentation

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index e4087f7a..4a7cf440 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -6,10 +6,10 @@
 # Gentoo Java Project <java@gentoo.org>
 # @AUTHOR:
 # Florian Schmaus <flow@gentoo.org>
-# @BLURB: utility functions for the gradle build system.
+# @BLURB: common ebuild functions for gradle-based packages.
 # @DESCRIPTION:
-# Utility functions for the gradle build system.
-# There are currently two approaches to using gradle in ebuilds. You can either
+# This eclass provides support for the gradle build system.  There
+# are currently two approaches to using gradle in ebuilds.  You can either
 # depend on a gradle system-wide installation from a gradle ebuild, typically
 # dev-java/gradle-bin, or, bundle gradle with the ebuild.
 #
@@ -33,6 +33,13 @@
 #     $(gradle_src_uri)
 # "
 # @CODE
+#
+# Afterwards, use egradle to invoke gradle.
+# @CODE
+# src_compile() {
+#     egradle build
+# }
+# @CODE
 
 case ${EAPI} in
 	7|8) ;;


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-03-16 10:45 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-03-16 10:45 UTC (permalink / raw
  To: gentoo-commits

commit:     8cee4d41c1eae351bd98dea5afb310e12b9b20f0
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 16 10:45:09 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar 16 10:45:09 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=8cee4d41

gradle.eclass: add EGRADLE_BUNDLED_VER

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 488c265d..e4087f7a 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -9,6 +9,30 @@
 # @BLURB: utility functions for the gradle build system.
 # @DESCRIPTION:
 # Utility functions for the gradle build system.
+# There are currently two approaches to using gradle in ebuilds. You can either
+# depend on a gradle system-wide installation from a gradle ebuild, typically
+# dev-java/gradle-bin, or, bundle gradle with the ebuild.
+#
+# To use a system-wide gradle installation, set EGRADLE_MIN and
+# EGRADLE_MAX_EXCLUSIVE and declare a BDEPEND on the gradle package.
+# @CODE
+# inherit gradle
+# EGRADLE_MIN=7.3
+# EGRADLE_MAX_EXCLUSIVE=8
+#
+# BDEPEND="|| (dev-java/gradle-bin:7.3 dev-java/gradle-bin:7.4)
+# @CODE
+#
+# To use a bundled gradle version, set EGRADLE_BUNDLED_VER and add
+# $(gradle_src_uri) to SRC_URI.
+# @CODE
+# inherit gradle
+# EGRADLE_BUNDLED_VER=7.6
+# SRC_URI="
+#     ...
+#     $(gradle_src_uri)
+# "
+# @CODE
 
 case ${EAPI} in
 	7|8) ;;
@@ -35,6 +59,11 @@ inherit edo
 # @DESCRIPTION:
 # The exact required gradle version.
 
+# @ECLASS_VARIABLE: EGRADLE_BUNDLED_VER
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The gradle version that will be bundled with this package.
+
 # @ECLASS_VARIABLE: EGRADLE_PARALLEL
 # @DESCRIPTION:
 # Set to the 'true', the default, to invoke gradle with --parallel. Set
@@ -64,6 +93,11 @@ gradle-set_EGRADLE() {
 		return
 	fi
 
+	if [[ -n ${EGRADLE_BUNDLED_VER} ]]; then
+		export EGRADLE="${WORKDIR}/gradle-${EGRADLE_BUNDLED_VER}/bin/gradle"
+		return
+	fi
+
 	local candidates candidate selected selected_ver
 
 	candidates=$(compgen -c gradle-)
@@ -115,6 +149,16 @@ gradle-set_EGRADLE() {
 	export EGRADLE="${selected}"
 }
 
+# @FUNCTION: gradle-src_uri
+# @DESCRIPTION:
+# Generate SRC_URI data from EGRADLE_BUNDLED_VER.
+gradle-src_uri() {
+	if [[ -z ${EGRADLE_BUNDLED_VER} ]]; then
+		die "Must set EGRADLE_BUNDLED_VER when calling gradle-src_uri"
+	fi
+	echo "https://services.gradle.org/distributions/gradle-${EGRADLE_BUNDLED_VER}-bin.zip"
+}
+
 # @FUNCTION: egradle
 # @USAGE: [gradle-args]
 # @DESCRIPTION:


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-08 10:53 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-08 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b498da2bc56db0c5f9ba6ee376498dd767d433c2
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  8 10:53:22 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jan  8 10:53:22 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=b498da2b

gradle.eclass: respect existing JAVA_TOOL_OPTIONS

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 1461afad..488c265d 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -137,7 +137,7 @@ egradle() {
 		gradle_args+=( --parallel )
 	fi
 
-	local -x JAVA_TOOL_OPTIONS="-Duser.home=\"${T}\""
+	local -x JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -Duser.home=\"${T}\""
 	# TERM needed, otherwise gradle may fail on terms it does not know about
 	TERM=xterm \
 		edo \


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-08 10:52 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-08 10:52 UTC (permalink / raw
  To: gentoo-commits

commit:     9cf36722c8b4f03f8fe0c0a1762cd36f19e3430e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  8 10:52:24 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jan  8 10:52:24 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=9cf36722

gradle.eclass: drop unnecessary assignment due to previous commit

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index d15ec8cf..1461afad 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -83,7 +83,6 @@ gradle-set_EGRADLE() {
 			ver_test "${ver}" -ne "${EGRADLE_EXACT_VER}" && continue
 
 			selected="${candidate}"
-			selected_ver="${ver}"
 			break
 		fi
 


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-08 10:51 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-08 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     20a464f99e460ac851bd0df31bea35ac435add30
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  8 10:50:46 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jan  8 10:50:49 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=20a464f9

gradle.eclass: drop EGRADLE_VER

EGRADLE_VER would not have been set if EGRADLE_OVERWRITE was used.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 0261df47..d15ec8cf 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -114,7 +114,6 @@ gradle-set_EGRADLE() {
 	fi
 
 	export EGRADLE="${selected}"
-	export EGRADLE_VER="${ver}"
 }
 
 # @FUNCTION: egradle


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-08 10:29 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-08 10:29 UTC (permalink / raw
  To: gentoo-commits

commit:     d3bbaa0c42a43f1dd3526c9b5e9c4b2b4b33a871
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  8 10:29:30 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jan  8 10:29:30 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=d3bbaa0c

gradle.eclass: update

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index a3212626..0261df47 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -6,7 +6,7 @@
 # Gentoo Java Project <java@gentoo.org>
 # @AUTHOR:
 # Florian Schmaus <flow@gentoo.org>
-# @BLURB: Utility functions for the gradle build system.
+# @BLURB: utility functions for the gradle build system.
 # @DESCRIPTION:
 # Utility functions for the gradle build system.
 
@@ -135,11 +135,11 @@ egradle() {
 		--project-cache-dir "${T}/gradle_project_cache"
 	)
 
-	if $EGRADLE_PARALLEL; then
+	if ${EGRADLE_PARALLEL}; then
 		gradle_args+=( --parallel )
 	fi
 
-	local -x JAVA_TOOL_OPTIONS="-Duser.home=\"$T\""
+	local -x JAVA_TOOL_OPTIONS="-Duser.home=\"${T}\""
 	# TERM needed, otherwise gradle may fail on terms it does not know about
 	TERM=xterm \
 		edo \


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-06 17:11 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-06 17:11 UTC (permalink / raw
  To: gentoo-commits

commit:     eee6e56c9a156befab7041e42ffafb4c7bf10735
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  6 17:11:30 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Jan  6 17:11:30 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=eee6e56c

gradle.eclass: update

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index f53fce44..a3212626 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -124,7 +124,6 @@ gradle-set_EGRADLE() {
 egradle() {
 	gradle-set_EGRADLE
 
-	# TODO --no-build-cache ?
 	local gradle_args=(
 		--console=plain
 		--info


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-06 17:10 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-06 17:10 UTC (permalink / raw
  To: gentoo-commits

commit:     376931ad15509f969b55fdd0a4177ebaaec1d1b5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  6 17:10:36 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Jan  6 17:10:36 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=376931ad

gradle.eclass: update

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 90e21905..f53fce44 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -9,8 +9,6 @@
 # @BLURB: Utility functions for the gradle build system.
 # @DESCRIPTION:
 # Utility functions for the gradle build system.
-# WARNING: This eclass is currently experimental and
-# subject to change.
 
 case ${EAPI} in
 	7|8) ;;
@@ -35,18 +33,19 @@ inherit edo
 # @ECLASS_VARIABLE: EGRADLE_EXACT_VER
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# The exactly required gradle version.
+# The exact required gradle version.
 
 # @ECLASS_VARIABLE: EGRADLE_PARALLEL
 # @DESCRIPTION:
 # Set to the 'true', the default, to invoke gradle with --parallel. Set
 # to 'false' to disable parallel gradle builds.
-: ${EGRADLE_PARALLEL=true}
+: "${EGRADLE_PARALLEL=true}"
 
 # @ECLASS_VARIABLE: EGRADLE_USER_HOME
 # @DESCRIPTION:
-# Directroy used the user's home directory by gradle.
-EGRADLE_USER_HOME="${T}/gradle_user_home"
+# Directroy used as the user's home directory by gradle. Defaults to
+# ${T}/gradle_user_home
+: "${EGRADLE_USER_HOME="${T}/gradle_user_home"}"
 
 # @ECLASS_VARIABLE: EGRADLE_OVERWRITE
 # @USER_VARIABLE
@@ -81,7 +80,7 @@ gradle-set_EGRADLE() {
 		fi
 
 		if [[ -n ${EGRADLE_EXACT_VER} ]]; then
-			ver_test "${ver}" -ne ${EGRADLE_EXACT_VER} && continue
+			ver_test "${ver}" -ne "${EGRADLE_EXACT_VER}" && continue
 
 			selected="${candidate}"
 			selected_ver="${ver}"
@@ -145,7 +144,7 @@ egradle() {
 	# TERM needed, otherwise gradle may fail on terms it does not know about
 	TERM=xterm \
 		edo \
-		"${EGRADLE}" "${gradle_args[@]}" ${@}
+		"${EGRADLE}" "${gradle_args[@]}" "${@}"
 }
 
 fi


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-06 14:53 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-06 14:53 UTC (permalink / raw
  To: gentoo-commits

commit:     5f9b10dea4332283361b38bccb8f7b7ed186fa9e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  6 14:48:32 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Jan  6 14:48:32 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=5f9b10de

gradle.eclass: update

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index 09eda636..90e21905 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -32,6 +32,17 @@ inherit edo
 # @DESCRIPTION:
 # First gradle version that is not supported.
 
+# @ECLASS_VARIABLE: EGRADLE_EXACT_VER
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The exactly required gradle version.
+
+# @ECLASS_VARIABLE: EGRADLE_PARALLEL
+# @DESCRIPTION:
+# Set to the 'true', the default, to invoke gradle with --parallel. Set
+# to 'false' to disable parallel gradle builds.
+: ${EGRADLE_PARALLEL=true}
+
 # @ECLASS_VARIABLE: EGRADLE_USER_HOME
 # @DESCRIPTION:
 # Directroy used the user's home directory by gradle.
@@ -69,6 +80,14 @@ gradle-set_EGRADLE() {
 			ver="${BASH_REMATCH[1]}"
 		fi
 
+		if [[ -n ${EGRADLE_EXACT_VER} ]]; then
+			ver_test "${ver}" -ne ${EGRADLE_EXACT_VER} && continue
+
+			selected="${candidate}"
+			selected_ver="${ver}"
+			break
+		fi
+
 		if [[ -n ${EGRADLE_MIN} ]] \
 			   && ver_test "${ver}" -lt "${EGRADLE_MIN}"; then
 			# Candidate does not satisfy EGRADLE_MIN condition.
@@ -113,12 +132,15 @@ egradle() {
 		--stacktrace
 		--no-daemon
 		--offline
-		--parallel
 		--no-build-cache
 		--gradle-user-home "${EGRADLE_USER_HOME}"
 		--project-cache-dir "${T}/gradle_project_cache"
 	)
 
+	if $EGRADLE_PARALLEL; then
+		gradle_args+=( --parallel )
+	fi
+
 	local -x JAVA_TOOL_OPTIONS="-Duser.home=\"$T\""
 	# TERM needed, otherwise gradle may fail on terms it does not know about
 	TERM=xterm \


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2023-01-06 13:32 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2023-01-06 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     8c794b05f3f68c2bbf2a7eb3b568d08c538fdb47
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  6 13:30:52 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Jan  6 13:30:52 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=8c794b05

gradle.eclass: update

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
index ad7b1440..09eda636 100644
--- a/eclass/gradle.eclass
+++ b/eclass/gradle.eclass
@@ -32,6 +32,11 @@ inherit edo
 # @DESCRIPTION:
 # First gradle version that is not supported.
 
+# @ECLASS_VARIABLE: EGRADLE_USER_HOME
+# @DESCRIPTION:
+# Directroy used the user's home directory by gradle.
+EGRADLE_USER_HOME="${T}/gradle_user_home"
+
 # @ECLASS_VARIABLE: EGRADLE_OVERWRITE
 # @USER_VARIABLE
 # @DEFAULT_UNSET
@@ -66,7 +71,7 @@ gradle-set_EGRADLE() {
 
 		if [[ -n ${EGRADLE_MIN} ]] \
 			   && ver_test "${ver}" -lt "${EGRADLE_MIN}"; then
-			# Candidate does not stisfy EGRADLE_MIN condition.
+			# Candidate does not satisfy EGRADLE_MIN condition.
 			continue
 		fi
 
@@ -96,8 +101,8 @@ gradle-set_EGRADLE() {
 
 # @FUNCTION: egradle
 # @USAGE: [gradle-args]
-# @DESCRIPTION
-# Invoke gradle
+# @DESCRIPTION:
+# Invoke gradle with the optionally provided arguments.
 egradle() {
 	gradle-set_EGRADLE
 
@@ -108,12 +113,17 @@ egradle() {
 		--stacktrace
 		--no-daemon
 		--offline
+		--parallel
 		--no-build-cache
-		--gradle-user-home "${T}/gradle_user_home"
+		--gradle-user-home "${EGRADLE_USER_HOME}"
 		--project-cache-dir "${T}/gradle_project_cache"
 	)
 
-	edo "${EGRADLE}" "${gradle_args[@]}" ${@}
+	local -x JAVA_TOOL_OPTIONS="-Duser.home=\"$T\""
+	# TERM needed, otherwise gradle may fail on terms it does not know about
+	TERM=xterm \
+		edo \
+		"${EGRADLE}" "${gradle_args[@]}" ${@}
 }
 
 fi


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2022-07-23 10:41 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2022-07-23 10:41 UTC (permalink / raw
  To: gentoo-commits

commit:     96cd7fc7318dba2b0209c709996638b2213972e7
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 23 10:39:53 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 10:39:53 2022 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=96cd7fc7

java-maven-2.eclass: fix JAVEN_MAVEN_POM_HELPER path

Closes: https://bugs.gentoo.org/237539
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/java-maven-2.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/eclass/java-maven-2.eclass b/eclass/java-maven-2.eclass
index e096db36..f8f6a2ba 100644
--- a/eclass/java-maven-2.eclass
+++ b/eclass/java-maven-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -101,7 +101,7 @@ esac
 JAVA_MAVEN_SYSTEM_HOME="/usr/share/maven-${JAVA_MAVEN_VERSION}/maven_home"
 
 # our pom helper
-JAVA_MAVEN_POM_HELPER="/usr/lib/javatoolkit/bin/maven-helper.py"
+JAVA_MAVEN_POM_HELPER="${EROOT}/usr/libexec/javatoolkit/maven-helper.py"
 
 # maven 1 and 1.1 share the same repo
 JAVA_MAVEN_SYSTEM_REPOSITORY="/usr/share/maven-${JAVA_MAVEN_VERSION//1.1/1}/maven_home/gentoo-repo"
@@ -623,4 +623,3 @@ java-maven-2_src_install() {
 }
 
 EXPORT_FUNCTIONS src_unpack src_compile src_install
-


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2021-06-30  7:22 Florian Schmaus
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Schmaus @ 2021-06-30  7:22 UTC (permalink / raw
  To: gentoo-commits

commit:     bc66c7b0b3a29865ab8261ee60b62cd73fa884f3
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 30 07:20:59 2021 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jun 30 07:22:04 2021 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=bc66c7b0

gradle.eclass: initial version

This is the start of a new eclass for the gradle build system. The
eclass is currently experimental and subject to change.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/gradle.eclass | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
new file mode 100644
index 00000000..f609c122
--- /dev/null
+++ b/eclass/gradle.eclass
@@ -0,0 +1,36 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: gradle.eclass
+# @MAINTAINER:
+# Gentoo Java Project <java@gentoo.org>
+# @AUTHOR:
+# Florian Schmaus <flow@gentoo.org>
+# @BLURB: Utility functions for the gradle build system.
+# @DESCRIPTION:
+# Utility functions for the gradle build system.
+# WARNING: This eclass is currently experimental and
+# subject to change.
+
+EGRADLE_BIN="gradle"
+
+# @FUNCTION: egradle
+# @USAGE: [gradle-args]
+# @DESCRIPTION
+# Invoke gradle
+egradle() {
+	# TODO --no-build-cache ?
+	local gradle_args=(
+		--console=plain
+		--info
+		--stacktrace
+		--no-daemon
+		--offline
+		--no-build-cache
+		--gradle-user-home "${T}/gradle_user_home"
+		--project-cache-dir "${T}/gradle_project_cache"
+	)
+
+	einfo "gradle "${gradle_args[@]}" ${@}"
+	"${EGRADLE_BIN}" "${gradle_args[@]}" ${@} || die "gradle failed"
+}


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [gentoo-commits] proj/java:master commit in: eclass/
@ 2015-07-22 18:37 James Le Cuirot
  0 siblings, 0 replies; 16+ messages in thread
From: James Le Cuirot @ 2015-07-22 18:37 UTC (permalink / raw
  To: gentoo-commits

commit:     b24ae1b69140badc0260c75e60fc1c431b7f8806
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 22 18:29:22 2015 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Jul 22 18:36:28 2015 +0000
URL:        https://gitweb.gentoo.org/proj/java.git/commit/?id=b24ae1b6

[eclass] Replace deprecated hasq with has

 eclass/java-maven-2.eclass   | 6 +++---
 eclass/openoffice-ext.eclass | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/java-maven-2.eclass b/eclass/java-maven-2.eclass
index f86ce17..e9fadf3 100644
--- a/eclass/java-maven-2.eclass
+++ b/eclass/java-maven-2.eclass
@@ -317,7 +317,7 @@ java-maven-2_src_unpack() {
 		fi
 	done
 
-	if hasq doc ${IUSE} && use doc; then
+	if has doc ${IUSE} && use doc; then
 		JAVA_ANT_JAVADOC_INPUT_DIRS="${JAVA_ANT_JAVADOC_INPUT_DIRS} ${JAVA_MAVEN_SRC_DIRS}"
 	fi
 	# now rewriting all the poms
@@ -548,10 +548,10 @@ java-maven-2_install_one() {
 # basic src_install which can install in most cases (multi and single project
 # mode)
 java-maven-2_src_install() {
-	hasq doc ${IUSE} && use doc \
+	has doc ${IUSE} && use doc \
 	&& [[ -n "${JAVA_ANT_JAVADOC_INPUT_DIRS}" ]] \
 	&& java-pkg_dojavadoc ${JAVA_ANT_JAVADOC_OUTPUT_DIR}
-	if hasq source ${IUSE} && use source; then
+	if has source ${IUSE} && use source; then
 		# JAVA_MAVEN_SRC_DIRS must be maven parent sources dirs like "src/main"
 		# install java/* into zip/* and the rest inside zip/subdir/*
 		local java_maven_src_dir="${WORKDIR}/mavenjavasrcpack"

diff --git a/eclass/openoffice-ext.eclass b/eclass/openoffice-ext.eclass
index ec44b68..8ee4419 100644
--- a/eclass/openoffice-ext.eclass
+++ b/eclass/openoffice-ext.eclass
@@ -68,7 +68,7 @@ _openoffice-utils_pkg_prerm() {
 }
 
 _openoffice-ext_check_use() {
-	return $(hasq ${OPENOFFICE_EXT_OPT_USE} "${IUSE}")
+	return $(has ${OPENOFFICE_EXT_OPT_USE} "${IUSE}")
 }
 
 if _openoffice-ext_check_use; then


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-06-28  7:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28  7:38 [gentoo-commits] proj/java:master commit in: eclass/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2023-06-28  7:38 Florian Schmaus
2023-03-16 13:40 Florian Schmaus
2023-03-16 10:49 Florian Schmaus
2023-03-16 10:45 Florian Schmaus
2023-01-08 10:53 Florian Schmaus
2023-01-08 10:52 Florian Schmaus
2023-01-08 10:51 Florian Schmaus
2023-01-08 10:29 Florian Schmaus
2023-01-06 17:11 Florian Schmaus
2023-01-06 17:10 Florian Schmaus
2023-01-06 14:53 Florian Schmaus
2023-01-06 13:32 Florian Schmaus
2022-07-23 10:41 Florian Schmaus
2021-06-30  7:22 Florian Schmaus
2015-07-22 18:37 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox