summaryrefslogtreecommitdiff
path: root/dev-libs/crossguid/crossguid-0.2.2_p20190529.ebuild
blob: 580736e93e7d3a21ab7e8b05117d90fe6d1de1a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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
}