1 |
commit: 87056724896f44e4d1843e0e8d17806bdecf11a5 |
2 |
Author: Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 28 00:09:12 2018 +0000 |
4 |
Commit: Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 29 01:40:49 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87056724 |
7 |
|
8 |
dev-util/tup: add new package |
9 |
|
10 |
Based on work by Cody P Schafer <dev <AT> codyps.com> (jmesmon overlay). |
11 |
|
12 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
13 |
|
14 |
dev-util/tup/Manifest | 1 + |
15 |
dev-util/tup/metadata.xml | 11 +++++ |
16 |
dev-util/tup/tup-0.7.7.ebuild | 98 +++++++++++++++++++++++++++++++++++++++++++ |
17 |
dev-util/tup/tup-9999.ebuild | 98 +++++++++++++++++++++++++++++++++++++++++++ |
18 |
4 files changed, 208 insertions(+) |
19 |
|
20 |
diff --git a/dev-util/tup/Manifest b/dev-util/tup/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000000..d9c8a9d735d |
23 |
--- /dev/null |
24 |
+++ b/dev-util/tup/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST tup-0.7.7.tar.gz 4033539 BLAKE2B dc4d3fc538c76dac53629991e32de7414f35877af8bb9f2ce4a1f80252317de7b3d2ea1542ab3e58702813b297a42c95610d14122496ac7f23acc1f8f3d62461 SHA512 05407cc923b898d5dcf6652df6395e7618d43fa4e3ace905dda09bcda26f975187761a704d360fceeb38332f29d65cd3d1f9e04c87d93dcffa4e9e2be9b35aad |
27 |
|
28 |
diff --git a/dev-util/tup/metadata.xml b/dev-util/tup/metadata.xml |
29 |
new file mode 100644 |
30 |
index 00000000000..390ab1cc501 |
31 |
--- /dev/null |
32 |
+++ b/dev-util/tup/metadata.xml |
33 |
@@ -0,0 +1,11 @@ |
34 |
+<?xml version="1.0" encoding="UTF-8"?> |
35 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
36 |
+<pkgmetadata> |
37 |
+ <maintainer type="person"> |
38 |
+ <email>andrey_utkin@g.o</email> |
39 |
+ <name>Andrey Utkin</name> |
40 |
+ </maintainer> |
41 |
+ <upstream> |
42 |
+ <remote-id type="github">gittup/tup</remote-id> |
43 |
+ </upstream> |
44 |
+</pkgmetadata> |
45 |
|
46 |
diff --git a/dev-util/tup/tup-0.7.7.ebuild b/dev-util/tup/tup-0.7.7.ebuild |
47 |
new file mode 100644 |
48 |
index 00000000000..104dd83a9db |
49 |
--- /dev/null |
50 |
+++ b/dev-util/tup/tup-0.7.7.ebuild |
51 |
@@ -0,0 +1,98 @@ |
52 |
+# Copyright 1999-2018 Gentoo Foundation |
53 |
+# Distributed under the terms of the GNU General Public License v2 |
54 |
+ |
55 |
+EAPI=7 |
56 |
+ |
57 |
+inherit toolchain-funcs |
58 |
+ |
59 |
+DESCRIPTION="A file-based build system" |
60 |
+HOMEPAGE="http://gittup.org/tup" |
61 |
+# Tup itself is GPLv2, but it bundles differently licensed software: |
62 |
+# - lua: MIT |
63 |
+# - sqlite (unused in this ebuild): public domain |
64 |
+# - inih: 3-clause BSD |
65 |
+# - red-black tree implementation: 2-clause BSD |
66 |
+# - queue implementation: 3-clause BSD |
67 |
+LICENSE="GPL-2 MIT public-domain BSD BSD-2" |
68 |
+SLOT="0" |
69 |
+ |
70 |
+if [[ "${PV}" == 9999 ]]; then |
71 |
+ EGIT_REPO_URI="https://github.com/gittup/tup.git" |
72 |
+ inherit git-r3 |
73 |
+else |
74 |
+ SRC_URI="https://github.com/gittup/tup/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
75 |
+ KEYWORDS="~amd64" |
76 |
+fi |
77 |
+ |
78 |
+DEPEND=" |
79 |
+ dev-db/sqlite:= |
80 |
+ sys-fs/fuse:= |
81 |
+" |
82 |
+RDEPEND="${DEPEND}" |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ # Use our toolchain |
86 |
+ sed -i Tuprules.tup \ |
87 |
+ -e "s:CC = gcc:CC = $(tc-getCC) ${CFLAGS} ${LDFLAGS}:" \ |
88 |
+ -e "s:ar crs:$(tc-getAR) crs:" |
89 |
+ |
90 |
+ if [[ ${PV} != 9999 ]]; then |
91 |
+ # Avoid invoking `git` to find version, use ours |
92 |
+ sed -i src/tup/link.sh \ |
93 |
+ -e 's;`git describe`;v'"${PV};" |
94 |
+ fi |
95 |
+ |
96 |
+ default |
97 |
+} |
98 |
+ |
99 |
+src_configure () { |
100 |
+ echo "CONFIG_TUP_USE_SYSTEM_SQLITE=y" >> tup.config |
101 |
+} |
102 |
+ |
103 |
+src_compile() { |
104 |
+ # Disabling namespacing because it leads to accessing /proc/<pid>/setgroups |
105 |
+ # which violates sandboxing. |
106 |
+ export TUP_NO_NAMESPACING=1 |
107 |
+ ./bootstrap-nofuse.sh || die |
108 |
+ unset TUP_NO_NAMESPACING |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ dobin tup |
113 |
+ dolib.a libtup_client.a |
114 |
+ doheader tup_client.h |
115 |
+ doman tup.1 |
116 |
+} |
117 |
+ |
118 |
+src_test() { |
119 |
+ # tup uses fuse when tracking dependencies. |
120 |
+ addwrite /dev/fuse |
121 |
+ |
122 |
+ # Disabling namespacing because it leads to accessing /proc/<pid>/setgroups |
123 |
+ # which violates sandboxing. |
124 |
+ export TUP_NO_NAMESPACING=1 |
125 |
+ |
126 |
+ # Skip tests which require namespacing or root privileges. |
127 |
+ SKIPPED_TESTS=( |
128 |
+ t4062-full-deps.sh |
129 |
+ t4063-full-deps2.sh |
130 |
+ t4064-full-deps3.sh |
131 |
+ t4065-full-deps-proc.sh |
132 |
+ t4067-full-deps5.sh |
133 |
+ t4069-gcc-coverage.sh |
134 |
+ t4072-proc-self.sh |
135 |
+ t4074-getpwd.sh |
136 |
+ t4131-proc-self-exe.sh |
137 |
+ t4132-proc-meminfo.sh |
138 |
+ t4171-dev-null.sh |
139 |
+ t5083-symlink-fullpath.sh |
140 |
+ t5084-symlink-fullpath2.sh |
141 |
+ t7048-full-deps.sh |
142 |
+ ) |
143 |
+ pushd test || die |
144 |
+ rm ${SKIPPED_TESTS[@]} || die |
145 |
+ ./test.sh || die |
146 |
+ popd || die |
147 |
+ |
148 |
+ unset TUP_NO_NAMESPACING |
149 |
+} |
150 |
|
151 |
diff --git a/dev-util/tup/tup-9999.ebuild b/dev-util/tup/tup-9999.ebuild |
152 |
new file mode 100644 |
153 |
index 00000000000..104dd83a9db |
154 |
--- /dev/null |
155 |
+++ b/dev-util/tup/tup-9999.ebuild |
156 |
@@ -0,0 +1,98 @@ |
157 |
+# Copyright 1999-2018 Gentoo Foundation |
158 |
+# Distributed under the terms of the GNU General Public License v2 |
159 |
+ |
160 |
+EAPI=7 |
161 |
+ |
162 |
+inherit toolchain-funcs |
163 |
+ |
164 |
+DESCRIPTION="A file-based build system" |
165 |
+HOMEPAGE="http://gittup.org/tup" |
166 |
+# Tup itself is GPLv2, but it bundles differently licensed software: |
167 |
+# - lua: MIT |
168 |
+# - sqlite (unused in this ebuild): public domain |
169 |
+# - inih: 3-clause BSD |
170 |
+# - red-black tree implementation: 2-clause BSD |
171 |
+# - queue implementation: 3-clause BSD |
172 |
+LICENSE="GPL-2 MIT public-domain BSD BSD-2" |
173 |
+SLOT="0" |
174 |
+ |
175 |
+if [[ "${PV}" == 9999 ]]; then |
176 |
+ EGIT_REPO_URI="https://github.com/gittup/tup.git" |
177 |
+ inherit git-r3 |
178 |
+else |
179 |
+ SRC_URI="https://github.com/gittup/tup/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
180 |
+ KEYWORDS="~amd64" |
181 |
+fi |
182 |
+ |
183 |
+DEPEND=" |
184 |
+ dev-db/sqlite:= |
185 |
+ sys-fs/fuse:= |
186 |
+" |
187 |
+RDEPEND="${DEPEND}" |
188 |
+ |
189 |
+src_prepare() { |
190 |
+ # Use our toolchain |
191 |
+ sed -i Tuprules.tup \ |
192 |
+ -e "s:CC = gcc:CC = $(tc-getCC) ${CFLAGS} ${LDFLAGS}:" \ |
193 |
+ -e "s:ar crs:$(tc-getAR) crs:" |
194 |
+ |
195 |
+ if [[ ${PV} != 9999 ]]; then |
196 |
+ # Avoid invoking `git` to find version, use ours |
197 |
+ sed -i src/tup/link.sh \ |
198 |
+ -e 's;`git describe`;v'"${PV};" |
199 |
+ fi |
200 |
+ |
201 |
+ default |
202 |
+} |
203 |
+ |
204 |
+src_configure () { |
205 |
+ echo "CONFIG_TUP_USE_SYSTEM_SQLITE=y" >> tup.config |
206 |
+} |
207 |
+ |
208 |
+src_compile() { |
209 |
+ # Disabling namespacing because it leads to accessing /proc/<pid>/setgroups |
210 |
+ # which violates sandboxing. |
211 |
+ export TUP_NO_NAMESPACING=1 |
212 |
+ ./bootstrap-nofuse.sh || die |
213 |
+ unset TUP_NO_NAMESPACING |
214 |
+} |
215 |
+ |
216 |
+src_install() { |
217 |
+ dobin tup |
218 |
+ dolib.a libtup_client.a |
219 |
+ doheader tup_client.h |
220 |
+ doman tup.1 |
221 |
+} |
222 |
+ |
223 |
+src_test() { |
224 |
+ # tup uses fuse when tracking dependencies. |
225 |
+ addwrite /dev/fuse |
226 |
+ |
227 |
+ # Disabling namespacing because it leads to accessing /proc/<pid>/setgroups |
228 |
+ # which violates sandboxing. |
229 |
+ export TUP_NO_NAMESPACING=1 |
230 |
+ |
231 |
+ # Skip tests which require namespacing or root privileges. |
232 |
+ SKIPPED_TESTS=( |
233 |
+ t4062-full-deps.sh |
234 |
+ t4063-full-deps2.sh |
235 |
+ t4064-full-deps3.sh |
236 |
+ t4065-full-deps-proc.sh |
237 |
+ t4067-full-deps5.sh |
238 |
+ t4069-gcc-coverage.sh |
239 |
+ t4072-proc-self.sh |
240 |
+ t4074-getpwd.sh |
241 |
+ t4131-proc-self-exe.sh |
242 |
+ t4132-proc-meminfo.sh |
243 |
+ t4171-dev-null.sh |
244 |
+ t5083-symlink-fullpath.sh |
245 |
+ t5084-symlink-fullpath2.sh |
246 |
+ t7048-full-deps.sh |
247 |
+ ) |
248 |
+ pushd test || die |
249 |
+ rm ${SKIPPED_TESTS[@]} || die |
250 |
+ ./test.sh || die |
251 |
+ popd || die |
252 |
+ |
253 |
+ unset TUP_NO_NAMESPACING |
254 |
+} |