commit:     7c42c41102ce82a51acc08fdd1ee76c36b3e5d11
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Jan 22 00:00:00 2022 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 15:19:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c42c411

dev-libs/utfcpp: Update live ebuild.

https://github.com/nemtrif/utfcpp/commit/fe79d14ae764e0da411078927b1c60ea9271e408

Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 dev-libs/utfcpp/utfcpp-9999.ebuild | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/dev-libs/utfcpp/utfcpp-9999.ebuild 
b/dev-libs/utfcpp/utfcpp-9999.ebuild
index ca5002a61255..0b15d97bb35e 100644
--- a/dev-libs/utfcpp/utfcpp-9999.ebuild
+++ b/dev-libs/utfcpp/utfcpp-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 2015-2020 Gentoo Authors
+# Copyright 2015-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI="8"
 
 inherit cmake
 
@@ -10,6 +10,9 @@ if [[ "${PV}" == "9999" ]]; then
 
        EGIT_REPO_URI="https://github.com/nemtrif/utfcpp";
        EGIT_SUBMODULES=()
+else
+       FTEST_GIT_REVISION=""
+       FTEST_DATE=""
 fi
 
 DESCRIPTION="UTF-8 C++ library"
@@ -17,7 +20,8 @@ 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"
+       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"
@@ -27,14 +31,27 @@ IUSE="test"
 RESTRICT="!test? ( test )"
 
 BDEPEND=""
-DEPEND="test? ( dev-cpp/gtest )"
+DEPEND=""
 RDEPEND=""
 
-src_prepare() {
-       sed -e "/add_subdirectory(extern\/gtest)/d" -i CMakeLists.txt || die
-       sed -e "s/gtest_main/gtest &/" -i tests/CMakeLists.txt || die
+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_REVISION} ftest || die
+               fi
+       fi
 
-       cmake_src_prepare
+       rmdir "${S}/extern/ftest" || die
+       ln -s ../../ftest "${S}/extern/ftest" || die
 }
 
 src_configure() {

Reply via email to