2019-07-22 03:14:26 +02:00
|
|
|
# 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"
|
2019-08-02 09:44:12 +02:00
|
|
|
IUSE="doc examples test"
|
2019-07-22 03:14:26 +02:00
|
|
|
|
2019-08-02 09:44:12 +02:00
|
|
|
RDEPEND="
|
|
|
|
dev-libs/libconfig[cxx]
|
|
|
|
dev-libs/libxdg-basedir
|
|
|
|
"
|
2019-07-22 03:14:26 +02:00
|
|
|
DEPEND="
|
|
|
|
${RDEPEND}
|
2019-08-02 09:44:12 +02:00
|
|
|
test? ( dev-cpp/catch )
|
|
|
|
doc? ( app-doc/doxygen )
|
|
|
|
"
|
2019-07-22 03:14:26 +02:00
|
|
|
|
|
|
|
S="${WORKDIR}/${PN}"
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local mycmakeargs=(
|
2019-08-02 10:55:59 +02:00
|
|
|
-DWITH_TESTS=$(usex test)
|
2019-07-22 03:14:26 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cmake-utils_src_configure
|
|
|
|
}
|
|
|
|
|
2019-08-02 09:44:12 +02:00
|
|
|
src_compile() {
|
|
|
|
cmake-utils_src_compile
|
|
|
|
|
|
|
|
if use doc; then
|
2019-08-02 10:55:59 +02:00
|
|
|
./build_doc.sh || die "Generation of HTML documentation failed."
|
2019-08-02 09:44:12 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-08-02 10:55:59 +02:00
|
|
|
src_test() {
|
2019-08-02 11:08:43 +02:00
|
|
|
BUILD_DIR="${BUILD_DIR}/tests" cmake-utils_src_test
|
2019-08-02 10:55:59 +02:00
|
|
|
}
|
|
|
|
|
2019-07-22 03:14:26 +02:00
|
|
|
src_install() {
|
2019-08-02 09:44:12 +02:00
|
|
|
if use doc; then
|
|
|
|
HTML_DOCS="doc/html/*"
|
|
|
|
fi
|
|
|
|
|
2019-07-22 04:35:06 +02:00
|
|
|
cmake-utils_src_install
|
2019-08-02 09:44:12 +02:00
|
|
|
|
2019-07-22 04:29:11 +02:00
|
|
|
if use examples; then
|
2019-08-02 09:44:12 +02:00
|
|
|
dodoc examples/example.cpp
|
2019-07-22 04:29:11 +02:00
|
|
|
fi
|
2019-07-22 03:14:26 +02:00
|
|
|
}
|