overlay/dev-cpp/mastodon-cpp/mastodon-cpp-0.15.1.ebuild

59 lines
1.1 KiB
Bash
Raw Normal View History

EAPI=6
inherit 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"
SRC_URI="https://schlomp.space/tastytea/mastodon-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc debug examples"
RDEPEND=">=dev-cpp/curlpp-0.7.3
2018-06-04 14:01:06 +02:00
>=dev-libs/jsoncpp-1.8.1"
DEPEND=">=dev-util/cmake-3.9.6
2018-06-04 14:01:06 +02:00
doc? ( >=app-doc/doxygen-1.8.13-r1 )
${RDEPEND}"
2018-06-04 14:01:06 +02:00
src_unpack() {
default_src_unpack
mv ${PN} ${P}
}
2018-06-04 14:01:06 +02:00
src_configure() {
local mycmakeargs=(
-DWITH_DOC=NO
-DWITH_EXAMPLES=NO
-DWITH_TESTS=NO
)
if use debug; then
mycmakeargs+=(-DCMAKE_BUILD_TYPE=Debug)
else
mycmakeargs+=(-DCMAKE_BUILD_TYPE=Release)
fi
cmake-utils_src_configure
2018-06-04 13:48:15 +02:00
}
# We won't let cmake handle the documentation, because it would install the
# examples, no matter if we want them.
src_compile() {
2018-06-04 14:01:06 +02:00
if use doc; then
./build_doc.sh
fi
cmake-utils_src_compile
}
src_install() {
2018-06-04 14:01:06 +02:00
if use doc; then
HTML_DOCS="doc/html/*"
fi
2018-06-04 14:01:06 +02:00
if use examples; then
docinto examples
for file in examples/*.cpp; do
dodoc ${file}
done
fi
cmake-utils_src_install
}