1 |
commit: 4c92aee93dc8e74d760e0a0d2c649e80d3cceae7 |
2 |
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Feb 19 23:39:45 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 19 23:39:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4c92aee9 |
7 |
|
8 |
dev-util/blueprint-compiler: Initial import |
9 |
|
10 |
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com> |
11 |
|
12 |
dev-util/blueprint-compiler/Manifest | 1 + |
13 |
.../blueprint-compiler-0.1.0_pre20220219.ebuild | 91 ++++++++++++++++++++++ |
14 |
.../blueprint-compiler-9999.ebuild | 91 ++++++++++++++++++++++ |
15 |
dev-util/blueprint-compiler/metadata.xml | 11 +++ |
16 |
4 files changed, 194 insertions(+) |
17 |
|
18 |
diff --git a/dev-util/blueprint-compiler/Manifest b/dev-util/blueprint-compiler/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000..c0379ca60 |
21 |
--- /dev/null |
22 |
+++ b/dev-util/blueprint-compiler/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST blueprint-compiler-0.1.0_pre20220219.tar.gz 51398 BLAKE2B 282fa95486d0fd18d8fc41682f29a4ecd9b94b4f4b617697809630d66d7fdcaebd8f1830bc0675f1f5917787c80d0d15f10a72230378390fd32642fc9473ccc2 SHA512 ca4b0f654bb212750f5381fa6d95dc66e0fbc494962bb60d370ec919bae239f657bcc3873522b3c903eb2441e684d83d794835df249b8107e40ac5429a53f067 |
25 |
|
26 |
diff --git a/dev-util/blueprint-compiler/blueprint-compiler-0.1.0_pre20220219.ebuild b/dev-util/blueprint-compiler/blueprint-compiler-0.1.0_pre20220219.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000..6dfccd58c |
29 |
--- /dev/null |
30 |
+++ b/dev-util/blueprint-compiler/blueprint-compiler-0.1.0_pre20220219.ebuild |
31 |
@@ -0,0 +1,91 @@ |
32 |
+# Copyright 2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{9..10} ) |
38 |
+ |
39 |
+inherit meson python-r1 |
40 |
+ |
41 |
+if [[ ${PV} == *9999 ]]; then |
42 |
+ inherit git-r3 |
43 |
+ EGIT_REPO_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler.git" |
44 |
+else |
45 |
+ # Upstream has not started to tag releases yet, so each keyworded (normal) |
46 |
+ # ebuild is to be based on a Git commit snapshot at this moment. |
47 |
+ # Live ebuild: Might be intentionally left blank |
48 |
+ # Normal ebuild: Fill in commit SHA-1 object name to this variable's value |
49 |
+ GIT_COMMIT="8ce748e62b6f7d10cf16a075a37c8f4b1f0267e4" |
50 |
+ KEYWORDS="~amd64" |
51 |
+ |
52 |
+ SRC_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/${GIT_COMMIT}/blueprint-compiler-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
53 |
+ S="${WORKDIR}/${PN}-${GIT_COMMIT}" |
54 |
+fi |
55 |
+ |
56 |
+DESCRIPTION="Compiler for Blueprint, a markup language for GTK user interfaces" |
57 |
+HOMEPAGE="https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/" |
58 |
+ |
59 |
+LICENSE="LGPL-3+" |
60 |
+SLOT="0" |
61 |
+ |
62 |
+IUSE="doc" |
63 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
64 |
+ |
65 |
+BDEPEND=" |
66 |
+ ${PYTHON_DEPS} |
67 |
+ doc? ( |
68 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
69 |
+ dev-python/furo[${PYTHON_USEDEP}] |
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 |
+ # Install Sphinx-generated documentation only once |
115 |
+ # since the documentation is supposed to be identical |
116 |
+ # between different Python implementations |
117 |
+ use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* ) |
118 |
+ } |
119 |
+ |
120 |
+ python_foreach_impl my_src_install |
121 |
+ einstalldocs |
122 |
+} |
123 |
|
124 |
diff --git a/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild b/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild |
125 |
new file mode 100644 |
126 |
index 000000000..7ffa8d633 |
127 |
--- /dev/null |
128 |
+++ b/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild |
129 |
@@ -0,0 +1,91 @@ |
130 |
+# Copyright 2022 Gentoo Authors |
131 |
+# Distributed under the terms of the GNU General Public License v2 |
132 |
+ |
133 |
+EAPI=8 |
134 |
+ |
135 |
+PYTHON_COMPAT=( python3_{9..10} ) |
136 |
+ |
137 |
+inherit meson python-r1 |
138 |
+ |
139 |
+if [[ ${PV} == *9999 ]]; then |
140 |
+ inherit git-r3 |
141 |
+ EGIT_REPO_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler.git" |
142 |
+else |
143 |
+ # Upstream has not started to tag releases yet, so each keyworded (normal) |
144 |
+ # ebuild is to be based on a Git commit snapshot at this moment. |
145 |
+ # Live ebuild: Might be intentionally left blank |
146 |
+ # Normal ebuild: Fill in commit SHA-1 object name to this variable's value |
147 |
+ GIT_COMMIT="" |
148 |
+ KEYWORDS="~amd64" |
149 |
+ |
150 |
+ SRC_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/${GIT_COMMIT}/blueprint-compiler-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
151 |
+ S="${WORKDIR}/${PN}-${GIT_COMMIT}" |
152 |
+fi |
153 |
+ |
154 |
+DESCRIPTION="Compiler for Blueprint, a markup language for GTK user interfaces" |
155 |
+HOMEPAGE="https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/" |
156 |
+ |
157 |
+LICENSE="LGPL-3+" |
158 |
+SLOT="0" |
159 |
+ |
160 |
+IUSE="doc" |
161 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
162 |
+ |
163 |
+BDEPEND=" |
164 |
+ ${PYTHON_DEPS} |
165 |
+ doc? ( |
166 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
167 |
+ dev-python/furo[${PYTHON_USEDEP}] |
168 |
+ ) |
169 |
+" |
170 |
+ |
171 |
+RDEPEND=" |
172 |
+ ${PYTHON_DEPS} |
173 |
+" |
174 |
+ |
175 |
+src_configure() { |
176 |
+ local emesonargs=( |
177 |
+ $(meson_use doc docs) |
178 |
+ ) |
179 |
+ python_foreach_impl meson_src_configure |
180 |
+} |
181 |
+ |
182 |
+src_compile() { |
183 |
+ python_foreach_impl meson_src_compile |
184 |
+} |
185 |
+ |
186 |
+src_test() { |
187 |
+ python_foreach_impl meson_src_test |
188 |
+} |
189 |
+ |
190 |
+src_install() { |
191 |
+ my_src_install() { |
192 |
+ local exe="${ED}/usr/bin/${PN}" |
193 |
+ |
194 |
+ # Meson installs a Python script at ${ED}/usr/bin/${PN}; on |
195 |
+ # Gentoo, the script should go into ${ED}/usr/lib/python-exec, |
196 |
+ # and ${ED}/usr/bin/${PN} should be a symbolic link to |
197 |
+ # ${ED}/usr/lib/python-exec/python-exec2. |
198 |
+ # |
199 |
+ # When multiple PYTHON_TARGETS are enabled, then after the |
200 |
+ # package has been installed for one Python implementation, |
201 |
+ # Meson will follow the ${ED}/usr/bin/${PN} symbolic link and |
202 |
+ # install the script at ${ED}/usr/lib/python-exec/python-exec2 |
203 |
+ # for the remaining implementations, leading to file collision. |
204 |
+ if [[ -L "${exe}" ]]; then |
205 |
+ rm -v "${exe}" || die "Failed to remove symbolic link ${exe}" |
206 |
+ fi |
207 |
+ |
208 |
+ meson_src_install |
209 |
+ python_doscript "${exe}" |
210 |
+ python_optimize |
211 |
+ |
212 |
+ # Install Sphinx-generated documentation only once |
213 |
+ # since the documentation is supposed to be identical |
214 |
+ # between different Python implementations |
215 |
+ use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* ) |
216 |
+ } |
217 |
+ |
218 |
+ python_foreach_impl my_src_install |
219 |
+ einstalldocs |
220 |
+} |
221 |
|
222 |
diff --git a/dev-util/blueprint-compiler/metadata.xml b/dev-util/blueprint-compiler/metadata.xml |
223 |
new file mode 100644 |
224 |
index 000000000..bb8f2c8f4 |
225 |
--- /dev/null |
226 |
+++ b/dev-util/blueprint-compiler/metadata.xml |
227 |
@@ -0,0 +1,11 @@ |
228 |
+<?xml version="1.0" encoding="UTF-8"?> |
229 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
230 |
+<pkgmetadata> |
231 |
+ <maintainer type="person"> |
232 |
+ <email>liaoyuan@×××××.com</email> |
233 |
+ <name>Yuan Liao</name> |
234 |
+ </maintainer> |
235 |
+ <upstream> |
236 |
+ <doc>https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/</doc> |
237 |
+ </upstream> |
238 |
+</pkgmetadata> |