From 252f775f510722727429b25a7383141e29c29134 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 9 May 2018 06:11:24 +0200 Subject: [PATCH] added mastodon-cpp-0.12.0 --- dev-cpp/mastodon-cpp/Manifest | 1 + .../mastodon-cpp/mastodon-cpp-0.12.0.ebuild | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 dev-cpp/mastodon-cpp/mastodon-cpp-0.12.0.ebuild diff --git a/dev-cpp/mastodon-cpp/Manifest b/dev-cpp/mastodon-cpp/Manifest index 4476572..838f59a 100644 --- a/dev-cpp/mastodon-cpp/Manifest +++ b/dev-cpp/mastodon-cpp/Manifest @@ -1 +1,2 @@ DIST mastodon-cpp-0.10.1.tar.gz 48709 BLAKE2B 67ff2680a2b3dc5c90c43981d1b558f809d37865a122136edc0aed5192df858682f465aa304b9dfd1d00b6a00778d494cc7fee7f0efc32af3884a4da4e002a36 SHA512 5b1557c5ec027c21d3d14b7067e473c131dde699592a2f434090979285ad2ee2f89b4e3a664264b99b1e5c42a4b271c565b2c008c34ea78927733c7b4290fd98 +DIST mastodon-cpp-0.12.0.tar.gz 51931 BLAKE2B fdf08a8dbe9a5b29a37f32ea3156e74b68c84c85737c8717a0eb52d2a6e6ded2602b1817b2014c71e2f9144fd60135a6c0d6c5b222b57f71d0600f298fb2d721 SHA512 407e80d2e92a45214a83ee9659d2014c89e11df3e9d0af9f9094775cb459b086964d64de097d5f8ded3e3a20c8b9f02c0567044952c1fbaadd3b215efb75c1d7 diff --git a/dev-cpp/mastodon-cpp/mastodon-cpp-0.12.0.ebuild b/dev-cpp/mastodon-cpp/mastodon-cpp-0.12.0.ebuild new file mode 100644 index 0000000..0240eb2 --- /dev/null +++ b/dev-cpp/mastodon-cpp/mastodon-cpp-0.12.0.ebuild @@ -0,0 +1,53 @@ +EAPI=6 +inherit cmake-utils + +DESCRIPTION="mastodon-cpp is a C++ wrapper for the Mastodon API." +HOMEPAGE="https://github.com/tastytea/mastodon-cpp" +SRC_URI="https://github.com/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 + >=dev-libs/jsoncpp-1.8.1" +DEPEND=">=dev-util/cmake-3.9.6 + doc? ( >=app-doc/doxygen-1.8.13-r1 ) + ${RDEPEND}" + +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 +} + +# We won't let cmake handle the documentation, because it would install the +# examples, no matter if we want them. +src_compile() { + if use doc; then + ./build_doc.sh + fi + cmake-utils_src_compile +} + +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 + + cmake-utils_src_install +}