This repository has been archived on 2020-05-10. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon-cpp/packages/gentoo/mastodon-cpp-9999.ebuild

64 lines
1.2 KiB
Bash
Raw Normal View History

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit git-r3 cmake-utils
DESCRIPTION="mastodon-cpp is a C++ wrapper for the Mastodon API."
2018-06-04 00:52:11 +02:00
HOMEPAGE="https://git.schlomp.space/tastytea/mastodon-cpp"
EGIT_REPO_URI="https://git.schlomp.space/tastytea/mastodon-cpp.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
2018-02-09 14:12:04 +01:00
IUSE="doc debug examples"
2018-03-01 03:20:23 +01:00
RDEPEND=">=dev-cpp/curlpp-0.8.1
2018-06-21 18:11:47 +02:00
>=dev-libs/jsoncpp-1.8.4"
DEPEND=">=dev-util/cmake-3.9.6
2018-06-21 18:11:47 +02:00
doc? ( >=app-doc/doxygen-1.8.14-r1 )
${RDEPEND}"
src_unpack() {
2018-06-21 18:11:47 +02:00
git-r3_src_unpack
}
src_configure() {
2018-06-21 18:11:47 +02:00
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-01-13 22:48:07 +01: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() {
2018-06-21 18:11:47 +02:00
cmake-utils_src_compile
if use doc; then
./build_doc.sh
fi
2018-01-13 22:48:07 +01:00
}
src_install() {
2018-06-21 18:11:47 +02:00
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
2018-01-13 22:48:07 +01:00
}