forked from tastytea/overlay
tastytea
b07849cc8c
Package-Manager: Portage-2.3.69, Repoman-2.3.16 Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07
61 lines
1.0 KiB
Bash
61 lines
1.0 KiB
Bash
# Copyright 2019 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
inherit cmake-utils
|
|
|
|
DESCRIPTION="Wrapper around libconfig that writes and reads files in XDG_CONFIG_HOME"
|
|
HOMEPAGE="https://schlomp.space/tastytea/xdgcfg"
|
|
SRC_URI="https://schlomp.space/tastytea/${PN}/archive/${PV}.tar.gz"
|
|
|
|
LICENSE="CC0-1.0"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
IUSE="doc examples test"
|
|
|
|
RDEPEND="
|
|
dev-libs/libconfig[cxx]
|
|
dev-libs/libxdg-basedir
|
|
"
|
|
DEPEND="
|
|
${RDEPEND}
|
|
test? ( dev-cpp/catch )
|
|
doc? ( app-doc/doxygen )
|
|
"
|
|
|
|
S="${WORKDIR}/${PN}"
|
|
|
|
src_configure() {
|
|
local mycmakeargs=(
|
|
-DWITH_TESTS=$(usex test)
|
|
)
|
|
|
|
cmake-utils_src_configure
|
|
}
|
|
|
|
src_compile() {
|
|
cmake-utils_src_compile
|
|
|
|
if use doc; then
|
|
./build_doc.sh || die "Generation of HTML documentation failed."
|
|
fi
|
|
}
|
|
|
|
src_test() {
|
|
cd "${BUILD_DIR}/tests" || die "Could not change to test directory."
|
|
ctest . || die "Test failed."
|
|
}
|
|
|
|
src_install() {
|
|
if use doc; then
|
|
HTML_DOCS="doc/html/*"
|
|
fi
|
|
|
|
cmake-utils_src_install
|
|
|
|
if use examples; then
|
|
dodoc examples/example.cpp
|
|
fi
|
|
}
|