2019-01-31 18:06:28 +01:00
|
|
|
# Copyright 1999-2019 Gentoo Authors
|
2018-05-08 06:50:18 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=6
|
|
|
|
inherit git-r3 cmake-utils
|
|
|
|
|
|
|
|
DESCRIPTION="mastodon-cpp is a C++ wrapper for the Mastodon API."
|
2018-06-04 21:09:02 +02:00
|
|
|
HOMEPAGE="https://schlomp.space/tastytea/mastodon-cpp"
|
|
|
|
EGIT_REPO_URI="https://schlomp.space/tastytea/mastodon-cpp.git"
|
2018-05-08 06:50:18 +02:00
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS=""
|
2019-01-31 18:06:28 +01:00
|
|
|
IUSE="doc examples static-libs"
|
2018-05-08 06:50:18 +02:00
|
|
|
RDEPEND=">=dev-cpp/curlpp-0.8.1
|
2018-06-21 20:35:06 +02:00
|
|
|
>=dev-libs/jsoncpp-1.8.1"
|
2018-05-08 06:50:18 +02:00
|
|
|
DEPEND=">=dev-util/cmake-3.9.6
|
2018-06-21 20:35:06 +02:00
|
|
|
doc? ( >=app-doc/doxygen-1.8.13-r1 )
|
|
|
|
${RDEPEND}"
|
2018-05-08 06:50:18 +02:00
|
|
|
|
|
|
|
src_unpack() {
|
2018-06-21 20:35:06 +02:00
|
|
|
git-r3_src_unpack
|
2018-05-08 06:50:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
2018-06-21 20:35:06 +02:00
|
|
|
local mycmakeargs=(
|
|
|
|
-DWITH_DOC=NO
|
|
|
|
-DWITH_EXAMPLES=NO
|
|
|
|
-DWITH_TESTS=NO
|
|
|
|
)
|
2018-07-19 12:22:51 +02:00
|
|
|
if use static-libs; then
|
|
|
|
mycmakeargs+=(-DWITH_STATIC=YES)
|
|
|
|
fi
|
|
|
|
|
2018-06-21 20:35:06 +02:00
|
|
|
cmake-utils_src_configure
|
2018-05-08 06:50:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# We can not let cmake handle the documentation, because it would end up in
|
|
|
|
# doc/mastodon-cpp-${PROJECT_VERSION} instead of -9999
|
|
|
|
src_compile() {
|
2019-01-31 18:06:28 +01:00
|
|
|
cmake-utils_src_compile
|
2018-06-21 20:35:06 +02:00
|
|
|
|
|
|
|
if use doc; then
|
|
|
|
./build_doc.sh
|
|
|
|
fi
|
2018-05-08 06:50:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2018-06-21 20:35:06 +02:00
|
|
|
cmake-utils_src_install
|
|
|
|
|
|
|
|
if use doc; then
|
|
|
|
HTML_DOCS="doc/html/*"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if use examples; then
|
|
|
|
docinto examples
|
|
|
|
for file in examples/*.cpp; do
|
|
|
|
dodoc ${file}
|
|
|
|
done
|
|
|
|
fi
|
2018-05-08 06:50:18 +02:00
|
|
|
}
|