1 |
commit: 0903023cf4993efba41cd9e72bd3d2e444a3e7ca |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Mon Jul 5 20:44:15 2021 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 5 22:01:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0903023c |
7 |
|
8 |
net-misc/gmid: add 1.6.2 and tests |
9 |
|
10 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
11 |
|
12 |
net-misc/gmid/Manifest | 2 +- |
13 |
.../files/gmid-1.6.2-disable-runtime-test.patch | 10 ++++ |
14 |
...pidfile.patch => gmid-1.6.2-make-pidfile.patch} | 0 |
15 |
.../gmid/{gmid-1.6.1.ebuild => gmid-1.6.2.ebuild} | 68 +++++++++++++--------- |
16 |
net-misc/gmid/gmid-9999.ebuild | 62 +++++++++++++------- |
17 |
5 files changed, 93 insertions(+), 49 deletions(-) |
18 |
|
19 |
diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest |
20 |
index 636020c63..1a3dac3a9 100644 |
21 |
--- a/net-misc/gmid/Manifest |
22 |
+++ b/net-misc/gmid/Manifest |
23 |
@@ -1 +1 @@ |
24 |
-DIST gmid-1.6.1.tar.gz 59488 BLAKE2B 147c8eb4e1c7195405fdce9bef8260e1a3acb145e9dfd2cb3fb126e4445685a3a1826906b01699429e98a61db6bb2089ec3399a1403323b36adf2555afc61bf2 SHA512 b98592e4bb5b1121fad07dc1fcbdbc95ce69a5648b3c2d22dba974511ae265255be62a330125c2da9b0b357edc2f24065fd8b475013d3d2023a8eded2c01a490 |
25 |
+DIST gmid-1.6.2.tar.gz 60293 BLAKE2B 807f4e93d1ed0f2a69a9631504ffe28d5aee4efbba85b9e7d0a8eec5b4fb50a38285478651f196f57fbcf7b4d38ff462f78c37210720353af638d76b2b28e3e1 SHA512 053e2f95449d71c72052c422b1c51657ad48f662422a121452618c69e6bac9b23bbaa2b35b52d314eb7614b9a0f413504c87cd431bc756d455dd198c79270da8 |
26 |
|
27 |
diff --git a/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch b/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch |
28 |
new file mode 100644 |
29 |
index 000000000..c6cb8c19c |
30 |
--- /dev/null |
31 |
+++ b/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch |
32 |
@@ -0,0 +1,10 @@ |
33 |
+--- a/regress/Makefile |
34 |
++++ b/regress/Makefile |
35 |
+@@ -4,7 +4,6 @@ |
36 |
+ |
37 |
+ all: puny-test testdata iri_test cert.pem testca.pem valid.crt invalid.cert.pem |
38 |
+ ./puny-test |
39 |
+- ./runtime |
40 |
+ ./iri_test |
41 |
+ |
42 |
+ puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT} |
43 |
|
44 |
diff --git a/net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch b/net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch |
45 |
similarity index 100% |
46 |
rename from net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch |
47 |
rename to net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch |
48 |
|
49 |
diff --git a/net-misc/gmid/gmid-1.6.1.ebuild b/net-misc/gmid/gmid-1.6.2.ebuild |
50 |
similarity index 57% |
51 |
rename from net-misc/gmid/gmid-1.6.1.ebuild |
52 |
rename to net-misc/gmid/gmid-1.6.2.ebuild |
53 |
index dbf6b69ac..fc7a027df 100644 |
54 |
--- a/net-misc/gmid/gmid-1.6.1.ebuild |
55 |
+++ b/net-misc/gmid/gmid-1.6.2.ebuild |
56 |
@@ -3,33 +3,31 @@ |
57 |
|
58 |
EAPI=7 |
59 |
|
60 |
-SSL_DEPS_SKIP=1 |
61 |
SSL_DAYS=36500 |
62 |
- |
63 |
inherit ssl-cert toolchain-funcs |
64 |
|
65 |
DESCRIPTION="Simple and secure Gemini server" |
66 |
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html" |
67 |
- |
68 |
-if [[ ${PV} == "9999" ]] ; then |
69 |
- inherit git-r3 |
70 |
- EGIT_REPO_URI="https://git.omarpolo.com/${PN}" |
71 |
-else |
72 |
- SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz" |
73 |
- KEYWORDS="~amd64 ~x86" |
74 |
-fi |
75 |
+SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz" |
76 |
|
77 |
LICENSE="ISC" |
78 |
SLOT="0" |
79 |
+KEYWORDS="~amd64 ~x86" |
80 |
+IUSE="+seccomp test" |
81 |
+RESTRICT="!test? ( test )" |
82 |
|
83 |
PATCHES=( "${FILESDIR}"/${P}-make-pidfile.patch ) |
84 |
|
85 |
-DEPEND="acct-user/gemini |
86 |
+DEPEND=" |
87 |
+ acct-user/gemini |
88 |
dev-libs/libevent |
89 |
dev-libs/libretls |
90 |
" |
91 |
-BDEPEND="sys-devel/flex |
92 |
- virtual/yacc" |
93 |
+BDEPEND=" |
94 |
+ sys-devel/flex |
95 |
+ virtual/pkgconfig |
96 |
+ virtual/yacc |
97 |
+" |
98 |
RDEPEND="${DEPEND}" |
99 |
|
100 |
DOCS=( README.md ChangeLog ) |
101 |
@@ -37,28 +35,46 @@ DOCS=( README.md ChangeLog ) |
102 |
src_prepare() { |
103 |
default |
104 |
|
105 |
- # QA Notice: command not found |
106 |
- # remove `etags` from the "all" target |
107 |
- sed \ |
108 |
- -e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \ |
109 |
- -i Makefile || die |
110 |
+ if use seccomp && has usersandbox ${FEATURES} ; then |
111 |
+ eapply "${FILESDIR}"/${P}-disable-runtime-test.patch |
112 |
+ fi |
113 |
} |
114 |
|
115 |
src_configure() { |
116 |
+ local conf_args |
117 |
+ |
118 |
# note: not an autoconf configure script |
119 |
- ./configure \ |
120 |
- CC="$(tc-getCC)" \ |
121 |
- PREFIX="${EPREFIX}"/usr/share \ |
122 |
- BINDIR="${EPREFIX}"/usr/bin \ |
123 |
- CFLAGS="${CFLAGS}" \ |
124 |
- LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die |
125 |
+ conf_args=( |
126 |
+ CC="$(tc-getCC)" |
127 |
+ PREFIX="${EPREFIX}"/usr/share |
128 |
+ BINDIR="${EPREFIX}"/usr/bin |
129 |
+ CFLAGS="${CFLAGS}" |
130 |
+ LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" |
131 |
+ ) |
132 |
+ if ! use seccomp ; then |
133 |
+ conf_args+=( --disable-sandbox ) |
134 |
+ fi |
135 |
+ |
136 |
+ ./configure "${conf_args[@]}" || die |
137 |
+} |
138 |
+ |
139 |
+src_compile() { |
140 |
+ emake gmid |
141 |
+ if use test ; then |
142 |
+ emake gg |
143 |
+ emake -C regress puny-test testdata iri_test |
144 |
+ fi |
145 |
+} |
146 |
+ |
147 |
+src_test() { |
148 |
+ emake regress |
149 |
} |
150 |
|
151 |
src_install() { |
152 |
default |
153 |
|
154 |
- dodir /etc/gmid |
155 |
- cp "${FILESDIR}"/gmid.conf "${ED}"/etc/gmid/gmid.conf || die |
156 |
+ insinto /etc/gmid |
157 |
+ doins "${FILESDIR}"/gmid.conf |
158 |
|
159 |
newinitd "${FILESDIR}"/gmid.initd gmid |
160 |
newconfd "${FILESDIR}"/gmid.confd gmid |
161 |
|
162 |
diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-9999.ebuild |
163 |
index a5f8bc23b..4818aacdb 100644 |
164 |
--- a/net-misc/gmid/gmid-9999.ebuild |
165 |
+++ b/net-misc/gmid/gmid-9999.ebuild |
166 |
@@ -3,50 +3,68 @@ |
167 |
|
168 |
EAPI=7 |
169 |
|
170 |
-SSL_DEPS_SKIP=1 |
171 |
SSL_DAYS=36500 |
172 |
- |
173 |
-inherit ssl-cert toolchain-funcs |
174 |
+inherit git-r3 ssl-cert toolchain-funcs |
175 |
|
176 |
DESCRIPTION="Simple and secure Gemini server" |
177 |
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html" |
178 |
- |
179 |
-if [[ ${PV} == "9999" ]] ; then |
180 |
- inherit git-r3 |
181 |
- EGIT_REPO_URI="https://git.omarpolo.com/${PN}" |
182 |
-else |
183 |
- SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz" |
184 |
- KEYWORDS="~amd64 ~x86" |
185 |
-fi |
186 |
+EGIT_REPO_URI="https://github.com/omar-polo/${PN}.git https://git.omarpolo.com/${PN}" |
187 |
|
188 |
LICENSE="ISC" |
189 |
SLOT="0" |
190 |
+IUSE="+seccomp test" |
191 |
+RESTRICT=" |
192 |
+ !test? ( test ) |
193 |
+ seccomp? ( test ) |
194 |
+" |
195 |
|
196 |
-DEPEND="acct-user/gemini |
197 |
+DEPEND=" |
198 |
+ acct-user/gemini |
199 |
dev-libs/libevent |
200 |
dev-libs/libretls |
201 |
" |
202 |
-BDEPEND="sys-devel/flex |
203 |
- virtual/yacc" |
204 |
+BDEPEND=" |
205 |
+ virtual/pkgconfig |
206 |
+ virtual/yacc |
207 |
+" |
208 |
RDEPEND="${DEPEND}" |
209 |
|
210 |
DOCS=( README.md ChangeLog ) |
211 |
|
212 |
src_configure() { |
213 |
+ local conf_args |
214 |
+ |
215 |
# note: not an autoconf configure script |
216 |
- ./configure \ |
217 |
- CC="$(tc-getCC)" \ |
218 |
- PREFIX="${EPREFIX}"/usr/share \ |
219 |
- BINDIR="${EPREFIX}"/usr/bin \ |
220 |
- CFLAGS="${CFLAGS}" \ |
221 |
- LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die |
222 |
+ conf_args=( |
223 |
+ CC="$(tc-getCC)" |
224 |
+ PREFIX="${EPREFIX}"/usr/share |
225 |
+ BINDIR="${EPREFIX}"/usr/bin |
226 |
+ CFLAGS="${CFLAGS}" |
227 |
+ LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" |
228 |
+ ) |
229 |
+ if ! use seccomp ; then |
230 |
+ conf_args+=( --disable-sandbox ) |
231 |
+ fi |
232 |
+ |
233 |
+ ./configure "${conf_args[@]}" || die |
234 |
+} |
235 |
+ |
236 |
+src_compile() { |
237 |
+ emake gmid |
238 |
+ if use test ; then |
239 |
+ emake -C regress gg puny-test testdata iri_test |
240 |
+ fi |
241 |
+} |
242 |
+ |
243 |
+src_test() { |
244 |
+ emake regress |
245 |
} |
246 |
|
247 |
src_install() { |
248 |
default |
249 |
|
250 |
- dodir /etc/gmid |
251 |
- cp "${FILESDIR}"/gmid.conf "${ED}"/etc/gmid/gmid.conf || die |
252 |
+ insinto /etc/gmid |
253 |
+ doins "${FILESDIR}"/gmid.conf |
254 |
|
255 |
newinitd "${FILESDIR}"/gmid.initd gmid |
256 |
newconfd "${FILESDIR}"/gmid.confd gmid |