2020-11-17 17:52:33 +01:00
|
|
|
# Copyright 2019-2020 Gentoo Authors
|
2019-07-22 03:14:26 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
2020-11-16 15:48:36 +01:00
|
|
|
inherit cmake
|
2019-07-22 03:14:26 +02:00
|
|
|
|
|
|
|
DESCRIPTION="Wrapper around libconfig that writes and reads files in XDG_CONFIG_HOME"
|
|
|
|
HOMEPAGE="https://schlomp.space/tastytea/xdgcfg"
|
2020-11-17 17:52:33 +01:00
|
|
|
SRC_URI="https://schlomp.space/tastytea/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
2019-07-22 03:14:26 +02:00
|
|
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
2020-11-16 15:48:36 +01:00
|
|
|
cmake_src_configure
|
2019-07-22 03:14:26 +02:00
|
|
|
}
|
|
|
|
|
2019-08-02 09:44:12 +02:00
|
|
|
src_compile() {
|
2020-11-16 15:48:36 +01:00
|
|
|
cmake_src_compile
|
2019-08-02 09:44:12 +02:00
|
|
|
|
|
|
|
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() {
|
2020-11-16 15:48:36 +01:00
|
|
|
BUILD_DIR="${BUILD_DIR}/tests" cmake_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
|
|
|
|
|
2020-11-16 15:48:36 +01:00
|
|
|
cmake_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
|
|
|
}
|