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

56 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."
HOMEPAGE="https://github.com/tastytea/mastodon-cpp"
EGIT_REPO_URI="https://github.com/tastytea/mastodon-cpp.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
2018-01-22 17:34:18 +01:00
IUSE="doc debug"
RDEPEND=">=dev-libs/boost-1.63.0"
DEPEND=">=dev-util/cmake-3.9.6
doc? ( >=app-doc/doxygen-1.8.13-r1 )
${RDEPEND}"
src_unpack() {
git-r3_src_unpack
}
src_configure() {
local mycmakeargs=(
2018-01-13 22:48:07 +01:00
-DWITH_DOC=NO
-DWITH_EXAMPLES=NO
-DWITH_TESTS=NO
)
2018-01-22 17:34:18 +01:00
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() {
if use doc; then
./build_doc.sh
fi
cmake-utils_src_compile
}
src_install() {
if use doc; then
HTML_DOCS="doc/html/*"
for file in src/examples/*.cpp; do
dodoc ${file}
done
fi
cmake-utils_src_install
}