1 |
commit: e524e80e019e084297d8ef63e5eec2051a296121 |
2 |
Author: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Dec 14 09:15:09 2019 +0000 |
4 |
Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Dec 14 09:15:09 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=e524e80e |
7 |
|
8 |
add phoronix-test-suite, missing dependencies and eclass xdg-utils-r1 |
9 |
|
10 |
Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com> |
11 |
|
12 |
app-benchmarks/phoronix-test-suite/Manifest | 6 + |
13 |
app-benchmarks/phoronix-test-suite/metadata.xml | 7 + |
14 |
.../phoronix-test-suite-8.8.1.ebuild | 144 ++++++++++++++++ |
15 |
.../phoronix-test-suite-9.0.1.ebuild | 144 ++++++++++++++++ |
16 |
.../phoronix-test-suite-9999.ebuild | 144 ++++++++++++++++ |
17 |
dev-php/fpdf/Manifest | 3 + |
18 |
dev-php/fpdf/fpdf-1.81.ebuild | 34 ++++ |
19 |
dev-php/fpdf/metadata.xml | 21 +++ |
20 |
eclass/xdg-utils-r1.eclass | 186 +++++++++++++++++++++ |
21 |
9 files changed, 689 insertions(+) |
22 |
|
23 |
diff --git a/app-benchmarks/phoronix-test-suite/Manifest b/app-benchmarks/phoronix-test-suite/Manifest |
24 |
new file mode 100644 |
25 |
index 0000000..e10ce27 |
26 |
--- /dev/null |
27 |
+++ b/app-benchmarks/phoronix-test-suite/Manifest |
28 |
@@ -0,0 +1,6 @@ |
29 |
+DIST phoronix-test-suite-8.8.1.tar.gz 890982 BLAKE2B bc8c96bd30c0c1854edef0a0c5f4eda6cd91b20d2ceb8c3a31c5ad2d93223d8ac8b95f112484d62e7523942461c76f17cfb2813ee8685f3b2105318ea2ba2ac2 SHA512 5c60ead063be27271654253a1319cf676ea06df89874489da0f2b931b588e6e7c25df823ec647b392fa6606e8b28fa8350cca39c199d950bd11671af7cab160c |
30 |
+DIST phoronix-test-suite-9.0.1.tar.gz 1263655 BLAKE2B dd2be7776c46d7b78135a43214372709b36d87b1d24a959c6baa25afd6562157d212ef4c4d67f2bd17e97aa75e656de236ec7cfcd7c2b816890d1b24749a57f5 SHA512 7584f85fb57ca64128d6342c42244fe2498eec51e378bf4265f447b178d24dcde5855b644faa5937953ee262657e24dd5bb689a95e5843c184b205986e29ebce |
31 |
+EBUILD phoronix-test-suite-8.8.1.ebuild 4766 BLAKE2B 5594f3852917357b3a0f36b6083fe1178ee9a39e232521bf1018eaec5e69c6ecc1778b85a4cbfe5c0b341ef46c1b6888bc57628748a5bf8b2c57c3e48de22c93 SHA512 60a6beb97e21e495e7fc393557dfe39bd4174bb4f843a626db19fa2a2ee8d7e9d25ab2dbfc69172f301bc3cb0f607e301cf9322be191c4a477404f404b04e5cd |
32 |
+EBUILD phoronix-test-suite-9.0.1.ebuild 4766 BLAKE2B 5594f3852917357b3a0f36b6083fe1178ee9a39e232521bf1018eaec5e69c6ecc1778b85a4cbfe5c0b341ef46c1b6888bc57628748a5bf8b2c57c3e48de22c93 SHA512 60a6beb97e21e495e7fc393557dfe39bd4174bb4f843a626db19fa2a2ee8d7e9d25ab2dbfc69172f301bc3cb0f607e301cf9322be191c4a477404f404b04e5cd |
33 |
+EBUILD phoronix-test-suite-9999.ebuild 4766 BLAKE2B 5594f3852917357b3a0f36b6083fe1178ee9a39e232521bf1018eaec5e69c6ecc1778b85a4cbfe5c0b341ef46c1b6888bc57628748a5bf8b2c57c3e48de22c93 SHA512 60a6beb97e21e495e7fc393557dfe39bd4174bb4f843a626db19fa2a2ee8d7e9d25ab2dbfc69172f301bc3cb0f607e301cf9322be191c4a477404f404b04e5cd |
34 |
+MISC metadata.xml 223 BLAKE2B 6b03411bb798e5da6a370643ce0ffa41f4627cd9125d5c7fddd4bee814de5b8f8dd5fff73a0872c921474022fefc963766cab3a1a8fe52e6752e2501e40a3a63 SHA512 258a180336834206986eed33d45839d4a6e399b2bf966401d1fd6ef22e64a2dcdd041e846d0c1daf82ff49da3fd23e77c88a0dcdad2167cd88fc9b16f8ea35e9 |
35 |
|
36 |
diff --git a/app-benchmarks/phoronix-test-suite/metadata.xml b/app-benchmarks/phoronix-test-suite/metadata.xml |
37 |
new file mode 100644 |
38 |
index 0000000..068da26 |
39 |
--- /dev/null |
40 |
+++ b/app-benchmarks/phoronix-test-suite/metadata.xml |
41 |
@@ -0,0 +1,7 @@ |
42 |
+<?xml version="1.0" encoding="UTF-8"?> |
43 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
44 |
+<pkgmetadata> |
45 |
+ <upstream> |
46 |
+ <remote-id type="github">phoronix-test-suite</remote-id> |
47 |
+ </upstream> |
48 |
+</pkgmetadata> |
49 |
|
50 |
diff --git a/app-benchmarks/phoronix-test-suite/phoronix-test-suite-8.8.1.ebuild b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-8.8.1.ebuild |
51 |
new file mode 100644 |
52 |
index 0000000..ccd32a4 |
53 |
--- /dev/null |
54 |
+++ b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-8.8.1.ebuild |
55 |
@@ -0,0 +1,144 @@ |
56 |
+# Copyright 1999-2019 Gentoo Authors |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+ |
59 |
+# shellcheck disable=SC2034 |
60 |
+ |
61 |
+EAPI=7 |
62 |
+ |
63 |
+inherit bash-completion-r1 xdg-utils-r1 |
64 |
+ |
65 |
+DESCRIPTION="Phoronix's comprehensive, cross-platform testing and benchmark suite" |
66 |
+HOMEPAGE="http://www.phoronix-test-suite.com" |
67 |
+ |
68 |
+LICENSE="GPL-3" |
69 |
+SLOT="0" |
70 |
+ |
71 |
+if [[ ${PV} == "9999" ]] ; then |
72 |
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" |
73 |
+ EGIT3_STORE_DIR="${T}" |
74 |
+ inherit git-r3 |
75 |
+ SRC_URI="" |
76 |
+ KEYWORDS="" |
77 |
+else |
78 |
+ major_version="$(ver_cut 1-3)" |
79 |
+ minor_version="$(ver_cut 4-5)" |
80 |
+ MY_PV="${major_version}" |
81 |
+ MY_P="${PN}-${MY_PV}" |
82 |
+ KEYWORDS="~amd64 ~x86" |
83 |
+ if [ ! -z "${minor_version}" ]; then |
84 |
+ MY_PV="${MY_PV}${minor_version/pre/m}" |
85 |
+ MY_P="${MY_P}${minor_version/pre/m}" |
86 |
+ fi |
87 |
+ SRC_URI="https://github.com/phoronix-test-suite/${PN}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
88 |
+ S="${WORKDIR}/${MY_P}" |
89 |
+ unset -v minor_version major_version |
90 |
+fi |
91 |
+ |
92 |
+IUSE="sdl" |
93 |
+ |
94 |
+DEPEND="" |
95 |
+RDEPEND="${DEPEND} |
96 |
+ app-arch/p7zip |
97 |
+ media-libs/libpng |
98 |
+ >=dev-lang/php-5.3:=[cli,curl,gd,json,posix,pcntl,sockets,ssl,truetype,xml,zip,zlib] |
99 |
+ dev-php/fpdf |
100 |
+ www-servers/apache |
101 |
+ x11-base/xorg-server |
102 |
+ sdl? ( |
103 |
+ media-libs/libsdl |
104 |
+ media-libs/sdl-net |
105 |
+ media-libs/sdl-image |
106 |
+ media-libs/libsdl2 |
107 |
+ media-libs/sdl2-net |
108 |
+ media-libs/sdl2-image |
109 |
+ media-libs/sdl2-mixer |
110 |
+ |
111 |
+ )" |
112 |
+ |
113 |
+check_php_config() |
114 |
+{ |
115 |
+ local slot |
116 |
+ for slot in $(eselect --brief php list cli); do |
117 |
+ local php_dir="/etc/php/cli-${slot}" |
118 |
+ |
119 |
+ if [[ -f "${EROOT%/}${php_dir}/php.ini" ]]; then |
120 |
+ dodir "${php_dir}" |
121 |
+ cp -f "${EROOT%/}${php_dir}/php.ini" "${ED%/}${php_dir}/php.ini" \ |
122 |
+ || die "cp failed: copy php.ini file" |
123 |
+ sed -i -e 's|^allow_url_fopen .*|allow_url_fopen = On|g' "${ED%/}${php_dir}/php.ini" \ |
124 |
+ || die "sed failed: modify php.ini file" |
125 |
+ elif [[ "$(eselect php show cli)" == "${slot}" ]]; then |
126 |
+ ewarn "${slot} does not have a php.ini file." |
127 |
+ ewarn "${PN} needs the 'allow_url_fopen' option set to \"On\"" |
128 |
+ ewarn "for downloading to work properly." |
129 |
+ ewarn |
130 |
+ else |
131 |
+ elog "${slot} does not have a php.ini file." |
132 |
+ elog "${PN} may need the 'allow_url_fopen' option set to \"On\"" |
133 |
+ elog "for downloading to work properly if you switch to ${slot}" |
134 |
+ elog |
135 |
+ fi |
136 |
+ done |
137 |
+} |
138 |
+ |
139 |
+get_optional_dependencies() |
140 |
+{ |
141 |
+ (($# == 1)) || die "${FUNCNAME[0]}(): invalid number of arguments: ${#} (1)" |
142 |
+ |
143 |
+ local -a array_package_names |
144 |
+ local field_value ifield package_generic_name optional_packages_xmlline package_names installable_packages="" |
145 |
+ local package_close_regexp="</Package>" \ |
146 |
+ package_generic_name_regexp="^.*<GenericName>|</GenericName>.*$" \ |
147 |
+ package_names_regexp="^.*<PackageName>|</PackageName>.*$" |
148 |
+ |
149 |
+ line=0 |
150 |
+ while IFS=$'\n' read -r optional_packages_xmlline; do |
151 |
+ if [[ "${optional_packages_xmlline}" =~ ${package_generic_name_regexp} ]]; then |
152 |
+ package_generic_name="$(echo "${optional_packages_xmlline}" | sed -r "s@${package_generic_name_regexp}@@g")" |
153 |
+ elif [[ "${optional_packages_xmlline}" =~ ${package_names_regexp} ]]; then |
154 |
+ package_names="$(echo "${optional_packages_xmlline}" | sed -r -e "s@${package_names_regexp}@@g" -e 's@(^[[:blank:]]+|[[:blank:]]+$)$@@g' )" |
155 |
+ ifield=0 |
156 |
+ # shellcheck disable=SC2206 |
157 |
+ array_package_names=( ${package_names} ) |
158 |
+ for (( ifield=0 ; ifield < ${#array_package_names[@]} ; ++ifield )); do |
159 |
+ field_value="${array_package_names[ifield]}" |
160 |
+ [[ ${field_value} =~ ^.+/.+$ ]] || continue # skip invalid package atoms |
161 |
+ |
162 |
+ if ! has_version "${field_value}"; then |
163 |
+ installable_packages="${installable_packages}${installable_packages:+ }${field_value}" |
164 |
+ fi |
165 |
+ done |
166 |
+ elif [[ "${optional_packages_xmlline}" =~ ${package_close_regexp} && ! -z "${installable_packages}" ]]; then |
167 |
+ ewarn " ${package_generic_name}: ${installable_packages}" |
168 |
+ installable_packages="" |
169 |
+ fi |
170 |
+ done <<< "${1}" |
171 |
+} |
172 |
+ |
173 |
+src_prepare() { |
174 |
+ # BASH completion helper function "have" test is depreciated |
175 |
+ sed -i -e '/^have phoronix-test-suite &&$/d' "${S}/pts-core/static/bash_completion" \ |
176 |
+ || die "sed failed: remove PTS bash completion have test" |
177 |
+ # Remove all dependency resolving shell scripts - security vulnerability |
178 |
+ rm -rf "${S}/pts-core/external-test-dependencies/scripts" |
179 |
+ eapply_user |
180 |
+} |
181 |
+ |
182 |
+src_install() { |
183 |
+ # Store the contents of this file - since it will be installed / deleted before we need it. |
184 |
+ GENTOO_OPTIONAL_PKGS_XML="$(cat "${S}/pts-core/external-test-dependencies/xml/gentoo-packages.xml")" |
185 |
+ newbashcomp pts-core/static/bash_completion "${PN}" |
186 |
+ DESTDIR="${D}" "${S}/install-sh" "${EPREFIX%/}/usr" |
187 |
+ |
188 |
+ # Fix the cli-php config for downloading to work. |
189 |
+ check_php_config |
190 |
+} |
191 |
+ |
192 |
+pkg_postinst() { |
193 |
+ xdg_icon_cache_update |
194 |
+ xdg_mimeinfo_database_update |
195 |
+ |
196 |
+ ewarn "${PN} has the following optional package dependencies:" |
197 |
+ get_optional_dependencies "${GENTOO_OPTIONAL_PKGS_XML}" |
198 |
+ unset -v GENTOO_OPTIONAL_PKGS_XML |
199 |
+} |
200 |
|
201 |
diff --git a/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9.0.1.ebuild b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9.0.1.ebuild |
202 |
new file mode 100644 |
203 |
index 0000000..ccd32a4 |
204 |
--- /dev/null |
205 |
+++ b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9.0.1.ebuild |
206 |
@@ -0,0 +1,144 @@ |
207 |
+# Copyright 1999-2019 Gentoo Authors |
208 |
+# Distributed under the terms of the GNU General Public License v2 |
209 |
+ |
210 |
+# shellcheck disable=SC2034 |
211 |
+ |
212 |
+EAPI=7 |
213 |
+ |
214 |
+inherit bash-completion-r1 xdg-utils-r1 |
215 |
+ |
216 |
+DESCRIPTION="Phoronix's comprehensive, cross-platform testing and benchmark suite" |
217 |
+HOMEPAGE="http://www.phoronix-test-suite.com" |
218 |
+ |
219 |
+LICENSE="GPL-3" |
220 |
+SLOT="0" |
221 |
+ |
222 |
+if [[ ${PV} == "9999" ]] ; then |
223 |
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" |
224 |
+ EGIT3_STORE_DIR="${T}" |
225 |
+ inherit git-r3 |
226 |
+ SRC_URI="" |
227 |
+ KEYWORDS="" |
228 |
+else |
229 |
+ major_version="$(ver_cut 1-3)" |
230 |
+ minor_version="$(ver_cut 4-5)" |
231 |
+ MY_PV="${major_version}" |
232 |
+ MY_P="${PN}-${MY_PV}" |
233 |
+ KEYWORDS="~amd64 ~x86" |
234 |
+ if [ ! -z "${minor_version}" ]; then |
235 |
+ MY_PV="${MY_PV}${minor_version/pre/m}" |
236 |
+ MY_P="${MY_P}${minor_version/pre/m}" |
237 |
+ fi |
238 |
+ SRC_URI="https://github.com/phoronix-test-suite/${PN}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
239 |
+ S="${WORKDIR}/${MY_P}" |
240 |
+ unset -v minor_version major_version |
241 |
+fi |
242 |
+ |
243 |
+IUSE="sdl" |
244 |
+ |
245 |
+DEPEND="" |
246 |
+RDEPEND="${DEPEND} |
247 |
+ app-arch/p7zip |
248 |
+ media-libs/libpng |
249 |
+ >=dev-lang/php-5.3:=[cli,curl,gd,json,posix,pcntl,sockets,ssl,truetype,xml,zip,zlib] |
250 |
+ dev-php/fpdf |
251 |
+ www-servers/apache |
252 |
+ x11-base/xorg-server |
253 |
+ sdl? ( |
254 |
+ media-libs/libsdl |
255 |
+ media-libs/sdl-net |
256 |
+ media-libs/sdl-image |
257 |
+ media-libs/libsdl2 |
258 |
+ media-libs/sdl2-net |
259 |
+ media-libs/sdl2-image |
260 |
+ media-libs/sdl2-mixer |
261 |
+ |
262 |
+ )" |
263 |
+ |
264 |
+check_php_config() |
265 |
+{ |
266 |
+ local slot |
267 |
+ for slot in $(eselect --brief php list cli); do |
268 |
+ local php_dir="/etc/php/cli-${slot}" |
269 |
+ |
270 |
+ if [[ -f "${EROOT%/}${php_dir}/php.ini" ]]; then |
271 |
+ dodir "${php_dir}" |
272 |
+ cp -f "${EROOT%/}${php_dir}/php.ini" "${ED%/}${php_dir}/php.ini" \ |
273 |
+ || die "cp failed: copy php.ini file" |
274 |
+ sed -i -e 's|^allow_url_fopen .*|allow_url_fopen = On|g' "${ED%/}${php_dir}/php.ini" \ |
275 |
+ || die "sed failed: modify php.ini file" |
276 |
+ elif [[ "$(eselect php show cli)" == "${slot}" ]]; then |
277 |
+ ewarn "${slot} does not have a php.ini file." |
278 |
+ ewarn "${PN} needs the 'allow_url_fopen' option set to \"On\"" |
279 |
+ ewarn "for downloading to work properly." |
280 |
+ ewarn |
281 |
+ else |
282 |
+ elog "${slot} does not have a php.ini file." |
283 |
+ elog "${PN} may need the 'allow_url_fopen' option set to \"On\"" |
284 |
+ elog "for downloading to work properly if you switch to ${slot}" |
285 |
+ elog |
286 |
+ fi |
287 |
+ done |
288 |
+} |
289 |
+ |
290 |
+get_optional_dependencies() |
291 |
+{ |
292 |
+ (($# == 1)) || die "${FUNCNAME[0]}(): invalid number of arguments: ${#} (1)" |
293 |
+ |
294 |
+ local -a array_package_names |
295 |
+ local field_value ifield package_generic_name optional_packages_xmlline package_names installable_packages="" |
296 |
+ local package_close_regexp="</Package>" \ |
297 |
+ package_generic_name_regexp="^.*<GenericName>|</GenericName>.*$" \ |
298 |
+ package_names_regexp="^.*<PackageName>|</PackageName>.*$" |
299 |
+ |
300 |
+ line=0 |
301 |
+ while IFS=$'\n' read -r optional_packages_xmlline; do |
302 |
+ if [[ "${optional_packages_xmlline}" =~ ${package_generic_name_regexp} ]]; then |
303 |
+ package_generic_name="$(echo "${optional_packages_xmlline}" | sed -r "s@${package_generic_name_regexp}@@g")" |
304 |
+ elif [[ "${optional_packages_xmlline}" =~ ${package_names_regexp} ]]; then |
305 |
+ package_names="$(echo "${optional_packages_xmlline}" | sed -r -e "s@${package_names_regexp}@@g" -e 's@(^[[:blank:]]+|[[:blank:]]+$)$@@g' )" |
306 |
+ ifield=0 |
307 |
+ # shellcheck disable=SC2206 |
308 |
+ array_package_names=( ${package_names} ) |
309 |
+ for (( ifield=0 ; ifield < ${#array_package_names[@]} ; ++ifield )); do |
310 |
+ field_value="${array_package_names[ifield]}" |
311 |
+ [[ ${field_value} =~ ^.+/.+$ ]] || continue # skip invalid package atoms |
312 |
+ |
313 |
+ if ! has_version "${field_value}"; then |
314 |
+ installable_packages="${installable_packages}${installable_packages:+ }${field_value}" |
315 |
+ fi |
316 |
+ done |
317 |
+ elif [[ "${optional_packages_xmlline}" =~ ${package_close_regexp} && ! -z "${installable_packages}" ]]; then |
318 |
+ ewarn " ${package_generic_name}: ${installable_packages}" |
319 |
+ installable_packages="" |
320 |
+ fi |
321 |
+ done <<< "${1}" |
322 |
+} |
323 |
+ |
324 |
+src_prepare() { |
325 |
+ # BASH completion helper function "have" test is depreciated |
326 |
+ sed -i -e '/^have phoronix-test-suite &&$/d' "${S}/pts-core/static/bash_completion" \ |
327 |
+ || die "sed failed: remove PTS bash completion have test" |
328 |
+ # Remove all dependency resolving shell scripts - security vulnerability |
329 |
+ rm -rf "${S}/pts-core/external-test-dependencies/scripts" |
330 |
+ eapply_user |
331 |
+} |
332 |
+ |
333 |
+src_install() { |
334 |
+ # Store the contents of this file - since it will be installed / deleted before we need it. |
335 |
+ GENTOO_OPTIONAL_PKGS_XML="$(cat "${S}/pts-core/external-test-dependencies/xml/gentoo-packages.xml")" |
336 |
+ newbashcomp pts-core/static/bash_completion "${PN}" |
337 |
+ DESTDIR="${D}" "${S}/install-sh" "${EPREFIX%/}/usr" |
338 |
+ |
339 |
+ # Fix the cli-php config for downloading to work. |
340 |
+ check_php_config |
341 |
+} |
342 |
+ |
343 |
+pkg_postinst() { |
344 |
+ xdg_icon_cache_update |
345 |
+ xdg_mimeinfo_database_update |
346 |
+ |
347 |
+ ewarn "${PN} has the following optional package dependencies:" |
348 |
+ get_optional_dependencies "${GENTOO_OPTIONAL_PKGS_XML}" |
349 |
+ unset -v GENTOO_OPTIONAL_PKGS_XML |
350 |
+} |
351 |
|
352 |
diff --git a/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild |
353 |
new file mode 100644 |
354 |
index 0000000..ccd32a4 |
355 |
--- /dev/null |
356 |
+++ b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild |
357 |
@@ -0,0 +1,144 @@ |
358 |
+# Copyright 1999-2019 Gentoo Authors |
359 |
+# Distributed under the terms of the GNU General Public License v2 |
360 |
+ |
361 |
+# shellcheck disable=SC2034 |
362 |
+ |
363 |
+EAPI=7 |
364 |
+ |
365 |
+inherit bash-completion-r1 xdg-utils-r1 |
366 |
+ |
367 |
+DESCRIPTION="Phoronix's comprehensive, cross-platform testing and benchmark suite" |
368 |
+HOMEPAGE="http://www.phoronix-test-suite.com" |
369 |
+ |
370 |
+LICENSE="GPL-3" |
371 |
+SLOT="0" |
372 |
+ |
373 |
+if [[ ${PV} == "9999" ]] ; then |
374 |
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" |
375 |
+ EGIT3_STORE_DIR="${T}" |
376 |
+ inherit git-r3 |
377 |
+ SRC_URI="" |
378 |
+ KEYWORDS="" |
379 |
+else |
380 |
+ major_version="$(ver_cut 1-3)" |
381 |
+ minor_version="$(ver_cut 4-5)" |
382 |
+ MY_PV="${major_version}" |
383 |
+ MY_P="${PN}-${MY_PV}" |
384 |
+ KEYWORDS="~amd64 ~x86" |
385 |
+ if [ ! -z "${minor_version}" ]; then |
386 |
+ MY_PV="${MY_PV}${minor_version/pre/m}" |
387 |
+ MY_P="${MY_P}${minor_version/pre/m}" |
388 |
+ fi |
389 |
+ SRC_URI="https://github.com/phoronix-test-suite/${PN}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
390 |
+ S="${WORKDIR}/${MY_P}" |
391 |
+ unset -v minor_version major_version |
392 |
+fi |
393 |
+ |
394 |
+IUSE="sdl" |
395 |
+ |
396 |
+DEPEND="" |
397 |
+RDEPEND="${DEPEND} |
398 |
+ app-arch/p7zip |
399 |
+ media-libs/libpng |
400 |
+ >=dev-lang/php-5.3:=[cli,curl,gd,json,posix,pcntl,sockets,ssl,truetype,xml,zip,zlib] |
401 |
+ dev-php/fpdf |
402 |
+ www-servers/apache |
403 |
+ x11-base/xorg-server |
404 |
+ sdl? ( |
405 |
+ media-libs/libsdl |
406 |
+ media-libs/sdl-net |
407 |
+ media-libs/sdl-image |
408 |
+ media-libs/libsdl2 |
409 |
+ media-libs/sdl2-net |
410 |
+ media-libs/sdl2-image |
411 |
+ media-libs/sdl2-mixer |
412 |
+ |
413 |
+ )" |
414 |
+ |
415 |
+check_php_config() |
416 |
+{ |
417 |
+ local slot |
418 |
+ for slot in $(eselect --brief php list cli); do |
419 |
+ local php_dir="/etc/php/cli-${slot}" |
420 |
+ |
421 |
+ if [[ -f "${EROOT%/}${php_dir}/php.ini" ]]; then |
422 |
+ dodir "${php_dir}" |
423 |
+ cp -f "${EROOT%/}${php_dir}/php.ini" "${ED%/}${php_dir}/php.ini" \ |
424 |
+ || die "cp failed: copy php.ini file" |
425 |
+ sed -i -e 's|^allow_url_fopen .*|allow_url_fopen = On|g' "${ED%/}${php_dir}/php.ini" \ |
426 |
+ || die "sed failed: modify php.ini file" |
427 |
+ elif [[ "$(eselect php show cli)" == "${slot}" ]]; then |
428 |
+ ewarn "${slot} does not have a php.ini file." |
429 |
+ ewarn "${PN} needs the 'allow_url_fopen' option set to \"On\"" |
430 |
+ ewarn "for downloading to work properly." |
431 |
+ ewarn |
432 |
+ else |
433 |
+ elog "${slot} does not have a php.ini file." |
434 |
+ elog "${PN} may need the 'allow_url_fopen' option set to \"On\"" |
435 |
+ elog "for downloading to work properly if you switch to ${slot}" |
436 |
+ elog |
437 |
+ fi |
438 |
+ done |
439 |
+} |
440 |
+ |
441 |
+get_optional_dependencies() |
442 |
+{ |
443 |
+ (($# == 1)) || die "${FUNCNAME[0]}(): invalid number of arguments: ${#} (1)" |
444 |
+ |
445 |
+ local -a array_package_names |
446 |
+ local field_value ifield package_generic_name optional_packages_xmlline package_names installable_packages="" |
447 |
+ local package_close_regexp="</Package>" \ |
448 |
+ package_generic_name_regexp="^.*<GenericName>|</GenericName>.*$" \ |
449 |
+ package_names_regexp="^.*<PackageName>|</PackageName>.*$" |
450 |
+ |
451 |
+ line=0 |
452 |
+ while IFS=$'\n' read -r optional_packages_xmlline; do |
453 |
+ if [[ "${optional_packages_xmlline}" =~ ${package_generic_name_regexp} ]]; then |
454 |
+ package_generic_name="$(echo "${optional_packages_xmlline}" | sed -r "s@${package_generic_name_regexp}@@g")" |
455 |
+ elif [[ "${optional_packages_xmlline}" =~ ${package_names_regexp} ]]; then |
456 |
+ package_names="$(echo "${optional_packages_xmlline}" | sed -r -e "s@${package_names_regexp}@@g" -e 's@(^[[:blank:]]+|[[:blank:]]+$)$@@g' )" |
457 |
+ ifield=0 |
458 |
+ # shellcheck disable=SC2206 |
459 |
+ array_package_names=( ${package_names} ) |
460 |
+ for (( ifield=0 ; ifield < ${#array_package_names[@]} ; ++ifield )); do |
461 |
+ field_value="${array_package_names[ifield]}" |
462 |
+ [[ ${field_value} =~ ^.+/.+$ ]] || continue # skip invalid package atoms |
463 |
+ |
464 |
+ if ! has_version "${field_value}"; then |
465 |
+ installable_packages="${installable_packages}${installable_packages:+ }${field_value}" |
466 |
+ fi |
467 |
+ done |
468 |
+ elif [[ "${optional_packages_xmlline}" =~ ${package_close_regexp} && ! -z "${installable_packages}" ]]; then |
469 |
+ ewarn " ${package_generic_name}: ${installable_packages}" |
470 |
+ installable_packages="" |
471 |
+ fi |
472 |
+ done <<< "${1}" |
473 |
+} |
474 |
+ |
475 |
+src_prepare() { |
476 |
+ # BASH completion helper function "have" test is depreciated |
477 |
+ sed -i -e '/^have phoronix-test-suite &&$/d' "${S}/pts-core/static/bash_completion" \ |
478 |
+ || die "sed failed: remove PTS bash completion have test" |
479 |
+ # Remove all dependency resolving shell scripts - security vulnerability |
480 |
+ rm -rf "${S}/pts-core/external-test-dependencies/scripts" |
481 |
+ eapply_user |
482 |
+} |
483 |
+ |
484 |
+src_install() { |
485 |
+ # Store the contents of this file - since it will be installed / deleted before we need it. |
486 |
+ GENTOO_OPTIONAL_PKGS_XML="$(cat "${S}/pts-core/external-test-dependencies/xml/gentoo-packages.xml")" |
487 |
+ newbashcomp pts-core/static/bash_completion "${PN}" |
488 |
+ DESTDIR="${D}" "${S}/install-sh" "${EPREFIX%/}/usr" |
489 |
+ |
490 |
+ # Fix the cli-php config for downloading to work. |
491 |
+ check_php_config |
492 |
+} |
493 |
+ |
494 |
+pkg_postinst() { |
495 |
+ xdg_icon_cache_update |
496 |
+ xdg_mimeinfo_database_update |
497 |
+ |
498 |
+ ewarn "${PN} has the following optional package dependencies:" |
499 |
+ get_optional_dependencies "${GENTOO_OPTIONAL_PKGS_XML}" |
500 |
+ unset -v GENTOO_OPTIONAL_PKGS_XML |
501 |
+} |
502 |
|
503 |
diff --git a/dev-php/fpdf/Manifest b/dev-php/fpdf/Manifest |
504 |
new file mode 100644 |
505 |
index 0000000..e68ceef |
506 |
--- /dev/null |
507 |
+++ b/dev-php/fpdf/Manifest |
508 |
@@ -0,0 +1,3 @@ |
509 |
+DIST fpdf181.tgz 127608 BLAKE2B e1632e03c8c041f89e8f5572987f38b22fd693f8926c4144fe677ae6267ede2c33cf9df697489459f41bd5e6905eaae0e64fdc40c6b4172220a686e8cda95f48 SHA512 cf025691f1ad6f124b98baef87b64da79b3a866660db31d9a6de094f54504874f4cdd9c1b976cb802d38d3b760f1126bf98634e0b37ed299c21c05035ea676c9 |
510 |
+EBUILD fpdf-1.81.ebuild 705 BLAKE2B 06d98ca4b8444c92adecbe88aa40b23b83015946c1f178fd46c602eb3e6026ad968de5cf1c817e80e8f6ddc0e3494d44923023b9c5b4943632c8046bbe8ffac5 SHA512 005ff3152ae7a7e91781e4bc569e990858276cd8deb4180d830e97698443f709b75812444858149e54f25a6ab1433d2ceac73f1268a8fec4ce12e4a3b4bae156 |
511 |
+MISC metadata.xml 885 BLAKE2B 259f25c3d3b366631a76c2d126cff6f2c3ab248b54018ae366ad4bb9027fecf0e96736f668f0894b678e1da2942d5f902794c0f7e9e18ecaff88c0c8dfcca261 SHA512 62c0ed5a47d02ab53a724ffa5f13da6cfc7b183ed1216d739b41d5f61b5274a2010ee54c58497919f99848a65ea7fde7f8672ad9e933cc018926dc78722818a0 |
512 |
|
513 |
diff --git a/dev-php/fpdf/fpdf-1.81.ebuild b/dev-php/fpdf/fpdf-1.81.ebuild |
514 |
new file mode 100644 |
515 |
index 0000000..f5c73d5 |
516 |
--- /dev/null |
517 |
+++ b/dev-php/fpdf/fpdf-1.81.ebuild |
518 |
@@ -0,0 +1,34 @@ |
519 |
+# Copyright 1999-2019 Gentoo Authors |
520 |
+# Distributed under the terms of the GNU General Public License v2 |
521 |
+ |
522 |
+# shellcheck disable=SC2034 |
523 |
+ |
524 |
+EAPI=7 |
525 |
+ |
526 |
+MY_PV="$(ver_rs 1 '')" |
527 |
+MY_P="${PN}${MY_PV}" |
528 |
+ |
529 |
+DESCRIPTION="FPDF is a PHP class which allows to generate PDF files with pure PHP" |
530 |
+HOMEPAGE="http://www.fpdf.org/" |
531 |
+SRC_URI="http://www.fpdf.org/en/dl.php?v=${MY_PV}&f=tgz -> ${MY_P}.tgz" |
532 |
+ |
533 |
+LICENSE="freedist" |
534 |
+SLOT="0" |
535 |
+KEYWORDS="~amd64 ~x86" |
536 |
+IUSE="doc" |
537 |
+ |
538 |
+RDEPEND="dev-lang/php:*[gd,zlib]" |
539 |
+ |
540 |
+S="${WORKDIR}/${MY_P}" |
541 |
+ |
542 |
+DOCS=( install.txt ) |
543 |
+ |
544 |
+src_install() { |
545 |
+ insinto "/usr/share/php/${PN}" |
546 |
+ doins -r ./*.php font/ makefont/ |
547 |
+ |
548 |
+ if use doc; then |
549 |
+ docinto html |
550 |
+ dodoc -r changelog.htm fpdf.css FAQ.htm html/ tutorial/ |
551 |
+ fi |
552 |
+} |
553 |
|
554 |
diff --git a/dev-php/fpdf/metadata.xml b/dev-php/fpdf/metadata.xml |
555 |
new file mode 100644 |
556 |
index 0000000..663eef0 |
557 |
--- /dev/null |
558 |
+++ b/dev-php/fpdf/metadata.xml |
559 |
@@ -0,0 +1,21 @@ |
560 |
+<?xml version="1.0" encoding="UTF-8"?> |
561 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
562 |
+<pkgmetadata> |
563 |
+ <longdescription> |
564 |
+FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. |
565 |
+ |
566 |
+FPDF has other advantages: high level functions. Here is a list of its main features: |
567 |
+ |
568 |
+* Choice of measure unit, page format and margins |
569 |
+* Page header and footer management |
570 |
+* Automatic page break |
571 |
+* Automatic line break and text justification |
572 |
+* Image support (JPEG, PNG and GIF) |
573 |
+* Colors |
574 |
+* Links |
575 |
+* TrueType, Type1 and encoding support |
576 |
+* Page compression |
577 |
+ |
578 |
+FPDF requires no extension (except Zlib to enable compression and GD for GIF support). The latest version requires at least PHP 5.1. |
579 |
+ </longdescription> |
580 |
+</pkgmetadata> |
581 |
|
582 |
diff --git a/eclass/xdg-utils-r1.eclass b/eclass/xdg-utils-r1.eclass |
583 |
new file mode 100644 |
584 |
index 0000000..5f90437 |
585 |
--- /dev/null |
586 |
+++ b/eclass/xdg-utils-r1.eclass |
587 |
@@ -0,0 +1,186 @@ |
588 |
+# Copyright 1999-2018 Gentoo Foundation |
589 |
+# Distributed under the terms of the GNU General Public License v2 |
590 |
+ |
591 |
+# @ECLASS: xdg-utils.eclass |
592 |
+# @MAINTAINER: |
593 |
+# gnome@g.o |
594 |
+# @AUTHOR: |
595 |
+# Original author: Gilles Dartiguelongue <eva@g.o> |
596 |
+# @BLURB: Auxiliary functions commonly used by XDG compliant packages. |
597 |
+# @DESCRIPTION: |
598 |
+# This eclass provides a set of auxiliary functions needed by most XDG |
599 |
+# compliant packages. |
600 |
+# It provides XDG stack related functions such as: |
601 |
+# * XDG .desktop files cache management |
602 |
+# * XDG mime information database management |
603 |
+ |
604 |
+case "${EAPI:-0}" in |
605 |
+ 0|1|2|3|4|5|6|7) ;; |
606 |
+ *) die "EAPI=${EAPI} is not supported" ;; |
607 |
+esac |
608 |
+ |
609 |
+# @ECLASS-VARIABLE: DESKTOP_DATABASE_UPDATE_BIN |
610 |
+# @INTERNAL |
611 |
+# @DESCRIPTION: |
612 |
+# Path to update-desktop-database |
613 |
+: "${DESKTOP_DATABASE_UPDATE_BIN:="/usr/bin/update-desktop-database"}" |
614 |
+ |
615 |
+# @ECLASS-VARIABLE: DESKTOP_DATABASE_DIR |
616 |
+# @INTERNAL |
617 |
+# @DESCRIPTION: |
618 |
+# Directory where .desktop files database is stored |
619 |
+: "${DESKTOP_DATABASE_DIR="/usr/share/applications"}" |
620 |
+ |
621 |
+# @ECLASS-VARIABLE: GTK_UPDATE_ICON_CACHE |
622 |
+# @INTERNAL |
623 |
+# @DESCRIPTION: |
624 |
+# Path to gtk-update-icon-cache |
625 |
+: "${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"}" |
626 |
+ |
627 |
+# @ECLASS-VARIABLE: MIMEINFO_DATABASE_UPDATE_BIN |
628 |
+# @INTERNAL |
629 |
+# @DESCRIPTION: |
630 |
+# Path to update-mime-database |
631 |
+: "${MIMEINFO_DATABASE_UPDATE_BIN:="/usr/bin/update-mime-database"}" |
632 |
+ |
633 |
+# @ECLASS-VARIABLE: MIMEINFO_DATABASE_DIR |
634 |
+# @INTERNAL |
635 |
+# @DESCRIPTION: |
636 |
+# Directory where .desktop files database is stored |
637 |
+: "${MIMEINFO_DATABASE_DIR:="/usr/share/mime"}" |
638 |
+ |
639 |
+# @ECLASS-VARIABLE: XDG_ECLASS_ICONS |
640 |
+# @INTERNAL |
641 |
+# @DEFAULT_UNSET |
642 |
+# @DESCRIPTION: |
643 |
+# List of icons provided by the package |
644 |
+ |
645 |
+# @FUNCTION: xdg_environment_reset |
646 |
+# @DESCRIPTION: |
647 |
+# Clean up environment for clean builds. |
648 |
+xdg_environment_reset() { |
649 |
+ # Prepare XDG base directories |
650 |
+ export XDG_DATA_HOME="${HOME}/.local/share" |
651 |
+ export XDG_CONFIG_HOME="${HOME}/.config" |
652 |
+ export XDG_CACHE_HOME="${HOME}/.cache" |
653 |
+ export XDG_RUNTIME_DIR="${T}/run" |
654 |
+ mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \ |
655 |
+ "${XDG_RUNTIME_DIR}" || die |
656 |
+ # This directory needs to be owned by the user, and chmod 0700 |
657 |
+ # https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
658 |
+ chmod 0700 "${XDG_RUNTIME_DIR}" || die |
659 |
+ |
660 |
+ unset DBUS_SESSION_BUS_ADDRESS |
661 |
+} |
662 |
+ |
663 |
+# @FUNCTION: xdg_desktop_database_update |
664 |
+# @DESCRIPTION: |
665 |
+# Updates the .desktop files database. |
666 |
+# Generates a list of mimetypes linked to applications that can handle them |
667 |
+xdg_desktop_database_update() { |
668 |
+ has ${EAPI:-0} 7 || BROOT="${EROOT}" |
669 |
+ local updater="${BROOT%/}${DESKTOP_DATABASE_UPDATE_BIN}" |
670 |
+ |
671 |
+ if [[ ${EBUILD_PHASE} != post* ]] ; then |
672 |
+ die "xdg_desktop_database_update must be used in pkg_post* phases." |
673 |
+ fi |
674 |
+ |
675 |
+ if [[ ! -x "${updater}" ]] ; then |
676 |
+ debug-print "${updater} is not executable" |
677 |
+ return |
678 |
+ fi |
679 |
+ |
680 |
+ ebegin "Updating .desktop files database" |
681 |
+ "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}" |
682 |
+ eend $? |
683 |
+} |
684 |
+ |
685 |
+# @FUNCTION: xdg_icon_savelist |
686 |
+# @DESCRIPTION: |
687 |
+# Find the icons that are about to be installed and save their location |
688 |
+# in the XDG_ECLASS_ICONS environment variable. This is only |
689 |
+# necessary for eclass implementations that call |
690 |
+# xdg_icon_cache_update conditionally. |
691 |
+# This function should be called from pkg_preinst. |
692 |
+xdg_icon_savelist() { |
693 |
+ XDG_ECLASS_ICONS=() |
694 |
+ while IFS= read -r -d '' f; do |
695 |
+ XDG_ECLASS_ICONS+=( "${f}" ) |
696 |
+ done < <(cd "${D}" && find 'usr/share/icons' -type f -print0 2>/dev/null) |
697 |
+ |
698 |
+ export XDG_ECLASS_ICONS |
699 |
+} |
700 |
+ |
701 |
+# @FUNCTION: xdg_icon_cache_update |
702 |
+# @DESCRIPTION: |
703 |
+# Updates Gtk+ icon cache files under /usr/share/icons. |
704 |
+# This function should be called from pkg_postinst and pkg_postrm. |
705 |
+xdg_icon_cache_update() { |
706 |
+ has ${EAPI:-0} 7 || BROOT="${EROOT}" |
707 |
+ local updater="${BROOT%/}${GTK_UPDATE_ICON_CACHE}" |
708 |
+ |
709 |
+ if [[ ! -x "${updater}" ]] ; then |
710 |
+ debug-print "${updater} is not executable" |
711 |
+ return |
712 |
+ fi |
713 |
+ |
714 |
+ ebegin "Updating icons cache" |
715 |
+ |
716 |
+ local retval=0 |
717 |
+ local fails=( ) |
718 |
+ |
719 |
+ for dir in "${EROOT%/}"/usr/share/icons/* |
720 |
+ do |
721 |
+ if [[ -f "${dir}/index.theme" ]] ; then |
722 |
+ local rv=0 |
723 |
+ |
724 |
+ "${updater}" -qf "${dir}" |
725 |
+ rv=$? |
726 |
+ |
727 |
+ if [[ ! $rv -eq 0 ]] ; then |
728 |
+ debug-print "Updating cache failed on ${dir}" |
729 |
+ |
730 |
+ # Add to the list of failures |
731 |
+ fails+=( "${dir}" ) |
732 |
+ |
733 |
+ retval=2 |
734 |
+ fi |
735 |
+ elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then |
736 |
+ # Clear stale cache files after theme uninstallation |
737 |
+ rm "${dir}/icon-theme.cache" |
738 |
+ fi |
739 |
+ |
740 |
+ if [[ -z $(ls "${dir}") ]]; then |
741 |
+ # Clear empty theme directories after theme uninstallation |
742 |
+ rmdir "${dir}" |
743 |
+ fi |
744 |
+ done |
745 |
+ |
746 |
+ eend ${retval} |
747 |
+ |
748 |
+ for f in "${fails[@]}" ; do |
749 |
+ eerror "Failed to update cache with icon $f" |
750 |
+ done |
751 |
+} |
752 |
+ |
753 |
+# @FUNCTION: xdg_mimeinfo_database_update |
754 |
+# @DESCRIPTION: |
755 |
+# Update the mime database. |
756 |
+# Creates a general list of mime types from several sources |
757 |
+xdg_mimeinfo_database_update() { |
758 |
+ has ${EAPI:-0} 7 || BROOT="${EROOT}" |
759 |
+ local updater="${BROOT%/}${MIMEINFO_DATABASE_UPDATE_BIN}" |
760 |
+ |
761 |
+ if [[ ${EBUILD_PHASE} != post* ]] ; then |
762 |
+ die "xdg_mimeinfo_database_update must be used in pkg_post* phases." |
763 |
+ fi |
764 |
+ |
765 |
+ if [[ ! -x "${updater}" ]] ; then |
766 |
+ debug-print "${updater} is not executable" |
767 |
+ return |
768 |
+ fi |
769 |
+ |
770 |
+ ebegin "Updating shared mime info database" |
771 |
+ "${updater}" "${BROOT%/}${MIMEINFO_DATABASE_DIR}" |
772 |
+ eend $? |
773 |
+} |