You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/crossguid/crossguid-0.2.2_p20190529.e...

53 lines
1.0 KiB

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo cmake
MY_COMMIT="ca1bf4b810e2d188d04cb6286f957008ee1b7681"
DESCRIPTION="Lightweight cross platform C++ GUID/UUID library"
HOMEPAGE="https://github.com/graeme-hill/crossguid"
SRC_URI="https://github.com/graeme-hill/crossguid/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_COMMIT}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ~riscv x86"
IUSE="test"
RESTRICT="!test? ( test )"
# We use libuuid from util-linux.
DEPEND="sys-apps/util-linux"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-0.2.2_p20190529-gcc-13.patch
)
src_prepare() {
# https://github.com/graeme-hill/crossguid/pull/62
sed -i -e 's:-Werror::' CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DCROSSGUID_TESTS=$(usex test)
)
cmake_src_configure
}
src_test() {
edo "${BUILD_DIR}"/crossguid-test
}
src_install() {
cmake_src_install
rm "${ED}"/usr/share/crossguid/LICENSE || die
}