2020-03-27 00:32:05 +01:00
|
|
|
# Copyright 1999-2020 Gentoo Authors
|
2018-12-26 05:10:11 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2019-07-30 10:53:04 +02:00
|
|
|
EAPI=7
|
2018-12-26 05:10:11 +01:00
|
|
|
|
2020-10-24 10:40:14 +02:00
|
|
|
inherit cmake
|
2018-12-26 05:10:11 +01:00
|
|
|
|
|
|
|
if [[ "${PV}" == "9999" ]]; then
|
|
|
|
inherit git-r3
|
|
|
|
fi
|
|
|
|
|
2019-09-13 17:06:00 +02:00
|
|
|
DESCRIPTION="Library to generate identicons for C++."
|
2018-12-26 05:10:11 +01:00
|
|
|
HOMEPAGE="https://schlomp.space/tastytea/identiconpp"
|
|
|
|
if [[ "${PV}" == "9999" ]]; then
|
|
|
|
EGIT_REPO_URI="https://schlomp.space/tastytea/identiconpp.git"
|
|
|
|
else
|
|
|
|
SRC_URI="https://schlomp.space/tastytea/identiconpp/archive/${PV}.tar.gz
|
|
|
|
-> ${P}.tar.gz"
|
2022-09-13 19:52:59 +02:00
|
|
|
S="${WORKDIR}/${PN}"
|
|
|
|
KEYWORDS="~amd64"
|
2018-12-26 05:10:11 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
2019-07-30 10:53:04 +02:00
|
|
|
IUSE="doc examples test"
|
2018-12-26 05:10:11 +01:00
|
|
|
|
2022-09-13 19:52:59 +02:00
|
|
|
RESTRICT="!test? ( test )"
|
|
|
|
|
2018-12-26 05:10:11 +01:00
|
|
|
RDEPEND="
|
2020-03-27 00:32:05 +01:00
|
|
|
media-gfx/imagemagick[png,cxx]
|
2018-12-26 05:10:11 +01:00
|
|
|
"
|
|
|
|
DEPEND="
|
2024-02-14 10:01:33 +01:00
|
|
|
dev-build/cmake
|
2018-12-26 05:10:11 +01:00
|
|
|
doc? ( app-doc/doxygen )
|
2019-01-02 07:05:58 +01:00
|
|
|
test? ( dev-cpp/catch )
|
2018-12-26 05:10:11 +01:00
|
|
|
${RDEPEND}
|
|
|
|
"
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
if use doc; then
|
|
|
|
HTML_DOCS="doc/html/*"
|
|
|
|
fi
|
|
|
|
if use examples; then
|
2019-09-13 19:31:43 +02:00
|
|
|
DOCS+=(examples/example.cpp)
|
2018-12-26 05:10:11 +01:00
|
|
|
fi
|
2019-01-02 07:05:58 +01:00
|
|
|
|
|
|
|
if use test; then
|
|
|
|
mycmakeargs+=(-DWITH_TESTS=YES)
|
|
|
|
fi
|
2020-10-24 10:40:14 +02:00
|
|
|
|
|
|
|
cmake_src_prepare
|
2018-12-26 05:10:11 +01:00
|
|
|
}
|
|
|
|
|
2018-12-27 21:00:41 +01:00
|
|
|
src_compile() {
|
2020-10-24 10:40:14 +02:00
|
|
|
cmake_src_compile
|
2018-12-27 20:48:47 +01:00
|
|
|
|
2018-12-26 05:10:11 +01:00
|
|
|
if use doc; then
|
|
|
|
./build_doc.sh
|
|
|
|
fi
|
|
|
|
}
|
2019-09-13 17:06:00 +02:00
|
|
|
|
|
|
|
src_test() {
|
2020-10-24 10:40:14 +02:00
|
|
|
BUILD_DIR="${BUILD_DIR}/tests" cmake_src_test
|
2019-09-13 17:06:00 +02:00
|
|
|
}
|