diff options
Diffstat (limited to 'dev-libs/utfcpp')
-rw-r--r-- | dev-libs/utfcpp/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/utfcpp/utfcpp-4.0.6.ebuild | 70 | ||||
-rw-r--r-- | dev-libs/utfcpp/utfcpp-9999.ebuild | 60 |
3 files changed, 107 insertions, 28 deletions
diff --git a/dev-libs/utfcpp/Manifest b/dev-libs/utfcpp/Manifest index b3e29b4833ba..382e749757a7 100644 --- a/dev-libs/utfcpp/Manifest +++ b/dev-libs/utfcpp/Manifest @@ -1,5 +1,8 @@ DIST ftest-20211106174116.tar.gz 3232 BLAKE2B 9a2184e82a19465333600b7c31de9a51e6716a4099f23145d93c967636da6539a0e71bfdd082507bf19a440df1199a1abf6f528b3957391f8b2a5c3e4dfb26ec SHA512 d92d3a3abd4f7b35971bfe7d74e1b822931818f60149a56ad29dd3238300ad71de1989fedc602a44a9c1a253da7bce758adf8d5b6da63ca6f322fb06dcefc98a +DIST ftest-c4ad4af0.tar.gz 3320 BLAKE2B de11b5864bbf3c2ba8a67add006deffd729350fa3d5f0ee59a72cebaa8ad467c503930bf7ed2fdea8c5a68f05886049b637e9d886ba851d2cfdac403ae86dc0f SHA512 ac328665d2f22fe72f7252d4f7ae84c74ea551407ba618151ef1c281159df8744f1e6efb9b21d4e1df774528f0b979d45ee5d82d3e8ab146aa9f2ad91b0b6d37 DIST utfcpp-3.2.1.tar.gz 27377 BLAKE2B 27c4becfa7e1f5e8b63ee0e03b9f66cf5d6743cff3706222dde6e21c3feb51897eddd7dcaeaaacc66513fdb209d5be392e83ba22ab7a7d848bdf9721577d6444 SHA512 5798487f12b1bc55d3e06aed38f7604271ca3402963efcf85d181fd590d8a088d21e961e77698e60dc2cdae8cf4506645903442c45fd328201752d9589180e0d +DIST utfcpp-4.0.6.tar.gz 34153 BLAKE2B 9ad44b7390d1f93e2692641e87c693b83ee13f93732dbab893f678db0c32e37e0d2399d2c2834f98ad629ee7025bf7a1f2f36d14b9b89926d97caaaeb8635c83 SHA512 53c59f2e04fe5d36faf98a238b94f774834a34982d481a8170ee144f7f8c2d4ba249a732d90654922944c1075c578690c327091883398c533d604bf49f4a6ecf EBUILD utfcpp-3.2.1.ebuild 1371 BLAKE2B 0d41b0c537dc135e99372c21f1f9259316f45852250b96730dae85937035ffe88fd0dbc56d10910545ed5bf177df6bce26ec34badf6ea2b7547e6a6da57bcfef SHA512 a3aae4ffabdb22eb00a3ad4924542ec31ec444619b604961982a460f79c0fb6a4eaeb402ea7b358c0a338ced53849093b0a429d95652725814764cb7f153a352 -EBUILD utfcpp-9999.ebuild 1268 BLAKE2B 991a901db757f36b9ebc115a45b585ec3e0eca396820a3456106fd3c3872c22060f6821a5c3f6d35b7fed3f28bd8792df01ea2547e58325e92d477450fb99366 SHA512 067403e83fdbc062b9d82e676a156f7b867a4efdae70cccff1b3f00010655d9e65930874ae672d203a9a2c27fe4048ad42b709218111dbd98f530e9a2319b72d +EBUILD utfcpp-4.0.6.ebuild 1577 BLAKE2B 51da35f11e44c1dc355248c1432127b6b858c820e569298526da560ac5cfca10c5169e54b8a1a319b8dff07756d429de4076187da566caf245e9faa3d56574cd SHA512 89073621386e7a98bb86e1a516494ce2d99bb3fa07e1d8170c92313d5acfaed24c50c3d11c6eae6fc14cf1b9850ace7eacaaa6bb1285ef41d8f2fadc020b2465 +EBUILD utfcpp-9999.ebuild 1537 BLAKE2B e921534f1e8b3eb554a3f361e8bb8b0b4e950bc1a4d8211704469ace7f03ec69055f4abf087449d13ccdc6a0c68018fe982c02c6e22b5e2e48116328d1189867 SHA512 82625c1c26223979bd2bd4c02c430dd1b471c23e740b8a76b3d530678394703c123cb53c7d1eef058a6117e1c488de44038782afc6170eae70c4e304f47cf0e9 MISC metadata.xml 314 BLAKE2B a6a9d542a1959762ad1d2cdf12a7eda485e821498fdce41672090236f704b58d6d878cd6d58fa537bd4856c25fd3bf5ef34c036614183ee1f14561ea3131004d SHA512 0d67d04764cdbc0bae9d9b34c406ee111fcbf52f6f9cb8fd5828f0a3022190e6af04b97c983d3daed859400fc25e47ddb14a1ecacc3d14cb4a11d62bdd016fa2 diff --git a/dev-libs/utfcpp/utfcpp-4.0.6.ebuild b/dev-libs/utfcpp/utfcpp-4.0.6.ebuild new file mode 100644 index 000000000000..42f4f5ff6346 --- /dev/null +++ b/dev-libs/utfcpp/utfcpp-4.0.6.ebuild @@ -0,0 +1,70 @@ +# Copyright 2015-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/nemtrif/utfcpp" + EGIT_SUBMODULES=() + inherit git-r3 +else + FTEST_GIT_REV="c4ad4af0946b73ce1a40cbc72205d15d196c7e06" + 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" + +LICENSE="Boost-1.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + + if use test; then + git-r3_fetch https://github.com/nemtrif/ftest refs/heads/master + git-r3_checkout https://github.com/nemtrif/ftest "${WORKDIR}/ftest" + fi + else + default + + if use test; then + mv ftest-${FTEST_GIT_REV} ftest || die + fi + fi + + if use test; then + rmdir "${S}/extern/ftest" || die + ln -s ../../ftest "${S}/extern/ftest" || die + fi +} + +src_configure() { + 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 +} 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 } |