summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2023-11-16 16:54:38 +0100
committerFlorian Schmaus <flow@gentoo.org>2023-11-16 16:55:04 +0100
commitf9edecf8b9d748a4849c58313c0066cfe3d525cc (patch)
treed7a796160ca4ba1575cb08a2c7bfaf8b924f5271 /dev-java/java-config
parentapp-backup/bacula: further fixes for tray-monitor build (diff)
downloadgentoo-f9edecf8b9d748a4849c58313c0066cfe3d525cc.tar.gz
gentoo-f9edecf8b9d748a4849c58313c0066cfe3d525cc.tar.bz2
gentoo-f9edecf8b9d748a4849c58313c0066cfe3d525cc.zip
dev-java/java-config: update for new Meson-based build
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/java-config')
-rw-r--r--dev-java/java-config/java-config-9999.ebuild51
1 files changed, 38 insertions, 13 deletions
diff --git a/dev-java/java-config/java-config-9999.ebuild b/dev-java/java-config/java-config-9999.ebuild
index 852afb28806a..a4dc516e9ab8 100644
--- a/dev-java/java-config/java-config-9999.ebuild
+++ b/dev-java/java-config/java-config-9999.ebuild
@@ -3,13 +3,11 @@
EAPI=8
-# jython depends on java-config, so don't add it or things will break
PYTHON_COMPAT=( python3_{10..12} )
-DISTUTILS_USE_PEP517=setuptools
-inherit distutils-r1 prefix
+inherit meson python-r1
-if [[ ${PV} = *9999 ]]; then
+if [[ ${PV} = 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/java-config.git"
else
@@ -24,27 +22,54 @@ LICENSE="GPL-2"
SLOT="2"
IUSE="test"
RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="test? ( sys-apps/portage[${PYTHON_USEDEP}] )"
# baselayout-java is added as a dep till it can be added to eclass.
RDEPEND="
+ ${PYTHON_DEPS}
sys-apps/baselayout-java
sys-apps/portage[${PYTHON_USEDEP}]
"
-python_configure_all() {
- # setup.py fails to update this file
- eprefixify src/launcher.bash
+src_configure() {
+ local python_only=false
+ python_foreach_impl my_src_configure
}
-python_install_all() {
- distutils-r1_python_install_all
+my_src_configure() {
+ local emesonargs=(
+ -Darch="${ARCH}"
+ -Dpython-only="${python_only}"
+ -Deprefix="${EPREFIX}"
+ )
- # This replaces the file installed by java-config-wrapper.
- dosym java-config-2 /usr/bin/java-config
+ meson_src_configure
+ python_only=true
}
-python_test() {
- esetup.py test
+src_compile() {
+ python_foreach_impl meson_src_compile
+}
+
+src_test() {
+ python_foreach_impl meson_src_test --no-rebuild --verbose
+}
+
+src_install() {
+ python_foreach_impl my_src_install
+
+ local scripts
+ mapfile -t scripts < <(awk '/^#!.*python/ {print FILENAME} {nextfile}' "${ED}"/usr/bin/* || die)
+ python_replicate_script "${scripts[@]}"
+}
+
+my_src_install() {
+ meson_src_install
+
+ local pydirs=(
+ "${D}$(python_get_sitedir)"
+ )
+ python_optimize "${pydirs[@]}"
}