2019-01-27 04:32:11 +01:00
|
|
|
# Copyright 1999-2019 Gentoo Authors
|
2018-11-17 21:29:49 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2019-01-27 04:32:11 +01:00
|
|
|
EAPI=7
|
2018-11-17 21:29:49 +01:00
|
|
|
inherit cmake-utils
|
|
|
|
|
|
|
|
DESCRIPTION="mastodon-cpp is a C++ wrapper for the Mastodon API."
|
|
|
|
HOMEPAGE="https://schlomp.space/tastytea/mastodon-cpp"
|
|
|
|
SRC_URI="https://schlomp.space/tastytea/mastodon-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="GPL-3"
|
2019-03-29 07:51:01 +01:00
|
|
|
SLOT="0"
|
2018-11-17 21:29:49 +01:00
|
|
|
KEYWORDS="~amd64"
|
2019-01-31 18:06:28 +01:00
|
|
|
IUSE="doc examples static-libs"
|
2019-01-27 04:32:11 +01:00
|
|
|
RDEPEND="
|
|
|
|
>=dev-cpp/curlpp-0.8.1
|
|
|
|
>=dev-libs/jsoncpp-1.8.4
|
|
|
|
"
|
|
|
|
DEPEND="
|
|
|
|
>=dev-util/cmake-3.9.6
|
|
|
|
doc? ( >=app-doc/doxygen-1.8.14-r1 )
|
|
|
|
${RDEPEND}
|
|
|
|
"
|
2018-11-17 21:29:49 +01:00
|
|
|
|
2019-01-27 04:32:11 +01:00
|
|
|
S="${WORKDIR}/${PN}"
|
2018-11-17 21:29:49 +01:00
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local mycmakeargs=(
|
|
|
|
-DWITH_DOC=NO
|
|
|
|
-DWITH_EXAMPLES=NO
|
|
|
|
-DWITH_TESTS=NO
|
|
|
|
)
|
|
|
|
if use static-libs; then
|
|
|
|
mycmakeargs+=(-DWITH_STATIC=YES)
|
|
|
|
fi
|
|
|
|
|
|
|
|
cmake-utils_src_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
# We won't let cmake handle the documentation, because it would install the
|
|
|
|
# examples, no matter if we want them.
|
|
|
|
src_compile() {
|
2019-01-31 18:06:28 +01:00
|
|
|
cmake-utils_src_compile
|
2018-11-17 21:29:49 +01:00
|
|
|
|
|
|
|
if use doc; then
|
|
|
|
./build_doc.sh
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
if use doc; then
|
|
|
|
HTML_DOCS="doc/html/*"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if use examples; then
|
|
|
|
docinto examples
|
|
|
|
for file in examples/*.cpp; do
|
2019-01-27 04:32:11 +01:00
|
|
|
dodoc "${file}"
|
2018-11-17 21:29:49 +01:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
cmake-utils_src_install
|
|
|
|
}
|