mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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:
4965d378fb
Bug: https://bugs.gentoo.org/936252
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user