Gentoo Archives: gentoo-commits

From: Yuan Liao <liaoyuan@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-util/blueprint-compiler/
Date: Tue, 29 Nov 2022 22:12:05
Message-Id: 1669758838.9884bdffec0a7f3023ec7ab2a552bea6838a8870.liaoyuan@gentoo
1 commit: 9884bdffec0a7f3023ec7ab2a552bea6838a8870
2 Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
3 AuthorDate: Tue Nov 29 21:51:32 2022 +0000
4 Commit: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
5 CommitDate: Tue Nov 29 21:53:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9884bdff
7
8 dev-util/blueprint-compiler: Add 0.6.0
9
10 Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
11
12 dev-util/blueprint-compiler/Manifest | 1 +
13 .../blueprint-compiler-0.6.0.ebuild | 88 ++++++++++++++++++++++
14 2 files changed, 89 insertions(+)
15
16 diff --git a/dev-util/blueprint-compiler/Manifest b/dev-util/blueprint-compiler/Manifest
17 index 45004460c..00f72b978 100644
18 --- a/dev-util/blueprint-compiler/Manifest
19 +++ b/dev-util/blueprint-compiler/Manifest
20 @@ -1,2 +1,3 @@
21 DIST blueprint-compiler-v0.2.0.tar.bz2 45480 BLAKE2B 64c477070ea684002dc1e38eac8d22633ae7b46efb9887733118838c04d2c4e386d3825b3e07dcba1adada83afad439025d082d3bd74d2d737c1f5552085a716 SHA512 dfb16354a13a18c0e6db52dc0b88ab7339fbf3eb56541d0a273551c009c7f05c651d41814397986ef2cebdefb6d4e57d0eb3690dd2a7a9eebfb0cfb23e96e3e6
22 DIST blueprint-compiler-v0.4.0.tar.bz2 50396 BLAKE2B eb51af35030fbaa583b809de0449e7e54143a7b5e582b9be24a0345ca704fb1b1d2778d96ebfb02cc66e4c4acdc97a0356e03624f33be1ea28316ed815c0e334 SHA512 9eb3b17e8b44ecd400c1ec683bf1edee54877a0f16e545ba2f9f9cb683163983fd096ff9403ab36658f92678036f4b6b43e1343cf2bc4793332ef4b2972408ac
23 +DIST blueprint-compiler-v0.6.0.tar.bz2 56896 BLAKE2B 318ffa52b2fbf3b07058e5b4d2f9bb0ef1f6614586b79968889921964b454e5c26d44e58a18185263797f7569135662d14471bafd8e501d7c6386e88972193d0 SHA512 458016f4eabef15026cb3ee675111984b19af8a9139bc412dfb48dfef56b0d0ff028316001d0ce04a90b50d6785c92d799f17ed42ca53fc7582345729ae02207
24
25 diff --git a/dev-util/blueprint-compiler/blueprint-compiler-0.6.0.ebuild b/dev-util/blueprint-compiler/blueprint-compiler-0.6.0.ebuild
26 new file mode 100644
27 index 000000000..4d9743646
28 --- /dev/null
29 +++ b/dev-util/blueprint-compiler/blueprint-compiler-0.6.0.ebuild
30 @@ -0,0 +1,88 @@
31 +# Copyright 2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{9..11} )
37 +
38 +inherit meson python-r1
39 +
40 +if [[ ${PV} == *9999 ]]; then
41 + inherit git-r3
42 + EGIT_REPO_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler.git"
43 +else
44 + SRC_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/v${PV}/blueprint-compiler-v${PV}.tar.bz2"
45 + S="${WORKDIR}/${PN}-v${PV}"
46 + KEYWORDS="~amd64"
47 +fi
48 +
49 +DESCRIPTION="Compiler for Blueprint, a markup language for GTK user interfaces"
50 +HOMEPAGE="https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/"
51 +
52 +LICENSE="LGPL-3+"
53 +SLOT="0"
54 +
55 +IUSE="doc test"
56 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
57 +RESTRICT="!test? ( test )"
58 +
59 +BDEPEND="
60 + ${PYTHON_DEPS}
61 + doc? (
62 + dev-python/sphinx[${PYTHON_USEDEP}]
63 + dev-python/furo[${PYTHON_USEDEP}]
64 + )
65 +"
66 +
67 +DEPEND="
68 + test? (
69 + gui-libs/gtk:4[introspection]
70 + )
71 +"
72 +
73 +RDEPEND="
74 + ${PYTHON_DEPS}
75 +"
76 +
77 +src_configure() {
78 + local emesonargs=(
79 + $(meson_use doc docs)
80 + )
81 + python_foreach_impl meson_src_configure
82 +}
83 +
84 +src_compile() {
85 + python_foreach_impl meson_src_compile
86 +}
87 +
88 +src_test() {
89 + python_foreach_impl meson_src_test
90 +}
91 +
92 +src_install() {
93 + my_src_install() {
94 + local exe="${ED}/usr/bin/${PN}"
95 +
96 + # Meson installs a Python script at ${ED}/usr/bin/${PN}; on
97 + # Gentoo, the script should go into ${ED}/usr/lib/python-exec,
98 + # and ${ED}/usr/bin/${PN} should be a symbolic link to
99 + # ${ED}/usr/lib/python-exec/python-exec2.
100 + #
101 + # When multiple PYTHON_TARGETS are enabled, then after the
102 + # package has been installed for one Python implementation,
103 + # Meson will follow the ${ED}/usr/bin/${PN} symbolic link and
104 + # install the script at ${ED}/usr/lib/python-exec/python-exec2
105 + # for the remaining implementations, leading to file collision.
106 + if [[ -L "${exe}" ]]; then
107 + rm -v "${exe}" || die "Failed to remove symbolic link ${exe}"
108 + fi
109 +
110 + meson_src_install
111 + python_doscript "${exe}"
112 + python_optimize
113 + }
114 +
115 + python_foreach_impl my_src_install
116 + use doc && build_sphinx docs
117 + einstalldocs
118 +}