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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 594ED1580FD for ; Sat, 28 Dec 2024 00:05:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84C83E0849; Sat, 28 Dec 2024 00:05:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 6F2F7E0849 for ; Sat, 28 Dec 2024 00:05:43 +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 B777333BEED for ; Sat, 28 Dec 2024 00:05:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F1E6E19A2 for ; Sat, 28 Dec 2024 00:05:38 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1735344292.f0e4690aabc365c69f3b4375ec50571cddc9711c.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/utfcpp/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/utfcpp/utfcpp-9999.ebuild X-VCS-Directories: dev-libs/utfcpp/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: f0e4690aabc365c69f3b4375ec50571cddc9711c X-VCS-Branch: master Date: Sat, 28 Dec 2024 00:05:38 +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: b8541dd8-653d-4b4f-8adb-78550130b623 X-Archives-Hash: 1fe1ec765609260823252d4c80e71068 commit: f0e4690aabc365c69f3b4375ec50571cddc9711c Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Jan 30 20:25:06 2024 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Dec 28 00:04:52 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0e4690a dev-libs/utfcpp: Rebase onto upstream git master Tests are now a separate subdir CMake project, see also: See also: https://github.com/nemtrif/utfcpp/pull/110 Unfortunately, the CMake build system was declared unmaintained, see also: https://github.com/nemtrif/utfcpp/commit/4965d378fb141a21c8afa7c283a8af4725e6a57e Bug: https://bugs.gentoo.org/936252 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-libs/utfcpp/utfcpp-9999.ebuild | 60 +++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/dev-libs/utfcpp/utfcpp-9999.ebuild b/dev-libs/utfcpp/utfcpp-9999.ebuild index 0b15d97bb35e..c05ef42bdd44 100644 --- a/dev-libs/utfcpp/utfcpp-9999.ebuild +++ b/dev-libs/utfcpp/utfcpp-9999.ebuild @@ -1,41 +1,31 @@ -# Copyright 2015-2022 Gentoo Authors +# Copyright 2015-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="8" +EAPI=8 inherit cmake -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - +if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="https://github.com/nemtrif/utfcpp" EGIT_SUBMODULES=() + inherit git-r3 else - FTEST_GIT_REVISION="" - FTEST_DATE="" + FTEST_GIT_REV="" + SRC_URI="https://github.com/nemtrif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/nemtrif/ftest/archive/${FTEST_GIT_REV}.tar.gz -> ftest-${FTEST_GIT_REV:0:8}.tar.gz )" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" fi DESCRIPTION="UTF-8 C++ library" HOMEPAGE="https://github.com/nemtrif/utfcpp" -if [[ "${PV}" == "9999" ]]; then - SRC_URI="" -else - SRC_URI="https://github.com/nemtrif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz - test? ( https://github.com/nemtrif/ftest/archive/${FTEST_GIT_REVISION}.tar.gz -> ftest-${FTEST_DATE}.tar.gz )" -fi LICENSE="Boost-1.0" SLOT="0" -KEYWORDS="" IUSE="test" RESTRICT="!test? ( test )" -BDEPEND="" -DEPEND="" -RDEPEND="" - src_unpack() { - if [[ "${PV}" == "9999" ]]; then + if [[ ${PV} == *9999* ]]; then git-r3_src_unpack if use test; then @@ -46,19 +36,35 @@ src_unpack() { default if use test; then - mv ftest-${FTEST_GIT_REVISION} ftest || die + mv ftest-${FTEST_GIT_REV} ftest || die fi fi - rmdir "${S}/extern/ftest" || die - ln -s ../../ftest "${S}/extern/ftest" || die + if use test; then + rmdir "${S}/extern/ftest" || die + ln -s ../../ftest "${S}/extern/ftest" || die + fi } src_configure() { - local mycmakeargs=( - -DUTF8_SAMPLES=OFF - -DUTF8_TESTS=$(usex test ON OFF) - ) - cmake_src_configure + + if use test; then + CMAKE_USE_DIR=${CMAKE_USE_DIR}/tests BUILD_DIR=${CMAKE_USE_DIR}_build \ + cmake_src_configure + fi +} + +src_compile() { + cmake_src_compile + + if use test; then + CMAKE_USE_DIR=${CMAKE_USE_DIR}/tests BUILD_DIR=${CMAKE_USE_DIR}_build \ + cmake_src_compile + fi +} + +src_test() { + CMAKE_USE_DIR=${CMAKE_USE_DIR}/tests BUILD_DIR=${CMAKE_USE_DIR}_build \ + cmake_src_test }