aboutsummaryrefslogtreecommitdiff
blob: 41c9151c50b02d1e950b2a3331d7baffff1be2b7 (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-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake

DESCRIPTION="SimCList is a high quality C (C++ embeddable) library for handling lists"
HOMEPAGE="https://mij.oltrelinux.com/devel/simclist"
COMMIT=6aef848d1743af66045a6f413cd3b8b1f1578c15
SRC_URI="https://github.com/mij/simclist/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/${PN}-${COMMIT}

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc dump hash threads"

BDEPEND="doc? ( app-text/doxygen )"

CMAKE_IN_SOURCE_BUILD=1

src_prepare() {
	sed -i -e "/-O2/d" CMakeLists.txt || die
	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DSIMCLIST_DEBUG=$(usex debug)
		-DSIMCLIST_THREADING=$(usex threads)
		-DSIMCLIST_NO_DUMPRESTORE=$(usex dump)
		-DSIMCLIST_ALLOW_LOCATIONBASED_HASHES=$(usex hash)
	)
	cmake_src_configure
}

src_compile(){
	cmake_src_compile
	if use doc; then
		doxygen || die "doxygen failed"
	fi
}

src_install() {
	doheader simclist.h
	dolib.so libsimclist.so

	if use doc ; then
		dodoc -r doc/html/*
	fi
}