Gentoo Archives: gentoo-commits

From: Dennis Lamm <expeditioneer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libsavitar/
Date: Mon, 30 Nov 2020 18:37:55
Message-Id: 1606761459.de524be6a9e3e4c69dda24d5c3d00e273cd0a729.expeditioneer@gentoo
1 commit: de524be6a9e3e4c69dda24d5c3d00e273cd0a729
2 Author: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 29 08:58:25 2020 +0000
4 Commit: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 18:37:39 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de524be6
7
8 dev-libs/libsavitar: bump to 4.8.0
9
10 Signed-off-by: Dennis Lamm <expeditoneer <AT> gentoo.org>
11 Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
12
13 dev-libs/libsavitar/Manifest | 1 +
14 dev-libs/libsavitar/libsavitar-4.8.0.ebuild | 76 +++++++++++++++++++++++++++++
15 2 files changed, 77 insertions(+)
16
17 diff --git a/dev-libs/libsavitar/Manifest b/dev-libs/libsavitar/Manifest
18 index 4ffc1c2f7db..393650d2b34 100644
19 --- a/dev-libs/libsavitar/Manifest
20 +++ b/dev-libs/libsavitar/Manifest
21 @@ -1,2 +1,3 @@
22 DIST libsavitar-4.6.1.tar.gz 98202 BLAKE2B 8025d11316fb777a037c01fb9411a6368e5e7a1b64c4a695a114ff94c1a2802d4eaeb6c8512e14db74ddbbffabd2bc98f93f61adfc2cbdc7ef329d30b105bd4b SHA512 49a0f2e98bc26d84b638d6eb44f9fd93811d92ad398f3c85b1abf2cca3172667315b907d30807eb70b497bd652d95cd443c8cc4daa68c8852787ef46fda47cc2
23 DIST libsavitar-4.7.0.tar.gz 99070 BLAKE2B 3e27624a62568b8d45ddf8fde60a0377faa81eb9e031e32e935d992304b7249d4f3fa7d9bc45b370882e203368a90ad48347faa600f339d096c67432e23d8ddc SHA512 bd19d3ee8be570791bf4f3d5be5eb44d5bba3181a693633d5703ba91c78d3725dbe051c888ec60cea057790a561beeb98b96c41e6584f630f2410bdb97e0cb4d
24 +DIST libsavitar-4.8.0.tar.gz 99030 BLAKE2B a1c1e252aa942114a1d7112d2e661b5e63403502642826c6b92c408c8eabd3d9fb12b44dc286f9a0dce3d42f473adae2441d357f237c903c8a0df936c41f9f37 SHA512 65d31986b120c9e717b10d0bac420f2582d9f1b44051d88f89475408d1f7997e144001c61f180eac554de33f1f8c1ec9555a6c23bdd797315624f57030f7ec8c
25
26 diff --git a/dev-libs/libsavitar/libsavitar-4.8.0.ebuild b/dev-libs/libsavitar/libsavitar-4.8.0.ebuild
27 new file mode 100644
28 index 00000000000..3afa1673bb7
29 --- /dev/null
30 +++ b/dev-libs/libsavitar/libsavitar-4.8.0.ebuild
31 @@ -0,0 +1,76 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{6..8} )
38 +
39 +inherit cmake python-single-r1
40 +
41 +MY_PN="libSavitar"
42 +
43 +DESCRIPTION="C++ implementation of 3mf loading with SIP python bindings"
44 +HOMEPAGE="https://github.com/Ultimaker/libSavitar"
45 +SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
46 +
47 +LICENSE="LGPL-3"
48 +SLOT="0/3"
49 +KEYWORDS="~amd64 ~arm64 ~x86"
50 +
51 +IUSE="+python static-libs test"
52 +RESTRICT="!test? ( test )"
53 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
54 +
55 +RDEPEND="${PYTHON_DEPS}
56 + dev-libs/pugixml
57 + $(python_gen_cond_dep '
58 + dev-python/sip[${PYTHON_MULTI_USEDEP}]
59 + ')"
60 +
61 +DEPEND="${RDEPEND}
62 + test? (
63 + dev-cpp/gtest
64 + dev-cpp/tbb
65 + )"
66 +
67 +S="${WORKDIR}/${MY_PN}-${PV}"
68 +BUILD_DIR="${S}/build"
69 +
70 +PATCHES=( "${FILESDIR}/${PN}-4.7.0-use-system-pugixml.patch" )
71 +
72 +pkg_setup() {
73 + use python && python-single-r1_pkg_setup
74 +}
75 +
76 +src_prepare() {
77 + # remove bundled pugixml
78 + rm -r "${S}"/pugixml || die
79 +
80 + find "${S}"/src -type f -name '*.cpp' -o -name '*.h' | xargs sed -i \
81 + -e 's "../pugixml/src/pugixml.hpp" <pugixml.hpp> g' || die
82 +
83 + if use test; then
84 + find "${S}"/tests -type f -name '*.cpp' -o -name '*.h' | xargs sed -i \
85 + -e 's "../pugixml/src/pugixml.hpp" <pugixml.hpp> g' || die
86 + fi
87 +
88 + # find SIP for current python version, not the latest installed
89 + sed -i -e "s/find_package(Python3 3.4 REQUIRED/find_package(Python3 ${EPYTHON##python} EXACT REQUIRED/g" \
90 + CMakeLists.txt cmake/FindSIP.cmake || die
91 +
92 + cmake_src_prepare
93 +}
94 +
95 +src_configure() {
96 + local mycmakeargs=(
97 + -DBUILD_PYTHON=$(usex python ON OFF)
98 + -DBUILD_STATIC=$(usex static-libs ON OFF)
99 + -DBUILD_TESTS=$(usex test ON OFF)
100 + )
101 +
102 + cmake_src_configure
103 +}
104 +
105 +src_test() {
106 + cmake_src_test
107 +}