Diff utfcpp-3.2.1 with a utfcpp-4.0.6

/usr/portage/dev-libs/utfcpp/utfcpp-4.0.6.ebuild 2025-02-03 17:39:32.850666998 +0300
1
# Copyright 2015-2023 Gentoo Authors
1
# Copyright 2015-2024 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="8"
4
EAPI=8
5 5

  
6 6
inherit cmake
7 7

  
8
if [[ "${PV}" == "9999" ]]; then
9
	inherit git-r3
10

  
8
if [[ ${PV} == *9999* ]]; then
11 9
	EGIT_REPO_URI="https://github.com/nemtrif/utfcpp"
12 10
	EGIT_SUBMODULES=()
11
	inherit git-r3
13 12
else
14
	FTEST_GIT_REVISION="1e14b77c2ab8489386fc7046a8bced696c0fc4d6"
15
	FTEST_DATE="20211106174116"
13
	FTEST_GIT_REV="c4ad4af0946b73ce1a40cbc72205d15d196c7e06"
14
	SRC_URI="https://github.com/nemtrif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
15
		test? ( https://github.com/nemtrif/ftest/archive/${FTEST_GIT_REV}.tar.gz -> ftest-${FTEST_GIT_REV:0:8}.tar.gz )"
16
	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
16 17
fi
17 18

  
18 19
DESCRIPTION="UTF-8 C++ library"
19 20
HOMEPAGE="https://github.com/nemtrif/utfcpp"
20
if [[ "${PV}" == "9999" ]]; then
21
	SRC_URI=""
22
else
23
	SRC_URI="https://github.com/nemtrif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
24
		test? ( https://github.com/nemtrif/ftest/archive/${FTEST_GIT_REVISION}.tar.gz -> ftest-${FTEST_DATE}.tar.gz )"
25
fi
26 21

  
27 22
LICENSE="Boost-1.0"
28 23
SLOT="0"
29
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
30 24
IUSE="test"
31 25
RESTRICT="!test? ( test )"
32 26

  
33
BDEPEND=""
34
DEPEND=""
35
RDEPEND=""
36

  
37 27
src_unpack() {
38
	if [[ "${PV}" == "9999" ]]; then
28
	if [[ ${PV} == *9999* ]]; then
39 29
		git-r3_src_unpack
40 30

  
41 31
		if use test; then
......
46 36
		default
47 37

  
48 38
		if use test; then
49
			mv ftest-${FTEST_GIT_REVISION} ftest || die
39
			mv ftest-${FTEST_GIT_REV} ftest || die
50 40
		fi
51 41
	fi
52 42

  
53
	rmdir "${S}/extern/ftest" || die
54
	ln -s ../../ftest "${S}/extern/ftest" || die
43
	if use test; then
44
		rmdir "${S}/extern/ftest" || die
45
		ln -s ../../ftest "${S}/extern/ftest" || die
46
	fi
55 47
}
56 48

  
57 49
src_configure() {
58
	local mycmakeargs=(
59
		-DUTF8_SAMPLES=OFF
60
		-DUTF8_TESTS=$(usex test ON OFF)
61
	)
62

  
63 50
	cmake_src_configure
51

  
52
	if use test; then
53
		CMAKE_USE_DIR=${CMAKE_USE_DIR}/tests BUILD_DIR=${CMAKE_USE_DIR}_build \
54
			cmake_src_configure
55
	fi
56
}
57

  
58
src_compile() {
59
	cmake_src_compile
60

  
61
	if use test; then
62
		CMAKE_USE_DIR=${CMAKE_USE_DIR}/tests BUILD_DIR=${CMAKE_USE_DIR}_build \
63
			cmake_src_compile
64
	fi
65
}
66

  
67
src_test() {
68
	CMAKE_USE_DIR=${CMAKE_USE_DIR}/tests BUILD_DIR=${CMAKE_USE_DIR}_build \
69
		cmake_src_test
64 70
}
Thank you!