Gentoo Archives: gentoo-commits

From: Matthew Smith <matthew@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libcharon/
Date: Mon, 28 Feb 2022 19:44:00
Message-Id: 1646077377.cf79d35588e2be13401a3219ec98b3303075df5d.matthew@gentoo
1 commit: cf79d35588e2be13401a3219ec98b3303075df5d
2 Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 28 19:11:47 2022 +0000
4 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 28 19:42:57 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf79d355
7
8 dev-libs/libcharon: add 4.13.0
9
10 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
11
12 dev-libs/libcharon/Manifest | 1 +
13 dev-libs/libcharon/libcharon-4.13.0.ebuild | 72 ++++++++++++++++++++++++++++++
14 2 files changed, 73 insertions(+)
15
16 diff --git a/dev-libs/libcharon/Manifest b/dev-libs/libcharon/Manifest
17 index c3a3afcb59a1..a7ff2bd4a809 100644
18 --- a/dev-libs/libcharon/Manifest
19 +++ b/dev-libs/libcharon/Manifest
20 @@ -1,2 +1,3 @@
21 DIST libcharon-4.12.1.tar.gz 151783 BLAKE2B 54cac090a924ee086e15fddc0cd2acc8dfbc3dfd2dc91b27ffb1d81a64dcf30a46bf62e2c443d8de46a6f2a02e6d06dc1ea454d19f57f7dd93d5f81a44477dba SHA512 dcc0b89703e36e8f3d508bbda91b6fcc8313ac09c4d5e09cc6f0770ccdde18e421daa7e6b52958c5705dbb6987961635e3e31a61810ba54bf8b842af7afba94d
22 +DIST libcharon-4.13.0.tar.gz 151775 BLAKE2B f8a8b59b361ffc9b54e0047e0cc3824e2a92cf341aa9664712d020e07e5f2facda6f2d1827998c4af0958a3b05070738a20d93d7723a2f3708e601b70474653c SHA512 cd6e4cd696bcbebe5aa6a53f5222fbb8f982ff21d165adcd8854769b19df2d15ea6287100ba09ddd85ac80d3f86dbfae9ac050ee50f082223bf0acb542413d8c
23 DIST libcharon-4.9.1.tar.gz 151243 BLAKE2B 8557efe4667a83297a4bcfc8307e2322a379e52d50ad1648d873a923e182b3be1651a13c7402ac041fd134036a75a42e825adf2cc27271af218db44af7e48473 SHA512 41d611f8d3bf0f762a38a00c159104df04b73cd5c4f7e9ebcfe3ac9cdd0c8e31e505c4fd4ef8f8a6f1c02bf882bb3e14ea4e92c8b15169a91cbd1815e36310fa
24
25 diff --git a/dev-libs/libcharon/libcharon-4.13.0.ebuild b/dev-libs/libcharon/libcharon-4.13.0.ebuild
26 new file mode 100644
27 index 000000000000..5a215127935d
28 --- /dev/null
29 +++ b/dev-libs/libcharon/libcharon-4.13.0.ebuild
30 @@ -0,0 +1,72 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +
38 +inherit cmake python-single-r1
39 +
40 +MY_PN="libCharon"
41 +
42 +DESCRIPTION="This library facilitates communication between Cura and its backend"
43 +HOMEPAGE="https://github.com/Ultimaker/libCharon"
44 +SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="LGPL-3"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm64 ~x86"
49 +
50 +IUSE="+client +dbus test"
51 +RESTRICT="!test? ( test )"
52 +
53 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
54 +RDEPEND="
55 + ${PYTHON_DEPS}
56 + dbus? (
57 + acct-group/ultimaker
58 + acct-user/ultimaker
59 + sys-apps/dbus
60 + )"
61 +
62 +DEPEND="${PYTHON_DEPS}
63 + test? (
64 + $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
65 + )"
66 +
67 +S="${WORKDIR}/${MY_PN}-${PV}"
68 +
69 +src_prepare() {
70 + # use current python version, not the latest installed
71 + # fix python install location
72 + sed -i \
73 + -e "s:find_package(Python3 3.4 REQUIRED:find_package(Python3 ${EPYTHON##python} EXACT REQUIRED:g" \
74 + -e "s:lib\${LIB_SUFFIX}/python\${Python3_VERSION_MAJOR}\.\${Python3_VERSION_MINOR}/site-packages:$(python_get_sitedir):g" \
75 + CMakeLists.txt || die
76 +
77 + sed -i -e "s:/usr/lib/python3/dist-packages/Charon/Service/main.py:$(python_get_sitedir)/Charon/Service/main.py:g" service/charon.service || die
78 +
79 + cmake_src_prepare
80 +}
81 +
82 +src_configure() {
83 + local mycmakeargs=(
84 + -DINSTALL_CLIENT=$(usex client ON OFF)
85 + -DINSTALL_SERVICE=$(usex dbus ON OFF)
86 + -DPython3_EXECUTABLE="${PYTHON}"
87 + )
88 +
89 + cmake_src_configure
90 +}
91 +
92 +src_install() {
93 + cmake_src_install
94 + python_optimize
95 +}
96 +
97 +pkg_postinst() {
98 + if use dbus ; then
99 + elog "To start the Charon File Metadata service at boot, add it to the default runlevel with:"
100 + elog " systemctl enable charon"
101 + fi
102 +}