*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-libs / libsavitar / libsavitar-3.6.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_6 )
7 inherit cmake-utils python-single-r1
8
9 MY_PN="libSavitar"
10
11 DESCRIPTION="C++ implementation of 3mf loading with SIP python bindings"
12 HOMEPAGE="https://github.com/Ultimaker/libSavitar"
13 SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 LICENSE="LGPL-3"
16 SLOT="0/3"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="+python static-libs"
19 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
20
21 RDEPEND="${PYTHON_DEPS}
22         dev-libs/pugixml
23         dev-python/sip[${PYTHON_USEDEP}]"
24
25 DEPEND="${RDEPEND}"
26
27 S="${WORKDIR}/${MY_PN}-${PV}"
28
29 PATCHES=( "${FILESDIR}"/${PN}-3.3.0-remove-packaged-pugixml.patch )
30
31 pkg_setup() {
32         use python && python-single-r1_pkg_setup
33 }
34
35 src_configure() {
36         local mycmakeargs=(
37                 -DBUILD_PYTHON=$(usex python ON OFF)
38                 -DBUILD_STATIC=$(usex static-libs ON OFF)
39         )
40         use python && mycmakeargs+=( -DPYTHON_SITE_PACKAGES_DIR="$(python_get_sitedir)" )
41         cmake-utils_src_configure
42 }