From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 00DF1158089 for ; Thu, 16 Nov 2023 15:55:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5CF882BC013; Thu, 16 Nov 2023 15:55:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 492C32BC013 for ; Thu, 16 Nov 2023 15:55:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 686E9335CDF for ; Thu, 16 Nov 2023 15:55:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F0A3E9D4 for ; Thu, 16 Nov 2023 15:55:14 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1700150104.f9edecf8b9d748a4849c58313c0066cfe3d525cc.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/java-config/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/java-config/java-config-9999.ebuild X-VCS-Directories: dev-java/java-config/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: f9edecf8b9d748a4849c58313c0066cfe3d525cc X-VCS-Branch: master Date: Thu, 16 Nov 2023 15:55:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 40730fe0-38c5-4ab7-8e33-3557a4265776 X-Archives-Hash: c1e13ca751bdc5d5995af8fe904b8282 commit: f9edecf8b9d748a4849c58313c0066cfe3d525cc Author: Florian Schmaus gentoo org> AuthorDate: Thu Nov 16 15:54:38 2023 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Thu Nov 16 15:55:04 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9edecf8 dev-java/java-config: update for new Meson-based build Signed-off-by: Florian Schmaus gentoo.org> dev-java/java-config/java-config-9999.ebuild | 51 +++++++++++++++++++++------- 1 file 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[@]}" }