This commit is contained in:
Gerardo J. Puerta 2020-09-27 08:39:59 +02:00
commit 725e924c30
227 changed files with 17007 additions and 6 deletions

View File

@ -0,0 +1,3 @@
DIST deja-dup-40.6.tar.bz2 1309271 BLAKE2B f266ae458988a3195df006263a4104846934b8d723de950e2feb31e2d509a42909df0a33a88aa4bf022dc5395e54302fb96371b6ba362fada1ac6e2da25992b1 SHA512 3a582386a0ebc25a45ab9c3ac1a5e2710d4454c6004935c23e77e524905bde113efe75eb53136cdd08ed181ec6aa4eec38c8bdebe13796f83e0a65894de532a6
EBUILD deja-dup-40.6.ebuild 1157 BLAKE2B 531a2fbc7fb59e889dc5dab6c0a0cb36d3ec4603595f64c7424667b0392e6268c7c25251334308fce5ecc89be208d11852c0a33c06246df3b89e0312ac659133 SHA512 53e298aebaf46877592ddb034355a97bf41dd42a42e0859e7b56c59ab773b7c3677f4cfea40cecd843201cb30620834698bc7cda1ede07e099f55f6a7ecb68a5
MISC metadata.xml 425 BLAKE2B 8973d6823641d5c69a21ba4d5862dd9a361ce5771537f42b50f2b54b36ad1d9217b358f7289c5981586330c1ad0673ca421caa30db2259f6c92a479735f46c15 SHA512 ba6a6a6530d8a6f582be2c3029dfc221c8cdad945486017820b1e8ba6dc144de27469f7093db5b565ed8b9e28652f9a553362687ada5105ff55f0c6be103ba47

View File

@ -0,0 +1,62 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils gnome2 vala meson
DESCRIPTION="Simple backup tool using duplicity back-end"
HOMEPAGE="https://launchpad.net/deja-dup/"
SRC_URI="https://gitlab.gnome.org/World/${PN}/-/archive/${PV}/${PN}-${PV}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="nautilus test"
RESTRICT="test" # bug#????
COMMON_DEPEND="
app-admin/packagekit-base
app-crypt/libsecret[vala]
>=dev-libs/glib-2.34:2[dbus]
>=dev-libs/libpeas-1.0
>=x11-libs/gtk+-3.10:3
>=x11-libs/libnotify-0.7
>=app-backup/duplicity-0.6.23
dev-libs/dbus-glib
nautilus? ( gnome-base/nautilus )
"
RDEPEND="${COMMON_DEPEND}
gnome-base/dconf
gnome-base/gvfs[fuse]
"
DEPEND="${COMMON_DEPEND}
$(vala_depend)
app-text/yelp-tools
dev-perl/Locale-gettext
virtual/pkgconfig
dev-util/intltool
sys-devel/gettext
"
src_prepare() {
default
}
src_configure() {
meson_src_configure
}
src_install() {
meson_src_install
}
pkg_postinst() {
gnome2_icon_cache_update
glib-compile-schemas /usr/share/glib-2.0/schemas/
}
pkg_postrm() {
gnome2_icon_cache_update
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="nautilus">Build gnome-base/nautilus extension</flag>
</use>
<upstream>
<remote-id type="launchpad">deja-dup</remote-id>
</upstream>
</pkgmetadata>

21
dev-lang/php/Manifest Normal file
View File

@ -0,0 +1,21 @@
AUX 20php5-envd 145 BLAKE2B 06476b8fc04d1e835496b417ac752f0834ddbe8584e4fddc6db0aa5e6845b82cdea0a1355c77125375dcdd0f0a3c19de5f3a8a64ee93950f96c437a16f971567 SHA512 581aa86479e3cd584ee1bc6dc6d4a135fe8ec343fe5519566d728d81f7018cfb23658bd0c0368951d380982c75adbb4f45acf3c146868aaf4e4ec8e9f2fad1ce
AUX 5.6-mbstring-oniguruma-6.8.patch 880 BLAKE2B 7526874436b0fee12d0bc80487abe8a2e152491b52d2b3c041e4162284a3be580d88649704d360e85b0985d6406d2d26fe55c147a091fef1adbe7631cedafeeb SHA512 8767aa16f72fec2e4d79d8b15559ffe6afcf97c1664d963befc5565ead5eb3a5291982ece941441f57cfac21589c5e8eecf359b111b27a880919f77652e4de65
AUX apache.patch 297 BLAKE2B 8e6270cfdfa074e10471b147f747a8211c8b3043ec825d8674445d02d91d5a0a31bf4630ec0d339cc4fa49c3a7f77206910d6ec14cbaa66fddf7d3a60f5b2b94 SHA512 d606829873ed9fd7db369e98ca1efea574a781de0df0137e0905a4294f532d6718d398a58371ce2c2ddb3d4d5a82958200c2b6fadb07fa5f7a3261bb34f51483
AUX libressl-compatibility.patch 2978 BLAKE2B 714e268149d973beb0d2d76f90e15adde57acb7aed028131c6dee2a34b11980fedff487ccec67e20d9a9094014878e13bd7e180e98bb0ee304c5916324016823 SHA512 58ed57061f31da72c96cbca6f6e86d1466c96c8562dfa6551b4a8d16bd6e537b848ca34cbe57c5c220c72158e176f9cd7c07d282fe1fd69ebf5475c48bf95c26
AUX mbstring-oniguruma-6.8.patch 1488 BLAKE2B 181aacdd5fc01e5b11246d624cd88a5d3184c00343abb8a9e36d1e224dce185a81521c0498d562e51768e4c035806f007f9cd5ed930b7abe2a3da2e5b519f5b3 SHA512 5a3334ca98da9ac22be67021e4e859c89826aec8393d4b56c4e52336a5fc689acd2579ff44ac984a40711ccaf917a810264b07a0071f8161da18e2bffd3d0c05
AUX php-5.6-intl-detect-icu-via-pkg-config.patch 5715 BLAKE2B 609192a91736ae7417365b7040606dc4dae43333c63eda79879cd45f74c34613563e4c4625cb5f1401cb59f78db0b9328e808b9293eab63aac34069847b3058a SHA512 89e109422f2eb8efa2408851592528c0bcc2103c902bffdc72208096489c3d2593cc4baeac2bde6266f3e08028f90e7c4960e2b9a17323216dbd68b19fe84c44
AUX php-5.6-intl-icu-memory-corruption.patch 2374 BLAKE2B eb970251333796622491b40ac9da4aeca4d0775e11f579bb7fd63078a44d35f5fc4987155f190ca07cbdd98e8b6f532e0ba92a770b3f7ed61405f361f888001a SHA512 b5533f2e9665204ca62dcfd24d8988c3dde453068919e00dc26bb02409ac50da2d42ad1fc00815aea2f13410f0d5d95fadfb820d13c944eb2d8be9060f3787f1
AUX php-5.6-intl-use-icu-namespace.patch 11150 BLAKE2B 0117eba8f33d4ed07484e3dad15fd7ff34282f1ad57b441f4794c0dcec650fb19f32a7fbb345d4feee54efc1ef470d118f8f2d7c6b422a0ba3aa22c0ca5c83f3 SHA512 ef440c9fd157739ea80dc68aecb3d9ea3f97d9347e44152e198eda3763c05d252f0913eae09c5945e372497e2be8eace55a9d004cdfb61281ea17208c6e6aed1
AUX php-5.6-no-bison-warnings.patch 1428 BLAKE2B d37bc7a1ae803aa4a14d32f0ca5613b7bc82610248d6de5ef7b6078fdcfa944cd1c245aa919137ff0d6968c8621b5acf2638386307c46fdbb8c98eba991eb674 SHA512 8f751c638c833d535e022434cd8ace5c175703bf61dfab7bea3e52d9419700e2b85c4cca40da9ab6056e8fd9c0bc1fab55810bb1193bed14ce0a50ce653fe62b
AUX php-7.0.33-intl-detect-icu-via-pkg-config.patch 5832 BLAKE2B 7f48cb80ee4d51a4385845f1cc10babbbc2dbd40c245f13711467a8cb6244e85eafe59a03c50b99d0d07465a335cefff765296ab92e8b8a8ee2cc8543c4f5e4a SHA512 a08a3e59c77ab5313cdb7f8d8d496071fbaa6765e7bb878012c283eb7103093b511afbf0c234b760fe56ac4e13817746db9990880e5056d36a0d0b1779dd239c
AUX php-7.0.33-intl-icu-memory-corruption.patch 2385 BLAKE2B 37123710c6cf3f8c99bce365d299079810317cd9aff32e7b725d89fdcedfe0503335b568c5b09f45fdeee8506cd3f691bda24eea1f6101d39a655feff818e57f SHA512 904188088bd2a8a68e2d2019df96d61abfcd7ff7e306f078bcfcd610ea0deda5007392a135c62e2fa2feac27ea6379087835beb36bb76edd1a4055ebe84c1a97
AUX php-7.0.33-intl-use-icu-namespace.patch 11180 BLAKE2B 5a5d6bd74f2cee846ce58e754443a9b0d689aac1c1705166ea16ea0292f7f4d2b6a83519db5391414cd97de88bc25b7a4d43ba2adc90427e62b134d662ea924d SHA512 faa289791e4ac2c176a27056fb63683cd444c36b6b5118299327179a753e9a1a8589dc6f20e0e3e2d6645312500fbe0d8d9cb4db39e29e7fa22d3d19283b36e8
AUX php-7.1.25-intl-detect-icu-via-pkg-config.patch 4608 BLAKE2B 3639c5a39bae61d3032c18a85982769c2d8a5837a67cc8b3ec7cd25263d15f4923a04c74f21b10cd5cc17c0cd9d657431dc3052cddaa289a6eb1dac0cf975350 SHA512 567fb3486af02e487cdde11e2a6f706b2fc19722e5e9f4b63320bb2226e30ff79b14780f3f661378bf5bea2150b47af93fb5b39003465895fdf420691d4dbc44
AUX php-7.1.25-intl-use-icu-namespace.patch 11396 BLAKE2B 7664703a7bafb38d252f5eeec926ee0b7eaf4d75e71ef98c2e7d3f612b7d48d38b66764286d67299a38a704500db2e3215dc375d64a8f277b904aff80211fa60 SHA512 c7b61cade203a338a576aff0b4b76a22f0d686d53e91fbf4c5171e0429317460f7404c78a0c076a3000957100af2d17caba6245bf37afc6177fb43c7fafa7679
AUX php-7.2.13-intl-use-icu-namespace.patch 11499 BLAKE2B 0dca597d5afd0309595499e3ff860e2d83183e570d02f202a1e2966d430606f09b8dc7427c4007e791914c8ee093a2e7cbf7372baa7896ac06d1912f2e707c09 SHA512 1332eb76feda2100685e319ae046512cf12b55a0d2be537c2172ccf035b547d851f84fb7941389882d7e3d674d91441e018c7b8f1e3f0d4cced05c314d5821fe
AUX php-fpm_at-simple.service 316 BLAKE2B 0ba10f3e3b004fbf14956e1e4f04f59b8a127e6717fe6b92c09b9f931033a11551c75fbbee9010f6b694c5a8758ca0eec9eed457ae304ba0dea8f2c256c3b8d4 SHA512 7367a3f8d3874f8e0c76f331ba613a0250db02f60ad9f87affaf448dcb5bc34bcecb91d88f415764a12b24b46ae3d1b738a002af9f77a4b707e916e83a0021fd
AUX php-fpm_at.service 317 BLAKE2B f13fc38fcc0575a8517ee8d07b120efda37eabd2355061d0fdc303604c6b02ad42d7301180d86c977d5e585f5dd685343c592e37a6e0f44933707be79e0b77e0 SHA512 27982f9e2d958bfa75c89c7d3531e48d17fc388b1cdcbc8e09051b236b1184ee2baabdfcc567c19d9fcd067d4b3b86f171015616d8da42fccdabd89432d865e8
AUX php-freetype-2.9.1.patch 7667 BLAKE2B efc8f829bbad11b3e7b654d0882213ecb9aae766060d51f93446a6293a2f607339faba484c7b0b2f9318a5c5442da3c09e25aeda20dbc5e3258bf1009f8625b4 SHA512 0a06189f6fb3513cd2dcf9ddb590360475e2dd9a7aa8b13ab66c389c1ed40ce2361681f017cd3c6219f5b40a0a9d4978e57ca3ee4bacb7657db3285136fd2875
AUX php-iodbc-header-location.patch 481 BLAKE2B 9ea6a5d529dc7a8c78eeee800900372bc14309a05e352b2838da32e1384b61b507fdb623c9400094aa5b637eb1a87da92c72600eff79b18b8989ef90af56a0fa SHA512 86469f657d8807f005c28fd2149770c881add8f243fdfea087956c7987277597fe400a7af23f624f26da270356604717ed9cd04771154d7cf2ffe7237972372b
DIST php-7.3.17.tar.xz 12116072 BLAKE2B 5f8a0b1a3de9b7e750d249593be0a3eb9e62040691ebe4549da74d8c321dcd88e970d92285f49a924ef0f38118779d540a94810c08ece2df7dbd8584a8f83c56 SHA512 ac99a645a7442c322b8334cb4d091474bb0486b5efe11f8ffc16e4a2c0ecf8dbb5d958206372617350ec70b579dd4756f4d166c2863f3892db480e9bfbd14837
EBUILD php-7.3.17.ebuild 22531 BLAKE2B 5e7829bfce6c1d99cf39cf1058f2c3f896de26a71880a1365ed4fca9c40977208165d201bb5abffda0e8c39d722d4565a62200cf438f043cafd82192e9f21e57 SHA512 929c387adb105d805a16536f7fa87f2d8c134c39485eeec6433ca5a154d302a64d904b8c5b25796f1f4f1e5deab304e0363e692e6784d2a4ea8ed36a163e18c1

View File

@ -0,0 +1,2 @@
MANPATH="/usr/lib/php5/man/"
CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/"

View File

@ -0,0 +1,12 @@
diff -aurN a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
--- a/ext/mbstring/php_mbregex.c 2018-03-28 17:28:58.000000000 -0400
+++ b/ext/mbstring/php_mbregex.c 2018-04-04 12:53:23.268296387 -0400
@@ -454,7 +454,7 @@
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
- if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
+ if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
onig_error_code_to_str(err_str, err_code, &err_info);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);

View File

@ -0,0 +1,10 @@
--- a/sapi/apache2handler/config.m4
+++ b/sapi/apache2handler/config.m4
@@ -111,7 +111,6 @@
PHP_BUILD_THREAD_SAFE
fi
else
- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`
if test -n "$APACHE_THREADED_MPM"; then
PHP_BUILD_THREAD_SAFE
fi

View File

@ -0,0 +1,65 @@
--- a/ext/openssl/openssl.c 2018-04-04 14:26:34.583000000 +0000
+++ b/ext/openssl/openssl.c 2018-04-04 14:20:16.907000000 +0000
@@ -73,7 +73,7 @@
#ifdef HAVE_OPENSSL_MD2_H
#define OPENSSL_ALGO_MD2 4
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#define OPENSSL_ALGO_DSS1 5
#endif
#define OPENSSL_ALGO_SHA224 6
@@ -560,7 +560,7 @@
#endif
/* {{{ OpenSSL compatibility functions and macros */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
#define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
#define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
@@ -677,7 +677,7 @@
return M_ASN1_STRING_data(asn1);
}
-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
static int X509_get_signature_nid(const X509 *x)
{
@@ -1324,7 +1324,7 @@
mdtype = (EVP_MD *) EVP_md2();
break;
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
case OPENSSL_ALGO_DSS1:
mdtype = (EVP_MD *) EVP_dss1();
break;
@@ -1450,7 +1450,7 @@
#ifdef HAVE_OPENSSL_MD2_H
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
#endif
REGISTER_LONG_CONSTANT("OPENSSL_ALGO_SHA224", OPENSSL_ALGO_SHA224, CONST_CS|CONST_PERSISTENT);
@@ -3620,7 +3620,7 @@
RETURN_FALSE;
}
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
/* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
* the pub key is not changed after assigning. It means if we pass
* a private key, it will be returned including the private part.
@@ -3631,7 +3631,7 @@
/* Retrieve the public key from the CSR */
tpubkey = X509_REQ_get_pubkey(csr);
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
/* We need to free the CSR as it was duplicated */
X509_REQ_free(csr);
#endif

View File

@ -0,0 +1,30 @@
From 4072b2787074ee8e247a6639585b49e10c5a55fe Mon Sep 17 00:00:00 2001
From: "Christoph M. Becker" <cmbecker69@gmx.de>
Date: Tue, 20 Mar 2018 16:35:39 +0100
Subject: [PATCH] Fix #76113: mbstring does not build with Oniguruma 6.8.1
As of Oniguruma 6.8.1, the regex structure has been moved from the
public `oniguruma.h` to the private `regint.h`. Thus, it is no longer
possible to directly access the struct's members, and actually, there
is no need to, since there are respective accessor functions available
at least of 2.3.1.
---
ext/mbstring/php_mbregex.c | 2 +-
1 file changed, 1 insertions(+), 1 deletion(-)
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index a5a6cd0..7a70c63 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -452,7 +452,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen);
- if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
+ if (!rc || onig_get_options(rc) != options || onig_get_encoding(rc) != enc || onig_get_syntax(rc) != syntax) {
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
onig_error_code_to_str(err_str, err_code, &err_info);
php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str);
--
2.1.4

View File

@ -0,0 +1,154 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
https://github.com/php/php-src/pull/3701
https://github.com/php/php-src/commit/2bd299f7318492fd7e5cafffa562d76ba60e69d4
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2201,49 +2201,16 @@ dnl
dnl Common setup macro for ICU
dnl
AC_DEFUN([PHP_SETUP_ICU],[
- PHP_ARG_WITH(icu-dir,,
- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1])
- if test "$PHP_ICU_DIR" = "no"; then
- PHP_ICU_DIR=DEFAULT
- fi
-
- if test "$PHP_ICU_DIR" = "DEFAULT"; then
- dnl Try to find icu-config
- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
- else
- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
- fi
-
- AC_MSG_CHECKING([for location of ICU headers and libraries])
-
- dnl Trust icu-config to know better what the install prefix is..
- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
- if test "$?" != "0" || test -z "$icu_install_prefix"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
- else
- AC_MSG_RESULT([$icu_install_prefix])
-
- dnl Check ICU version
- AC_MSG_CHECKING([for ICU 4.0 or greater])
- icu_version_full=`$ICU_CONFIG --version`
- ac_IFS=$IFS
- IFS="."
- set $icu_version_full
- IFS=$ac_IFS
- icu_version=`expr [$]1 \* 1000 + [$]2`
- AC_MSG_RESULT([found $icu_version_full])
+ PHP_EVAL_INCLINE($ICU_CFLAGS)
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
- if test "$icu_version" -lt "4000"; then
- AC_MSG_ERROR([ICU version 4.0 or later is required])
- fi
+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
- ICU_VERSION=$icu_version
- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
- PHP_EVAL_INCLINE($ICU_INCS)
- PHP_EVAL_LIBLINE($ICU_LIBS, $1)
+ if test "$PKG_CONFIG icu-io --atleast-version=60"; then
+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi
])
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -9,18 +9,10 @@ if test "$PHP_INTL" != "no"; then
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
PHP_SUBST(INTL_SHARED_LIBADD)
PHP_REQUIRE_CXX()
- if test "$icu_version" -ge "4002"; then
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
- spoofchecker/spoofchecker.c\
- spoofchecker/spoofchecker_create.c\
- spoofchecker/spoofchecker_main.c"
- else
- icu_spoof_src=""
- fi
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
- intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -32,8 +24,6 @@ if test "$PHP_INTL" != "no"; then
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
- common/common_enum.cpp \
- common/common_date.cpp \
converter/converter.c \
formatter/formatter.c \
formatter/formatter_main.c \
@@ -53,17 +43,12 @@ if test "$PHP_INTL" != "no"; then
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
- dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
- dateformat/dateformat_create.cpp \
- dateformat/dateformat_attrcpp.cpp \
- dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
msgformat/msgformat_data.c \
msgformat/msgformat_format.c \
- msgformat/msgformat_helpers.cpp \
msgformat/msgformat_parse.c \
grapheme/grapheme_string.c \
grapheme/grapheme_util.c \
@@ -73,6 +58,20 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ idn/idn.c \
+ spoofchecker/spoofchecker_class.c \
+ spoofchecker/spoofchecker.c\
+ spoofchecker/spoofchecker_create.c\
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
+
+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
+ common/common_enum.cpp \
+ common/common_date.cpp \
+ dateformat/dateformat_format_object.cpp \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
+ msgformat/msgformat_helpers.cpp \
timezone/timezone_class.cpp \
timezone/timezone_methods.cpp \
calendar/calendar_class.cpp \
@@ -83,9 +82,15 @@ if test "$PHP_INTL" != "no"; then
breakiterator/breakiterator_methods.cpp \
breakiterator/rulebasedbreakiterator_methods.cpp \
breakiterator/codepointiterator_internal.cpp \
- breakiterator/codepointiterator_methods.cpp \
- idn/idn.c \
- $icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings)
+ breakiterator/codepointiterator_methods.cpp"
+
+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
+ if test "$ext_shared" = "no"; then
+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
+ else
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
+ fi
+
PHP_ADD_BUILD_DIR($ext_builddir/collator)
PHP_ADD_BUILD_DIR($ext_builddir/converter)
PHP_ADD_BUILD_DIR($ext_builddir/common)

View File

@ -0,0 +1,88 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/45a05f38410d4a67c8c83c09906e2cfb42fc6e4c
https://github.com/php/php-src/commit/534684d1042978f3c21caf9b665a7aca27f3f325
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -27,6 +27,7 @@
#include <unicode/timezone.h>
#include <unicode/datefmt.h>
#include <unicode/calendar.h>
+#include <unicode/strenum.h>
#include <vector>
@@ -45,6 +46,7 @@ extern "C" {
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
#define HAS_MESSAGE_PATTERN 1
+#define HAS_MISALLOCATE_MEMORY_BUG 1
#endif
U_NAMESPACE_BEGIN
@@ -345,6 +347,26 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
return; /* already done */
}
+#ifdef HAS_MISALLOCATE_MEMORY_BUG
+ /* There is a bug in ICU which prevents MessageFormatter::getFormats()
+ to handle more than 10 formats correctly. The enumerator could be
+ used to walk through the present formatters using getFormat(), which
+ however seems to provide just a readonly access. This workaround
+ prevents crash when there are > 10 formats but doesn't set any error.
+ As a result, only DateFormatters with > 10 subformats are affected.
+ This workaround should be ifdef'd out, when the bug has been fixed
+ in ICU. */
+ icu::StringEnumeration* fnames = mf->getFormatNames(err.code);
+ if (!fnames || U_FAILURE(err.code)) {
+ return;
+ }
+ count = fnames->count(err.code);
+ delete fnames;
+ if (count > 10) {
+ return;
+ }
+#endif
+
formats = mf->getFormats(count);
if (formats == NULL) {
--- /dev/null
+++ b/ext/intl/tests/bug74484_MessageFormatter.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #74484 MessageFormatter::formatMessage memory corruption with 11+ named placeholder
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+?>
+--FILE--
+<?php
+$text = "{a} {b} {c} {d} {e} {f} {g} {h} {i} {j} {k} {l}";
+
+$vars = array(
+ 'a' => 1,
+ 'b' => 2,
+ 'c' => 3,
+ 'd' => 4,
+ 'e' => 5,
+ 'f' => 6,
+ 'g' => 7,
+ 'h' => 8,
+ 'i' => 9,
+ 'j' => 10,
+ 'k' => 11,
+ 'l' => 12
+);
+
+var_dump(MessageFormatter::formatMessage('en_US', $text, $vars));
+
+?>
+==DONE==
+--EXPECT--
+string(26) "1 2 3 4 5 6 7 8 9 10 11 12"
+==DONE==

View File

@ -0,0 +1,365 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22
https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::RuleBasedBreakIterator;
/* {{{ Global variables */
zend_class_entry *BreakIterator_ce_ptr;
--- a/ext/intl/breakiterator/breakiterator_class.h
+++ b/ext/intl/breakiterator/breakiterator_class.h
@@ -26,6 +26,8 @@
#ifndef USE_BREAKITERATOR_POINTER
typedef void BreakIterator;
+#else
+using icu::BreakIterator;
#endif
typedef struct {
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -32,6 +32,8 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::BreakIterator;
+using icu::Locale;
U_CFUNC PHP_METHOD(BreakIterator, __construct)
{
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -31,6 +31,8 @@ typedef union {
using namespace PHP;
+using icu::UCharCharacterIterator;
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
CodePointBreakIterator::CodePointBreakIterator()
--- a/ext/intl/breakiterator/codepointiterator_internal.h
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
@@ -18,8 +18,11 @@
#define CODEPOINTITERATOR_INTERNAL_H
#include <unicode/brkiter.h>
+#include <unicode/unistr.h>
-using U_ICU_NAMESPACE::BreakIterator;
+using icu::BreakIterator;
+using icu::CharacterIterator;
+using icu::UnicodeString;
namespace PHP {
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -25,6 +25,9 @@ extern "C" {
#include "../intl_convertcpp.h"
+using icu::RuleBasedBreakIterator;
+using icu::Locale;
+
static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
return (RuleBasedBreakIterator*)bio->biter;
}
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -34,6 +34,9 @@ extern "C" {
#include <assert.h>
}
+using icu::GregorianCalendar;
+using icu::Locale;
+
/* {{{ Global variables */
zend_class_entry *Calendar_ce_ptr;
zend_class_entry *GregorianCalendar_ce_ptr;
--- a/ext/intl/calendar/calendar_class.h
+++ b/ext/intl/calendar/calendar_class.h
@@ -26,6 +26,8 @@
#ifndef USE_CALENDAR_POINTER
typedef void Calendar;
+#else
+using icu::Calendar;
#endif
typedef struct {
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -40,6 +40,8 @@ extern "C" {
}
#include "../common/common_enum.h"
+using icu::Locale;
+
U_CFUNC PHP_METHOD(IntlCalendar, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -23,6 +23,8 @@
#include <unicode/locid.h>
#include <unicode/calendar.h>
#include <unicode/gregocal.h>
+#include <unicode/ustring.h>
+
extern "C" {
#include "../php_intl.h"
#define USE_TIMEZONE_POINTER 1
@@ -32,6 +34,11 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::GregorianCalendar;
+using icu::Locale;
+using icu::UnicodeString;
+using icu::StringPiece;
+
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
}
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -25,6 +25,9 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::TimeZone;
+using icu::UnicodeString;
+
#ifndef INFINITY
#define INFINITY (DBL_MAX+DBL_MAX)
#endif
--- a/ext/intl/common/common_date.h
+++ b/ext/intl/common/common_date.h
@@ -28,6 +28,8 @@ U_CDECL_END
#include <unicode/timezone.h>
+using icu::TimeZone;
+
U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func TSRMLS_DC);
U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
intl_error *err, const char *func TSRMLS_DC);
--- a/ext/intl/common/common_enum.h
+++ b/ext/intl/common/common_enum.h
@@ -69,6 +69,7 @@ U_CFUNC void zoi_with_current_get_current_data(zend_object_iterator *iter, zval
U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter TSRMLS_DC);
#ifdef __cplusplus
+using icu::StringEnumeration;
U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object TSRMLS_DC);
#endif
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -18,6 +18,8 @@
#include "zend_exceptions.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
+#include <unicode/utf16.h>
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -33,6 +33,12 @@ extern "C" {
#include "../common/common_date.h"
}
+using icu::Locale;
+using icu::DateFormat;
+using icu::GregorianCalendar;
+using icu::StringPiece;
+using icu::SimpleDateFormat;
+
static const DateFormat::EStyle valid_styles[] = {
DateFormat::kNone,
DateFormat::kFull,
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -28,6 +28,8 @@ extern "C" {
#include "../calendar/calendar_class.h"
}
+using icu::GregorianCalendar;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/dateformat/dateformat_helpers.h
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -22,11 +22,16 @@
#endif
#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
extern "C" {
#include "../php_intl.h"
}
+using icu::Locale;
+using icu::Calendar;
+using icu::DateFormat;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -24,6 +24,7 @@
#include "grapheme_util.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>
#include <unicode/ubrk.h>
@@ -860,10 +861,10 @@ PHP_FUNCTION(grapheme_extract)
pstr = str + start;
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
unsigned char *str_end = str + str_len;
- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
pstr++;
if ( pstr >= str_end ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
--- a/ext/intl/intl_convertcpp.h
+++ b/ext/intl/intl_convertcpp.h
@@ -25,6 +25,8 @@
#include <unicode/unistr.h>
+using icu::UnicodeString;
+
int intl_stringFromChar(UnicodeString &ret, char *str, int32_t str_len, UErrorCode *status);
int intl_charFromString(const UnicodeString &from, char **res, int *res_len, UErrorCode *status);
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -76,6 +76,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
#endif
U_NAMESPACE_END
+using icu::Formattable;
+using icu::Format;
+using icu::DateFormat;
+using icu::MessageFormat;
+#ifdef HAS_MESSAGE_PATTERN
+using icu::MessagePattern;
+#endif
+using icu::MessageFormatAdapter;
+using icu::FieldPosition;
+
U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
{
int32_t fmt_count = 0;
@@ -227,15 +237,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
UnicodeString typeString = mp.getSubstring(type_part);
/* This is all based on the rules in the docs for MessageFormat
* @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
- if (typeString == "number") {
+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1)
+ if (typeString == ASCII_LITERAL("number")) {
MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
UnicodeString styleString = mp.getSubstring(style_part);
- if (styleString == "integer") {
+ if (styleString == ASCII_LITERAL("integer")) {
type = Formattable::kInt64;
- } else if (styleString == "currency") {
+ } else if (styleString == ASCII_LITERAL("currency")) {
type = Formattable::kDouble;
- } else if (styleString == "percent") {
+ } else if (styleString == ASCII_LITERAL("percent")) {
type = Formattable::kDouble;
} else { /* some style invalid/unknown to us */
type = Formattable::kDouble;
@@ -243,12 +254,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
} else { // if missing style, part, make it a double
type = Formattable::kDouble;
}
- } else if ((typeString == "date") || (typeString == "time")) {
+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) {
type = Formattable::kDate;
- } else if ((typeString == "spellout") || (typeString == "ordinal")
- || (typeString == "duration")) {
+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal"))
+ || (typeString == ASCII_LITERAL("duration"))) {
type = Formattable::kDouble;
}
+#undef ASCII_LITERAL
} else {
/* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
* UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -24,6 +24,7 @@
#include "normalizer_class.h"
#include "normalizer_normalize.h"
#include "intl_convert.h"
+#include <unicode/utf8.h>
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
* Normalize a string. }}} */
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -37,6 +37,8 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::Calendar;
+
/* {{{ Global variables */
U_CDECL_BEGIN
zend_class_entry *TimeZone_ce_ptr = NULL;
--- a/ext/intl/timezone/timezone_class.h
+++ b/ext/intl/timezone/timezone_class.h
@@ -29,6 +29,8 @@
#ifndef USE_TIMEZONE_POINTER
typedef void TimeZone;
+#else
+using icu::TimeZone;
#endif
typedef struct {
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -23,6 +23,7 @@
#include <unicode/locid.h>
#include <unicode/timezone.h>
#include <unicode/ustring.h>
+#include <unicode/calendar.h>
#include "intl_convertcpp.h"
#include "../common/common_date.h"
@@ -37,6 +38,9 @@ extern "C" {
}
#include "common/common_enum.h"
+using icu::Locale;
+using icu::Calendar;
+
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
{
zend_throw_exception( NULL,

View File

@ -0,0 +1,42 @@
From d3466a04345b31dfc62d94fe994b40321a6418ec Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <michael@orlitzky.com>
Date: Thu, 29 Sep 2016 15:43:06 -0400
Subject: [PATCH 1/1] Zend/acinclude.m4: don't warn about >=bison-3.0.1
versions.
The PHP configure script will emit a warning if it thinks your bison
version is insufficient:
WARNING: This bison version is not supported for regeneration of
the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0).
However, there is an error in the test that causes it to treat all
3.0.x versions as if they were 3.0. The result is that users get
warned about a perfectly acceptable version of bison.
This patch is meant only for Gentoo, where we can require a working
version of bison (something newer than 3.0.1). Having done so, this
patch removes the check and the WARNING.
Gentoo-Bug: 593278
PHP-Bug: 69055
---
Zend/acinclude.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
index 7fa8c99..9d6cb1d 100644
--- a/Zend/acinclude.m4
+++ b/Zend/acinclude.m4
@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
# non-working versions, e.g. "3.0 3.2";
# remove "none" when introducing the first incompatible bison version an
# separate any following additions by spaces
- bison_version_exclude="3.0"
+ bison_version_exclude=""
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
--
2.7.3

View File

@ -0,0 +1,159 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
https://github.com/php/php-src/pull/3701
https://github.com/php/php-src/commit/2bd299f7318492fd7e5cafffa562d76ba60e69d4
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2205,49 +2205,16 @@ dnl
dnl Common setup macro for ICU
dnl
AC_DEFUN([PHP_SETUP_ICU],[
- PHP_ARG_WITH(icu-dir,,
- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1])
- if test "$PHP_ICU_DIR" = "no"; then
- PHP_ICU_DIR=DEFAULT
- fi
-
- if test "$PHP_ICU_DIR" = "DEFAULT"; then
- dnl Try to find icu-config
- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
- else
- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
- fi
-
- AC_MSG_CHECKING([for location of ICU headers and libraries])
-
- dnl Trust icu-config to know better what the install prefix is..
- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
- if test "$?" != "0" || test -z "$icu_install_prefix"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
- else
- AC_MSG_RESULT([$icu_install_prefix])
-
- dnl Check ICU version
- AC_MSG_CHECKING([for ICU 4.0 or greater])
- icu_version_full=`$ICU_CONFIG --version`
- ac_IFS=$IFS
- IFS="."
- set $icu_version_full
- IFS=$ac_IFS
- icu_version=`expr [$]1 \* 1000 + [$]2`
- AC_MSG_RESULT([found $icu_version_full])
+ PHP_EVAL_INCLINE($ICU_CFLAGS)
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
- if test "$icu_version" -lt "4000"; then
- AC_MSG_ERROR([ICU version 4.0 or later is required])
- fi
+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
- ICU_VERSION=$icu_version
- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
- PHP_EVAL_INCLINE($ICU_INCS)
- PHP_EVAL_LIBLINE($ICU_LIBS, $1)
+ if test "$PKG_CONFIG icu-io --atleast-version=60"; then
+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi
])
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -9,18 +9,10 @@ if test "$PHP_INTL" != "no"; then
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
PHP_SUBST(INTL_SHARED_LIBADD)
PHP_REQUIRE_CXX()
- if test "$icu_version" -ge "4002"; then
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
- spoofchecker/spoofchecker.c\
- spoofchecker/spoofchecker_create.c\
- spoofchecker/spoofchecker_main.c"
- else
- icu_spoof_src=""
- fi
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
- intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -32,8 +24,6 @@ if test "$PHP_INTL" != "no"; then
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
- common/common_enum.cpp \
- common/common_date.cpp \
converter/converter.c \
formatter/formatter.c \
formatter/formatter_main.c \
@@ -53,17 +43,12 @@ if test "$PHP_INTL" != "no"; then
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
- dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
- dateformat/dateformat_create.cpp \
- dateformat/dateformat_attrcpp.cpp \
- dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
msgformat/msgformat_data.c \
msgformat/msgformat_format.c \
- msgformat/msgformat_helpers.cpp \
msgformat/msgformat_parse.c \
grapheme/grapheme_string.c \
grapheme/grapheme_util.c \
@@ -73,6 +58,21 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ uchar/uchar.c \
+ idn/idn.c \
+ spoofchecker/spoofchecker_class.c \
+ spoofchecker/spoofchecker.c\
+ spoofchecker/spoofchecker_create.c\
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
+
+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
+ common/common_enum.cpp \
+ common/common_date.cpp \
+ dateformat/dateformat_format_object.cpp \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
+ msgformat/msgformat_helpers.cpp \
timezone/timezone_class.cpp \
timezone/timezone_methods.cpp \
calendar/calendar_class.cpp \
@@ -83,10 +83,15 @@ if test "$PHP_INTL" != "no"; then
breakiterator/breakiterator_methods.cpp \
breakiterator/rulebasedbreakiterator_methods.cpp \
breakiterator/codepointiterator_internal.cpp \
- breakiterator/codepointiterator_methods.cpp \
- uchar/uchar.c \
- idn/idn.c \
- $icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,cxx)
+ breakiterator/codepointiterator_methods.cpp"
+
+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
+ if test "$ext_shared" = "no"; then
+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
+ else
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
+ fi
+
PHP_ADD_BUILD_DIR($ext_builddir/collator)
PHP_ADD_BUILD_DIR($ext_builddir/converter)
PHP_ADD_BUILD_DIR($ext_builddir/common)
--
2.19.2

View File

@ -0,0 +1,91 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/45a05f38410d4a67c8c83c09906e2cfb42fc6e4c
https://github.com/php/php-src/commit/534684d1042978f3c21caf9b665a7aca27f3f325
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -27,6 +27,7 @@
#include <unicode/timezone.h>
#include <unicode/datefmt.h>
#include <unicode/calendar.h>
+#include <unicode/strenum.h>
#include <vector>
@@ -45,6 +46,7 @@ extern "C" {
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
#define HAS_MESSAGE_PATTERN 1
+#define HAS_MISALLOCATE_MEMORY_BUG 1
#endif
U_NAMESPACE_BEGIN
@@ -345,6 +347,26 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
return; /* already done */
}
+#ifdef HAS_MISALLOCATE_MEMORY_BUG
+ /* There is a bug in ICU which prevents MessageFormatter::getFormats()
+ to handle more than 10 formats correctly. The enumerator could be
+ used to walk through the present formatters using getFormat(), which
+ however seems to provide just a readonly access. This workaround
+ prevents crash when there are > 10 formats but doesn't set any error.
+ As a result, only DateFormatters with > 10 subformats are affected.
+ This workaround should be ifdef'd out, when the bug has been fixed
+ in ICU. */
+ icu::StringEnumeration* fnames = mf->getFormatNames(err.code);
+ if (!fnames || U_FAILURE(err.code)) {
+ return;
+ }
+ count = fnames->count(err.code);
+ delete fnames;
+ if (count > 10) {
+ return;
+ }
+#endif
+
formats = mf->getFormats(count);
if (formats == NULL) {
--- /dev/null
+++ b/ext/intl/tests/bug74484_MessageFormatter.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #74484 MessageFormatter::formatMessage memory corruption with 11+ named placeholder
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+?>
+--FILE--
+<?php
+$text = "{a} {b} {c} {d} {e} {f} {g} {h} {i} {j} {k} {l}";
+
+$vars = array(
+ 'a' => 1,
+ 'b' => 2,
+ 'c' => 3,
+ 'd' => 4,
+ 'e' => 5,
+ 'f' => 6,
+ 'g' => 7,
+ 'h' => 8,
+ 'i' => 9,
+ 'j' => 10,
+ 'k' => 11,
+ 'l' => 12
+);
+
+var_dump(MessageFormatter::formatMessage('en_US', $text, $vars));
+
+?>
+==DONE==
+--EXPECT--
+string(26) "1 2 3 4 5 6 7 8 9 10 11 12"
+==DONE==
--
2.19.2

View File

@ -0,0 +1,369 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22
https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::RuleBasedBreakIterator;
/* {{{ Global variables */
zend_class_entry *BreakIterator_ce_ptr;
--- a/ext/intl/breakiterator/breakiterator_class.h
+++ b/ext/intl/breakiterator/breakiterator_class.h
@@ -26,6 +26,8 @@
#ifndef USE_BREAKITERATOR_POINTER
typedef void BreakIterator;
+#else
+using icu::BreakIterator;
#endif
typedef struct {
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -32,6 +32,8 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::BreakIterator;
+using icu::Locale;
U_CFUNC PHP_METHOD(BreakIterator, __construct)
{
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -33,6 +33,8 @@ typedef union {
using namespace PHP;
+using icu::UCharCharacterIterator;
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
CodePointBreakIterator::CodePointBreakIterator()
--- a/ext/intl/breakiterator/codepointiterator_internal.h
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
@@ -18,8 +18,11 @@
#define CODEPOINTITERATOR_INTERNAL_H
#include <unicode/brkiter.h>
+#include <unicode/unistr.h>
-using U_ICU_NAMESPACE::BreakIterator;
+using icu::BreakIterator;
+using icu::CharacterIterator;
+using icu::UnicodeString;
namespace PHP {
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -26,6 +26,9 @@ extern "C" {
#include "../intl_convertcpp.h"
#include "../intl_common.h"
+using icu::RuleBasedBreakIterator;
+using icu::Locale;
+
static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
return (RuleBasedBreakIterator*)bio->biter;
}
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -34,6 +34,9 @@ extern "C" {
#include <assert.h>
}
+using icu::GregorianCalendar;
+using icu::Locale;
+
/* {{{ Global variables */
zend_class_entry *Calendar_ce_ptr;
zend_class_entry *GregorianCalendar_ce_ptr;
--- a/ext/intl/calendar/calendar_class.h
+++ b/ext/intl/calendar/calendar_class.h
@@ -26,6 +26,8 @@
#ifndef USE_CALENDAR_POINTER
typedef void Calendar;
+#else
+using icu::Calendar;
#endif
typedef struct {
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -40,6 +40,8 @@ extern "C" {
}
#include "../common/common_enum.h"
+using icu::Locale;
+
U_CFUNC PHP_METHOD(IntlCalendar, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -23,6 +23,8 @@
#include <unicode/locid.h>
#include <unicode/calendar.h>
#include <unicode/gregocal.h>
+#include <unicode/ustring.h>
+
extern "C" {
#include "../php_intl.h"
#include "../intl_common.h"
@@ -34,6 +36,11 @@ extern "C" {
#include "zend_exceptions.h"
}
+using icu::GregorianCalendar;
+using icu::Locale;
+using icu::UnicodeString;
+using icu::StringPiece;
+
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
}
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -25,6 +25,9 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::TimeZone;
+using icu::UnicodeString;
+
#ifndef INFINITY
#define INFINITY (DBL_MAX+DBL_MAX)
#endif
--- a/ext/intl/common/common_date.h
+++ b/ext/intl/common/common_date.h
@@ -28,6 +28,8 @@ U_CDECL_END
#include <unicode/timezone.h>
+using icu::TimeZone;
+
U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
intl_error *err, const char *func);
--- a/ext/intl/common/common_enum.h
+++ b/ext/intl/common/common_enum.h
@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter);
U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
#ifdef __cplusplus
+using icu::StringEnumeration;
U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
#endif
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -18,6 +18,8 @@
#include "zend_exceptions.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
+#include <unicode/utf16.h>
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -33,6 +33,12 @@ extern "C" {
#include "../common/common_date.h"
}
+using icu::Locale;
+using icu::DateFormat;
+using icu::GregorianCalendar;
+using icu::StringPiece;
+using icu::SimpleDateFormat;
+
static const DateFormat::EStyle valid_styles[] = {
DateFormat::kNone,
DateFormat::kFull,
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -28,6 +28,8 @@ extern "C" {
#include "../calendar/calendar_class.h"
}
+using icu::GregorianCalendar;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/dateformat/dateformat_helpers.h
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -22,11 +22,16 @@
#endif
#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
extern "C" {
#include "../php_intl.h"
}
+using icu::Locale;
+using icu::Calendar;
+using icu::DateFormat;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -24,6 +24,7 @@
#include "grapheme_util.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>
#include <unicode/ubrk.h>
@@ -831,10 +832,10 @@ PHP_FUNCTION(grapheme_extract)
pstr = str + start;
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
- char *str_end = str + str_len;
+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ unsigned char *str_end = str + str_len;
- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
pstr++;
if ( pstr >= str_end ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
--- a/ext/intl/intl_convertcpp.h
+++ b/ext/intl/intl_convertcpp.h
@@ -26,6 +26,8 @@
#include <unicode/unistr.h>
#include <zend_types.h>
+using icu::UnicodeString;
+
int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status);
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -76,6 +76,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
#endif
U_NAMESPACE_END
+using icu::Formattable;
+using icu::Format;
+using icu::DateFormat;
+using icu::MessageFormat;
+#ifdef HAS_MESSAGE_PATTERN
+using icu::MessagePattern;
+#endif
+using icu::MessageFormatAdapter;
+using icu::FieldPosition;
+
U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
{
int32_t fmt_count = 0;
@@ -227,15 +237,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
UnicodeString typeString = mp.getSubstring(type_part);
/* This is all based on the rules in the docs for MessageFormat
* @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
- if (typeString == "number") {
+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1)
+ if (typeString == ASCII_LITERAL("number")) {
MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
UnicodeString styleString = mp.getSubstring(style_part);
- if (styleString == "integer") {
+ if (styleString == ASCII_LITERAL("integer")) {
type = Formattable::kInt64;
- } else if (styleString == "currency") {
+ } else if (styleString == ASCII_LITERAL("currency")) {
type = Formattable::kDouble;
- } else if (styleString == "percent") {
+ } else if (styleString == ASCII_LITERAL("percent")) {
type = Formattable::kDouble;
} else { /* some style invalid/unknown to us */
type = Formattable::kDouble;
@@ -243,12 +254,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
} else { // if missing style, part, make it a double
type = Formattable::kDouble;
}
- } else if ((typeString == "date") || (typeString == "time")) {
+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) {
type = Formattable::kDate;
- } else if ((typeString == "spellout") || (typeString == "ordinal")
- || (typeString == "duration")) {
+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal"))
+ || (typeString == ASCII_LITERAL("duration"))) {
type = Formattable::kDouble;
}
+#undef ASCII_LITERAL
} else {
/* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
* UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -24,6 +24,7 @@
#include "normalizer_class.h"
#include "normalizer_normalize.h"
#include "intl_convert.h"
+#include <unicode/utf8.h>
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
* Normalize a string. }}} */
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -37,6 +37,8 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::Calendar;
+
/* {{{ Global variables */
U_CDECL_BEGIN
zend_class_entry *TimeZone_ce_ptr = NULL;
--- a/ext/intl/timezone/timezone_class.h
+++ b/ext/intl/timezone/timezone_class.h
@@ -29,6 +29,8 @@
#ifndef USE_TIMEZONE_POINTER
typedef void TimeZone;
+#else
+using icu::TimeZone;
#endif
typedef struct {
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -23,6 +23,7 @@
#include <unicode/locid.h>
#include <unicode/timezone.h>
#include <unicode/ustring.h>
+#include <unicode/calendar.h>
#include "intl_convertcpp.h"
#include "../common/common_date.h"
@@ -37,6 +38,9 @@ extern "C" {
}
#include "common/common_enum.h"
+using icu::Locale;
+using icu::Calendar;
+
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
{
zend_throw_exception( NULL,
--
2.19.2

View File

@ -0,0 +1,121 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
https://github.com/php/php-src/pull/3701
https://github.com/php/php-src/commit/2bd299f7318492fd7e5cafffa562d76ba60e69d4
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2205,52 +2205,16 @@ dnl
dnl Common setup macro for ICU
dnl
AC_DEFUN([PHP_SETUP_ICU],[
- PHP_ARG_WITH(icu-dir,,
- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1])
- if test "$PHP_ICU_DIR" = "no"; then
- PHP_ICU_DIR=DEFAULT
- fi
-
- if test "$PHP_ICU_DIR" = "DEFAULT"; then
- dnl Try to find icu-config
- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
- else
- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
- fi
-
- AC_MSG_CHECKING([for location of ICU headers and libraries])
-
- dnl Trust icu-config to know better what the install prefix is..
- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
- if test "$?" != "0" || test -z "$icu_install_prefix"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
- else
- AC_MSG_RESULT([$icu_install_prefix])
-
- dnl Check ICU version
- AC_MSG_CHECKING([for ICU 4.0 or greater])
- icu_version_full=`$ICU_CONFIG --version`
- ac_IFS=$IFS
- IFS="."
- set $icu_version_full
- IFS=$ac_IFS
- icu_version=`expr [$]1 \* 1000 + [$]2`
- AC_MSG_RESULT([found $icu_version_full])
-
- if test "$icu_version" -lt "4000"; then
- AC_MSG_ERROR([ICU version 4.0 or later is required])
- fi
+ PHP_EVAL_INCLINE($ICU_CFLAGS)
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
- ICU_VERSION=$icu_version
- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
- PHP_EVAL_INCLINE($ICU_INCS)
- PHP_EVAL_LIBLINE($ICU_LIBS, $1)
+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
- ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
- ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
+ if test "$PKG_CONFIG icu-io --atleast-version=60"; then
+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi
])
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -9,15 +9,7 @@ if test "$PHP_INTL" != "no"; then
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
PHP_SUBST(INTL_SHARED_LIBADD)
PHP_REQUIRE_CXX()
- INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
- if test "$icu_version" -ge "4002"; then
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
- spoofchecker/spoofchecker.c\
- spoofchecker/spoofchecker_create.c\
- spoofchecker/spoofchecker_main.c"
- else
- icu_spoof_src=""
- fi
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
@@ -68,9 +60,12 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator_methods.c \
uchar/uchar.c \
idn/idn.c \
- $icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
+ spoofchecker/spoofchecker_class.c \
+ spoofchecker/spoofchecker.c\
+ spoofchecker/spoofchecker_create.c\
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
- PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
common/common_enum.cpp \
common/common_date.cpp \
dateformat/dateformat_format_object.cpp \
@@ -89,11 +84,12 @@ if test "$PHP_INTL" != "no"; then
breakiterator/rulebasedbreakiterator_methods.cpp \
breakiterator/codepointiterator_internal.cpp \
breakiterator/codepointiterator_methods.cpp"
- PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
+
+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
if test "$ext_shared" = "no"; then
- PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
else
- PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
fi
PHP_ADD_BUILD_DIR($ext_builddir/collator)
--
2.19.2

View File

@ -0,0 +1,379 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22
https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::RuleBasedBreakIterator;
/* {{{ Global variables */
zend_class_entry *BreakIterator_ce_ptr;
--- a/ext/intl/breakiterator/breakiterator_class.h
+++ b/ext/intl/breakiterator/breakiterator_class.h
@@ -26,6 +26,8 @@
#ifndef USE_BREAKITERATOR_POINTER
typedef void BreakIterator;
+#else
+using icu::BreakIterator;
#endif
typedef struct {
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -32,6 +32,8 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::BreakIterator;
+using icu::Locale;
U_CFUNC PHP_METHOD(BreakIterator, __construct)
{
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -33,6 +33,8 @@ typedef union {
using namespace PHP;
+using icu::UCharCharacterIterator;
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
CodePointBreakIterator::CodePointBreakIterator()
--- a/ext/intl/breakiterator/codepointiterator_internal.h
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
@@ -18,8 +18,11 @@
#define CODEPOINTITERATOR_INTERNAL_H
#include <unicode/brkiter.h>
+#include <unicode/unistr.h>
-using U_ICU_NAMESPACE::BreakIterator;
+using icu::BreakIterator;
+using icu::CharacterIterator;
+using icu::UnicodeString;
namespace PHP {
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -26,6 +26,9 @@ extern "C" {
#include "../intl_convertcpp.h"
#include "../intl_common.h"
+using icu::RuleBasedBreakIterator;
+using icu::Locale;
+
static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
return (RuleBasedBreakIterator*)bio->biter;
}
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -34,6 +34,9 @@ extern "C" {
#include <assert.h>
}
+using icu::GregorianCalendar;
+using icu::Locale;
+
/* {{{ Global variables */
zend_class_entry *Calendar_ce_ptr;
zend_class_entry *GregorianCalendar_ce_ptr;
--- a/ext/intl/calendar/calendar_class.h
+++ b/ext/intl/calendar/calendar_class.h
@@ -26,6 +26,8 @@
#ifndef USE_CALENDAR_POINTER
typedef void Calendar;
+#else
+using icu::Calendar;
#endif
typedef struct {
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -40,6 +40,8 @@ extern "C" {
}
#include "../common/common_enum.h"
+using icu::Locale;
+
U_CFUNC PHP_METHOD(IntlCalendar, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -23,6 +23,8 @@
#include <unicode/locid.h>
#include <unicode/calendar.h>
#include <unicode/gregocal.h>
+#include <unicode/ustring.h>
+
extern "C" {
#include "../php_intl.h"
#include "../intl_common.h"
@@ -34,6 +36,11 @@ extern "C" {
#include "zend_exceptions.h"
}
+using icu::GregorianCalendar;
+using icu::Locale;
+using icu::UnicodeString;
+using icu::StringPiece;
+
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
}
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -25,6 +25,9 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::TimeZone;
+using icu::UnicodeString;
+
#ifndef INFINITY
#define INFINITY (DBL_MAX+DBL_MAX)
#endif
--- a/ext/intl/common/common_date.h
+++ b/ext/intl/common/common_date.h
@@ -28,6 +28,8 @@ U_CDECL_END
#include <unicode/timezone.h>
+using icu::TimeZone;
+
U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
intl_error *err, const char *func);
--- a/ext/intl/common/common_enum.h
+++ b/ext/intl/common/common_enum.h
@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter);
U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
#ifdef __cplusplus
+using icu::StringEnumeration;
U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
#endif
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -18,6 +18,8 @@
#include "zend_exceptions.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
+#include <unicode/utf16.h>
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -33,6 +33,12 @@ extern "C" {
#include "../common/common_date.h"
}
+using icu::Locale;
+using icu::DateFormat;
+using icu::GregorianCalendar;
+using icu::StringPiece;
+using icu::SimpleDateFormat;
+
static const DateFormat::EStyle valid_styles[] = {
DateFormat::kNone,
DateFormat::kFull,
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -28,6 +28,8 @@ extern "C" {
#include "../calendar/calendar_class.h"
}
+using icu::GregorianCalendar;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/dateformat/dateformat_helpers.h
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -22,11 +22,16 @@
#endif
#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
extern "C" {
#include "../php_intl.h"
}
+using icu::Locale;
+using icu::Calendar;
+using icu::DateFormat;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -24,6 +24,7 @@
#include "grapheme_util.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>
#include <unicode/ubrk.h>
@@ -835,10 +836,10 @@ PHP_FUNCTION(grapheme_extract)
pstr = str + start;
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
- char *str_end = str + str_len;
+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ unsigned char *str_end = str + str_len;
- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
pstr++;
if ( pstr >= str_end ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
--- a/ext/intl/intl_convertcpp.h
+++ b/ext/intl/intl_convertcpp.h
@@ -26,6 +26,8 @@
#include <unicode/unistr.h>
#include <zend_types.h>
+using icu::UnicodeString;
+
int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status);
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -78,6 +78,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
#endif
U_NAMESPACE_END
+using icu::Formattable;
+using icu::Format;
+using icu::DateFormat;
+using icu::MessageFormat;
+#ifdef HAS_MESSAGE_PATTERN
+using icu::MessagePattern;
+#endif
+using icu::MessageFormatAdapter;
+using icu::FieldPosition;
+
U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
{
int32_t fmt_count = 0;
@@ -229,15 +239,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
UnicodeString typeString = mp.getSubstring(type_part);
/* This is all based on the rules in the docs for MessageFormat
* @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
- if (typeString == "number") {
+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1)
+ if (typeString == ASCII_LITERAL("number")) {
MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
UnicodeString styleString = mp.getSubstring(style_part);
- if (styleString == "integer") {
+ if (styleString == ASCII_LITERAL("integer")) {
type = Formattable::kInt64;
- } else if (styleString == "currency") {
+ } else if (styleString == ASCII_LITERAL("currency")) {
type = Formattable::kDouble;
- } else if (styleString == "percent") {
+ } else if (styleString == ASCII_LITERAL("percent")) {
type = Formattable::kDouble;
} else { /* some style invalid/unknown to us */
type = Formattable::kDouble;
@@ -245,12 +256,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
} else { // if missing style, part, make it a double
type = Formattable::kDouble;
}
- } else if ((typeString == "date") || (typeString == "time")) {
+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) {
type = Formattable::kDate;
- } else if ((typeString == "spellout") || (typeString == "ordinal")
- || (typeString == "duration")) {
+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal"))
+ || (typeString == ASCII_LITERAL("duration"))) {
type = Formattable::kDouble;
}
+#undef ASCII_LITERAL
} else {
/* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
* UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -24,6 +24,7 @@
#include "normalizer_class.h"
#include "normalizer_normalize.h"
#include "intl_convert.h"
+#include <unicode/utf8.h>
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
* Normalize a string. }}} */
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -37,6 +37,8 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::Calendar;
+
/* {{{ Global variables */
U_CDECL_BEGIN
zend_class_entry *TimeZone_ce_ptr = NULL;
--- a/ext/intl/timezone/timezone_class.h
+++ b/ext/intl/timezone/timezone_class.h
@@ -29,6 +29,8 @@
#ifndef USE_TIMEZONE_POINTER
typedef void TimeZone;
+#else
+using icu::TimeZone;
#endif
typedef struct {
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -23,6 +23,7 @@
#include <unicode/locid.h>
#include <unicode/timezone.h>
#include <unicode/ustring.h>
+#include <unicode/calendar.h>
#include "intl_convertcpp.h"
#include "../common/common_date.h"
@@ -37,6 +38,9 @@ extern "C" {
}
#include "common/common_enum.h"
+using icu::Locale;
+using icu::Calendar;
+
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -3,6 +3,7 @@
#include "intl_convert.h"
#include <unicode/uchar.h>
+#include <unicode/utf8.h>
#define IC_METHOD(mname) PHP_METHOD(IntlChar, mname)
--
2.19.2

View File

@ -0,0 +1,379 @@
Based on the following upstream commits:
https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22
https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7
https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -38,6 +38,7 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::RuleBasedBreakIterator;
/* {{{ Global variables */
zend_class_entry *BreakIterator_ce_ptr;
--- a/ext/intl/breakiterator/breakiterator_class.h
+++ b/ext/intl/breakiterator/breakiterator_class.h
@@ -26,6 +26,8 @@
#ifndef USE_BREAKITERATOR_POINTER
typedef void BreakIterator;
+#else
+using icu::BreakIterator;
#endif
typedef struct {
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -32,6 +32,8 @@ extern "C" {
}
using PHP::CodePointBreakIterator;
+using icu::BreakIterator;
+using icu::Locale;
U_CFUNC PHP_METHOD(BreakIterator, __construct)
{
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -33,6 +33,8 @@ typedef union {
using namespace PHP;
+using icu::UCharCharacterIterator;
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
CodePointBreakIterator::CodePointBreakIterator()
--- a/ext/intl/breakiterator/codepointiterator_internal.h
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
@@ -18,8 +18,11 @@
#define CODEPOINTITERATOR_INTERNAL_H
#include <unicode/brkiter.h>
+#include <unicode/unistr.h>
-using U_ICU_NAMESPACE::BreakIterator;
+using icu::BreakIterator;
+using icu::CharacterIterator;
+using icu::UnicodeString;
namespace PHP {
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -26,6 +26,9 @@ extern "C" {
#include "../intl_convertcpp.h"
#include "../intl_common.h"
+using icu::RuleBasedBreakIterator;
+using icu::Locale;
+
static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
return (RuleBasedBreakIterator*)bio->biter;
}
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -34,6 +34,9 @@ extern "C" {
#include <assert.h>
}
+using icu::GregorianCalendar;
+using icu::Locale;
+
/* {{{ Global variables */
zend_class_entry *Calendar_ce_ptr;
zend_class_entry *GregorianCalendar_ce_ptr;
--- a/ext/intl/calendar/calendar_class.h
+++ b/ext/intl/calendar/calendar_class.h
@@ -26,6 +26,8 @@
#ifndef USE_CALENDAR_POINTER
typedef void Calendar;
+#else
+using icu::Calendar;
#endif
typedef struct {
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -40,6 +40,8 @@ extern "C" {
}
#include "../common/common_enum.h"
+using icu::Locale;
+
U_CFUNC PHP_METHOD(IntlCalendar, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -23,6 +23,8 @@
#include <unicode/locid.h>
#include <unicode/calendar.h>
#include <unicode/gregocal.h>
+#include <unicode/ustring.h>
+
extern "C" {
#include "../php_intl.h"
#include "../intl_common.h"
@@ -34,6 +36,11 @@ extern "C" {
#include "zend_exceptions.h"
}
+using icu::GregorianCalendar;
+using icu::Locale;
+using icu::UnicodeString;
+using icu::StringPiece;
+
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
}
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -27,6 +27,9 @@ extern "C" {
#include "zend_portability.h"
+using icu::TimeZone;
+using icu::UnicodeString;
+
/* {{{ timezone_convert_datetimezone
* The timezone in DateTime and DateTimeZone is not unified. */
U_CFUNC TimeZone *timezone_convert_datetimezone(int type,
--- a/ext/intl/common/common_date.h
+++ b/ext/intl/common/common_date.h
@@ -28,6 +28,8 @@ U_CDECL_END
#include <unicode/timezone.h>
+using icu::TimeZone;
+
U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
intl_error *err, const char *func);
--- a/ext/intl/common/common_enum.h
+++ b/ext/intl/common/common_enum.h
@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter);
U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
#ifdef __cplusplus
+using icu::StringEnumeration;
U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
#endif
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -18,6 +18,8 @@
#include "zend_exceptions.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
+#include <unicode/utf16.h>
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -33,6 +33,12 @@ extern "C" {
#include "../common/common_date.h"
}
+using icu::Locale;
+using icu::DateFormat;
+using icu::GregorianCalendar;
+using icu::StringPiece;
+using icu::SimpleDateFormat;
+
static const DateFormat::EStyle valid_styles[] = {
DateFormat::kNone,
DateFormat::kFull,
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -28,6 +28,8 @@ extern "C" {
#include "../calendar/calendar_class.h"
}
+using icu::GregorianCalendar;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/dateformat/dateformat_helpers.h
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -22,11 +22,16 @@
#endif
#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
extern "C" {
#include "../php_intl.h"
}
+using icu::Locale;
+using icu::Calendar;
+using icu::DateFormat;
+
int datefmt_process_calendar_arg(zval* calendar_zv,
Locale const& locale,
const char *func_name,
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -24,6 +24,7 @@
#include "grapheme_util.h"
#include <unicode/utypes.h>
+#include <unicode/utf8.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>
#include <unicode/ubrk.h>
@@ -834,10 +835,10 @@ PHP_FUNCTION(grapheme_extract)
pstr = str + start;
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
- char *str_end = str + str_len;
+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ unsigned char *str_end = str + str_len;
- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) {
pstr++;
if ( pstr >= str_end ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
--- a/ext/intl/intl_convertcpp.h
+++ b/ext/intl/intl_convertcpp.h
@@ -26,6 +26,8 @@
#include <unicode/unistr.h>
#include <zend_types.h>
+using icu::UnicodeString;
+
int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status);
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -78,6 +78,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
#endif
U_NAMESPACE_END
+using icu::Formattable;
+using icu::Format;
+using icu::DateFormat;
+using icu::MessageFormat;
+#ifdef HAS_MESSAGE_PATTERN
+using icu::MessagePattern;
+#endif
+using icu::MessageFormatAdapter;
+using icu::FieldPosition;
+
U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
{
int32_t fmt_count = 0;
@@ -229,15 +239,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
UnicodeString typeString = mp.getSubstring(type_part);
/* This is all based on the rules in the docs for MessageFormat
* @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
- if (typeString == "number") {
+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1)
+ if (typeString == ASCII_LITERAL("number")) {
MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
UnicodeString styleString = mp.getSubstring(style_part);
- if (styleString == "integer") {
+ if (styleString == ASCII_LITERAL("integer")) {
type = Formattable::kInt64;
- } else if (styleString == "currency") {
+ } else if (styleString == ASCII_LITERAL("currency")) {
type = Formattable::kDouble;
- } else if (styleString == "percent") {
+ } else if (styleString == ASCII_LITERAL("percent")) {
type = Formattable::kDouble;
} else { /* some style invalid/unknown to us */
type = Formattable::kDouble;
@@ -245,12 +256,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
} else { // if missing style, part, make it a double
type = Formattable::kDouble;
}
- } else if ((typeString == "date") || (typeString == "time")) {
+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) {
type = Formattable::kDate;
- } else if ((typeString == "spellout") || (typeString == "ordinal")
- || (typeString == "duration")) {
+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal"))
+ || (typeString == ASCII_LITERAL("duration"))) {
type = Formattable::kDouble;
}
+#undef ASCII_LITERAL
} else {
/* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
* UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -24,6 +24,7 @@
#include "normalizer_class.h"
#include "normalizer_normalize.h"
#include "intl_convert.h"
+#include <unicode/utf8.h>
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
* Normalize a string. }}} */
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -37,6 +37,8 @@ extern "C" {
#include <ext/date/php_date.h>
}
+using icu::Calendar;
+
/* {{{ Global variables */
U_CDECL_BEGIN
zend_class_entry *TimeZone_ce_ptr = NULL;
--- a/ext/intl/timezone/timezone_class.h
+++ b/ext/intl/timezone/timezone_class.h
@@ -29,6 +29,8 @@
#ifndef USE_TIMEZONE_POINTER
typedef void TimeZone;
+#else
+using icu::TimeZone;
#endif
typedef struct {
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -23,6 +23,7 @@
#include <unicode/locid.h>
#include <unicode/timezone.h>
#include <unicode/ustring.h>
+#include <unicode/calendar.h>
#include "intl_convertcpp.h"
#include "../common/common_date.h"
@@ -37,6 +38,9 @@ extern "C" {
}
#include "common/common_enum.h"
+using icu::Locale;
+using icu::Calendar;
+
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
{
zend_throw_exception( NULL,
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -3,6 +3,7 @@
#include "intl_convert.h"
#include <unicode/uchar.h>
+#include <unicode/utf8.h>
#define IC_METHOD(mname) PHP_METHOD(IntlChar, mname)
--
2.19.2

View File

@ -0,0 +1,13 @@
[Unit]
Description=The PHP FastCGI Process Manager
After=network.target
[Service]
Type=simple
PIDFile=/run/php-fpm/php-fpm-%I.pid
ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
[Unit]
Description=The PHP FastCGI Process Manager
After=network.target
[Service]
Type=notify
PIDFile=/run/php-fpm/php-fpm-%I.pid
ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,233 @@
--- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400
+++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400
@@ -186,21 +186,36 @@
AC_DEFUN([PHP_GD_FREETYPE2],[
if test "$PHP_FREETYPE_DIR" != "no"; then
- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
- if test -f "$i/bin/freetype-config"; then
- FREETYPE2_DIR=$i
- FREETYPE2_CONFIG="$i/bin/freetype-config"
- break
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ AC_MSG_CHECKING(for freetype2)
+
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
+
+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
+ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
+ FREETYPE2_DIR="found"
+
+ AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found)
+ else
+
+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+ if test -f "$i/bin/freetype-config"; then
+ FREETYPE2_DIR=$i
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
+ break
+ fi
+ done
+
+ if test -z "$FREETYPE2_DIR"; then
+ AC_MSG_ERROR([freetype-config not found.])
fi
- done
- if test -z "$FREETYPE2_DIR"; then
- AC_MSG_ERROR([freetype-config not found.])
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+ AC_MSG_RESULT(found via freetype-config)
fi
- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
-
PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
--- a/configure 2018-04-24 11:10:05.000000000 -0400
+++ b/configure 2018-05-04 15:18:45.626367913 -0400
@@ -34348,21 +34348,79 @@
if test "$PHP_FREETYPE_DIR" != "no"; then
- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
- if test -f "$i/bin/freetype-config"; then
- FREETYPE2_DIR=$i
- FREETYPE2_CONFIG="$i/bin/freetype-config"
- break
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
+$as_echo_n "checking for freetype2... " >&6; }
+
+
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
+
+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
+ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
+ FREETYPE2_DIR="found"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5
+$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; }
+ else
+
+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+ if test -f "$i/bin/freetype-config"; then
+ FREETYPE2_DIR=$i
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
+ break
+ fi
+ done
+
+ if test -z "$FREETYPE2_DIR"; then
+ as_fn_error $? "freetype-config not found." "$LINENO" 5
fi
- done
- if test -z "$FREETYPE2_DIR"; then
- as_fn_error $? "freetype-config not found." "$LINENO" 5
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
+$as_echo "found via freetype-config" >&6; }
fi
- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
-
for ac_i in $FREETYPE2_CFLAGS; do
case $ac_i in
@@ -36019,21 +36076,78 @@
if test "$PHP_FREETYPE_DIR" != "no"; then
- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
- if test -f "$i/bin/freetype-config"; then
- FREETYPE2_DIR=$i
- FREETYPE2_CONFIG="$i/bin/freetype-config"
- break
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
+$as_echo_n "checking for freetype2... " >&6; }
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
+
+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
+ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5
+$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; }
+ else
+
+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+ if test -f "$i/bin/freetype-config"; then
+ FREETYPE2_DIR=$i
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
+ break
+ fi
+ done
+
+ if test -z "$FREETYPE2_DIR"; then
+ as_fn_error $? "freetype-config not found." "$LINENO" 5
fi
- done
- if test -z "$FREETYPE2_DIR"; then
- as_fn_error $? "freetype-config not found." "$LINENO" 5
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
+$as_echo "found via freetype-config" >&6; }
fi
- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
-
for ac_i in $FREETYPE2_CFLAGS; do
case $ac_i in

View File

@ -0,0 +1,14 @@
diff -aurN a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4
--- a/ext/pdo_odbc/config.m4 2019-11-26 15:13:39.000000000 -0500
+++ b/ext/pdo_odbc/config.m4 2019-12-06 10:39:56.296658492 -0500
@@ -85,6 +85,10 @@
PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir"
fi
+ if test "$pdo_odbc_def_lib" = "iodbc" ; then
+ PDO_ODBC_INCDIR="$PDO_ODBC_INCDIR/iodbc"
+ fi
+
AC_MSG_RESULT([$pdo_odbc_flavour
libs $PDO_ODBC_LIBDIR,
headers $PDO_ODBC_INCDIR])

View File

@ -0,0 +1,748 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit flag-o-matic eapi7-ver systemd autotools
MY_PV=${PV/_rc/RC}
DESCRIPTION="The PHP language runtime engine"
HOMEPAGE="https://secure.php.net/"
SRC_URI="https://secure.php.net/distributions/${P}.tar.xz"
LICENSE="PHP-3.01
BSD
Zend-2.0
bcmath? ( LGPL-2.1+ )
fpm? ( BSD-2 )
gd? ( gd )
unicode? ( BSD-2 LGPL-2.1 )"
SLOT="$(ver_cut 1-2)"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
S="${WORKDIR}/${PN}-${MY_PV}"
# We can build the following SAPIs in the given order
SAPIS="embed cli cgi fpm apache2 phpdbg"
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
IUSE="${IUSE}
${SAPIS/cli/+cli}
threads"
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
coverage +ctype curl debug
enchant exif +fileinfo +filter firebird
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
mhash mssql mysql mysqli nls
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
readline recode selinux +session session-mm sharedmem
+simplexml snmp soap sockets sodium spell sqlite ssl
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
# The supported (that is, autodetected) versions of BDB are listed in
# the ./configure script. Other versions *work*, but we need to stick to
# the ones that can be detected to avoid a repeat of bug #564824.
COMMON_DEPEND="
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
>=dev-libs/libpcre2-10.30[unicode]
fpm? ( acl? ( sys-apps/acl ) )
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
<www-servers/apache-2.4[threads=] ) )
argon2? ( app-crypt/argon2:= )
berkdb? ( || ( sys-libs/db:5.3
sys-libs/db:5.1
sys-libs/db:4.8
sys-libs/db:4.7
sys-libs/db:4.6
sys-libs/db:4.5 ) )
bzip2? ( app-arch/bzip2:0= )
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
coverage? ( dev-util/lcov )
curl? ( >=net-misc/curl-7.10.5 )
enchant? ( <app-text/enchant-2.0:0 )
firebird? ( dev-db/firebird )
gd? ( virtual/jpeg:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
gmp? ( dev-libs/gmp:0= )
iconv? ( virtual/libiconv )
imap? ( virtual/imap-c-client[kerberos=,ssl=] )
intl? ( dev-libs/icu:= )
iodbc? ( dev-db/libiodbc )
kerberos? ( virtual/krb5 )
ldap? ( >=net-nds/openldap-1.2.11 )
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
lmdb? ( dev-db/lmdb:= )
mssql? ( dev-db/freetds[mssql] )
nls? ( sys-devel/gettext )
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
odbc? ( >=dev-db/unixODBC-1.8.13 )
postgres? ( dev-db/postgresql:* )
qdbm? ( dev-db/qdbm )
readline? ( sys-libs/readline:0= )
recode? ( app-text/recode )
session-mm? ( dev-libs/mm )
simplexml? ( >=dev-libs/libxml2-2.6.8 )
snmp? ( >=net-analyzer/net-snmp-5.2 )
soap? ( >=dev-libs/libxml2-2.6.8 )
sodium? ( dev-libs/libsodium:= )
spell? ( >=app-text/aspell-0.50 )
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
ssl? (
!libressl? ( >=dev-libs/openssl-1.0.1:0= )
libressl? ( dev-libs/libressl:0= )
)
tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
tokyocabinet? ( dev-db/tokyocabinet )
truetype? ( =media-libs/freetype-2* )
unicode? ( dev-libs/oniguruma:= )
wddx? ( >=dev-libs/libxml2-2.6.8 )
webp? ( media-libs/libwebp:0= )
xml? ( >=dev-libs/libxml2-2.6.8 )
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
xpm? ( x11-libs/libXpm )
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
zip? ( >=sys-libs/zlib-1.2.0.4:0= )
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
"
RDEPEND="${COMMON_DEPEND}
virtual/mta
fpm? (
selinux? ( sec-policy/selinux-phpfpm )
systemd? ( sys-apps/systemd ) )"
# Bison isn't actually needed when building from a release tarball
# However, the configure script will warn if it's absent or if you
# have an incompatible version installed. See bug 593278.
DEPEND="${COMMON_DEPEND}
app-arch/xz-utils
>=sys-devel/bison-3.0.1"
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
REQUIRED_USE="
|| ( cli cgi fpm apache2 embed phpdbg )
cli? ( ^^ ( readline libedit ) )
truetype? ( gd zlib )
webp? ( gd zlib )
cjk? ( gd zlib )
exif? ( gd zlib )
xpm? ( gd zlib )
gd? ( zlib )
simplexml? ( xml )
soap? ( xml )
wddx? ( xml )
xmlrpc? ( || ( xml iconv ) )
xmlreader? ( xml )
xslt? ( xml )
ldap-sasl? ( ldap )
mhash? ( hash )
phar? ( hash )
qdbm? ( !gdbm )
readline? ( !libedit )
recode? ( !imap !mysqli !mysql )
session-mm? ( session !threads )
mysql? ( || ( mysqli pdo ) )
zip-encryption? ( zip )
"
PATCHES=(
"${FILESDIR}/php-freetype-2.9.1.patch"
)
PHP_MV="$(ver_cut 1)"
php_install_ini() {
local phpsapi="${1}"
# work out where we are installing the ini file
php_set_ini_dir "${phpsapi}"
# Always install the production INI file, bug 611214.
local phpinisrc="php.ini-production-${phpsapi}"
cp php.ini-production "${phpinisrc}" || die
# default to /tmp for save_path, bug #282768
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
# Set the extension dir
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
-i "${phpinisrc}" || die
# Set the include path to point to where we want to find PEAR packages
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
dodir "${PHP_INI_DIR#${EPREFIX}}"
insinto "${PHP_INI_DIR#${EPREFIX}}"
newins "${phpinisrc}" php.ini
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
elog
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
if use opcache; then
elog "Adding opcache to $PHP_EXT_INI_DIR"
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
fi
# SAPI-specific handling
if [[ "${sapi}" == "fpm" ]] ; then
einfo "Installing FPM config files php-fpm.conf and www.conf"
insinto "${PHP_INI_DIR#${EPREFIX}}"
doins sapi/fpm/php-fpm.conf
insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
doins sapi/fpm/www.conf
fi
dodoc php.ini-{development,production}
}
php_set_ini_dir() {
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
}
src_prepare() {
default
# In php-7.x, the FPM pool configuration files have been split off
# of the main config. By default the pool config files go in
# e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
# include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
# we'll install the pool configuration file "www.conf" there.
php_set_ini_dir fpm
sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
sapi/fpm/php-fpm.conf.in \
|| die 'failed to move the include directory in php-fpm.conf'
# Bug 669566 - necessary so that build tools are updated for commands like pecl
# Force rebuilding aclocal.m4
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
eautoreconf
}
src_configure() {
addpredict /usr/share/snmp/mibs/.index #nowarn
addpredict /var/lib/net-snmp/mib_indexes #nowarn
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
local our_conf=(
--prefix="${PHP_DESTDIR}"
--mandir="${PHP_DESTDIR}/man"
--infodir="${PHP_DESTDIR}/info"
--libdir="${PHP_DESTDIR}/lib"
--with-libdir="$(get_libdir)"
--localstatedir="${EPREFIX}/var"
--without-pear
$(use_enable threads maintainer-zts)
)
our_conf+=(
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
$(use_enable bcmath bcmath)
$(use_with bzip2 bz2 "${EPREFIX}/usr")
$(use_enable calendar calendar)
$(use_enable coverage gcov)
$(use_enable ctype ctype)
$(use_with curl curl "${EPREFIX}/usr")
$(use_enable xml dom)
$(use_with enchant enchant "${EPREFIX}/usr")
$(use_enable exif exif)
$(use_enable fileinfo fileinfo)
$(use_enable filter filter)
$(use_enable ftp ftp)
$(use_with nls gettext "${EPREFIX}/usr")
$(use_with gmp gmp "${EPREFIX}/usr")
$(use_enable hash hash)
$(use_with mhash mhash "${EPREFIX}/usr")
$(use_with iconv iconv \
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
$(use_enable intl intl)
$(use_enable ipv6 ipv6)
$(use_enable json json)
$(use_with kerberos kerberos "${EPREFIX}/usr")
$(use_enable xml libxml)
$(use_with xml libxml-dir "${EPREFIX}/usr")
$(use_enable unicode mbstring)
$(use_with unicode onig "${EPREFIX}/usr")
$(use_with ssl openssl "${EPREFIX}/usr")
$(use_with ssl openssl-dir "${EPREFIX}/usr")
$(use_enable pcntl pcntl)
$(use_enable phar phar)
$(use_enable pdo pdo)
$(use_enable opcache opcache)
$(use_with postgres pgsql "${EPREFIX}/usr")
$(use_enable posix posix)
$(use_with spell pspell "${EPREFIX}/usr")
$(use_with recode recode "${EPREFIX}/usr")
$(use_enable simplexml simplexml)
$(use_enable sharedmem shmop)
$(use_with snmp snmp "${EPREFIX}/usr")
$(use_enable soap soap)
$(use_enable sockets sockets)
$(use_with sodium sodium "${EPREFIX}/usr")
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
$(use_enable sysvipc sysvmsg)
$(use_enable sysvipc sysvsem)
$(use_enable sysvipc sysvshm)
$(use_with tidy tidy "${EPREFIX}/usr")
$(use_enable tokenizer tokenizer)
$(use_enable wddx wddx)
$(use_enable xml xml)
$(use_enable xmlreader xmlreader)
$(use_enable xmlwriter xmlwriter)
$(use_with xmlrpc xmlrpc)
$(use_with xslt xsl "${EPREFIX}/usr")
$(use_enable zip zip)
$(use_with zip-encryption libzip "${EPREFIX}/usr")
$(use_with zlib zlib "${EPREFIX}/usr")
$(use_enable debug debug)
)
# DBA support
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|| use qdbm || use lmdb || use tokyocabinet ; then
our_conf+=( "--enable-dba${shared}" )
fi
# DBA drivers support
our_conf+=(
$(use_with cdb cdb)
$(use_with berkdb db4 "${EPREFIX}/usr")
$(use_enable flatfile flatfile)
$(use_with gdbm gdbm "${EPREFIX}/usr")
$(use_enable inifile inifile)
$(use_with qdbm qdbm "${EPREFIX}/usr")
$(use_with lmdb lmdb "${EPREFIX}/usr")
)
# Support for the GD graphics library
our_conf+=(
$(use_with truetype freetype-dir "${EPREFIX}/usr")
$(use_enable cjk gd-jis-conv)
$(use_with gd jpeg-dir "${EPREFIX}/usr")
$(use_with gd png-dir "${EPREFIX}/usr")
$(use_with xpm xpm-dir "${EPREFIX}/usr")
)
if use webp; then
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
fi
# enable gd last, so configure can pick up the previous settings
our_conf+=( $(use_with gd gd) )
# IMAP support
if use imap ; then
our_conf+=(
$(use_with imap imap "${EPREFIX}/usr")
$(use_with ssl imap-ssl "${EPREFIX}/usr")
)
fi
# Interbase/firebird support
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
# LDAP support
if use ldap ; then
our_conf+=(
$(use_with ldap ldap "${EPREFIX}/usr")
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
)
fi
# MySQL support
local mysqllib="mysqlnd"
local mysqlilib="mysqlnd"
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
if use mysql || use mysqli ; then
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
fi
# ODBC support
our_conf+=(
$(use_with odbc unixODBC "${EPREFIX}/usr")
$(use_with iodbc iodbc "${EPREFIX}/usr")
)
# Oracle support
our_conf+=( $(use_with oci8-instant-client oci8) )
# PDO support
if use pdo ; then
our_conf+=(
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
$(use_with mysql pdo-mysql "${mysqllib}")
$(use_with postgres pdo-pgsql)
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
$(use_with oci8-instant-client pdo-oci)
)
fi
# readline/libedit support
our_conf+=(
$(use_with readline readline "${EPREFIX}/usr")
$(use_with libedit libedit "${EPREFIX}/usr")
)
# Session support
if use session ; then
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
else
our_conf+=( $(use_enable session session) )
fi
# Use pic for shared modules such as apache2's mod_php
our_conf+=( --with-pic )
# we use the system copy of pcre
# --with-pcre-regex affects ext/pcre
# --with-pcre-dir affects ext/filter and ext/zip
# --with-pcre-valgrind cannot be enabled with system pcre
# Many arches don't support pcre-jit
our_conf+=(
--with-pcre-regex="${EPREFIX}/usr"
--with-pcre-dir="${EPREFIX}/usr"
--without-pcre-valgrind
--without-pcre-jit
)
# Catch CFLAGS problems
# Fixes bug #14067.
# Changed order to run it in reverse for bug #32022 and #12021.
replace-cpu-flags "k6*" "i586"
# Cache the ./configure test results between SAPIs.
our_conf+=( --cache-file="${T}/config.cache" )
# Support user-passed configuration parameters
our_conf+=( ${EXTRA_ECONF:-} )
# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
mkdir -p "${WORKDIR}/sapis-build" || die
for one_sapi in $SAPIS ; do
use "${one_sapi}" || continue
php_set_ini_dir "${one_sapi}"
# The BUILD_DIR variable is used to determine where to output
# the files that autotools creates. This was all originally
# based on the autotools-utils eclass.
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
cp -a "${S}" "${BUILD_DIR}" || die
cd "${BUILD_DIR}" || die
local sapi_conf=(
--with-config-file-path="${PHP_INI_DIR}"
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
)
for sapi in $SAPIS ; do
case "$sapi" in
cli|cgi|embed|fpm|phpdbg)
if [[ "${one_sapi}" == "${sapi}" ]] ; then
sapi_conf+=( "--enable-${sapi}" )
if [[ "fpm" == "${sapi}" ]] ; then
sapi_conf+=(
$(use_with acl fpm-acl)
$(use_with systemd fpm-systemd)
)
fi
else
sapi_conf+=( "--disable-${sapi}" )
fi
;;
apache2)
if [[ "${one_sapi}" == "${sapi}" ]] ; then
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
else
sapi_conf+=( --without-apxs2 )
fi
;;
esac
done
# Construct the $myeconfargs array by concatenating $our_conf
# (the common args) and $sapi_conf (the SAPI-specific args).
local myeconfargs=( "${our_conf[@]}" )
myeconfargs+=( "${sapi_conf[@]}" )
pushd "${BUILD_DIR}" > /dev/null || die
econf "${myeconfargs[@]}"
popd > /dev/null || die
done
}
src_compile() {
# snmp seems to run during src_compile, too (bug #324739)
addpredict /usr/share/snmp/mibs/.index #nowarn
addpredict /var/lib/net-snmp/mib_indexes #nowarn
for sapi in ${SAPIS} ; do
if use "${sapi}"; then
cd "${WORKDIR}/sapis-build/$sapi" || \
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
emake
fi
done
}
src_install() {
# see bug #324739 for what happens when we don't have that
addpredict /usr/share/snmp/mibs/.index #nowarn
# grab the first SAPI that got built and install common files from there
local first_sapi=""
for sapi in $SAPIS ; do
if use $sapi ; then
first_sapi=$sapi
break
fi
done
# Makefile forgets to create this before trying to write to it...
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
# Install php environment (without any sapis)
cd "${WORKDIR}/sapis-build/$first_sapi" || die
emake INSTALL_ROOT="${D}" \
install-build install-headers install-programs
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
# Create the directory where we'll put version-specific php scripts
keepdir "/usr/share/php${PHP_MV}"
local sapi="", file=""
local sapi_list=""
for sapi in ${SAPIS}; do
if use "${sapi}" ; then
einfo "Installing SAPI: ${sapi}"
cd "${WORKDIR}/sapis-build/${sapi}" || die
if [[ "${sapi}" == "apache2" ]] ; then
# We're specifically not using emake install-sapi as libtool
# may cause unnecessary relink failures (see bug #351266)
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
newins ".libs/libphp${PHP_MV}$(get_libname)" \
"libphp${PHP_MV}$(get_libname)"
keepdir "/usr/$(get_libdir)/apache2/modules"
else
# needed each time, php_install_ini would reset it
local dest="${PHP_DESTDIR#${EPREFIX}}"
into "${dest}"
case "$sapi" in
cli)
source="sapi/cli/php"
;;
cgi)
source="sapi/cgi/php-cgi"
;;
fpm)
source="sapi/fpm/php-fpm"
;;
embed)
source="libs/libphp${PHP_MV}$(get_libname)"
;;
phpdbg)
source="sapi/phpdbg/phpdbg"
;;
*)
die "unhandled sapi in src_install"
;;
esac
if [[ "${source}" == *"$(get_libname)" ]]; then
dolib.so "${source}"
else
dobin "${source}"
local name="$(basename ${source})"
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
fi
fi
php_install_ini "${sapi}"
# construct correct SAPI string for php-config
# thanks to ferringb for the bash voodoo
if [[ "${sapi}" == "apache2" ]]; then
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
else
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
fi
fi
done
# Installing opcache module
if use opcache ; then
into "${PHP_DESTDIR#${EPREFIX}}"
dolib.so "modules/opcache$(get_libname)"
fi
# Install env.d files
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
# set php-config variable correctly (bug #278439)
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
if use fpm ; then
if use systemd; then
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
"php-fpm@${SLOT}.service"
else
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
"php-fpm@${SLOT}.service"
fi
fi
}
src_test() {
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
if [[ ! -x "${PHP_BIN}" ]] ; then
ewarn "Test phase requires USE=cli, skipping"
return
else
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
fi
if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
fi
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
fi
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
"session.save_path=${T}" \
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
"session.save_path=${T}"
for name in ${EXPECTED_TEST_FAILURES}; do
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
done
local failed="$(find -name '*.out')"
if [[ ${failed} != "" ]] ; then
ewarn "The following test cases failed unexpectedly:"
for name in ${failed}; do
ewarn " ${name/.out/}"
done
else
einfo "No unexpected test failures, all fine"
fi
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
local passed=""
for name in ${EXPECTED_TEST_FAILURES}; do
[[ -f "${name}.diff" ]] && continue
passed="${passed} ${name}"
done
if [[ ${passed} != "" ]] ; then
einfo "The following test cases passed unexpectedly:"
for name in ${passed}; do
ewarn " ${passed}"
done
else
einfo "None of the known-to-fail tests passed, all fine"
fi
fi
}
pkg_postinst() {
# Output some general info to the user
if use apache2 ; then
elog
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
elog "your apache2 command. OpenRC users can append that string to"
elog "APACHE2_OPTS in /etc/conf.d/apache2."
elog
elog "The apache module configuration file 70_mod_php.conf is"
elog "provided (and maintained) by eselect-php."
elog
fi
# Create the symlinks for php
for m in ${SAPIS}; do
[[ ${m} == 'embed' ]] && continue;
if use $m ; then
local ci=$(eselect php show $m)
if [[ -z $ci ]]; then
eselect php set $m php${SLOT} || die
einfo "Switched ${m} to use php:${SLOT}"
einfo
elif [[ $ci != "php${SLOT}" ]] ; then
elog "To switch $m to use php:${SLOT}, run"
elog " eselect php set $m php${SLOT}"
elog
fi
fi
done
# Remove dead symlinks for SAPIs that were just disabled. For
# example, if the user has the cgi SAPI enabled, then he has an
# eselect-php symlink for it. If he later reinstalls PHP with
# USE="-cgi", that symlink will break. This call to eselect is
# supposed to remove that dead link per bug 572436.
eselect php cleanup || die
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
elog "To build extensions for this version of PHP, you will need to"
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
elog
fi
# Warn about the removal of PHP_INI_VERSION if the user has it set.
if [[ -n "${PHP_INI_VERSION}" ]]; then
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
ewarn 'remove it from your configuration at your convenience. See'
ewarn
ewarn ' https://bugs.gentoo.org/611214'
ewarn
ewarn 'for more information.'
fi
elog "For details on how version slotting works, please see"
elog "the wiki:"
elog
elog " https://wiki.gentoo.org/wiki/PHP"
elog
}
pkg_postrm() {
# This serves two purposes. First, if we have just removed the last
# installed version of PHP, then this will remove any dead symlinks
# belonging to eselect-php. Second, if a user upgrades slots from
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
# his existing symlinks to point to the new 7.0 installation. The
# latter is bug 432962.
#
# Note: the eselect-php package may not be installed at this point,
# so we can't die() if this command fails.
eselect php cleanup
}

17
dev-lang/rust/Manifest Normal file
View File

@ -0,0 +1,17 @@
AUX 0012-Ignore-broken-and-non-applicable-tests.patch 3387 BLAKE2B 6809f3d5c2cf5698d516ccd74dbbf66cc4265200f75567fa197743672895ddee418367751ac3d99a263ff3417ed89718cd3602c609d0dfac7ba2fd5ac18dce76 SHA512 0c41c238dc0b5a7130398d8c1d6bb6987c9bff704c89875830e9d6ad28d49d9b300c1fe7c982ef9be9a92ed0057f6fc04a604d189d1aec2dc2b014d6d50a7d8d
AUX 1.44.0-libressl.patch 8969 BLAKE2B 1ae707140a93fd76ec825e0e8c49f1408cda5a3b290a07c974d8ba8ba9b82e230bc2a4864cdecc744425d77ded819690da9328af2f648c636e8fd9ba3f0bb131 SHA512 81421ce6a0eb89bb51ff6a95be79159fce18be51c341f29aaf9d18e9b4aa1d3324e0c3472f72881c94a053b6dc4490c16b5ca2ac9cece0ea2d01051e3ed28a56
DIST rust-1.43.1-aarch64-unknown-linux-gnu.tar.xz 104148868 BLAKE2B ac5db9eb58c502253d001e0c93aef867bc584d045960a1d3c2caf6772a7c1f4fbad7da579d7c72b3376804f61f1332a54e9fc7099ba5f4a65f7e5435df28894a SHA512 b54fad5493344d2370bd77110f0ffb0231f41ab8aa9707e9303304957c5d9067dc83089432eb175605b78dc771dfcf7abfcce63d7fecdbb759dd224c17d12da0
DIST rust-1.43.1-arm-unknown-linux-gnueabi.tar.xz 104779424 BLAKE2B 63c05d7403970bd4a237a6b690bcb8e78f310816a953af43da8d258a74102cd560c8674656c2036b1f391dc964ba6d2be2736bc10686c2365cc332b5c76a5502 SHA512 ea2eae6da6c757c07cf9631c706365c743c58f28b514444763ea70fed4c8fcefc5c36d55136afffc2f5e0d25e9b1fdf3243cb9def7e0f57e37b5a4783d44a61b
DIST rust-1.43.1-arm-unknown-linux-gnueabihf.tar.xz 103569032 BLAKE2B fc94eeb777a72fcb1b2821b5d10bb9eaca535d76e8caee3d06aed989107460e00146516c5be5714e9739c49d5170809fc132624f9a035afba146db883346c57a SHA512 1c523dafceb29f916a192261f673048c8f781453bcee237e0e333d694d7d7b71735544906f2edea9e0a8a48fc66a478645ae8ae865a171f4f9a94f0d8e6800c1
DIST rust-1.43.1-armv7-unknown-linux-gnueabihf.tar.xz 108430484 BLAKE2B a3c57930b4e7096f409a2129abef60fbdfadad59f29e428296f3151187eac286e82bdb2d0ca879db87563cdc707dbcabbb5e9048b54303653209b98268ab9cf3 SHA512 0812b3229dd47f1b5cadb49020e68d28b4267ac0489d0c2e448f21e3b0b6519bbf216ac9b20b747e035033842a6eb3b13a98706f2eddca2c088d9396dcb2c21e
DIST rust-1.43.1-i686-unknown-linux-gnu.tar.xz 125731548 BLAKE2B 3a3278e409a69f3e8195bab39871b5594571c1c8f2ea2a5f8c9786a739f709381c13c1b2a3209ef62cb7c5b8aec47dd769cf3e658ed57e5037522759fa1a244e SHA512 c7423bccfb15f3df6043ec1d81203c9db9b3229dedd347cab09d3cc3b183f53aa0707f59964efccd63418e1c6ad21e7ee7dcc1495eda8c4ecb55ee8e6b3ac034
DIST rust-1.43.1-mips-unknown-linux-gnu.tar.xz 95924004 BLAKE2B fc1da442dfaa535b81029ed40a85cd0d55766d84c34f0d97bf36376c44e44fd5305b429854b9c964515e10f83a06b36a6ad9daae5714e142491d99e58b1d0a07 SHA512 fe3b11e586d506dc917f0e04009a994a16575ac534a2716b49e66a0344060a26ee6c7e912b6cd7b5f010a97f59604515f899bc1b6c38f0ea86e8cecc20152dd6
DIST rust-1.43.1-mips64-unknown-linux-gnuabi64.tar.xz 100980364 BLAKE2B 12439df511c3ad43ed24cb0e648a212314a747e203680929ed3e136505eb29af3dcb007162aaa337fbac56a9b1b8f1c405217756ec712c400bc0f4d9aefd64b8 SHA512 6c0d7f172e76e21596d305df7b1a38fde66a946972765de92ccc139cf8f2e8755864b7bd94328b9639023df6be51af08428f41ed78de4ba8d43620673b9f7ecb
DIST rust-1.43.1-mipsel-unknown-linux-gnu.tar.xz 98512180 BLAKE2B b5e8cdf2b8d65cc39bfb325afda9ae75a360967a4f6f413f3b01257bc34130fcc873dc128a4e48bbcad774d69b9a4aae0d4a8182819a4411809af6a0c636b403 SHA512 cb01eac951384fbf2ead5b7d4acbf92485de0bbaa7e3a272a46a8934066d720d248a19a67ffc88b7b239c15478e8691b94302807dc7652e042c9b8edded6da12
DIST rust-1.43.1-powerpc-unknown-linux-gnu.tar.xz 105007576 BLAKE2B 8392f36025ca91742fad9755c945b42e616272cc97c33087090c6462a5ba9f1de82a0167ed53568b5cdd4c593464ed2858811fd0c9ae8559a1cba37be6db5305 SHA512 d10da49f19b79f843ae369bdff3e5040b93934dc50dac3c09bd346c24dfa7394364da647c08206d5cef4c853b7e59d1062c16e6eeba0ffc01736eeba63dd3eb6
DIST rust-1.43.1-powerpc64-unknown-linux-gnu.tar.xz 107189572 BLAKE2B ba561d45b8f9a7f446b17313d92db31b30a07d657dbc59667076ee216d66e4b2ec3811821bc6d1fde6bba811d2c46473c6e3bc06162fe4e1ffe040ad23542742 SHA512 695591807892c8f08801cd145ebc6a91ee4222000210baaaa0d6c8acf1ac6a96f4bf2566871def04d15a9965b7e3ea4287e37d7851fb14010518694d8ede75e6
DIST rust-1.43.1-powerpc64le-unknown-linux-gnu.tar.xz 112921244 BLAKE2B 9fa67664fc90c1f6095d98b756cae747be2ad863b894b393d4e9ecc3a1bd527b0d26f1bae2988981b98d4d582d2b60a18c62b3db3b5fa017439e034f576e7582 SHA512 da447ec44ebf998290a73420437c8d434a6c196cfe1c3331a9adf40abf7acd97a231e352a8626bbfa961da8e0c4f450aa59d573254257f72cce4068eeb8112a1
DIST rust-1.43.1-s390x-unknown-linux-gnu.tar.xz 119547480 BLAKE2B 8ce0d64e2d47f23cb927f3ea3a0f469e3cafc191ac1d47e580bce6cf0b35887484542f7d1b857d9bace5f696a072adb7e17e8c5f64af9bf1fbcc305707a15f9f SHA512 f087e50a91b1cc4a12bf15aea1cefbda9b89518febcecc0d56ea7d0a6a682be06cff7777d0a0b4812e96f3fb3295e7799bf200c1599c88cb7083a78d5002f14a
DIST rust-1.43.1-x86_64-unknown-linux-gnu.tar.xz 112817212 BLAKE2B c6153889d9872ed5a60bfc43bc8c98e71654fffdd79ce775c3eb4376ed4714c5532e6aaecb769e447f3ae0bb7a11aed75754a5e879404742cb0813080dcf67eb SHA512 2fc573ca2826d9f03044f746ae4d7715b4e31b9ac933289607aa3449a538bb4dfd519540576a1d0d286c0d754a7ba6ce38beef6aded1090d3af3091b6ba2a9ee
DIST rustc-1.44.1-src.tar.xz 94756856 BLAKE2B 60f536c3ba0fa1fec4b6333ee57809ee5226090ad5041c14a136b4356ff3b898062e06c3fe54effe873e27931ac8fcb902cd48a38615a8de7eebc6ecb3bdc2bd SHA512 1c17002edae844a710db9b144c17171416330dc565343c65af8a6e112fb61555e2025bb4cf33cac1229d7df689e6ff8858b91ae00552400ccacafaf1de11849b
EBUILD rust-1.44.1.ebuild 14912 BLAKE2B 107391d3f6cbd0974c06398f7b9fec061cca9dd24ffd72ca903d5b9758edc630070b841a5973b0688ea17dc5afe95141874734bd365fa6d9fb283b97df7bf27e SHA512 78456cbe534f7735d3b2400f52ad07cd1a1dd3db5ae8c834d62f8744e4b4f5205d04b83d462d0a25a82f53158c19c7f625792d8c2cfbbdb63bc41f373b2ebf8f

View File

@ -0,0 +1,89 @@
From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 16 Sep 2018 16:38:48 +0000
Subject: [PATCH 12/15] Ignore broken and non-applicable tests
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
long-linker-command-lines: takes >10 minutes to run (but still passes)
simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
sparc-struct-abi: no sparc target
sysroot-crates-are-unstable: can't run rustc without RPATH
---
src/test/codegen/sparc-struct-abi.rs | 1 +
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
src/test/ui/env-funky-keys.rs | 1 +
src/test/ui/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
6 files changed, 10 insertions(+)
diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
index 78e5b14a212..6f93e93286b 100644
--- a/src/test/codegen/sparc-struct-abi.rs
+++ b/src/test/codegen/sparc-struct-abi.rs
@@ -4,6 +4,7 @@
// only-sparc64
// compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
+// ignore-test
#![feature(no_core, lang_items)]
#![no_core]
diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
index f124ca2ab61..363b18f0985 100644
--- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
@@ -1,3 +1,5 @@
+# ignore-aarch64
+
-include ../tools.mk
all:
diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
index 5876fbc94bc..5f167ece1a2 100644
--- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
@@ -1,3 +1,5 @@
+# ignore-test
+
-include ../tools.mk
all:
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
index 9e770706857..6d92ec5cec8 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,1 +1,3 @@
+# ignore-test
+
all:
python2.7 test.py
diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
index c5c824ac58d..f3fe047a79c 100644
--- a/src/test/ui/env-funky-keys.rs
+++ b/src/test/ui/env-funky-keys.rs
@@ -1,6 +1,7 @@
// run-pass
// Ignore this test on Android, because it segfaults there.
+// ignore-test
// ignore-android
// ignore-windows
// ignore-cloudabi no execve
diff --git a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
index b28f742a92e..3ee4ccce731 100644
--- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
+++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
@@ -2,6 +2,8 @@
#![allow(non_camel_case_types)]
// ignore-emscripten
+// ignore-powerpc
+// ignore-powerpc64
// Test that the simd_bitmask intrinsic produces correct results.
--
2.24.1

View File

@ -0,0 +1,45 @@
From 3d1be8d8981a0f847e935312a78bd2ba5129f90e Mon Sep 17 00:00:00 2001
From: Stefan Strogin <steils@gentoo.org>
Date: Fri, 5 Jun 2020 06:37:06 +0300
Subject: [PATCH] Support LibreSSL 3.2.x
Signed-off-by: Stefan Strogin <steils@gentoo.org>
---
vendor/openssl-sys/.cargo-checksum.json | 2 +-
vendor/openssl-sys/build/main.rs | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
index 7f63bae3d..76025fe7f 100644
--- a/vendor/openssl-sys/.cargo-checksum.json
+++ b/vendor/openssl-sys/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"ffd4bbaeec2740afbcab5a6828f9e65523aaff8638e3d5d13c93a3241fb8ed2f","Cargo.toml":"3eb2f65dda1aa74c8b47814878b56bf4999b4d01bc5864fc9f3c0ece9a5694a7","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"56cee620b082d87b1c9cdeba7c6c022e6aa7d3a99e2b66ec18a534ceaf2e2bb7","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"6e800f4dc5c2cbbd54d1b1b995a2915ff941e17e11300d7091858210d3ce788d","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"5afdfc0ab87259b13a55375c178ae3af934b3281240aa24ca27afac7acccea42","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"c464eca1beb33844718044946f6ffb1bc27356d65b5b70ebcd2d4082520e7235","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"13bf789702e37dc4b9f74f3a0e61ae6e5602e4dedf45c05d884c41257b32d76c","src/pem.rs":"4427060f543ae9e6745d9a8f7f76cb72acfb06afacaf396b011afff6a221714b","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"34ad7d5413d77f9052815cfd7344d5a21868b5ae0d38dadd6f4ed3b5c4b33760","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986"}
\ No newline at end of file
+{"files":{"CHANGELOG.md":"ffd4bbaeec2740afbcab5a6828f9e65523aaff8638e3d5d13c93a3241fb8ed2f","Cargo.toml":"3eb2f65dda1aa74c8b47814878b56bf4999b4d01bc5864fc9f3c0ece9a5694a7","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"56cee620b082d87b1c9cdeba7c6c022e6aa7d3a99e2b66ec18a534ceaf2e2bb7","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"049f7020b6a1f8bb831cb750054fbc0f408e048e34c0817644696ec9d0cfb06e","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"5afdfc0ab87259b13a55375c178ae3af934b3281240aa24ca27afac7acccea42","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"c464eca1beb33844718044946f6ffb1bc27356d65b5b70ebcd2d4082520e7235","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"13bf789702e37dc4b9f74f3a0e61ae6e5602e4dedf45c05d884c41257b32d76c","src/pem.rs":"4427060f543ae9e6745d9a8f7f76cb72acfb06afacaf396b011afff6a221714b","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"34ad7d5413d77f9052815cfd7344d5a21868b5ae0d38dadd6f4ed3b5c4b33760","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986"}
diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
index 162e11a66..6754ddeef 100644
--- a/vendor/openssl-sys/build/main.rs
+++ b/vendor/openssl-sys/build/main.rs
@@ -204,6 +204,9 @@ See rust-openssl README for more information:
(3, 0, 0) => ('3', '0', '0'),
(3, 0, 1) => ('3', '0', '1'),
(3, 0, _) => ('3', '0', 'x'),
+ (3, 1, 0) => ('3', '1', '0'),
+ (3, 1, _) => ('3', '1', 'x'),
+ (3, 2, _) => ('3', '2', 'x'),
_ => version_error(),
};
@@ -244,7 +247,7 @@ fn version_error() -> ! {
"
This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
-through 3.0.x, but a different version of OpenSSL was found. The build is now aborting
+through 3.2.x, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.
"
--
2.27.0

View File

@ -0,0 +1,502 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
MY_P="rustc-beta"
SLOT="beta/${PV}"
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
else
ABI_VER="$(ver_cut 1-2)"
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
KEYWORDS="amd64 arm arm64 ppc64 x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
!system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
# simultaneously.
# How to use it:
# 1. List all the working slots (with min versions) in ||, newest first.
# 2. Update the := to specify *max* version, e.g. < 11.
# 3. Specify LLVM_MAX_SLOT, e.g. 10.
LLVM_DEPEND="
|| (
sys-devel/llvm:10[${LLVM_TARGET_USEDEPS// /,}]
sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}]
)
<sys-devel/llvm-11:=
wasm? ( sys-devel/lld )
"
LLVM_MAX_SLOT=10
BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)) >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
# libgit2 should be at least same as bundled into libgit-sys #707746
COMMON_DEPEND="
>=dev-libs/libgit2-0.99:=
net-libs/libssh2:=
net-libs/http-parser:=
net-misc/curl:=[ssl]
sys-libs/zlib:=
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
elibc_musl? ( sys-libs/libunwind )
system-llvm? (
${LLVM_DEPEND}
)
"
DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
|| (
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
dev-util/cmake
dev-util/ninja
)
"
RDEPEND="${COMMON_DEPEND}
>=app-eselect/eselect-rust-20190311
"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
"
QA_FLAGS_IGNORED="
usr/bin/.*-${PV}
usr/lib.*/lib.*.so
usr/lib/rustlib/.*/codegen-backends/librustc_codegen_llvm-llvm.so
usr/lib/rustlib/.*/lib/lib.*.so
"
QA_SONAME="
usr/lib.*/lib.*.so
usr/lib.*/librustc_macros.*.s
"
# tests need a bit more work, currently they are causing multiple
# re-compilations and somewhat fragile.
RESTRICT="test"
PATCHES=(
"${FILESDIR}"/0012-Ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.44.0-libressl.patch
)
S="${WORKDIR}/${MY_P}-src"
toml_usex() {
usex "$1" true false
}
pre_build_checks() {
CHECKREQS_DISK_BUILD="9G"
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
CHECKREQS_DISK_BUILD="15G"
fi
eshopts_pop
check-reqs_pkg_setup
}
pkg_pretend() {
pre_build_checks
}
pkg_setup() {
pre_build_checks
python-any-r1_pkg_setup
# required to link agains system libs, otherwise
# crates use bundled sources and compile own static version
export LIBGIT2_SYS_USE_PKG_CONFIG=1
export LIBSSH2_SYS_USE_PKG_CONFIG=1
export PKG_CONFIG_ALLOW_CROSS=1
if use system-llvm; then
llvm_pkg_setup
local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
export LLVM_LINK_SHARED=1
export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
fi
}
src_prepare() {
if ! use system-bootstrap; then
local rust_stage0_root="${WORKDIR}"/rust-stage0
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
--destdir="${rust_stage0_root}" --prefix=/ || die
fi
default
}
src_configure() {
local rust_target="" rust_targets="" arch_cflags
# Collect rust target names to compile standard libs for all ABIs.
for v in $(multilib_get_enabled_abi_pairs); do
rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
done
if use wasm; then
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
if use system-llvm; then
# un-hardcode rust-lld linker for this target
# https://bugs.gentoo.org/715348
sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs || die
fi
fi
rust_targets="${rust_targets#,}"
local tools="\"cargo\","
if use clippy; then
tools="\"clippy\",$tools"
fi
if use miri; then
tools="\"miri\",$tools"
fi
if use rls; then
tools="\"rls\",\"analysis\",\"src\",$tools"
fi
if use rustfmt; then
tools="\"rustfmt\",$tools"
fi
local rust_stage0_root
if use system-bootstrap; then
rust_stage0_root="$(rustc --print sysroot)"
else
rust_stage0_root="${WORKDIR}"/rust-stage0
fi
rust_target="$(rust_abi)"
cat <<- EOF > "${S}"/config.toml
[llvm]
optimize = $(toml_usex !debug)
release-debuginfo = $(toml_usex debug)
assertions = $(toml_usex debug)
ninja = true
targets = "${LLVM_TARGETS// /;}"
experimental-targets = ""
link-shared = $(toml_usex system-llvm)
[build]
build = "${rust_target}"
host = ["${rust_target}"]
target = [${rust_targets}]
cargo = "${rust_stage0_root}/bin/cargo"
rustc = "${rust_stage0_root}/bin/rustc"
docs = $(toml_usex doc)
compiler-docs = $(toml_usex doc)
submodules = false
python = "${EPYTHON}"
locked-deps = true
vendor = true
extended = true
tools = [${tools}]
verbose = 2
sanitizers = false
profiler = false
cargo-native-static = false
[install]
prefix = "${EPREFIX}/usr"
libdir = "lib"
docdir = "share/doc/${PF}"
mandir = "share/man"
[rust]
optimize = true
debug = $(toml_usex debug)
debug-assertions = $(toml_usex debug)
debuginfo-level-rustc = 0
backtrace = true
incremental = false
default-linker = "$(tc-getCC)"
parallel-compiler = $(toml_usex parallel-compiler)
channel = "$(usex nightly nightly stable)"
rpath = false
verbose-tests = true
optimize-tests = $(toml_usex !debug)
codegen-tests = true
dist-src = false
lld = $(usex system-llvm false $(toml_usex wasm))
backtrace-on-ice = true
jemalloc = false
[dist]
src-tarball = false
EOF
for v in $(multilib_get_enabled_abi_pairs); do
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
arch_cflags="$(get_abi_CFLAGS ${v##*.})"
cat <<- EOF >> "${S}"/config.env
CFLAGS_${rust_target}=${arch_cflags}
EOF
cat <<- EOF >> "${S}"/config.toml
[target.${rust_target}]
cc = "$(tc-getBUILD_CC)"
cxx = "$(tc-getBUILD_CXX)"
linker = "$(tc-getCC)"
ar = "$(tc-getAR)"
EOF
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
if use elibc_musl; then
cat <<- EOF >> "${S}"/config.toml
crt-static = false
EOF
fi
if use system-llvm; then
cat <<- EOF >> "${S}"/config.toml
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
EOF
fi
done
if use wasm; then
cat <<- EOF >> "${S}"/config.toml
[target.wasm32-unknown-unknown]
linker = "$(usex system-llvm lld rust-lld)"
EOF
fi
if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then #whitespace intentionally shifted below
# experimental cross support
# discussion: https://bugs.gentoo.org/679878
# TODO: c*flags, clang, system-llvm, cargo.eclass target support
# it would be much better if we could split out stdlib
# complilation to separate ebuild and abuse CATEGORY to
# just install to /usr/lib/rustlib/<target>
# extra targets defined as a bash array
# spec format: <LLVM target>:<rust-target>:<CTARGET>
# best place would be /etc/portage/env/dev-lang/rust
# Example:
# RUST_CROSS_TARGETS=(
# "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
# )
# no extra hand holding is done, no target transformations, all
# values are passed as-is with just basic checks, so it's up to user to supply correct values
# valid rust targets can be obtained with
# rustc --print target-list
# matching cross toolchain has to be installed
# matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
# only gcc toolchains installed with crossdev are checked for now.
# BUG: we can't pass host flags to cross compiler, so just filter for now
# BUG: this should be more fine-grained.
filter-flags '-mcpu=*' '-march=*' '-mtune=*'
local cross_target_spec
for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
# extracts first element form <LLVM target>:<rust-target>:<CTARGET>
local cross_llvm_target="${cross_target_spec%%:*}"
# extracts toolchain triples, <rust-target>:<CTARGET>
local cross_triples="${cross_target_spec#*:}"
# extracts first element after before : separator
local cross_rust_target="${cross_triples%%:*}"
# extracts last element after : separator
local cross_toolchain="${cross_triples##*:}"
use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
cat <<- EOF >> "${S}"/config.toml
[target.${cross_rust_target}]
cc = "${cross_toolchain}-gcc"
cxx = "${cross_toolchain}-g++"
linker = "${cross_toolchain}-gcc"
ar = "${cross_toolchain}-ar"
EOF
if use system-llvm; then
cat <<- EOF >> "${S}"/config.toml
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
EOF
fi
# append cross target to "normal" target list
# example 'target = ["powerpc64le-unknown-linux-gnu"]'
# becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
rust_targets="${rust_targets},\"${cross_rust_target}\""
sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
ewarn
ewarn "Enabled ${rust_target} rust target"
ewarn "Using ${cross_toolchain} cross toolchain"
ewarn
if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
ewarn "'sys-devel/binutils[multitarget]' is not installed"
ewarn "'strip' will be unable to strip cross libraries"
ewarn "cross targets will be installed with full debug information"
ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
ewarn
ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
ewarn
fi
done
fi # I_KNOW_WHAT_I_AM_DOING_CROSS
einfo "Rust configured with the following settings:"
cat "${S}"/config.toml || die
}
src_compile() {
env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
"${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
"${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml -j$(makeopts_jobs) --no-doc --no-fail-fast \
src/test/codegen \
src/test/codegen-units \
src/test/compile-fail \
src/test/incremental \
src/test/mir-opt \
src/test/pretty \
src/test/run-fail \
src/test/run-make \
src/test/run-make-fulldeps \
src/test/ui \
src/test/ui-fulldeps || die
}
src_install() {
env $(cat "${S}"/config.env) DESTDIR="${D}" \
"${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die
# bug #689562, #689160
rm "${D}/etc/bash_completion.d/cargo" || die
rmdir "${D}"/etc{/bash_completion.d,} || die
dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
if use clippy; then
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
fi
if use miri; then
mv "${ED}/usr/bin/miri" "${ED}/usr/bin/miri-${PV}" || die
mv "${ED}/usr/bin/cargo-miri" "${ED}/usr/bin/cargo-miri-${PV}" || die
fi
if use rls; then
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
fi
if use rustfmt; then
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
fi
# Move public shared libs to abi specific libdir
# Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib
if [[ $(get_libdir) != lib ]]; then
dodir /usr/$(get_libdir)
mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die
fi
dodoc COPYRIGHT
rm "${ED}/usr/share/doc/${P}"/*.old || die
rm "${ED}/usr/share/doc/${P}/LICENSE-APACHE" || die
rm "${ED}/usr/share/doc/${P}/LICENSE-MIT" || die
# note: eselect-rust adds EROOT to all paths below
cat <<-EOF > "${T}/provider-${P}"
/usr/bin/cargo
/usr/bin/rustdoc
/usr/bin/rust-gdb
/usr/bin/rust-gdbgui
/usr/bin/rust-lldb
EOF
if use clippy; then
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
fi
if use miri; then
echo /usr/bin/miri >> "${T}/provider-${P}"
echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
fi
if use rls; then
echo /usr/bin/rls >> "${T}/provider-${P}"
fi
if use rustfmt; then
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}
pkg_postinst() {
eselect rust update --if-unset
elog "Rust installs a helper script for calling GDB and LLDB,"
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
if has_version app-editors/emacs; then
elog "install app-emacs/rust-mode to get emacs support for rust."
fi
if has_version app-editors/gvim || has_version app-editors/vim; then
elog "install app-vim/rust-vim to get vim support for rust."
fi
if use elibc_musl; then
ewarn "${PN} on *-musl targets is configured with crt-static"
ewarn ""
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
ewarn "to use it with portage, otherwise you may see failures like"
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
ewarn "x86_64-unknown-linux-musl does not support these crate types"
fi
}
pkg_postrm() {
eselect rust cleanup
}

17
dev-libs/nspr/Manifest Normal file
View File

@ -0,0 +1,17 @@
AUX nspr-4.10.6-solaris.patch 973 BLAKE2B 8370bedb05c718d7b73d57b5ac5c720ca62499d6d7b7a039da608a9c514996c2d987ba0135b7dcac509d1b9363908f0c0cff6fe47e1f7ca94b7efbd8c19aeeca SHA512 d4e4c44d02be7aafe09e633f2ee747c323036f7438cb87864d91bcd9bb8ac072065353aa4e8a785e38724d33bfdc8adb0e460dbf44ff7fbd8c8dd32b569074f1
AUX nspr-4.21-ipv6-musl-support.patch 1645 BLAKE2B 0b383804d5e66037041b91dcb7ddd52dd4533384ca5671ed1d36a71740b130863dd2b531867edab804fbb8cfab112282e17d607d7e298eb249ead620f99a55be SHA512 f241e607491d1192272221023d5f3e84b3e88957e7b66ce4d9ba1bcf2ab6639facc08eeb838a0e6753456f41dde4ced4fe99f923e0889030d844c23c62fad4e2
AUX nspr-4.23-prtime.patch 814 BLAKE2B 2106a841b34445310cef07e15cb77ae4c9465cca9a7dc68acd68408a66383c90bee1fafeaaa144e1b8344d1edae27407714f193a452ffc3d425212e3b2c40fc5 SHA512 9f51a03852f0b3d4352c14ee849ec8af9b3dbef68eaa2755cb5a630018f91e3a2a4fce5742078b8be51e76995218a0cfc7ef8b0c013e8c47f746a61185795eae
AUX nspr-4.7.0-prtime.patch 859 BLAKE2B d7869ee8e46f34e53546c28e7f9032497744d31b82d0fb47edb8c2ff5787392423698353e1374ebb5f9ed11470dff5ca62995e8f44f310756799bc9eae55ada5 SHA512 d8421bc11de5ec5e116c7eba3f31fcdde27796a64948d16aa1fb1822a29a92d8810056719ca60bcb96b1734b0e84c95250075c18acbcb631786249af7d679492
AUX nspr-4.7.1-solaris.patch 411 BLAKE2B 0c1f0e621aec9e150bd8c279f46c18256c451b2555b9f264f0da7432fb0e7d5d69e1bbbb7adc9a448d88ca269be41943f2ee60e1cc8e115542e300c1d7c61185 SHA512 11bd4ab3f98cbad2586f999370291d387fe7a817bab9feda9f5493f284410a73318e90072c0052a8216d9ae1cdc5b2a862a99315e09b72560d9bad6ebc16eb79
AUX nspr-4.8.4-darwin-install_name.patch 1046 BLAKE2B 1182149b03bd2c03fc4051bf98c61cdd4245da21a51d5f9b10149e12f5326992d587f0fe04bab79c26acee4aa2e4dded5ddf8c697b5cd4f2e34ea730c6ca7fe0 SHA512 dd00bc2108d6c7a64945afeaf97f31189250c90c3d63c86fa2b2b091ef812cc7c5f8c0f17211a02b497f50efc1c3668c840e21a45f514ff1103e22c659e820f2
AUX nspr-4.8.9-link-flags.patch 931 BLAKE2B 6aa6aa1cf3b856a95b7baa20f58e9ed83b8b29ccce37bab39e10e0e76c433ae5c79839b5f7f9bdaf8b2475c8e3692ff4a57c246dfa4e1fed6866ab284826ee0d SHA512 0bb61dc09d287f1324749c983404e1f03fdf7014fbbd32cc5abe452fc2f32b90b759d8f18d964a61da044b5a7221f5ba274d94c93c07c8a7359e3c937e44b975
AUX nspr-4.9.5_nspr_config.patch 251 BLAKE2B 65ae8b981e758e2955b7a3358f24b7b17dc1ef59f0e78f9fd9ddee740a4da3825bafea34f3900200b3f6edefed7d0797c194cb0339d4e36551615d599156108d SHA512 3f118b7142a19dcc7e26b348cec6029c78d585a57cc2bfc2ab7ca13d2ef953e576dab0ac044316e3165d0201bf27253afa732109f914da6f7a39f19facff8310
DIST nspr-4.22.tar.gz 1078701 BLAKE2B 8b37031ffebf79320c91ce674d7c3a0cfbef25bfb006cb9aaff44f090110b35ea2768f83dae4a793723f8e2f3aecabc1a4b8042cd1b0ab0aade30781e43f9d62 SHA512 d34271f0692905162f71b02cf6f62a8ebf779159335e4ed286ee8d51faaad633a61c9392bada86d976bca2b5aa47c8760085de30dbd13c9cfa423582c31db37b
DIST nspr-4.24.tar.gz 1078825 BLAKE2B 3a773768c31334fa4f3f406d838d430dccfbcf5f7bd34dca422b199265f17fc08ef3d5d1e6df5468efeeeace8b5f8a38ece518e6bdbcdf811c2642d43be80c6c SHA512 b020031ed7a8997099c11e0772779c7b10d15b4f6b14e2b1832732943e8b8224afa952ce04a1914c1553af9d3973a6d9cacf08058ee6fff35102e3b2ec0943c1
DIST nspr-4.25.tar.gz 1079633 BLAKE2B 377e5ec0e60cca13f1ee988adb10870bbb6cb9e4eb61e4434152418d4f8d446741a192d7019298ec2669b8e190cacb6a1ca9c4b2838e9b14dd3590ed40facdd2 SHA512 b9aa576e0da37e8729088fe559d94030cf18f277c1f7a30104d3088a804913343ed884645c0adb62144da475e20934b359f897bf3ae9a6ebb5f9daf283d5a562
DIST nspr-4.26.tar.gz 1079778 BLAKE2B db83afa5e3ab2e0ef92aa236db6d9f25e963b77df7c71400e691dc3e882ec6d63cbf13996eb1ae1a03a294def419e1669e38fe42990c66efedce03f121087e6c SHA512 d6632cde3570ee386ee1459257eba99f91dd62fa905fd82679222c83d63c185b76d8dca0422d4349de2dfce603472ae52bc0dcced0f142acb733374c74155d3c
EBUILD nspr-4.22.ebuild 3892 BLAKE2B 5633707738207a3a7b2dfcbb8798f2ad134f95f8a39e6f8619685e33b1acd5bcc3fa4784cceaf8225f7d5973caab467d79a4378c7399c8ec64bb08e6932d729c SHA512 0021005fde55f4c02782ad4f0ee5528e7df231e84e040503a1055fa42d4c09fb1db396108ae283a0096f4ddd34b24c16b4419c44fd9ed19d7a4878425a2337f4
EBUILD nspr-4.24.ebuild 3758 BLAKE2B 456721c50f3e99ebf0b13408df92a3e41bfa270b1f521025f5d2929c3a0a33f2a4ad81d8dc59cb907ce28611c91a64e2a25bfabdc9e5d81c00f7fdc0622c4c9d SHA512 4f64f4628fe87661a0a01cc0bc189fd3b5f18796f2fb000511d038757751ee59044d8d04bd5bdedbffdc222d1bdb60548e84fd408c73aa45e7398a2c88fc6f18
EBUILD nspr-4.25.ebuild 3758 BLAKE2B 456721c50f3e99ebf0b13408df92a3e41bfa270b1f521025f5d2929c3a0a33f2a4ad81d8dc59cb907ce28611c91a64e2a25bfabdc9e5d81c00f7fdc0622c4c9d SHA512 4f64f4628fe87661a0a01cc0bc189fd3b5f18796f2fb000511d038757751ee59044d8d04bd5bdedbffdc222d1bdb60548e84fd408c73aa45e7398a2c88fc6f18
EBUILD nspr-4.26.ebuild 3930 BLAKE2B 93e41000e906be98a34555fa1970189139db9d4b0c23dafac29ec4e5db93965981d614e15886333665db3d255ef3545a48efe7819755e973497d22367681d292 SHA512 b6edf7eb6685ec60f549c4ca542146fc02673c59369d6c691dbfe98106e319b7c0bc2817629296a447bfce720467f64c290106356b5eb26348227169d0841919
MISC metadata.xml 250 BLAKE2B 9e6643b2a0b90fc083246090047db38d3b9a3b71db8542051307b7e87394135d3337e1ea54b83a0c7474661a0fd07d950385b44cbed6ee95f6e6ad718bd0b062 SHA512 ba5e7c1f6ee117471a3804bc54211e7f89c75e965a865f45f85015a0a28ec7d511ef9bbc196eef8245dc9259f54b04eb3563d83811a293bb946cf0977563892b

View File

@ -0,0 +1,32 @@
* drop Solaris linker stuff
--- a/configure.in
+++ b/configure.in
@@ -1988,26 +1988,14 @@
CPU_ARCH=`uname -p`
MDCPUCFG_H=_solaris.cfg
PR_MD_CSRCS=solaris.c
- LD=/usr/ccs/bin/ld
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
RESOLVE_LINK_SYMBOLS=1
- case "${OS_RELEASE}" in
- 5.8|5.9)
- ;;
- *)
- # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
- USE_B_DIRECT=1
- ;;
- esac
if test -n "$GNU_CC"; then
DSO_CFLAGS=-fPIC
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
GCC_USE_GNU_LD=1
fi
- DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
- if test -n "$USE_B_DIRECT"; then
- DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
- fi
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
else
DSO_CFLAGS=-KPIC
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'

View File

@ -0,0 +1,53 @@
From 8c57451f44d7ceb37bfb4ae6e457fc70b1f58d0a Mon Sep 17 00:00:00 2001
From: Moritz Kick <gentoo@blackphoenix.de>
Date: Wed, 20 Mar 2019 13:36:06 -0500
Subject: [PATCH] Added IPv6 compatibility for musl libc
Signed-off-by: Moritz Kick <gentoo@blackphoenix.de>
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
---
pr/include/md/_linux.h | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
index 2370ab8..612184c 100644
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -289,33 +289,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
#endif /* __arm__ */
#define USE_SETJMP
-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID)
#define _PR_POLL_AVAILABLE
-#endif
#undef _PR_USE_POLL
#define _PR_STAT_HAS_ONLY_ST_ATIME
#if defined(__alpha) || defined(__ia64__)
#define _PR_HAVE_LARGE_OFF_T
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
- || defined(ANDROID)
-#define _PR_HAVE_OFF64_T
#else
-#define _PR_NO_LARGE_FILES
+#define _PR_HAVE_OFF64_T
#endif
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
- || defined(ANDROID)
#define _PR_INET6
#define _PR_HAVE_INET_NTOP
#define _PR_HAVE_GETHOSTBYNAME2
#define _PR_HAVE_GETADDRINFO
#define _PR_INET6_PROBE
-#endif
#ifndef ANDROID
#define _PR_HAVE_SYSV_SEMAPHORES
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
-#endif
-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */
-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS)
#define _PR_HAVE_GETHOST_R
#define _PR_HAVE_GETHOST_R_INT
#endif
--
2.21.0

View File

@ -0,0 +1,26 @@
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -1621,7 +1621,7 @@
case TT_EET: zone_offset = 2 * 60; break;
case TT_JST: zone_offset = 9 * 60; break;
default:
- PR_ASSERT (0);
+ return PR_FAILURE;
break;
}
}
@@ -1677,11 +1677,12 @@
struct tm localTime;
time_t secs;
- PR_ASSERT(result->tm_month > -1 &&
+ if (!(result->tm_month > -1 &&
result->tm_mday > 0 &&
result->tm_hour > -1 &&
result->tm_min > -1 &&
- result->tm_sec > -1);
+ result->tm_sec > -1))
+ return PR_FAILURE;
/*
* To obtain time_t from a tm structure representing the local

View File

@ -0,0 +1,26 @@
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -1536,7 +1536,7 @@
case TT_EET: zone_offset = 2 * 60; break;
case TT_JST: zone_offset = 9 * 60; break;
default:
- PR_ASSERT (0);
+ return PR_FAILURE;
break;
}
}
@@ -1578,11 +1578,12 @@
struct tm localTime;
time_t secs;
- PR_ASSERT(result->tm_month > -1 &&
+ if (!(result->tm_month > -1 &&
result->tm_mday > 0 &&
result->tm_hour > -1 &&
result->tm_min > -1 &&
- result->tm_sec > -1);
+ result->tm_sec > -1))
+ return PR_FAILURE;
/*
* To obtain time_t from a tm structure representing the local

View File

@ -0,0 +1,14 @@
Same magic as haubi did for glib compilation, which works again here
resolving a linker problem on Solaris with GNU ld. Bug #222625
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -95,7 +95,7 @@
endif
ifdef USE_PTHREADS
-OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
+OS_LIBS = -pthread ${LIBRT} -lsocket -lnsl -ldl -lc
else
ifdef LOCAL_THREADS_ONLY
OS_LIBS = -lsocket -lnsl -ldl -lc

View File

@ -0,0 +1,25 @@
Don't use @executable_path, it messed up linking against nspr from e.g.
nss.
--- a/configure.in
+++ b/configure.in
@@ -1007,7 +1007,7 @@
;;
esac
DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
_OPTIMIZE_FLAGS=-O2
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
STRIP="$STRIP -x -S"
--- a/configure
+++ b/configure
@@ -1007,7 +1007,7 @@
;;
esac
DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
_OPTIMIZE_FLAGS=-O2
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
STRIP="$STRIP -x -S"

View File

@ -0,0 +1,28 @@
Use CFLAGS when linking. Some flags can add functionality to generated
code that requires extra libs to be linked in (eg. libgomp when using
autoparallelization). Other flags are required when building and linking
(eg. -flto).
https://bugs.gentoo.org/365975
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -81,6 +81,7 @@ OS_DLLFLAGS = @OS_DLLFLAGS@
DLLFLAGS = @DLLFLAGS@
EXEFLAGS = @EXEFLAGS@
OPTIMIZER = @OPTIMIZER@
+LD_CFLAGS = @CFLAGS@
PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@
PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@
--- a/config/config.mk
+++ b/config/config.mk
@@ -72,7 +72,7 @@ NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
-LDFLAGS = $(OS_LDFLAGS)
+LDFLAGS = $(LD_CFLAGS) $(OS_LDFLAGS)
# Enable profile-guided optimization
ifdef MOZ_PROFILE_GENERATE

View File

@ -0,0 +1,11 @@
--- a/config/nspr-config.in
+++ b/config/nspr-config.in
@@ -126,7 +126,7 @@
fi
if test "$echo_libs" = "yes"; then
- libdirs=-L$libdir
+ libdirs=""
if test -n "$lib_plds"; then
libdirs="$libdirs -lplds${major_version}"
fi

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>mozilla@gentoo.org</email>
<name>Gentoo Mozilla Team</name>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,120 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs multilib-minimal
MIN_PV="$(ver_cut 2)"
DESCRIPTION="Netscape Portable Runtime"
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="debug elibc_musl"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nspr-config
)
PATCHES=(
"${FILESDIR}"/${PN}-4.7.0-prtime.patch
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
# We do not need to pass -L$libdir via nspr-config --libs
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
)
src_prepare() {
cd "${S}"/nspr || die
default
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
# rename configure.in to configure.ac for new autotools compatibility
if [[ -e "${S}"/nspr/configure.in ]] ; then
einfo "Renaming configure.in to configure.ac"
mv "${S}"/nspr/configure.{in,ac} || die
fi
# We must run eautoconf to regenerate configure
eautoconf
# make sure it won't find Perl out of Prefix
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
# Respect LDFLAGS
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
"${S}"/nspr/config/rules.mk || die
}
multilib_src_configure() {
# We use the standard BUILD_xxx but nspr uses HOST_xxx
tc-export_build_env BUILD_CC
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
tc-export AR CC CXX RANLIB
[[ ${CBUILD} != ${CHOST} ]] \
&& export CROSS_COMPILE=1 \
|| unset CROSS_COMPILE
local myconf=(
--libdir="${EPREFIX}/usr/$(get_libdir)"
$(use_enable debug)
$(use_enable !debug optimize)
)
# The configure has some fancy --enable-{{n,x}32,64bit} switches
# that trigger some code conditional to platform & arch. This really
# matters for the few common arches (x86, ppc) but we pass a little
# more of them to be future-proof.
# use ABI first, this will work for most cases
case "${ABI}" in
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
n32) myconf+=( --enable-n32 );;
x32) myconf+=( --enable-x32 );;
s390x|*64) myconf+=( --enable-64bit );;
default) # no abi actually set, fall back to old check
einfo "Running a short build test to determine 64bit'ness"
echo > "${T}"/test.c || die
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
case $(file "${T}"/test.o) in
*32-bit*x86-64*) myconf+=( --enable-x32 );;
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
esac ;;
*) ;;
esac
# Ancient autoconf needs help finding the right tools.
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
ac_cv_path_AR="${AR}" \
econf "${myconf[@]}"
}
multilib_src_install() {
# Their build system is royally confusing, as usual
MINOR_VERSION=${MIN_PV} # Used for .so version
emake DESTDIR="${D}" install
einfo "removing static libraries as upstream has requested!"
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
# install nspr-config
dobin config/nspr-config
# Remove stupid files in /usr/bin
rm "${ED}"/usr/bin/prerr.properties || die
# This is used only to generate prerr.c and prerr.h at build time.
# No other projects use it, and we don't want to depend on perl.
# Talked to upstream and they agreed w/punting.
rm "${ED}"/usr/bin/compile-et.pl || die
}

View File

@ -0,0 +1,122 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs multilib-minimal
MIN_PV="$(ver_cut 2)"
DESCRIPTION="Netscape Portable Runtime"
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="*"
IUSE="debug elibc_musl"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nspr-config
)
PATCHES=(
"${FILESDIR}"/${PN}-4.23-prtime.patch
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
# We do not need to pass -L$libdir via nspr-config --libs
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
)
src_prepare() {
cd "${S}"/nspr || die
default
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
# rename configure.in to configure.ac for new autotools compatibility
if [[ -e "${S}"/nspr/configure.in ]] ; then
einfo "Renaming configure.in to configure.ac"
mv "${S}"/nspr/configure.{in,ac} || die
else
elog "configure.in rename logic can be removed from ebuild."
fi
# We must run eautoconf to regenerate configure
eautoconf
# make sure it won't find Perl out of Prefix
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
# Respect LDFLAGS
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
"${S}"/nspr/config/rules.mk || die
}
multilib_src_configure() {
# We use the standard BUILD_xxx but nspr uses HOST_xxx
tc-export_build_env BUILD_CC
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
tc-export AR CC CXX RANLIB
[[ ${CBUILD} != ${CHOST} ]] \
&& export CROSS_COMPILE=1 \
|| unset CROSS_COMPILE
local myconf=(
--libdir="${EPREFIX}/usr/$(get_libdir)"
$(use_enable debug)
$(use_enable !debug optimize)
)
# The configure has some fancy --enable-{{n,x}32,64bit} switches
# that trigger some code conditional to platform & arch. This really
# matters for the few common arches (x86, ppc) but we pass a little
# more of them to be future-proof.
# use ABI first, this will work for most cases
case "${ABI}" in
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
n32) myconf+=( --enable-n32 );;
x32) myconf+=( --enable-x32 );;
s390x|*64) myconf+=( --enable-64bit );;
default) # no abi actually set, fall back to old check
einfo "Running a short build test to determine 64bit'ness"
echo > "${T}"/test.c || die
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
case $(file "${T}"/test.o) in
*32-bit*x86-64*) myconf+=( --enable-x32 );;
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
esac ;;
*) ;;
esac
# Ancient autoconf needs help finding the right tools.
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
ac_cv_path_AR="${AR}" \
econf "${myconf[@]}"
}
multilib_src_install() {
# Their build system is royally confusing, as usual
MINOR_VERSION=${MIN_PV} # Used for .so version
emake DESTDIR="${D}" install
einfo "removing static libraries as upstream has requested!"
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
# install nspr-config
dobin config/nspr-config
# Remove stupid files in /usr/bin
rm "${ED}"/usr/bin/prerr.properties || die
# This is used only to generate prerr.c and prerr.h at build time.
# No other projects use it, and we don't want to depend on perl.
# Talked to upstream and they agreed w/punting.
rm "${ED}"/usr/bin/compile-et.pl || die
}

View File

@ -0,0 +1,122 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs multilib-minimal
MIN_PV="$(ver_cut 2)"
DESCRIPTION="Netscape Portable Runtime"
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="*"
IUSE="debug elibc_musl"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nspr-config
)
PATCHES=(
"${FILESDIR}"/${PN}-4.23-prtime.patch
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
# We do not need to pass -L$libdir via nspr-config --libs
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
)
src_prepare() {
cd "${S}"/nspr || die
default
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
# rename configure.in to configure.ac for new autotools compatibility
if [[ -e "${S}"/nspr/configure.in ]] ; then
einfo "Renaming configure.in to configure.ac"
mv "${S}"/nspr/configure.{in,ac} || die
else
elog "configure.in rename logic can be removed from ebuild."
fi
# We must run eautoconf to regenerate configure
eautoconf
# make sure it won't find Perl out of Prefix
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
# Respect LDFLAGS
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
"${S}"/nspr/config/rules.mk || die
}
multilib_src_configure() {
# We use the standard BUILD_xxx but nspr uses HOST_xxx
tc-export_build_env BUILD_CC
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
tc-export AR CC CXX RANLIB
[[ ${CBUILD} != ${CHOST} ]] \
&& export CROSS_COMPILE=1 \
|| unset CROSS_COMPILE
local myconf=(
--libdir="${EPREFIX}/usr/$(get_libdir)"
$(use_enable debug)
$(use_enable !debug optimize)
)
# The configure has some fancy --enable-{{n,x}32,64bit} switches
# that trigger some code conditional to platform & arch. This really
# matters for the few common arches (x86, ppc) but we pass a little
# more of them to be future-proof.
# use ABI first, this will work for most cases
case "${ABI}" in
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
n32) myconf+=( --enable-n32 );;
x32) myconf+=( --enable-x32 );;
s390x|*64) myconf+=( --enable-64bit );;
default) # no abi actually set, fall back to old check
einfo "Running a short build test to determine 64bit'ness"
echo > "${T}"/test.c || die
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
case $(file "${T}"/test.o) in
*32-bit*x86-64*) myconf+=( --enable-x32 );;
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
esac ;;
*) ;;
esac
# Ancient autoconf needs help finding the right tools.
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
ac_cv_path_AR="${AR}" \
econf "${myconf[@]}"
}
multilib_src_install() {
# Their build system is royally confusing, as usual
MINOR_VERSION=${MIN_PV} # Used for .so version
emake DESTDIR="${D}" install
einfo "removing static libraries as upstream has requested!"
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
# install nspr-config
dobin config/nspr-config
# Remove stupid files in /usr/bin
rm "${ED}"/usr/bin/prerr.properties || die
# This is used only to generate prerr.c and prerr.h at build time.
# No other projects use it, and we don't want to depend on perl.
# Talked to upstream and they agreed w/punting.
rm "${ED}"/usr/bin/compile-et.pl || die
}

View File

@ -0,0 +1,122 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs multilib-minimal
MIN_PV="$(ver_cut 2)"
DESCRIPTION="Netscape Portable Runtime"
HOMEPAGE="http://www.mozilla.org/projects/nspr/"
SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="debug elibc_musl"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nspr-config
)
PATCHES=(
"${FILESDIR}"/${PN}-4.23-prtime.patch
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
# We do not need to pass -L$libdir via nspr-config --libs
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
)
src_prepare() {
cd "${S}"/nspr || die
default
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
# rename configure.in to configure.ac for new autotools compatibility
if [[ -e "${S}"/nspr/configure.in ]] ; then
einfo "Renaming configure.in to configure.ac"
mv "${S}"/nspr/configure.{in,ac} || die
else
elog "configure.in rename logic can be removed from ebuild."
fi
# We must run eautoconf to regenerate configure
eautoconf
# make sure it won't find Perl out of Prefix
sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
# Respect LDFLAGS
sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
"${S}"/nspr/config/rules.mk || die
}
multilib_src_configure() {
# We use the standard BUILD_xxx but nspr uses HOST_xxx
tc-export_build_env BUILD_CC
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
tc-export AR CC CXX RANLIB
[[ ${CBUILD} != ${CHOST} ]] \
&& export CROSS_COMPILE=1 \
|| unset CROSS_COMPILE
local myconf=(
--libdir="${EPREFIX}/usr/$(get_libdir)"
$(use_enable debug)
$(use_enable !debug optimize)
)
# The configure has some fancy --enable-{{n,x}32,64bit} switches
# that trigger some code conditional to platform & arch. This really
# matters for the few common arches (x86, ppc) but we pass a little
# more of them to be future-proof.
# use ABI first, this will work for most cases
case "${ABI}" in
alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
n32) myconf+=( --enable-n32 );;
x32) myconf+=( --enable-x32 );;
s390x|*64) myconf+=( --enable-64bit );;
default) # no abi actually set, fall back to old check
einfo "Running a short build test to determine 64bit'ness"
echo > "${T}"/test.c || die
${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
case $(file "${T}"/test.o) in
*32-bit*x86-64*) myconf+=( --enable-x32 );;
*64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
esac ;;
*) ;;
esac
# Ancient autoconf needs help finding the right tools.
LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
ac_cv_path_AR="${AR}" \
econf "${myconf[@]}"
}
multilib_src_install() {
# Their build system is royally confusing, as usual
MINOR_VERSION=${MIN_PV} # Used for .so version
emake DESTDIR="${D}" install
einfo "removing static libraries as upstream has requested!"
rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
# install nspr-config
dobin config/nspr-config
# Remove stupid files in /usr/bin
rm "${ED}"/usr/bin/prerr.properties || die
# This is used only to generate prerr.c and prerr.h at build time.
# No other projects use it, and we don't want to depend on perl.
# Talked to upstream and they agreed w/punting.
rm "${ED}"/usr/bin/compile-et.pl || die
}

7
dev-libs/nss/Manifest Normal file
View File

@ -0,0 +1,7 @@
AUX nss-3.21-gentoo-fixup-warnings.patch 178 BLAKE2B b51f80310db3db416d8aeaf9117ef801389b5b2df47c04aff51bf0759dd5bff41b09d1e9011f99b345d5769a3aab19acb943ee97f8437465518115f6902a0da1 SHA512 7667a020311ca11e8f1836bc146e4a3c94ff2a489882dbe87debcccfeaafeb50e6607574c64254a826b4b6f0bb436b310a3386fff4a58324f0e5e58debaa9d51
AUX nss-3.23-hppa-byte_order.patch 460 BLAKE2B 97358cc8fbea0b0d3beee0697833e48ef01039ceb08fd00792a7f7ef68409eb076022c03764ab079fdaa971a0358130002fa11c0c182ebeb33dcdf660be26408 SHA512 ad0097bb6cf409d61eb28202d7460c87e983d6db977aba38ff9ef2749b3f7bb8fdadce4174f5bf806350ae33733097a1f444792d31cc43574b28341893642e5a
AUX nss-3.53-fix-building-on-ppc.patch 1206 BLAKE2B e6189802769197b290fd332ee2b7d074c0bacf47313998117734dafd1eb6a536db19bc8a329944d9fad51a6f9f90f81d98181272e0068bf852fea7ca928d2713 SHA512 859162070aa3c5e6e8be259f5e6648d37a5194a02958310f8caf56ff772dcaa4ebb26e4d754c99608fc7a45b641c5088cccd9e2c7d9c92c5ccc85c6b47320720
AUX nss-3.53-gentoo-fixups.patch 6886 BLAKE2B 1c605d8db02ebe0492c41955207368197a79990e43e219a71962cb28ac0cecd9e0acc2b76e16f5b116fdb8bf8790d96046cb4f376df9b8634ac48e54924589f8 SHA512 51031f92519f57d4b57a547cf549f2d5da1c5a7212d4b304fb0d71d6a85a5aefd64724ec9075c14c9b49c1e99c3ffe91cbec501c3504985aa9b16eacf2aa15ed
DIST nss-3.55.tar.gz 81759883 BLAKE2B 5b663d2b1861eb74cf070f2711b4db1afbfbc40b08e1f117e6b4a62e9f997de06889de3afc654cf6547c371ab2a1183904a1a014d1dc4b3e94f734107c81e1cf SHA512 acae7b803a3219cd4b78216cb8a6352805741e42eca6a42a5e6289ebbabc6189c7c6bc138cbd8a93d8631d06175c4d34e72957d49fe726adada6aaa2566e399e
DIST nss-cacert-class1-class3.patch 22950 BLAKE2B 9d5e60df5f161a3c27c41e5a9419440a54f888eda454e3cde5ebe626d4075b65cf9938b5144d0fb022377f4bd415bff5e5c67d104409860aa9391b3eb8872c68 SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0
EBUILD nss-3.55.ebuild 8992 BLAKE2B 45d0ef7e3ecac0a19c75b5193cf3f21aad28fce9ee03d30785cd133c0357e3b71e62800154ce22df775e168a0eb5f99601db55f90bc3271d2ea5a8faee2a580f SHA512 8bbcd696bfd436eb76d4eee53db228c2d8c1351217ae9e171fd1e9a38e7c4903ff303c6931be733f3e2153e474f65668567bf720d6840f7325145b179d99b14f

View File

@ -0,0 +1,10 @@
--- nss/coreconf/Linux.mk
+++ nss/coreconf/Linux.mk
@@ -130,6 +130,7 @@
OPTIMIZER += -gdwarf-2
endif
endif
+OPTIMIZER += -fno-strict-aliasing
endif
ifndef COMPILER_TAG

View File

@ -0,0 +1,16 @@
--- nss/lib/dbm/include/mcom_db.h
+++ nss/lib/dbm/include/mcom_db.h
@@ -110,11 +110,13 @@
#endif /* !BYTE_ORDER */
#endif /* __sun */
+#ifndef BYTE_ORDER
#if defined(__hpux) || defined(__hppa)
#define BYTE_ORDER BIG_ENDIAN
#define BIG_ENDIAN 4321
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */
#endif
+#endif /* !BYTE_ORDER */
#if defined(AIXV3) || defined(AIX)
/* BYTE_ORDER, LITTLE_ENDIAN, BIG_ENDIAN are all defined here */

View File

@ -0,0 +1,39 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=1642174
From a7a862bab5e4aae4615ddae3cbe230345f92ed0d Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <cand@gmx.com>
Date: Mon, 1 Jun 2020 12:11:45 +0300
Subject: [PATCH v3] Bug 1642174 /usr/bin/ld: OBJS/Linux_SINGLE_SHLIB/sha512-p8.o:
ABI version 2 is not compatible with ABI version 1 output
Don't try to build the SHA-2 accelerated asm on old-ABI ppc.
Currently make only, I don't have enough gyp-fu to do that side.
However, the reporters of 1642174 and 1635625 both used make, not gyp.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
---
lib/freebl/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile
index 5f7384429..e0461c7d3 100644
--- a/lib/freebl/Makefile
+++ b/lib/freebl/Makefile
@@ -267,9 +267,12 @@ ifeq ($(CPU_ARCH),arm)
endif
ifeq ($(CPU_ARCH),ppc)
EXTRA_SRCS += gcm-ppc.c
- ASFILES += sha512-p8.s
ifdef USE_64
DEFINES += -DNSS_NO_INIT_SUPPORT
+ PPC_ABI := $(shell $(CC) -dM -E - < /dev/null | awk '$$2 == "_CALL_ELF" {print $$3}')
+ ifeq ($(PPC_ABI),2)
+ ASFILES += sha512-p8.s
+ endif
endif # USE_64
endif # ppc
endif # Linux
--
2.19.1

View File

@ -0,0 +1,290 @@
From 1b3c48499abb000d708abe5f05413c1f4155e086 Mon Sep 17 00:00:00 2001
From: Jory Pratt <anarchy@gentoo.org>
Date: Mon, 8 Jun 2020 12:22:29 -0500
Subject: [PATCH] Add pkg-config and nss-config for Gentoo
---
Makefile | 15 +----
config/Makefile | 40 ++++++++++++
config/nss-config.in | 145 +++++++++++++++++++++++++++++++++++++++++++
config/nss.pc.in | 12 ++++
manifest.mn | 2 +-
5 files changed, 200 insertions(+), 14 deletions(-)
create mode 100644 config/Makefile
create mode 100644 config/nss-config.in
create mode 100644 config/nss.pc.in
diff --git a/Makefile b/Makefile
index eb4ed1a..f979d90 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+default: nss_build_all
+
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
@@ -48,12 +50,9 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
nss_build_all:
- $(MAKE) build_nspr
$(MAKE) all
- $(MAKE) latest
nss_clean_all:
- $(MAKE) clobber_nspr
$(MAKE) clobber
NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status
@@ -138,16 +137,6 @@ $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
--prefix='$(NSS_GYP_PREFIX)'
endif
-build_nspr: $(NSPR_CONFIG_STATUS)
- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests
-
-install_nspr: build_nspr
- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install
-
-clobber_nspr: $(NSPR_CONFIG_STATUS)
- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
-
build_docs:
$(MAKE) -C $(CORE_DEPTH)/doc
diff --git a/config/Makefile b/config/Makefile
new file mode 100644
index 0000000..aaf1991
--- /dev/null
+++ b/config/Makefile
@@ -0,0 +1,40 @@
+CORE_DEPTH = ..
+DEPTH = ..
+
+include $(CORE_DEPTH)/coreconf/config.mk
+
+NSS_MAJOR_VERSION = $(shell grep -F "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}')
+NSS_MINOR_VERSION = $(shell grep -F "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}')
+NSS_PATCH_VERSION = $(shell grep -F "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}')
+PREFIX = /usr
+
+all: export libs
+
+export:
+ # Create the nss.pc file
+ mkdir -p $(DIST)/lib/pkgconfig
+ sed -e "s,@prefix@,$(PREFIX)," \
+ -e "s,@exec_prefix@,\$${prefix}," \
+ -e "s,@libdir@,\$${prefix}/lib64," \
+ -e "s,@includedir@,\$${prefix}/include/nss," \
+ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
+ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
+ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+ nss.pc.in > nss.pc
+ chmod 0644 nss.pc
+ ln -sf ../../../../config/nss.pc $(DIST)/lib/pkgconfig
+
+ # Create the nss-config script
+ mkdir -p $(DIST)/bin
+ sed -e "s,@prefix@,$(PREFIX)," \
+ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
+ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
+ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+ nss-config.in > nss-config
+ chmod 0755 nss-config
+ ln -sf ../../../config/nss-config $(DIST)/bin
+
+libs:
+
+dummy: all export libs
+
diff --git a/config/nss-config.in b/config/nss-config.in
new file mode 100644
index 0000000..3a957b8
--- /dev/null
+++ b/config/nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@NSS_MAJOR_VERSION@
+minor_version=@NSS_MINOR_VERSION@
+patch_version=@NSS_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--includedir[=DIR]]
+ [--libdir[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Dynamic Libraries:
+ nss
+ ssl
+ smime
+ nssutil
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=yes
+lib_nssutil=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=$(echo "$1" | sed 's/[-_a-zA-Z0-9]*=//') ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=${optarg}
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=${optarg}
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
+ includedir=${optarg}
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
+ libdir=${optarg}
+ ;;
+ --libdir)
+ echo_libdir=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ ssl)
+ lib_ssl=yes
+ ;;
+ smime)
+ lib_smime=yes
+ ;;
+ nss)
+ lib_nss=yes
+ ;;
+ nssutil)
+ lib_nssutil=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "${exec_prefix}"; then
+ exec_prefix=$(pkg-config --variable=exec_prefix nss)
+fi
+if test -z "${includedir}"; then
+ includedir=$(pkg-config --variable=includedir nss)
+fi
+if test -z "${libdir}"; then
+ libdir=$(pkg-config --variable=libdir nss)
+fi
+
+if test "${echo_prefix}" = "yes"; then
+ echo ${prefix}
+fi
+
+if test "${echo_exec_prefix}" = "yes"; then
+ echo ${exec_prefix}
+fi
+
+if test "${echo_includedir}" = "yes"; then
+ echo ${includedir}
+fi
+
+if test "${echo_libdir}" = "yes"; then
+ echo ${libdir}
+fi
+
+if test "${echo_cflags}" = "yes"; then
+ echo -I${includedir}
+fi
+
+if test "${echo_libs}" = "yes"; then
+ libdirs=""
+ if test -n "${lib_ssl}"; then
+ libdirs="${libdirs} -lssl${major_version}"
+ fi
+ if test -n "${lib_smime}"; then
+ libdirs="${libdirs} -lsmime${major_version}"
+ fi
+ if test -n "${lib_nss}"; then
+ libdirs="${libdirs} -lnss${major_version}"
+ fi
+ if test -n "${lib_nssutil}"; then
+ libdirs="${libdirs} -lnssutil${major_version}"
+ fi
+ echo ${libdirs}
+fi
+
diff --git a/config/nss.pc.in b/config/nss.pc.in
new file mode 100644
index 0000000..03f1e39
--- /dev/null
+++ b/config/nss.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: NSS
+Description: Network Security Services
+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
+Requires: nspr >= 4.25
+Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
+Cflags: -I${includedir}
+
diff --git a/manifest.mn b/manifest.mn
index dada8ab..72dc9b3 100644
--- a/manifest.mn
+++ b/manifest.mn
@@ -10,7 +10,7 @@ IMPORTS = nspr20/v4.8 \
RELEASE = nss
-DIRS = coreconf lib cmd cpputil gtests
+DIRS = coreconf lib cmd cpputil config
lib: coreconf
cmd: lib
--
2.26.2

View File

@ -0,0 +1,351 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
NSPR_VER="4.26"
RTM_NAME="NSS_${PV//./_}_RTM"
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="cacert utils"
# pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND
RDEPEND="
>=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
>=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
virtual/pkgconfig
"
DEPEND="${RDEPEND}"
RESTRICT="test"
S="${WORKDIR}/${P}/${PN}"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nss-config
)
PATCHES=(
# Custom changes for gentoo
"${FILESDIR}/${PN}-3.53-gentoo-fixups.patch"
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
"${FILESDIR}/${PN}-3.53-fix-building-on-ppc.patch"
)
src_prepare() {
if use cacert ; then #521462
PATCHES+=(
"${DISTDIR}/${PN}-cacert-class1-class3.patch"
)
fi
default
pushd coreconf >/dev/null || die
# hack nspr paths
echo 'INCLUDES += -I$(DIST)/include/dbm' \
>> headers.mk || die "failed to append include"
# modify install path
sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
-i source.mk || die
# Respect LDFLAGS
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
popd >/dev/null || die
# Fix pkgconfig file for Prefix
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
config/Makefile || die
# use host shlibsign if need be #436216
if tc-is-cross-compiler ; then
sed -i \
-e 's:"${2}"/shlibsign:shlibsign:' \
cmd/shlibsign/sign.sh || die
fi
# dirty hack
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
lib/ssl/config.mk || die
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
cmd/platlibs.mk || die
multilib_copy_sources
strip-flags
}
multilib_src_configure() {
# Ensure we stay multilib aware
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
}
nssarch() {
# Most of the arches are the same as $ARCH
local t=${1:-${CHOST}}
case ${t} in
aarch64*)echo "aarch64";;
hppa*) echo "parisc";;
i?86*) echo "i686";;
x86_64*) echo "x86_64";;
*) tc-arch ${t};;
esac
}
nssbits() {
local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
if [[ ${1} == BUILD_ ]]; then
cc=$(tc-getBUILD_CC)
else
cc=$(tc-getCC)
fi
echo > "${T}"/test.c || die
${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
case $(file "${T}/${1}test.o") in
*32-bit*x86-64*) echo USE_X32=1;;
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
esac
}
multilib_src_compile() {
# use ABI to determine bit'ness, or fallback if unset
local buildbits mybits
case "${ABI}" in
n32) mybits="USE_N32=1";;
x32) mybits="USE_X32=1";;
s390x|*64) mybits="USE_64=1";;
${DEFAULT_ABI})
einfo "Running compilation test to determine bit'ness"
mybits=$(nssbits)
;;
esac
# bitness of host may differ from target
if tc-is-cross-compiler; then
buildbits=$(nssbits BUILD_)
fi
local makeargs=(
CC="$(tc-getCC)"
CCC="$(tc-getCXX)"
AR="$(tc-getAR) rc \$@"
RANLIB="$(tc-getRANLIB)"
OPTIMIZER=
${mybits}
)
# Take care of nspr settings #436216
local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
unset NSPR_INCLUDE_DIR
export NSS_ALLOW_SSLKEYLOGFILE=1
export NSS_ENABLE_WERROR=0 #567158
export BUILD_OPT=1
export NSS_USE_SYSTEM_SQLITE=1
export NSDISTMODE=copy
export FREEBL_NO_DEPEND=1
export FREEBL_LOWHASH=1
export NSS_SEED_ONLY_DEV_URANDOM=1
export USE_SYSTEM_ZLIB=1
export ZLIB_LIBS=-lz
export ASFLAGS=""
local d
# Build the host tools first.
LDFLAGS="${BUILD_LDFLAGS}" \
XCFLAGS="${BUILD_CFLAGS}" \
NSPR_LIB_DIR="${T}/fakedir" \
emake -j1 -C coreconf \
CC="$(tc-getBUILD_CC)" \
${buildbits-${mybits}}
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
# Then build the target tools.
for d in . lib/dbm ; do
CPPFLAGS="${myCPPFLAGS}" \
XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
NSPR_LIB_DIR="${T}/fakedir" \
emake -j1 "${makeargs[@]}" -C ${d} OS_TEST="$(nssarch)"
done
}
# Altering these 3 libraries breaks the CHK verification.
# All of the following cause it to break:
# - stripping
# - prelink
# - ELF signing
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
# Either we have to NOT strip them, or we have to forcibly resign after
# stripping.
#local_libdir="$(get_libdir)"
#export STRIP_MASK="
# */${local_libdir}/libfreebl3.so*
# */${local_libdir}/libnssdbm3.so*
# */${local_libdir}/libsoftokn3.so*"
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
generate_chk() {
local shlibsign="$1"
local libdir="$2"
einfo "Resigning core NSS libraries for FIPS validation"
shift 2
local i
for i in ${NSS_CHK_SIGN_LIBS} ; do
local libname=lib${i}.so
local chkname=lib${i}.chk
"${shlibsign}" \
-i "${libdir}"/${libname} \
-o "${libdir}"/${chkname}.tmp \
&& mv -f \
"${libdir}"/${chkname}.tmp \
"${libdir}"/${chkname} \
|| die "Failed to sign ${libname}"
done
}
cleanup_chk() {
local libdir="$1"
shift 1
local i
for i in ${NSS_CHK_SIGN_LIBS} ; do
local libfname="${libdir}/lib${i}.so"
# If the major version has changed, then we have old chk files.
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
&& rm -f "${libfname}.chk"
done
}
multilib_src_install() {
pushd dist >/dev/null || die
dodir /usr/$(get_libdir)
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
local i
for i in crmf freebl nssb nssckfw ; do
cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
done
# Install nss-config and pkgconfig file
dodir /usr/bin
cp -L */bin/nss-config "${ED}"/usr/bin || die
dodir /usr/$(get_libdir)/pkgconfig
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
# bug 517266
sed -e 's#Libs:#Libs: -lfreebl#' \
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|| die "could not create nss-softokn.pc"
# all the include files
insinto /usr/include/nss
doins public/nss/*.{h,api}
insinto /usr/include/nss/private
doins private/nss/{blapi,alghmac,cmac}.h
popd >/dev/null || die
local f nssutils
# Always enabled because we need it for chk generation.
nssutils=( shlibsign )
if multilib_is_native_abi ; then
if use utils; then
# The tests we do not need to install.
#nssutils_test="bltest crmftest dbtest dertimetest
#fipstest remtest sdrtest"
# checkcert utils has been removed in nss-3.22:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
# https://hg.mozilla.org/projects/nss/rev/df1729d37870
# certcgi has been removed in nss-3.36:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
nssutils+=(
addbuiltin
atob
baddbdir
btoa
certutil
cmsutil
conflict
crlutil
derdump
digest
makepqg
mangle
modutil
multinit
nonspr10
ocspclnt
oidcalc
p7content
p7env
p7sign
p7verify
pk11mode
pk12util
pp
rsaperf
selfserv
signtool
signver
ssltap
strsclnt
symkeyutil
tstclnt
vfychain
vfyserv
)
# install man-pages for utils (bug #516810)
doman doc/nroff/*.1
fi
pushd dist/*/bin >/dev/null || die
for f in ${nssutils[@]}; do
dobin ${f}
done
popd >/dev/null || die
fi
# Prelink breaks the CHK files. We don't have any reliable way to run
# shlibsign after prelink.
dodir /etc/prelink.conf.d
printf -- "-b ${EPREFIX}/usr/$(get_libdir)/lib%s.so\n" ${NSS_CHK_SIGN_LIBS} \
> "${ED}"/etc/prelink.conf.d/nss.conf
}
pkg_postinst() {
multilib_pkg_postinst() {
# We must re-sign the libraries AFTER they are stripped.
local shlibsign="${EROOT}/usr/bin/shlibsign"
# See if we can execute it (cross-compiling & such). #436216
"${shlibsign}" -h >&/dev/null
if [[ $? -gt 1 ]] ; then
shlibsign="shlibsign"
fi
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
}
multilib_foreach_abi multilib_pkg_postinst
}
pkg_postrm() {
multilib_pkg_postrm() {
cleanup_chk "${EROOT}"/usr/$(get_libdir)
}
multilib_foreach_abi multilib_pkg_postrm
}

View File

@ -0,0 +1 @@
DIST wayland-1.17.0.tar.xz 437680 BLAKE2B 2f4eb54c5ded90453b4e2812f7b5086aa211196ec9f7333d316cdb829269d55db570ccb45a67ee07a039633245e630ab54da6403ff4754d59366f3c13fb87549 SHA512 c5051aab5ff078b368c196ecfedb33ccd961265bb914845d7ed81de361bb86ae18299575baa6c4eceb0d82cf8b495e8293f31b51d1cbc05d84af0a199ab3f946

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>x11@gentoo.org</email>
<name>X11</name>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,62 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
SRC_URI="https://wayland.freedesktop.org/releases/${P}.tar.xz"
inherit autotools libtool toolchain-funcs out-of-source
DESCRIPTION="Wayland protocol libraries"
HOMEPAGE="https://wayland.freedesktop.org/ https://gitlab.freedesktop.org/wayland/wayland"
LICENSE="MIT"
SLOT="0"
IUSE="doc static-libs"
KEYWORDS="*"
BDEPEND="
virtual/pkgconfig
doc? (
>=app-doc/doxygen-1.6[dot]
app-text/xmlto
>=media-gfx/graphviz-2.26.0
sys-apps/grep[pcre]
)
"
DEPEND="
>=dev-libs/expat-2.1.0-r3:=
dev-libs/libxml2:=
>=virtual/libffi-3.0.13-r1:=
"
RDEPEND="${DEPEND}
!<media-libs/mesa-18.1.1-r1
"
src_prepare() {
default
[[ $PV = 9999* ]] && eautoreconf || elibtoolize
}
my_src_configure() {
local myeconfargs=(
--disable-static
$(use_enable doc documentation)
$(use_enable doc dtd-validation)
)
tc-is-cross-compiler && myeconfargs+=( --with-host-scanner )
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
my_src_install_all() {
find "${D}" -name '*.la' -delete || die
einstalldocs
}
src_test() {
# We set it on purpose to only a short subdir name, as socket paths are
# created in there, which are 108 byte limited. With this it hopefully
# barely fits to the limit with /var/tmp/portage/$CAT/$PF/temp/xdr
export XDG_RUNTIME_DIR="${T}"/xdr
mkdir "${XDG_RUNTIME_DIR}" || die
chmod 0700 "${XDG_RUNTIME_DIR}" || die
}

View File

@ -0,0 +1,73 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EGIT_REPO_URI="https://anongit.freedesktop.org/git/wayland/wayland.git"
if [[ ${PV} = 9999* ]]; then
GIT_ECLASS="git-r3"
fi
inherit autotools libtool ltprune multilib-minimal toolchain-funcs $GIT_ECLASS
DESCRIPTION="Wayland protocol libraries"
HOMEPAGE="https://wayland.freedesktop.org/"
if [[ $PV = 9999* ]]; then
SRC_URI=""
else
SRC_URI="https://wayland.freedesktop.org/releases/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="doc static-libs"
RDEPEND=">=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
>=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
dev-libs/libxml2:=
!!<media-libs/mesa-18.1.1-r1"
DEPEND="${RDEPEND}
doc? (
>=app-doc/doxygen-1.6[dot]
app-text/xmlto
>=media-gfx/graphviz-2.26.0
sys-apps/grep[pcre]
)
virtual/pkgconfig"
src_prepare() {
default
[[ $PV = 9999* ]] && eautoreconf || elibtoolize
}
multilib_src_configure() {
local myconf
if tc-is-cross-compiler ; then
myconf+=' --with-host-scanner '
fi
ECONF_SOURCE="${S}" econf \
--disable-static \
$(multilib_native_use_enable doc documentation) \
$(multilib_native_enable dtd-validation) \
${myconf}
}
multilib_src_install_all() {
prune_libtool_files
einstalldocs
}
src_test() {
# We set it on purpose to only a short subdir name, as socket paths are
# created in there, which are 108 byte limited. With this it hopefully
# barely fits to the limit with /var/tmp/portage/$CAT/$PF/temp/xdr
export XDG_RUNTIME_DIR="${T}"/xdr
mkdir "${XDG_RUNTIME_DIR}" || die
chmod 0700 "${XDG_RUNTIME_DIR}" || die
multilib-minimal_src_test
}

View File

@ -0,0 +1,3 @@
AUX 0001-no-setup.patch 337 BLAKE2B ab8c5e068ad379165571c150ec64cc774c536558f384b579ab0c605512a6def2f4f8a5623079485b69dc3e6567c391c545d351d5a6740e5a0abf58733e2ead45 SHA512 71986adb4307bb7615c80a10875e286e699dafc12526b2864695f44a6f4773617ba23f1f35e99c57cc31f6ea21fd16057093e7fd828028234f1feb183e18462a
DIST isort-5.5.2.tar.gz 145020 BLAKE2B 718c3e748333e17a29b19a46779c40b21a674efb3b3358851973f383719a64fda44ab352bd005e368e0bec3d5c20472c27dba8f0e62ef53c7fd80785a4cc0228 SHA512 687e523073b671f7144027ce05b388566809673ffa36bc5890a51eb38f3a85c40d9861e6d2ee70e70710725579fe63a28ca45c0a8bc902761ad02bfe4656e5d2
EBUILD isort-5.5.2.ebuild 511 BLAKE2B e6e5fb31d5829a81cff2f3d9015357e172bf838db184d0f1d105ac90cd12c7dd16789e4e6f5ac258903e68a0e45d69835af8278a73c807b30782fb0cce6da67f SHA512 5721ce2d38b6d4edb08d427998b4f272c386d8adddc6e7cafdc1955211716cf9411d4f3426c3afb3c9f3097992c4d99a5695f27d5ab27507a6d8ffcdad6b2aca

View File

@ -0,0 +1,15 @@
--- a/setup.py 2020-09-15 10:50:44.048973353 +0200
+++ b/setup.py 2020-09-15 10:50:50.498973117 +0200
@@ -6,11 +6,7 @@
'isort._future',
'isort._vendored.toml',
'isort.deprecated',
- 'isort.stdlibs',
- 'tests',
- 'tests.integration',
- 'tests.unit',
- 'tests.unit.profiles']
+ 'isort.stdlibs']
package_data = \
{'': ['*']}

View File

@ -0,0 +1,24 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3+ pypy3 )
inherit distutils-r1
DESCRIPTION="A python utility/library to sort imports"
HOMEPAGE="https://pypi.org/project/isort/"
SRC_URI="https://files.pythonhosted.org/packages/49/af/6dc35623937fe93a6bccfd95a7b6fc295b34aca75c0d676a765ddb026dc1/isort-5.5.2.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="*"
BDEPEND="dev-python/setuptools"
PATCHES=(
"${FILESDIR}/0001-no-setup.patch"
)
src_prepare() {
default
}

View File

@ -0,0 +1,4 @@
AUX pypeg2-2.15.1-test.patch 399 BLAKE2B 64afae813084e2bcceb3354d6a9819425f5454d7febbb3df12d7b7f73329bfeed1a93fd7bbd046c69899f26757d984fd70964e13809ba9bb30305b80d35cdbc8 SHA512 20428aa41858da3b73a262ec2f36aed0df8626999eae27438a6bad1908b1dc79056ab33069c273aae56eabc02dfd0c080daaf42fee7e7c92ec32b95244ba41c4
DIST pyPEG2-2.15.2.tar.gz 40334 BLAKE2B 7a171824da4c0ccc3bfaef4e429efb16f5c8c4e03dd47c5cd59656a51fe37c9d0b3940e58e2f321a4d9976f66935fd5b9d526d24bd1e0342ef15a3a1341e77a3 SHA512 f78e3b1294169167809c5fe05f2a69af2bd6c7c4c1bcbebafb4aa6b8ae6ead181a46b051e41193bc31f49c4b4fa7b1ef231d172217c11d301d0ee21d8e411b6f
EBUILD pypeg2-2.15.2.ebuild 712 BLAKE2B 371026db2309714ca361fd70087ecfe4efef8bedc1b73926f6e41088567c4b1c5e9b112f20c20e9fe1c6ddba75b77e5e5afdac9780fd3557eb2592f808f3a8a3 SHA512 b4fa4038ccc509f3d6ae3208937b8543f477423fb6284c8f2bd684fd29d9fd94468afeab932aea914ba999c9fc6ef329f68d07cfd0d3a5bfe51c21ce4bbce313
MISC metadata.xml 362 BLAKE2B c34e5f667750e99f16f44361c62c79d138767c94e664be039f81f7b7fb6f295e6610aeca962ece7097dfbc1372e92e697ad99572c036910352362379eb3ab4cc SHA512 7eb0a3fbe48ee8f34bb9f697aa951faece1ce5da90319a5bd8f9958d569eebd2c91539d0d1bd46c51cdc77ddb5c858bb6d158be7268666af668a935e1c4998e7

View File

@ -0,0 +1,12 @@
Drop seemingly wrong test line that throws an AttributeError.
--- pyPEG2-2.15.1/pypeg2/test/test_pyPEG2.py
+++ pyPEG2-2.15.1/pypeg2/test/test_pyPEG2.py
@@ -255,7 +255,6 @@
def runTest(self):
r = pypeg2.parse("!all", type(self).C1)
self.assertEqual(str(r), "all")
- self.assertEqual(r._ignore1, None)
class ParseOmitTestCase(ParserTestCase):
def runTest(self):

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">pyPEG2</remote-id>
<remote-id type="bitbucket">fdik/pypeg</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,31 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
inherit distutils-r1
MY_PN=pyPEG2
MY_P=${MY_PN}-${PV}
DESCRIPTION="An intrinsic PEG Parser-Interpreter for Python"
HOMEPAGE="https://fdik.org/pyPEG/
https://bitbucket.org/fdik/pypeg/
https://pypi.org/project/pyPEG2/"
SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_P}
PATCHES=( "${FILESDIR}"/${PN}-2.15.1-test.patch )
python_test() {
"${PYTHON}" -m unittest discover || die "Tests failed with ${EPYTHON}"
}

1
dev-util/cargo/Manifest Normal file
View File

@ -0,0 +1 @@
EBUILD cargo-1.44.1.ebuild 203 BLAKE2B 519296c1f49182c41d92fdbfbe86bdbdca04ab9c84e01fbb709150c3d2dd000a4372eb2cc005f9a9914432f47e354f25421ce0041977d7e8a07c50aec725638e SHA512 c1ae8e4d284daea75640d3bb7c98dd3ebacd9e3a8e0876d77961a23465d9c30664608bc40bddd2f45d490be37a252b6ae526beeb415a1aceaa3ed05e852f7c7c

View File

@ -0,0 +1,13 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Package manager for Rust"
HOMEPAGE=""
SRC_URI=""
LICENSE=""
SLOT="0"
KEYWORDS="*"
RDEPEND="=virtual/rust-${PV}"

View File

@ -0,0 +1,41 @@
DIST ansi_term-0.11.0.crate 17087 BLAKE2B 9bd35c045a01ce4c6c4a5db1b4f15e9412bb97426eec19d4421dffbec633de8d13452c13c1dc1b30998690b78d7ed38311aca700087f13a81f66bd1d5d7300c4 SHA512 a637466a380748f939b3af090b8c0333f35581925bc03f4dda9b3f95d338836403cf5487ae3af9ff68f8245a837f8ab061aabe57a126a6a2c20f2e972c77d1fa
DIST atty-0.2.13.crate 4764 BLAKE2B 673eea1d377fc3aca792a3a8bd2a5c058f3041abc76a8760dd6acab7f19fa610f812c57d81a4dbf773675cad3df483904c66e66b45d83393402f747c6db60d89 SHA512 4554ca7dedb4c2e8693e5847ef1fe66161ed4cb2c19156bb03f41ce7e7ea21838369dabaf447a60d1468de8bfbb7087438c12934c4569dde63df074f168569ad
DIST bitflags-1.2.1.crate 16745 BLAKE2B 0fa6d3ce44aad7616d5cd02aad8c1d0b0fed4022650eb43067c4a72e6fc88da05442674fa51826e4858a47c9de233e1ba2229820af094197cd11bb416ceffb2b SHA512 ad89b3798845e23737a620bba581c2ff1ff3e15bac12555c765e201d2c0b90ecea0cdbc5b5b1a3fa9858c385e8e041f8226f5acfae5bbbe9925643fff2bf3f0b
DIST c2-chacha-0.2.3.crate 13336 BLAKE2B 0b548907ce4c9ee502ec96307ca003d168e8bcf9007ec667661d158f33de36fc2e832cb3c36cadc2523f6ba8b9aeff4dcb16e7f95a9a34ae02e8bd5d00f65cf2 SHA512 302498f75d1befdb8bf8b61d0eff2762f0e86000c3909d819a377be2fec72e830bfb4530e24059906b499cef17ab56229f5627fb998ad9ba34a7c6c0de748538
DIST cbindgen-0.14.3.crate 165874 BLAKE2B 0155bccbacc70a2f8173117dde46c3bb48e07d0a0616b53ea56cade436cb6da1aa7106a82bf4ac55954cafbea1790f9200bdd3132032d3306ec755be0bb2f05c SHA512 abce798aff93260c28b0717df5fd25cf24b3eb89c9d05df4832d06169ec30db8e1c17a300f88087c6fbd4414a6aae6788e162dde838aac01c499afcb145c8461
DIST cbindgen-0.14.4.crate 172123 BLAKE2B e86fe619d824b25884570c7a34bdb6ceb3d4906b2309a3c16b29b46284f7bd855991910000a54605eaf2786ce4f570b647a469a2d02831919d9c0a17feda694f SHA512 1d1dfbb159aad25ecbe77368ced803a0cf219a00238364d95b1866f371912e10932e9a6ccda7acd8541b270b1880bda4a29af095a8d83b79a792e31d1ce2bd78
DIST cfg-if-0.1.10.crate 7933 BLAKE2B 063a96ed176f34f788666b40adc483d147fc011dee941ab60569ddd0e57502b5dd06ed71090f4e14ce005d06e240500a286f74652615e9d068fba649610d8cf8 SHA512 9d22616bfb4a75770a828a0a3cddac6787297a5fdc53eb17e25811cc94de717f2de8bd66d53c5d65ba1c83d8892aefee5ae758cf56a1ef0a0c3120f70b244339
DIST clap-2.33.0.crate 196458 BLAKE2B 3bb62d817afc77b421a6282746b9b61367d224de6b614c7ed66bde452ce1046728077dab3368a46635b5c74d82ba3196586d87c0201478ce5b89638910dadb1a SHA512 f1075031414d48e4340bfe308904a95a31b72460724773c52a0bc8c004e625a04c904a39fc5420cb8c26a633321f9b5f4f69019c7aae5ed89900b63ed8c21a91
DIST getrandom-0.1.13.crate 24581 BLAKE2B a61df4369526f860eef6952a021c3f473562cc4171c373c105d8944c305370592cd98a6c28cc0f8d00496f6b47cb900a4498dad942d0b6f60b4d8163d8904f14 SHA512 534b01d28bc9e69a5ad1e84f34aa4154939c27d70c5f557f15e669fa8894c375486ee945a6a6d8adaf1b6b7accda0e24963f70e77dd51ee0638a6ae6daa38925
DIST heck-0.3.1.crate 54666 BLAKE2B 99f7ceb44ea6af445749989730ce1e14156018ff046a136be2e6474b285088e1d90d6f8af9352affbbde5bac7e5a32971dd99f249f968105e9793b7de76def07 SHA512 134722192c46fd64b38d2fbec3a2511c560916e906491a72c4ec9d99b9f716dc58942fb99cac99b9a6ef2de5b5ad1d1c1155f292d091401b6873347d80c086d6
DIST itoa-0.4.4.crate 11147 BLAKE2B bb6f1caf1e58dc313bd3cfa2cf81252cb2ebc15e1f4c9adfcdedf46c5fa79811d5b0cbd58f1e91d1f62bf85d7b941b0dba535814fb43b5b70a38db791b45717c SHA512 f5e04bd908457e7592243ce64a99c5283428b767f4cc17d77946770411b06fccb0250625263c3e84a02a018ea7e8a0e4216e1929a71988bab8e1dbf603d3801d
DIST libc-0.2.66.crate 457815 BLAKE2B 5da379ea738b75189e106d4be821c999394043303b8bb6a9caecdb1b53e449f11a58edc4589193611b76e7baf00e155ba1077bcca4d0cfae30826e946a0075f0 SHA512 5bf5645a7cbe626108cd71e1d189286ed161fcd3ea12cd34f4e392be4cf93bf78feb6128b1101bedc41a71091398f26771f3efd3880f779ee0be00f706914975
DIST log-0.4.8.crate 31297 BLAKE2B 31037fdc2fc94f4ab8a6e89a251b0bc29975027dc7efb7cc86a8e848dfc8e2ae50acdb177b7ba9f7c1f20ec01e50798f89abb772d67a33f1b060ac617cf9a8ab SHA512 0b71f97d5964134b5eea1332347e177806b2f171d0be5c410c0ff1539470b242ba9f0933fafd853e4171a43b5e373a150af18918924be431c7216022553a8a3b
DIST ppv-lite86-0.2.6.crate 20522 BLAKE2B 6e1e4f3d0daa02148df390be19d3575626e66f6a78dbf27c1275f097c4307b80d8182f7795a270aa2c34d8c31c8c3eecc88e9507a6c9def0e91af11233aba90b SHA512 b9764a841364eb89157c828a183fdf6aeeb63d1d35e4f5dcba79e5d8e20eee8f22c845636c5c7bc980da1d141d838528d5f190546b23aa5e4e51e626a0ddce3d
DIST proc-macro2-1.0.6.crate 35414 BLAKE2B abec56bdf8bf2109337e007c59c7c9c78ff0af3848c9b45567b2ee1d5120ace78fdf327c61becf917ef64366e5947792608631f197d182753eeeaf81ffd2a1cd SHA512 d0a6358eb6f9334128a5b47c096bfc57452e13d603c9514df433409069c00468fa2b3c76761d7f3696abb061c1c3ba24150e0cf9be2c5d571d580238d2d27853
DIST quote-1.0.2.crate 23023 BLAKE2B 4091809b4fc9b8d0b56be814b127d6ffd7c1507becba85dc905606cbe85f46233dc4b429c1e865e7c7de336cb936d956169ceb5dd45b489b7722022ccf818a3a SHA512 67778dff9dc5c4edcdd6454b74ad9353bb6c0c4e51c16cb82f2e393a7d7a0cde084d3c93279b718a8398c40af0a9377ebfae5321e69e635efd8390c125b75ce4
DIST rand-0.7.2.crate 111438 BLAKE2B c9e81a0b2bcf5a3d425865dad2babd90187da55b9c70fce4aea4ed2e2ffe9cfe4e66bb280f1acee11e1f1ad17d3a73e906ac6cd35e6a2124852b66093293bd48 SHA512 d29d10e9788f0f44b56b2981aca01a115eca1018e6afe2428fca088cc9432f27d014c6f1f0c819317052f4c64a9c54cee8834eb08e081f292ad65160dcdd014c
DIST rand_chacha-0.2.1.crate 11475 BLAKE2B 698f830845e24b85fe52b11e9a1c621dcdbe4232bc22f3dc0b1d2fcd4427045f302f74134d9b451fc5b4f9ac559fb2bc06f3d0eec5eddb6fd6cf3e6d3030855e SHA512 30933fdb94ca8d4bf040a7e08a42944a0d7c2f3f6a9a3d547e74bc32f922b0eb79d85afb1f6c85c78dc115170e70bdf96b36f0478d61ba5651876d5350ad18f6
DIST rand_core-0.5.1.crate 21116 BLAKE2B e74791f941a79971f2741172d489d546373c9abcb0dfbffcb7b97b858ec800b2e0c97df4ac636f3aa1b8dd6c14685edf317336d577f31b5c6cb7d89a157e547a SHA512 4f7500b35e165e6c817fdd67a50745d5497d24e554bb554705097e37258751e8755c4d6b8a69fcb5e1977708ba78620bc35d640e4e018fcd4e88d9dbdbebdcbf
DIST rand_hc-0.2.0.crate 11670 BLAKE2B 55fd048f2524cecd4f0e17927a81111e3070a8cc6a5b0234a46445400ad5527194edf8c91fb5ad6538f4958d53044ab02424f61a38adb2931e2cb7568c458ee8 SHA512 bca185612bed5cee4da76fb68fe854105da276f5bf2da464e596d586b925df798cc692ed881e276ab77c36b4b0551930966c93656be122ad05899d87853533b0
DIST redox_syscall-0.1.56.crate 17117 BLAKE2B 57b1b01ef3cbc6f55def6c9a0dcde16bd98e83badcef993e26ae3ce849abcd1b1c10f4da931c605970d77f92471734764a537e7329291a221343fde23f3591eb SHA512 17a3044327aa733c830dd74e210d6bda32622617d1c5af9d70d7647232d8569ad0b04ccb14042cbabb5d97ad98e3f1f5a9968a75387354ffb4d175e9577115a1
DIST remove_dir_all-0.5.2.crate 8907 BLAKE2B 585f49f83db3ace90dd0b4fc77aab7525844194c82d36cc33ab8999aaa6226d24a130c30f55e2c46a08273cc554d9d4c8bc51958aa7dbf1045085b2e22639e4e SHA512 d19a45398a93adbcef9f233f6b3eaf4a63ae95f5bbae00c880b40c5edd34449e7f798ebcd4d11843c68ddfa15e11bed21d434b224e4a175dcb64ae011c13c8cd
DIST ryu-1.0.2.crate 42001 BLAKE2B c25f0454bfac40de3150b8c263c6d2842e64f86f441a69ab5e5722a2383a9a07c7539837f6e50996619eb0c4a5da212556a4dd21a761a250785fe0a9c4e18a3c SHA512 c681e037f1eea488bad7fb5ecc79af52377bd4b9eeed95eb213201219d7f100702000f81947aff8f18641235fb62c138a30eb20c1f93ae518a4d9960a598bb64
DIST serde-1.0.104.crate 73258 BLAKE2B 98d63f91c61ac4693e17e0b137379cffd6608933b84d2211509be6b3b25b181592d5e907549fac6ae2e4a45255b8003e1bfd0db683429ac3e78d8ee097d3d79c SHA512 638a1dacc158d69658a005e599adc19d6bc80d0c663f527b1ff906f729e70e027eacc4ea5b9b2c675ac990d5997f50f9d46d614ba95b0c73bb9606aba46b053a
DIST serde_derive-1.0.104.crate 49658 BLAKE2B d4a9ecb4a8df87776a83d645778dc050803b16fd5c9889f28e231238223d424dd25b101412e89741fb47be624d1773acf97f6e38809c81110b696701975168df SHA512 303c3d126ca56b0a7126a87e9e1be8bd60bdb212ed21b5e1aee015313fd769f1d260869c41b0335bd467fd4e3fc6bb26f428c7c4b35e9a55c009797cfa745d1e
DIST serde_json-1.0.44.crate 70325 BLAKE2B c8f5836e3448bbf5fd666b30e747b90f84eb7dbaaf078026456082b5403bbcc1931c70528abbf0e605872271861c1e7dabfe1f42d5a13c2b02f5abb28b342e61 SHA512 ce1c68bfd2ceaa8b7f45cd34cfbc71dcfe3905b06fa47032403c54aa9eed0e618cd526938eb78dbc201e9480dbd64b4bfb405f2119478229f5cea12056dcf5e4
DIST strsim-0.8.0.crate 9309 BLAKE2B 40a8be506c43ee1ffe006ddc7dee98c3d418bdd205d57b78f5d1e4c9312feb57e1eaf952e02d92d4e0932db240c6fba45beb06ea8c4fc6de1cf1faa8b6a3a939 SHA512 1d55a8d946cd55f5f37d06aea536549ded95739fa58c0f2da285a0041154c181f663682bdcac643aa198b3e762d694a04f058db985c62ebe22b5c16327ba6d34
DIST syn-1.0.11.crate 193782 BLAKE2B 17e0b40ee69575efea77249343af2fa67af0990f08ac8efced152ebb88ad1301211306a2317ec163219d485a097878f8552ca353f43f35ffd5d172e6c92da0df SHA512 6b361c6cb27aebb3da5e81db270e7cd0fe8bfb11289c25ce46127214e222c2b64f53164c8869de41b77e9b780f967454ed5d7c5b73442ae292eadc4dea77494c
DIST tempfile-3.1.0.crate 25823 BLAKE2B a34721369923771d5f9a2fc64adaff2bff41da97a0ce79e01aaedb8d6670867220c671c0d23f7a8a9c71b09c0559efe4e7c9bab1f7f9d890866be1de1ce050a9 SHA512 a87ee51c36a81a8a8eb8f091eb57926682f38b707f7f641332d8752170e6c139a656ae49c6861f51e07c2fab5c86cc9b2ac158f5d89c6bff15d18934dd4e7ba5
DIST textwrap-0.11.0.crate 17322 BLAKE2B 257428908342774593bbd3528fcdae710712ff54e8a711393a24356d8ba0e16e466a4b20c05f942c48ca76b3b5b5aaa90ec202f782cad892caa8b71ccf124da6 SHA512 f5c0fe4f28ff1a3a0931e8e235b5157a45f67967985bcc752418c5ec3481fca44a8ae4800088889b37e8cd0533f53d3c456d5ffd19b767b3f83a87b49a2e209a
DIST toml-0.5.5.crate 54805 BLAKE2B 2b319f37165164793866bc4a470ed99447fdccb59242c94e5311906dc764f54131f2bc14921caab56bf84706d12800fb26a58210e3e58728f4076edc9a66e771 SHA512 8f6a04dc24ea775a9a28cc948039f20540ec983c46b287ebfa820e29cc5867803765ce099283f79d3b4a22c513b386603dbd8130808cb3354bc63b5d4706cb33
DIST unicode-segmentation-1.6.0.crate 90703 BLAKE2B b7d63bb8b62cabc604084957aaff021df24a1291f0ebdcddc424cceefe10ad399ed53152211c3e7557e39e21255166f922256f9f8e1fb488d3bae368b49a378e SHA512 80c6f92d9b39602a05809dc63a7cb05a305441689b6056801097a882a36c9795aabd660f884f707daa7e7fe6ad4983f6e245c226962cc982dbfeea2ddfddf41e
DIST unicode-width-0.1.7.crate 16644 BLAKE2B 8cc5ee2dfeeda8ffe3405a0d4f1576d2b3b8ede1a42cbefb0ba3bd0d71b53a92ceade86c4a06e9d5b31382955dc6e1152ae5cd279dc26dbc51f478dad1d0f64d SHA512 39b8a539c9009d0421f54ae68b139f21456c9cb03d743b58535a977f98bc9655cf42eaacfadbcff796c187a6f315ae16259ee22be9c2da5aa042172c6b464d84
DIST unicode-xid-0.2.0.crate 14994 BLAKE2B e66b4255798f0ef1c81fb852613fee396a042d780d2158a171dbb5e7dedad0b3d2522f5401ae5d215f89ab8be4f5c371b046e4845693a65554c2a6eedc5d1e28 SHA512 590f727d8d8354023062ae5fe7ac5bed1bcf79d86b883effd7f33b3ea3b1c8922998a63d621ca6962a969e890fa6edd009871f21cd57b1969264f41ba3f78359
DIST vec_map-0.8.1.crate 14959 BLAKE2B f5c179ccb4349d543747d5e3bb3edfca4bc9f3f64ba3c2d40fb1d9cba98433b7a0641387aafda6347c9b3603592c64bd820b217b46fbfcd37f802f298e5793ab SHA512 026cf10dc7ba98ae51dd312fc847cbaea41c25f0da5db6e0e22c2ecf75584bbf876d7bd96035fbbcf6696d702d5a3f25977e02a2d77cf519aa21e3ed05710e40
DIST wasi-0.7.0.crate 33941 BLAKE2B de1e4e577a1237a233f81ff1a3bd7f888020a42d93a807187a154a3ae0593397358a8667a065f0cdd5497dd2a89889e418d33a0d42ab1631b3f99677e9ebd665 SHA512 1950e78df7f0ba21b917680633d092704f1fb906bd973de4ddc43cedb7bf449f6e881d50e3aa0d5595e8d58796915d582b69c116ef536f819b6f035affea18f0
DIST winapi-0.3.8.crate 1128308 BLAKE2B e0e8ef6121f222b0500525192ebb69b26b71cc16f9ba92186f8ad6acc9de4cb8cc7c738f9c31f5bd223d2e34c93c496e8448c973d69797776004670c70abf69c SHA512 5a899ee5f09f30d742b8b8eba78da05cd9f4c664408fdeb9370373f8756a962a23e3f1c07619e745b3270138606c9a369076c02c3f5353f657df09d203d9a736
DIST winapi-i686-pc-windows-gnu-0.4.0.crate 2918815 BLAKE2B 4d357e4d30f9552972170d65b9a5358b69c46a3e772fe05efc22f3d4ffc1caeeaad7aacdc7abd503a7ad0545f8bd7d22bf351dcb6df76f812fa4d45c34d65df0 SHA512 a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2
DIST winapi-x86_64-pc-windows-gnu-0.4.0.crate 2947998 BLAKE2B 2ad1ea8b5fa07d544e910ccba043ae925269b76b26c9da356305b34b86741dd8b9aff0b9ffe3d562db4fcd7d7c46a11ce9e3168b782b1d89ae6881742b7ede82 SHA512 4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513
EBUILD cbindgen-0.14.3.ebuild 970 BLAKE2B ebc12682113ef7cd06974b72bb5d45ad3005475e3bac615d061efe7a3b3493a2964633f3a77d2691ce0587835f552b924572fdc7803fdd33e67ae44ac9647ab8 SHA512 aaf99043f26afaac6bb138bc0cf5dd66c6f4eaf2568c17988f77e9ed93a5ff3ee4e36fcdb3ce71897b00b7d94a1f012b53faf86ef342a10fc2b6fc5a7befab15
EBUILD cbindgen-0.14.4.ebuild 973 BLAKE2B d4b703a2fa4022ee6e8c683c73a6c29ef9b4de3aca7bebbe36f97deb8d7165b79dcce230ad0cdc9a1cddf14c0d933464e33c4d1b3a07378d0434765c4f96254d SHA512 f73de464787bba6289cf8eb24c0a77714b20de3fc3d5d4af36a00f39d5bc9f4a76f1d763811fd63afd9ff3a9b07abdc3a5b0b9f1cef6bca2a1a6584d8aec9023

View File

@ -0,0 +1,54 @@
# Copyright 2017-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CRATES="
ansi_term-0.11.0
atty-0.2.13
bitflags-1.2.1
c2-chacha-0.2.3
cbindgen-0.14.3
cfg-if-0.1.10
clap-2.33.0
getrandom-0.1.13
heck-0.3.1
itoa-0.4.4
libc-0.2.66
log-0.4.8
ppv-lite86-0.2.6
proc-macro2-1.0.6
quote-1.0.2
rand-0.7.2
rand_chacha-0.2.1
rand_core-0.5.1
rand_hc-0.2.0
redox_syscall-0.1.56
remove_dir_all-0.5.2
ryu-1.0.2
serde-1.0.104
serde_derive-1.0.104
serde_json-1.0.44
strsim-0.8.0
syn-1.0.11
tempfile-3.1.0
textwrap-0.11.0
toml-0.5.5
unicode-segmentation-1.6.0
unicode-width-0.1.7
unicode-xid-0.2.0
vec_map-0.8.1
wasi-0.7.0
winapi-0.3.8
winapi-i686-pc-windows-gnu-0.4.0
winapi-x86_64-pc-windows-gnu-0.4.0
"
inherit cargo
DESCRIPTION="A tool for generating C bindings to Rust code"
HOMEPAGE="https://github.com/eqrion/cbindgen/"
SRC_URI="$(cargo_crate_uris ${CRATES})"
LICENSE="MIT MPL-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"

View File

@ -0,0 +1,54 @@
# Copyright 2017-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CRATES="
ansi_term-0.11.0
atty-0.2.13
bitflags-1.2.1
c2-chacha-0.2.3
cbindgen-0.14.4
cfg-if-0.1.10
clap-2.33.0
getrandom-0.1.13
heck-0.3.1
itoa-0.4.4
libc-0.2.66
log-0.4.8
ppv-lite86-0.2.6
proc-macro2-1.0.6
quote-1.0.2
rand-0.7.2
rand_chacha-0.2.1
rand_core-0.5.1
rand_hc-0.2.0
redox_syscall-0.1.56
remove_dir_all-0.5.2
ryu-1.0.2
serde-1.0.104
serde_derive-1.0.104
serde_json-1.0.44
strsim-0.8.0
syn-1.0.11
tempfile-3.1.0
textwrap-0.11.0
toml-0.5.5
unicode-segmentation-1.6.0
unicode-width-0.1.7
unicode-xid-0.2.0
vec_map-0.8.1
wasi-0.7.0
winapi-0.3.8
winapi-i686-pc-windows-gnu-0.4.0
winapi-x86_64-pc-windows-gnu-0.4.0
"
inherit cargo
DESCRIPTION="A tool for generating C bindings to Rust code"
HOMEPAGE="https://github.com/eqrion/cbindgen/"
SRC_URI="$(cargo_crate_uris ${CRATES})"
LICENSE="MIT MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"

8
dev-util/meson/Manifest Normal file
View File

@ -0,0 +1,8 @@
AUX 0.53.1-remove-asan-ld_preload.patch 946 BLAKE2B 2f43446f853b5233c7c959e0216eadae9d190efd4743a138afae73d42f082499793b4688e2419cb3ef38fe7c5e7f29b472e8a27e9ce8701c28f83f390f55dddd SHA512 50b7b4c269d186e3c2274297f04dae46484af4f2f090bef3fc42dfbecab94d8a91b31c27369cf40a52c7ce71cf96d9bc22601739b6e886c6c710f0665c2ef311
AUX 0.53.1-remove-asan.patch 842 BLAKE2B 02864bbd41dd16d3e9e8e7ce9e9ef604f2fc6babd26958a4364147d392d56d8a87baec41fb009389a5fc989067019c6de89d1e2c82043ba7df463e32c99f885c SHA512 4abf8088832a1a9336fdffe04bc91a1fbab7363b72c5a1d14b22f408ea25f180d6526f8d6b3a2866a819f1895c93035869fff799da36b5040b8fb89a65ab0e23
DIST meson-0.50.1.tar.gz 1402160 BLAKE2B 051e9949f3a216c1074ec826c6a232124a3d2615dc03f83f57bfe96427cd44aa95e2ec7c688e87252d0179882f91e0ccf440eda4b47ff2f0d3af7382a530e011 SHA512 0dcc19007b3b1626e198c0a4ddb0f37dfdfe25f447e511a772b302bffc02187a3e56046daea01a0ad5cf611d557bae12d5b858bb7a44f69919b9ac9ad696aafd
DIST meson-0.53.1.tar.gz 1552121 BLAKE2B 3f0bbbeba6307397dfe5e49c1f978d6246d8e18317d0361b6f013f5c2ba55ad7cba53c985418686c20db159b7790b45a0c2e05d86f861cd0280fb07afdbeb847 SHA512 0c96c354bcd7e6945473c7df0ddff929ef2bae9c2dfc7b48c6c6174c7f2be4f798398929f9c4d5986aa5fc882305ff76371ad0d65a499f058b33b05ff7025859
DIST meson-0.54.0.tar.gz 1683491 BLAKE2B 3016beb44c4401672947afa898253b69769f998e18e00baedc3bcb525a9923b9154d7db79cfa4c38fcf66eeaee8137f47917689fdde33674b1f0483b21923393 SHA512 e3c97ffd9409a543e45c8be7b12d4e8437de8dbd0cd236fbe092952d7d0833728d46ff6b679c8a73dae4c4016fdf38b43b56f3959a95968a29db109ebfe254e7
EBUILD meson-0.50.1.ebuild 2291 BLAKE2B 4fa7e202464800dd5466f120d10fcc4ed55a591a60a7727e00df3dddedafc2e4e17cbfc813d9fb5732ab06bad07985553a56eca3cdfc1ff8867fad9836761ef2 SHA512 f1a48643c78c2326620419391e1a234810e8414929bbb6d478a361d20ae6680b7cd42fa48bd694619c06d6fe7e00072dcb479446b8880667b8884cf735d44567
EBUILD meson-0.53.1.ebuild 1682 BLAKE2B 5cc1651bf2c30681948eafd4e6f4620d575ba136af9450838e2859a46d5a238b1ff063a5c591b611636b412be2ed582541b27eab377b5c85b167eb99142d4749 SHA512 2858564cb4b9457242ac4413b8e96fd40f7dcc621e050aed4c4fdc753191349a674d36324ab850b31f9a4b35499ae94e642336eb12905883e2ae4087a2cac08e
EBUILD meson-0.54.0.ebuild 1682 BLAKE2B 5cc1651bf2c30681948eafd4e6f4620d575ba136af9450838e2859a46d5a238b1ff063a5c591b611636b412be2ed582541b27eab377b5c85b167eb99142d4749 SHA512 2858564cb4b9457242ac4413b8e96fd40f7dcc621e050aed4c4fdc753191349a674d36324ab850b31f9a4b35499ae94e642336eb12905883e2ae4087a2cac08e

View File

@ -0,0 +1,27 @@
From 75f2d7a004387edc7a7e73da5097bf01daf38769 Mon Sep 17 00:00:00 2001
From: William Hubbs <w.d.hubbs@gmail.com>
Date: Sat, 15 Feb 2020 12:24:42 -0600
Subject: [PATCH 1/2] remove asan ld_preload
ASAN and sandbox both want control over LD_PRELOAD
https://bugs.gentoo.org/673016
---
run_unittests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run_unittests.py b/run_unittests.py
index 676604f4..1c9aaf0c 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4985,7 +4985,7 @@ class LinuxlikeTests(BasePlatformTests):
r'Run-time dependency qt5 \(modules: Core\) found: YES 5.* \(pkg-config\)\n')
@skip_if_not_base_option('b_sanitize')
- def test_generate_gir_with_address_sanitizer(self):
+ def _test_generate_gir_with_address_sanitizer(self):
if is_cygwin():
raise unittest.SkipTest('asan not available on Cygwin')
if is_openbsd():
--
2.24.1

View File

@ -0,0 +1,27 @@
From 9ddb289ca9611281a45734d92fdfd2d5fb83f050 Mon Sep 17 00:00:00 2001
From: William Hubbs <w.d.hubbs@gmail.com>
Date: Sat, 15 Feb 2020 12:28:35 -0600
Subject: [PATCH 2/2] remove asan
ASAN is unsupported on some targets
https://bugs.gentoo.org/692822
---
run_unittests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run_unittests.py b/run_unittests.py
index 1c9aaf0c..171ee0f0 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5475,7 +5475,7 @@ class LinuxlikeTests(BasePlatformTests):
self.assertEqual(install_rpath, 'baz')
@skip_if_not_base_option('b_sanitize')
- def test_pch_with_address_sanitizer(self):
+ def _test_pch_with_address_sanitizer(self):
if is_cygwin():
raise unittest.SkipTest('asan not available on Cygwin')
if is_openbsd():
--
2.24.1

View File

@ -0,0 +1,99 @@
# Copyright 1999-2019 Gentoo Authors et al.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="*"
fi
inherit distutils-r1
DESCRIPTION="Open source build system"
HOMEPAGE="http://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="vim-syntax bash-completion zsh-completion test"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-util/ninja-1.5
"
DEPEND="
${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
dev-vcs/git
virtual/pkgconfig
)
"
python_prepare_all() {
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
# test_testsetups doesn't throw CalledProcessError with --setup=valgrind
# lcov up to 1.14 fails on gcc 9.1
# https://github.com/linux-test-project/lcov/issues/58
sed -e 's/test_generate_gir_with_address_sanitizer(/_&/' \
-e 's/test_testsetups(/_&/' \
-e 's/test_coverage(/_&/' \
-i run_unittests.py || die
# Remove test cases that break due to over-eager detection
rm -r "${S}/test cases/java"
rm -r "${S}/test cases/frameworks/17 mpi"
rm -r "${S}/test cases/frameworks/22 gir link order"
rm -r "${S}/test cases/frameworks/26 netcdf"
distutils-r1_python_prepare_all
}
src_test() {
# tc-export PKG_CONFIG
# if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
# ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
# else
distutils-r1_src_test
# fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# test_cross_file_system_paths
unset XDG_DATA_HOME
${EPYTHON} -u run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
if use vim-syntax ; then
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,ftplugin,indent,syntax}
fi
if use bash-completion ; then
insinto /usr/share/bash-completion/completions
doins data/shell-completions/bash/meson
fi
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
fi
}

View File

@ -0,0 +1,78 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3+ )
DISTUTILS_USE_SETUPTOOLS="rdepend"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="*"
inherit distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="http://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
dev-util/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
PATCHES=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
"${FILESDIR}"/0.53.1-remove-asan-ld_preload.patch
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
"${FILESDIR}"/0.53.1-remove-asan.patch
)
python_prepare_all() {
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# test_cross_file_system_paths
unset XDG_DATA_HOME
${EPYTHON} -u run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
}

View File

@ -0,0 +1,78 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3+ )
DISTUTILS_USE_SETUPTOOLS="rdepend"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="*"
inherit distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="http://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
dev-util/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
PATCHES=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
"${FILESDIR}"/0.53.1-remove-asan-ld_preload.patch
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
"${FILESDIR}"/0.53.1-remove-asan.patch
)
python_prepare_all() {
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# test_cross_file_system_paths
unset XDG_DATA_HOME
${EPYTHON} -u run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
}

12
gui-libs/wlroots/Manifest Normal file
View File

@ -0,0 +1,12 @@
DIST wlroots-0.10.1.tar.gz 455232 BLAKE2B 0f4def61d8501b7746ccc589d59586b3641340fb7633b0c4a7b518f1b1b5285c1ee71fb629aa0a0e649c15a4ae69b5cfbc7a034c96e545765a96ddda35f10609 SHA512 e1af5a5b6484b5f4060090e13d22d699d5aaa6926e1a6b1043d2b900f88a002ed67dacf8498f23ed3008bf8a35500f415f95b3dbcf50de5da354f309f9161d58
DIST wlroots-0.11.0.tar.gz 481126 BLAKE2B d2262298f24948293643b02c823851b4643289f776bc087d7b67240f4c9c76a7aca03c7dc7e13a65b3d0d3a7c8a5f5246a0e282d2cb3b88bbae0ef94b906f18a SHA512 a8a0c498d10664ff0a5aab8ad1a4fd034179542eff38b058e1da7e4653c42136e4a3586634f3d0a25a985aa7f4c5d17260117d9f4a70a7f8060494c04456f575
DIST wlroots-0.4.1.tar.gz 480127 BLAKE2B f193860ef9e0852b053270bdaa44b491a8c65a76dc01c71690f7a006eac46e606cca95675e6dec4d65487d9b98bcabb7cd12578f028a9cb9c5cd648e47754df4 SHA512 bd8863c7f285579d81b9372f1335c10eb2d0fd7b46b7589e6b2acad53fa373f2e3b549d2c31876d87d66851af0415a12a011a05953ffe2384b718db6d95cba2e
DIST wlroots-0.5.0.tar.gz 481154 BLAKE2B 094c7c92191ea9c581debc90fa7b0117ed15328c11a098e53cec05b326e84c54481a69382ef9a592337ade370ffb55ea98b545794471808dee9f41ee9db8194f SHA512 4defecff91a6179d3a6b7d05c92c14b20c7fa69263a889869912e913a5d1e29f9fd4684f9816b03e2427a21c004d64236f35d8282e02e8d27d826442f1f8b3a7
DIST wlroots-0.6.0.tar.gz 497934 BLAKE2B a0b631831752e533f83ed62e402ef69b0994df050fd643cf2ef89556face4a822b3936bc758b70ab160eedda8ced16c0992dc209600914095784bba97bd26ee2 SHA512 c205d4303a381e11ef2f4db2faac1ddf9ad85c675824aae9cfe62d9f8bd313f1568d4810db1d006416783b50c8364198648a46d1ba453a0d8f659d6920618286
EBUILD wlroots-0.10.1.ebuild 2560 BLAKE2B 76b28e33dbe932fe89160a4806a46d3f1de2118ea05545d2248f3c7ddf59609bcd339dbe34673054943e7ca37360d3dec773630f0e2a4dde803062aa14facab3 SHA512 aebd49d399a8989d56bd2e08291da1af80432ec9cf642446bc5aa6f71c8c63d9f3467243fd43d216693831dfa432e1ba4be494a79b999254e6a741e730559ff6
EBUILD wlroots-0.11.0.ebuild 2560 BLAKE2B 76b28e33dbe932fe89160a4806a46d3f1de2118ea05545d2248f3c7ddf59609bcd339dbe34673054943e7ca37360d3dec773630f0e2a4dde803062aa14facab3 SHA512 aebd49d399a8989d56bd2e08291da1af80432ec9cf642446bc5aa6f71c8c63d9f3467243fd43d216693831dfa432e1ba4be494a79b999254e6a741e730559ff6
EBUILD wlroots-0.4.1.ebuild 2556 BLAKE2B 387bad0c2177db317674eca833112491e6a9fb78dfe1f6f652450a557bcc5ef65c575f0024b069e6b93122b94e6fc180f8d046ee4d83c2be571150458fdb8868 SHA512 4c57f85f868d258bbe8168137f4e5f639dd617ab994a93324a115ed31e3ff2dddd802bc787cada563df8df780cd7a4ad3d1a57cf2b64c6408c862ffa64178c41
EBUILD wlroots-0.5.0.ebuild 2560 BLAKE2B 888dbb482966d512c7c448ef30061acf9bf19f311cb1cede67eb51d4969236f366980b2d13a852a6a19e5ed0dfd3969abb739796b3ba77556a70447245ec6ac2 SHA512 60e2b90b688e7e62e1a34077e5edbf07c1103da4d9198fb224b511b01a78c98011a835e6f547388646b337509f912d93ef674e919a08da2c24a6383ce74d0f21
EBUILD wlroots-0.6.0.ebuild 2560 BLAKE2B 76b28e33dbe932fe89160a4806a46d3f1de2118ea05545d2248f3c7ddf59609bcd339dbe34673054943e7ca37360d3dec773630f0e2a4dde803062aa14facab3 SHA512 aebd49d399a8989d56bd2e08291da1af80432ec9cf642446bc5aa6f71c8c63d9f3467243fd43d216693831dfa432e1ba4be494a79b999254e6a741e730559ff6
EBUILD wlroots-9999.ebuild 2563 BLAKE2B 3702306601cfb39e3d3e6719cfa75e6c23ee7f35814c804a4eb9997bcc004b5ff57f328d17625bd1313ca7898ee86211a3f1857c401886e39d9971443ccd478e SHA512 9c69220a61469efe672e06414dbdac04e7dbf25eb5b3e8cda4696752b0604421144b167cf5836ef413d500427edcc5a7d02dbc821027f3952bcb385cb310d6ad
MISC metadata.xml 1682 BLAKE2B 5713fb5006f1c178ba401ff4831ff991ec1e2270bf7d7961a0727a8934cf9262654fa12b9e13cd14803a8ace50c04dcdcdd37ff6162239fb22c30c84970b1f7a SHA512 88263936158e8d423f79ac9932286674e0b7e6e50f0279cefc07fa3961cda5c65874b14029553ce8b93dd22a7715ca40b1db32d239498d144fc6c901000e5018

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>bman@gentoo.org</email>
<name>Aaron Bauman</name>
</maintainer>
<maintainer type="person">
<email>speedjack95@gmail.com</email>
<name>Niccolò Scatena</name>
</maintainer>
<longdescription lang="en">
Pluggable, composable, unopinionated modules for building a Wayland
compositor.
wlroots implements a huge variety of Wayland compositor features and
implements them right. By using wlroots, you get high performance,
excellent hardware compatibility, broad support for many wayland
interfaces, and comfortable development tools.
wlroots is developed under the direction of the <pkg>dev-libs/sway</pkg> project.
</longdescription>
<use>
<flag name="elogind">Enable support for rootless session via elogind</flag>
<flag name="icccm">Use xcb-icccm (from <pkg>x11-libs/xcb-util-wm</pkg>) util library for improved Xwayland introspection</flag>
<flag name="rootston">Build the rootston example compositor</flag>
<flag name="x11-backend">Enable support for handling input/output devices through <pkg>x11-libs/libxcb</pkg></flag>
<flag name="X">Enable support for X11 applications (XWayland)</flag>
</use>
<upstream>
<remote-id type="github">swaywm/wlroots</remote-id>
<maintainer status="active">
<email>sir@cmpwn.com</email>
<name>Drew DeVault</name>
</maintainer>
<bugs-to>https://github.com/swaywm/wlroots/issues</bugs-to>
<doc>https://github.com/swaywm/wlroots/wiki</doc>
<changelog>https://github.com/swaywm/wlroots/releases</changelog>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,101 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64 x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
>=dev-libs/libinput-1.9.0:0=
>=dev-libs/wayland-1.17.0
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.17
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

View File

@ -0,0 +1,101 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64 x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
>=dev-libs/libinput-1.9.0:0=
>=dev-libs/wayland-1.17.0
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.17
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

View File

@ -0,0 +1,101 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
>=dev-libs/libinput-1.7.0:0=
>=dev-libs/wayland-1.16.0
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.17
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

View File

@ -0,0 +1,101 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64 x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
>=dev-libs/libinput-1.7.0:0=
>=dev-libs/wayland-1.16.0
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.17
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

View File

@ -0,0 +1,101 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64 x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
>=dev-libs/libinput-1.9.0:0=
>=dev-libs/wayland-1.17.0
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.17
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

View File

@ -0,0 +1,101 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps meson
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
HOMEPAGE="https://github.com/swaywm/wlroots"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind icccm rootston systemd x11-backend X"
REQUIRED_USE="?? ( elogind systemd )"
DEPEND="
>=dev-libs/libinput-1.9.0:0=
>=dev-libs/wayland-1.17.0
media-libs/mesa[egl,gles2,gbm]
virtual/libudev
x11-libs/libdrm
x11-libs/libxkbcommon
x11-libs/pixman
elogind? ( >=sys-auth/elogind-237 )
icccm? ( x11-libs/xcb-util-wm )
systemd? ( >=sys-apps/systemd-237 )
x11-backend? ( x11-libs/libxcb:0= )
X? (
x11-base/xorg-server[wayland]
x11-libs/libxcb:0=
x11-libs/xcb-util-image
)
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.17
virtual/pkgconfig
"
FILECAPS=( cap_sys_admin usr/bin/rootston )
src_configure() {
# xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
local emesonargs=(
"-Dxcb-errors=disabled"
-Dlibcap=$(usex filecaps enabled disabled)
-Dxcb-icccm=$(usex icccm enabled disabled)
-Dxwayland=$(usex X enabled disabled)
-Dx11-backend=$(usex x11-backend enabled disabled)
$(meson_use rootston)
"-Dexamples=false"
"-Dwerror=false"
)
if use systemd; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
elif use elogind; then
emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
else
emesonargs+=("-Dlogind=disabled")
fi
meson_src_configure
}
src_install() {
if use rootston; then
dobin "${BUILD_DIR}"/rootston/rootston
newdoc rootston/rootston.ini.example rootston.ini
fi
meson_src_install
}
pkg_postinst() {
elog "You must be in the input group to allow your compositor"
elog "to access input devices via libinput."
if use rootston; then
elog ""
elog "You should copy (and decompress) the example configuration file"
elog "from ${EROOT:-${ROOT}}/usr/share/doc/${PF}/rootston.ini"
elog "to the working directory from where you launch rootston"
elog "(or pass the '-C path-to-config' option to rootston)."
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch rootston using:"
elog "exec ck-launch-session rootston"
fcaps_pkg_postinst
fi
fi
}

View File

@ -0,0 +1,5 @@
AUX 1.4.0-eglmesaext-include.patch 305 BLAKE2B 14449638730ad168130723fb9a967e50ee9f31edc1072ad5ba6668f1a95628924896d43e03986793329f6fe91a59810e3081cfb0e0608e81e38f3ecc63ac6e66 SHA512 f77fe86153cb90648057a5348bab6bbc69f8fec78b9c9a11e70f4fb412f41d32734049ebec53907792475deff577f44a2930e6e9ec419bef17e07491d1ded80d
DIST wpebackend-fdo-1.4.0.tar.xz 30204 BLAKE2B dda32e0408a8fd98dc1d03c4606e20fb219fe722aef24360e31cd62027601a4795dbdbf026925e284e6b87f223e6e79824e8e6bab181b7bbf42a9db0664358dc SHA512 f94167b13345adfda15312b16e5de04910f812c7481f7e3c8a00163ce8387be22373867b51b2c5cb424e62de877c1aaa48592aac85ec9cc03c969c7e83185660
DIST wpebackend-fdo-1.6.0.tar.xz 35004 BLAKE2B 0a0b8eba28d77300b273e0ca7fb64a9d44b77ee975a68b814b2775d27e0bb1509cb7af9376ed734dbd02b5bf0c0a69c98ceec14cc854f0790b7fe1c4ae4a7d9d SHA512 26827684419d24c52d303d0caffc37d62cdd4bff7335660259167e46ad309b111ce5bccfc9656a0c62fed169f45bfa0c84d2b9ad9437445aa512dec89bd9e8bc
EBUILD wpebackend-fdo-1.4.0.ebuild 642 BLAKE2B bff3131654afd2c3bfa12e9173b34202e7c21dd78c1611efdbabf1b9027ac75046d98793349de4c37a745c7114665af1e9b9d8b008a9927b24029d285b3061c6 SHA512 e6a2c5ffff5e995510df11da5a90fea9d249e8d03e03bb47f8efc2ea474c6c1c458461dd0612f6fdd82292840e5dc6f95d6cbac8fc7ad391053c4839a7b671f1
EBUILD wpebackend-fdo-1.6.0.ebuild 644 BLAKE2B de4d9eccf96b2c25e22a9bc94b8f3a16b2f3f00374becfb3ca80f6aae3464ffdd5cf83a7927be3009e7042b718f57b0c6ef14439eb1d6cb65bb215018de08a70 SHA512 3aaa2ac49142e8c7ba125e7224880138025295046511b6793838c185f694580c9258f81e1dd87cf4d50cc9db6db2b00f471fabfa9728e3fdffb0b21328afa3bb

View File

@ -0,0 +1,12 @@
diff --git a/src/ws.cpp b/src/ws.cpp
index fc20823..54d147d 100644
--- a/src/ws.cpp
+++ b/src/ws.cpp
@@ -27,6 +27,7 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <EGL/eglmesaext.h>
#include "linux-dmabuf/linux-dmabuf.h"
#include "bridge/wpe-bridge-server-protocol.h"
#include <cassert>

View File

@ -0,0 +1,39 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
DESCRIPTION="WPE backend designed for Linux desktop systems"
HOMEPAGE="https://wpewebkit.org/"
SRC_URI="https://wpewebkit.org/releases/${P}.tar.xz"
LICENSE="BSD-2"
SLOT="1.0"
IUSE=""
KEYWORDS="*"
RDEPEND="
media-libs/mesa[egl]
dev-libs/glib:2
>=dev-libs/wayland-1.10
gui-libs/libwpe:1.0
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PV}-eglmesaext-include.patch
)
src_configure() {
local mycmakeargs=(
-DBUILD_DOCS=OFF # hotdoc not packaged
)
cmake_src_configure
}

View File

@ -0,0 +1,39 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
DESCRIPTION="WPE backend designed for Linux desktop systems"
HOMEPAGE="https://wpewebkit.org/"
SRC_URI="https://wpewebkit.org/releases/${P}.tar.xz"
LICENSE="BSD-2"
SLOT="1.0"
IUSE=""
KEYWORDS="*"
RDEPEND="
media-libs/mesa[egl]
dev-libs/glib:2
>=dev-libs/wayland-1.10
gui-libs/libwpe:1.0
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
"
PATCHES=(
# "${FILESDIR}"/${PV}-eglmesaext-include.patch
)
src_configure() {
local mycmakeargs=(
-DBUILD_DOCS=OFF # hotdoc not packaged
)
cmake_src_configure
}

10
gui-wm/sway/Manifest Normal file
View File

@ -0,0 +1,10 @@
DIST sway-1.0.tar.gz 5474548 BLAKE2B bea0a72c374b75f027e466d83e8c06abe32205e0cda80776b0e48e327a6da4e965a6a575595e5a38bcb125294c509b5d9a1db17604dd9e9032acef404366bdb9 SHA512 57e2610244c8bcd2b09bb5396113176d118ee5a0688aea297d4c191eda70ce29b36ff64e05c57d1a32a31cc4f2ac2562fd3cb3890508a8f3c7cbcb9fb017171d
DIST sway-1.1.1.tar.gz 5480615 BLAKE2B 2cc55535a030d5d057c332a8b2647f394ec8f08a3a5aebe48e0bd21da718eac23bdbcc5a2ce26624efb9360518e5f14eaafe406e1c7d9b3eb81621bab7b6c39c SHA512 2585446ca0936df41c7959b6b48487b25c86f1a8a3bedcd146aab023a873a416ce750698e3cabcd9cb861e35bbd7e280574ff477152906669af9b17d3e54028e
DIST sway-1.4.tar.gz 5514489 BLAKE2B 31eb1aee32079e643cc7a0263a097000c089e36916ea2a681e1ec696f8329e7ecfe3c8a981ec3b6d4e3dd99c8e263b2c208dbe602308d6bdaf4cdabbb3c10971 SHA512 3b280bdfdbdae8fb9b4f555bc630c64e7c1d09f7b2c783b99413863a6b620d50cd2b6d10d63e11fdfb9c678fce9a403228ac52fa69fb52561ffbd06790505a71
DIST sway-1.5.tar.gz 5535966 BLAKE2B e863e97ee897dcd1652d363a09b712932de55da08c88b4858f0aadc29b2cb19d2bda1e5e1184f4e4be6fa54a0136463556f9072f32e2b952d4f12ffd0ee9baf9 SHA512 702e44f8923a4ca05d831dd7ed76165654f113a8b2754d332c509ee844528f47c52b7f21deca78d4a79dad465cbcd0934574fff4ad9bb7a45aec3124dea5bca4
EBUILD sway-1.0.ebuild 3085 BLAKE2B 62c575e078c9078faca0d58cc0adc18fd52b10f648fdf6cc8cc18b5080fc8844d92a7bdf80141c03bae5d1dac8ccc62b0f263a05b82a407d4ee3e25c573470b5 SHA512 10aeba287ad9113010d60b1e07af1ba6291c575109f89c9501bd42370e8bc1afb148bb6604d95048b4d390b9d66213249c25b5f8867599e5cdce53db0967550b
EBUILD sway-1.1.1.ebuild 2953 BLAKE2B 0146efd670edbafed4df718383d9c059cced7dc7178d407e46c3ee3a3b260464972e2a485fd34f511bfc276a1cd41e41ba14e2a76058a626c222c06e8a32fb02 SHA512 b6fc5f65a764a2fc6e31e8b828bcccfca3b85d5d6b1d39ee7096b0dee22de36385d9432bd4bd90358c84e6cf7d17efdcf077c0513ced9d0be4e18ed8467b6d68
EBUILD sway-1.4.ebuild 2953 BLAKE2B 0146efd670edbafed4df718383d9c059cced7dc7178d407e46c3ee3a3b260464972e2a485fd34f511bfc276a1cd41e41ba14e2a76058a626c222c06e8a32fb02 SHA512 b6fc5f65a764a2fc6e31e8b828bcccfca3b85d5d6b1d39ee7096b0dee22de36385d9432bd4bd90358c84e6cf7d17efdcf077c0513ced9d0be4e18ed8467b6d68
EBUILD sway-1.5.ebuild 2954 BLAKE2B 499ee21a8285463504cee979015048559b3d8fee41d880a69006cc7a7c4d3a809555e2c8c661fd30e403413f6d14d2256d93ebc3422e0cf43b1522582d7e5fe4 SHA512 3c7ca387078703b3ac131fe3263bca993cd62951aaa5f5386b731c69484cddff0287a52434a1c53a01af3b5c9a68dea59d075162fac1bd2f04cbcb08a0479d40
EBUILD sway-9999.ebuild 2953 BLAKE2B 0146efd670edbafed4df718383d9c059cced7dc7178d407e46c3ee3a3b260464972e2a485fd34f511bfc276a1cd41e41ba14e2a76058a626c222c06e8a32fb02 SHA512 b6fc5f65a764a2fc6e31e8b828bcccfca3b85d5d6b1d39ee7096b0dee22de36385d9432bd4bd90358c84e6cf7d17efdcf077c0513ced9d0be4e18ed8467b6d68
MISC metadata.xml 2486 BLAKE2B 2d34da83a8d8726b91189d27a400e705a1b0259a1ca577a85e7c21784274a08a0adccc134cd523e193f8635b26dcb1802e37bfa1831f58c922285341b1eadd5e SHA512 9d382307136a126a614a8361828cb018865243b1a8c2a4dd08fbd484afc53320abf6d64dd82dd93a47d8de284552f1857c028c6c72db06199152e1458b636ec0

56
gui-wm/sway/metadata.xml Normal file
View File

@ -0,0 +1,56 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>bman@gentoo.org</email>
<name>Aaron Bauman</name>
</maintainer>
<maintainer type="person">
<email>prometheanfire@gentoo.org</email>
<name>Matthew Thode</name>
</maintainer>
<maintainer type="person">
<email>hilobakho@gmail.com</email>
<name>Mykyta Holubakha</name>
</maintainer>
<maintainer type="person">
<email>speedjack95@gmail.com</email>
<name>Niccolò Scatena</name>
</maintainer>
<longdescription lang="en">
"SirCmpwn's Wayland window manager" is an i3-compatible window manager
for Wayland.
sway was created to fill the need of an i3-like window manager for
Wayland. The upstream i3 developers have no intention of porting i3 to
Wayland, and projects proposed by others ended up as vaporware. Many
thanks to the i3 folks for providing such a great piece of software, so
good that your users would rather write an entirely new window manager
from scratch that behaved *exactly* like i3 rather than switch to
something else.
</longdescription>
<use>
<flag name="elogind">Enable support for rootless session via elogind</flag>
<flag name="fish-completion">Enable fish completion support</flag>
<flag name="man">Build and install man pages</flag>
<flag name="swaybar">Install 'swaybar': sway's status bar component</flag>
<flag name="swaybg">Install 'swaybg': allows to set a desktop background image</flag>
<flag name="swayidle">Install 'swayidle': idle manager to run commands when user is inactive</flag>
<flag name="swaylock">Install 'swaylock': sway's screen locker</flag>
<flag name="swaymsg">Install 'swaymsg': tool for communicating with a running sway instance</flag>
<flag name="swaynag">Install 'swaynag': shows a message with buttons</flag>
<flag name="tray">Enable support for StatusNotifierItem tray specification</flag>
<flag name="wallpapers">Install sway's default wallpaper image</flag>
<flag name="X">Enable support for X11 applications (XWayland)</flag>
</use>
<upstream>
<remote-id type="github">swaywm/sway</remote-id>
<maintainer status="active">
<email>sir@cmpwn.com</email>
<name>Drew DeVault</name>
</maintainer>
<bugs-to>https://github.com/swaywm/sway/issues</bugs-to>
<doc>https://github.com/swaywm/sway/wiki</doc>
<changelog>https://github.com/swaywm/sway/releases</changelog>
</upstream>
</pkgmetadata>

114
gui-wm/sway/sway-1.0.ebuild Normal file
View File

@ -0,0 +1,114 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64 x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( x11-libs/gdk-pixbuf:2 )
swayidle? ( gui-apps/swayidle )
swaylock? ( gui-apps/swaylock )
systemd? ( >=sys-apps/systemd-239 )
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~gui-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=gui-libs/wlroots-0.5.0[elogind=,systemd=,X=]
<gui-libs/wlroots-0.6.0[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
"
if [[ ${PV} == 9999 ]]; then
BDEPEND+="man? ( ~app-text/scdoc-9999 )"
else
BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
fi
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar || use swaybg; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
meson_src_configure
}
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

View File

@ -0,0 +1,112 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( gui-apps/swaybg )
swayidle? ( gui-apps/swayidle )
swaylock? ( gui-apps/swaylock )
systemd? ( >=sys-apps/systemd-239 )
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~gui-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=gui-libs/wlroots-0.6.0[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
"
if [[ ${PV} == 9999 ]]; then
BDEPEND+="man? ( ~app-text/scdoc-9999 )"
else
BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
fi
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
meson_src_configure
}
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

112
gui-wm/sway/sway-1.4.ebuild Normal file
View File

@ -0,0 +1,112 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( gui-apps/swaybg )
swayidle? ( gui-apps/swayidle )
swaylock? ( gui-apps/swaylock )
systemd? ( >=sys-apps/systemd-239 )
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~gui-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=gui-libs/wlroots-0.6.0[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
"
if [[ ${PV} == 9999 ]]; then
BDEPEND+="man? ( ~app-text/scdoc-9999 )"
else
BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
fi
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
meson_src_configure
}
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

112
gui-wm/sway/sway-1.5.ebuild Normal file
View File

@ -0,0 +1,112 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( gui-apps/swaybg )
swayidle? ( gui-apps/swayidle )
swaylock? ( gui-apps/swaylock )
systemd? ( >=sys-apps/systemd-239 )
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~gui-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=gui-libs/wlroots-0.11.0[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
"
if [[ ${PV} == 9999 ]]; then
BDEPEND+="man? ( ~app-text/scdoc-9999 )"
else
BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
fi
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
meson_src_configure
}
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

View File

@ -0,0 +1,112 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )
tray? ( || ( elogind systemd ) )"
DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
elogind? ( >=sys-auth/elogind-239 )
swaybar? ( x11-libs/gdk-pixbuf:2 )
swaybg? ( gui-apps/swaybg )
swayidle? ( gui-apps/swayidle )
swaylock? ( gui-apps/swaylock )
systemd? ( >=sys-apps/systemd-239 )
X? ( x11-libs/libxcb:0= )
"
if [[ ${PV} == 9999 ]]; then
DEPEND+="~gui-libs/wlroots-9999[elogind=,systemd=,X=]"
else
DEPEND+=">=gui-libs/wlroots-0.6.0[elogind=,systemd=,X=]"
fi
RDEPEND="
x11-misc/xkeyboard-config
${DEPEND}
"
BDEPEND="
>=dev-libs/wayland-protocols-1.14
virtual/pkgconfig
"
if [[ ${PV} == 9999 ]]; then
BDEPEND+="man? ( ~app-text/scdoc-9999 )"
else
BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
fi
src_prepare() {
default
use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}
src_configure() {
local emesonargs=(
-Dman-pages=$(usex man enabled disabled)
-Dtray=$(usex tray enabled disabled)
-Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
$(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
"-Dbash-completions=true"
"-Dwerror=false"
)
if use swaybar; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
meson_src_configure
}
pkg_preinst() {
if ! use systemd && ! use elogind; then
fowners root:0 /usr/bin/sway
fperms 4511 /usr/bin/sway
fi
}
pkg_postinst() {
if ! use systemd && ! use elogind; then
elog ""
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session sway"
elog ""
elog "If your system does not set the XDG_RUNTIME_DIR environment"
elog "variable, you must set it manually to run Sway. See wiki"
elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}

View File

@ -0,0 +1,7 @@
DIST harfbuzz-2.5.3.tar.xz 5685712 BLAKE2B a9d8a46b6a0667c598ea011f020b09d8fd795105483a8b307ee2a9399de2b84bf3b29659f9a3f7500250879bbb412003ee6f68aaba01b68824bd489615f737e6 SHA512 a2e6cedbe0e505fa31b540e0d0bc6c0b07080bd39879c27e04d351103e21201d75a809dd2fad559bf994b82b311f67ad85778cbbfb670d7e2580beafa09e93ff
DIST harfbuzz-2.6.4.tar.xz 5967468 BLAKE2B 24d215324a408a724f47a901c4a56605144d15373518bd52643ece83705d0c63582a80635ecef6a6d8d2f5f39c750076d553fb39aaa8c0dd41702ee910c32f24 SHA512 d8664bb64fda11ff7646693070637e3827f8b3d1de50e11ecf108ce4d19c878b26b2ba4cff278da6e6cc0cb431e1630d9eaa7c32a9bebb9655a7aa8dabf7114f
DIST harfbuzz-2.6.8.tar.xz 8976516 BLAKE2B 46401ae06ec70172621d2aa354901f03173a273abdb0db909332946643e82b4286be690ac717a29304e9db121dd7f693b4ce19522de772f5d140986d6333e7ce SHA512 651b23d7d4fab6fef472ee57db39bbaebc31c2f40ea3a482c1499ad1a7b549b86a2bccbe9da191c8e9ecdf464191dd3c9a7485546b51695ad8ab3c0329732d9d
EBUILD harfbuzz-2.5.3-r1.ebuild 3033 BLAKE2B fe45f37cd4e9b419188d38603aa8b83c2af8c67175ec350cc6e34f6f8e7f7b18b6aff0c0c6adbfb67661f18432687ee09386ca4e5bb6b4c63579c6b74826a6cf SHA512 29832f1637d6f3c09786831601ada4fe763538201d1143fdea9ad97a36362ad1a1c30eddd23ec220d15e15bf88996fb6764c6fcf8eecef8f3bb3bf832686b038
EBUILD harfbuzz-2.6.4.ebuild 2261 BLAKE2B 7781e96662022e898341482977d14125c87b2ea379e6913b4c34a2be12ff7155f7fa7098221af659f80eac7a3dbbb1d3852c189fad93bc1015c68c611ec65cab SHA512 10e977d1273df060436361b89d8f9daee3c9bb23637409b070f49c2af5fbc35bf91e2b6985173bd2d797ebd5530271972a0491f1ce515bd03d4b8ab5e5af6e19
EBUILD harfbuzz-2.6.8.ebuild 3172 BLAKE2B 232619df1e95eb0caa3cb4c04697ed49b30f4a7703d71f42f23eea057537eac686217e64ec91db04b1cfa24bab37ea265d40523ddb41adf7e9da3f099073a042 SHA512 1142604a0975cd202231b58261d689bba20f4c38f13c50e81ce3d7c22f717530c8dece6c8e10824cf9c446d02096042d6caac071945115b36272aec9b2779540
MISC metadata.xml 645 BLAKE2B aadcef9412392874d361b5c09e7450bf88db64fa704558553861cf16ffd1a5b5715291fefc0624e3ad0d86a537cdbd2b810fa093b289428e68a19c82049188ef SHA512 645e451768a5dba2e16d18b51ece20fa28172450bf22e29fe73ed29748f712187f997ce2f6f0a24c725f0cb10434b4a65c6de9a5fd1aa7d820e00b7dca8b8b63

View File

@ -0,0 +1,110 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_7 )
inherit flag-o-matic libtool multilib-minimal python-any-r1 xdg-utils
DESCRIPTION="An OpenType text shaping engine"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
if [[ ${PV} = 9999 ]] ; then
EGIT_REPO_URI="https://anongit.freedesktop.org/git/harfbuzz.git"
inherit git-r3 autotools
else
SRC_URI="https://www.freedesktop.org/software/${PN}/release/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="Old-MIT ISC icu"
SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
IUSE="+cairo debug +glib +graphite icu +introspection static-libs test +truetype"
REQUIRED_USE="introspection? ( glib )"
RDEPEND="
cairo? ( x11-libs/cairo:= )
glib? ( >=dev-libs/glib-2.38:2[${MULTILIB_USEDEP}] )
graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
introspection? ( >=dev-libs/gobject-introspection-1.34:= )
truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
BDEPEND="
dev-util/gtk-doc-am
virtual/pkgconfig
"
# eautoreconf requires gobject-introspection-common
# ragel needed if regenerating *.hh files from *.rl
if [[ ${PV} = 9999 ]] ; then
DEPEND+="
>=dev-libs/gobject-introspection-common-1.34
dev-util/ragel
"
fi
pkg_setup() {
use test && python-any-r1_pkg_setup
if ! use debug ; then
append-cppflags -DHB_NDEBUG
fi
}
src_prepare() {
default
xdg_environment_reset
if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
# on Darwin/Solaris we need to link with g++, like automake defaults
# to, but overridden by upstream because on Linux this is not
# necessary, bug #449126
sed -i \
-e 's/\<LINK\>/CXXLINK/' \
src/Makefile.am || die
sed -i \
-e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
src/Makefile.in || die
sed -i \
-e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
test/api/Makefile.in || die
fi
[[ ${PV} == 9999 ]] && eautoreconf
elibtoolize # for Solaris
# bug 618772
append-cxxflags -std=c++14
}
multilib_src_configure() {
# harfbuzz-gobject only used for instrospection, bug #535852
local myeconfargs=(
--without-coretext
--without-fontconfig #609300
--without-uniscribe
$(use_enable static-libs static)
$(multilib_native_use_with cairo)
$(use_with glib)
$(use_with introspection gobject)
$(use_with graphite graphite2)
$(use_with icu)
$(multilib_native_use_enable introspection)
$(use_with truetype freetype)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
if multilib_is_native_abi; then
ln -s "${S}"/docs/html docs/html || die
fi
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -name "*.la" -delete || die
}

View File

@ -0,0 +1,95 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8} )
inherit flag-o-matic libtool python-any-r1 xdg-utils
DESCRIPTION="An OpenType text shaping engine"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
SRC_URI="https://www.freedesktop.org/software/${PN}/release/${P}.tar.xz"
KEYWORDS="*"
LICENSE="Old-MIT ISC icu"
SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
IUSE="+cairo debug +glib +graphite icu +introspection static-libs test +truetype"
REQUIRED_USE="introspection? ( glib )"
RDEPEND="
cairo? ( >=x11-libs/cairo-1.8.0:= )
glib? ( >=dev-libs/glib-2.38:2 )
graphite? ( >=media-gfx/graphite2-1.2.0:= )
icu? ( >=dev-libs/icu-51.2-r1:= )
introspection? ( >=dev-libs/gobject-introspection-1.34:= )
truetype? ( >=media-libs/freetype-2.4.2:2= )
"
DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
BDEPEND="
dev-util/gtk-doc-am
virtual/pkgconfig
"
pkg_setup() {
use test && python-any-r1_pkg_setup
if ! use debug ; then
append-cppflags -DHB_NDEBUG
fi
}
src_prepare() {
default
xdg_environment_reset
if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
# on Darwin/Solaris we need to link with g++, like automake defaults
# to, but overridden by upstream because on Linux this is not
# necessary, bug #449126
sed -i \
-e 's/\<LINK\>/CXXLINK/' \
src/Makefile.am || die
sed -i \
-e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
src/Makefile.in || die
sed -i \
-e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
test/api/Makefile.in || die
fi
[[ ${PV} == 9999 ]] && eautoreconf
elibtoolize # for Solaris
# bug 618772
append-cxxflags -std=c++14
}
src_configure() {
# harfbuzz-gobject only used for instrospection, bug #535852
local myeconfargs=(
--without-coretext
--without-fontconfig #609300
--without-uniscribe
$(use_enable static-libs static)
$(use_with cairo)
$(use_with glib)
$(use_with introspection gobject)
$(use_with graphite graphite2)
$(use_with icu)
$(use_enable introspection)
$(use_with truetype freetype)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
ln -s "${S}"/docs/html docs/html
}
src_install() {
default
einstalldocs
find "${ED}" -name "*.la" -delete || die
}

View File

@ -0,0 +1,116 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
inherit autotools flag-o-matic libtool multilib-minimal python-any-r1 xdg-utils
DESCRIPTION="An OpenType text shaping engine"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
if [[ ${PV} = 9999 ]] ; then
EGIT_REPO_URI="https://github.com/harfbuzz/harfbuzz.git"
inherit git-r3
else
SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="Old-MIT ISC icu"
SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
IUSE="+cairo debug +glib +graphite icu +introspection static-libs test +truetype"
RESTRICT="!test? ( test )"
REQUIRED_USE="introspection? ( glib )"
RDEPEND="
cairo? ( x11-libs/cairo:= )
glib? ( >=dev-libs/glib-2.38:2[${MULTILIB_USEDEP}] )
graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
introspection? ( >=dev-libs/gobject-introspection-1.34:= )
truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
BDEPEND="
dev-util/gtk-doc-am
virtual/pkgconfig
"
# eautoreconf requires gobject-introspection-common
# ragel needed if regenerating *.hh files from *.rl
if [[ ${PV} = 9999 ]] ; then
DEPEND+="
>=dev-libs/gobject-introspection-common-1.34
dev-util/ragel
"
fi
pkg_setup() {
use test && python-any-r1_pkg_setup
if ! use debug ; then
append-cppflags -DHB_NDEBUG
fi
}
src_prepare() {
default
xdg_environment_reset
if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
# on Darwin/Solaris we need to link with g++, like automake defaults
# to, but overridden by upstream because on Linux this is not
# necessary, bug #449126
sed -i \
-e 's/\<LINK\>/CXXLINK/' \
src/Makefile.am || die
sed -i \
-e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
src/Makefile.in || die
sed -i \
-e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
test/api/Makefile.in || die
fi
sed -i \
-e 's:tests/macos.tests::' \
test/shaping/data/in-house/Makefile.sources \
test/shaping/data/in-house/Makefile.in || die # bug 726120
eautoreconf
elibtoolize # for Solaris
# bug 618772
append-cxxflags -std=c++14
}
multilib_src_configure() {
# harfbuzz-gobject only used for instrospection, bug #535852
local myeconfargs=(
--without-coretext
--without-fontconfig #609300
--without-uniscribe
$(use_enable static-libs static)
$(multilib_native_use_with cairo)
$(use_with glib)
$(use_with introspection gobject)
$(use_with graphite graphite2)
$(use_with icu)
$(multilib_native_use_enable introspection)
$(use_with truetype freetype)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
if multilib_is_native_abi; then
ln -s "${S}"/docs/html docs/html || die
fi
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name "*.la" -delete || die
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>polynomial-c@gentoo.org</email>
<name>Lars Wendler</name>
</maintainer>
<maintainer type="project">
<email>office@gentoo.org</email>
<name>Gentoo Office project</name>
</maintainer>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="glib">Compile with GLib Unicode support</flag>
<flag name="graphite">Use graphite to render complex non-Roman writing systems</flag>
</use>
</pkgmetadata>

View File

@ -1,2 +1,3 @@
DIST libpng-1.6.35-apng.patch.gz 10396 SHA512 40cda24d003089c31786b70fd581cdd960f338ae89535646a2188bc8e25e603a6ad2080406017bd45edb298442a88dd60ada1ec650b001596d216e8194a3dda1
DIST libpng-1.6.35.tar.xz 1014320 SHA512 b69152bc7869e98536effa8e45e2dac7bffee26aa9e31fc90b37506a702256919bcf4dd9cadc42fa4e45143bc023ffd7c637742367e58707e8c2226b3a09eee0
DIST libpng-1.6.35-apng.patch.gz 10396 BLAKE2B 5f69db106909f690f3fc96dc14db3c7281c3abb0ea9cd119fcf0cb6584eb1eb5f244d57e4ec7198614f3df5f9b302c0de2b447ed0cbacaa7b15821c2e3c23cf7 SHA512 40cda24d003089c31786b70fd581cdd960f338ae89535646a2188bc8e25e603a6ad2080406017bd45edb298442a88dd60ada1ec650b001596d216e8194a3dda1
DIST libpng-1.6.35.tar.xz 1014320 BLAKE2B 2c1d8a4a1af8d5c67c8c18414fc1c32ad41b81e5300b3fe72c2bb89afece764087c7829308243e5eb24e7d685c56ba6c151b66ef64603528ac0406d89dd4cc4d SHA512 b69152bc7869e98536effa8e45e2dac7bffee26aa9e31fc90b37506a702256919bcf4dd9cadc42fa4e45143bc023ffd7c637742367e58707e8c2226b3a09eee0
EBUILD libpng-1.6.35.ebuild 1521 BLAKE2B e540ff54bb52a0725a3e99b8be65f7fb76011521f86d2fc9d36f3f5764b7457fdefda977b93895c80c76b3092e49f1daee54a504ddb9021498de1af52c86e599 SHA512 88e570b4c23a0246e4edf6285b2ec458f10b85933f3771fd699418dc2239524f0d03bbe45013c918c2be22098af053251a17d8eea2bbb71f98514c87898234d0

View File

@ -1,2 +1,10 @@
AUX libvpx-1.3.0-sparc-configure.patch 406 BLAKE2B 02b1f0484a9659fdc90eb567db517a8b63f679521ae9ab510bfaa88b9fd5e1430d0eceeb8e4a138b00cb43ac4a1db6451dd29a808367973dc885fe5b9eacd665 SHA512 159ba5577fc0eee3e958740d8607a7570f374a8f64a36f1e7832a126482ec0bb96ba2be451eefdf50d84a412a2be73ae75da3d69da78ec13dfe0e24a14685035
AUX libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch 8035 BLAKE2B 785a8769741e5af10ce0f18f6ef9f091d1335ca1c8515c9b653d3a177a620a8b3360b7df03f058b63e42259d6e4ccb6863e0ec9acd69886627a222ea3b8beb2d SHA512 b5af677b7f8fc6c61ea1c99c094103549cbe1a0163da70f51d4c34eec40b507a7bf8f84f97ee141a15c33bfaf2a6cb36c572a08465407fb17eb9b6a1364a3819
DIST libvpx-1.7.0.tar.gz 2679797 BLAKE2B de7992adb517e375c5be2a9facf2b4a73174adcaef11185ed6d3102c2f6b73f378b0d415c5e3a4d915b3a6889bd8b31ba3e8c007a87a433a345ef7696a1dd899 SHA512 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0
DIST libvpx-1.8.2.tar.gz 5312988 BLAKE2B 4d27eb457c20e70f5b68b589962692d4938cf69e889009cd6aa74cbefb3afd53ba2733420e5a8feb1388558969d95d5a26e1fc60b9b8ef6a0be8dade7d54ee0b SHA512 da2ab0775a28ddd78654bbe46886e833d4ef7ba91867fc1427dceced735b6177eff06b24f204c075c50c3a5cadc5be6a1fb213c44df189218a543b52554f3a38
DIST libvpx-1.9.0.tar.gz 5326239 BLAKE2B 6403a5d8326235a8d27ca3727f45398556cbe72cd125ae358c22f729cc01d6a81917cca8a6e97ad0ed01e7fc04ca4212baf21f371323b93ccc8830c4a11acf91 SHA512 8d544552b35000ea5712aec220b78bb5f7dc210704b2f609365214cb95a4f5a0e343b362723d829cb4a9ac203b10d5443700ba84b28fd6b2fefbabb40663e298
DIST libvpx-testdata-1.8.2.tar.xz 422945340 BLAKE2B 117c26e77b9cda30ca083382981fd88139905fec756e362c6c8497adee26796cd9adab752b197b1eedb9f5e26970100c08fd0e3bd42184fd3e12afe927acad3e SHA512 a1616d1c199983d47157c2e99b409e781df86804048f9a7345f2e682ffc2c6d79ab95f5cf3ccb01c0db498e79686086d9c7aa2c2c07e53cb7f642afd1e38ea35
DIST libvpx-testdata-1.9.0.tar.xz 450868860 BLAKE2B aaed7f2ef4f70ff352e39be2630e3a5cd803e8d2408c4fd5c3e06e040a75d2f593a10bc267a497aa91eaceb64286e81f69e86ca0940160e4f34b62c08e91df7b SHA512 bcc89062a436d652d15d5852a842cb4985c4783855b943ab11667c022b5082887129fd9579b8da3af209a3031f95ff8dc625c380f79559db160501cd676736ea
EBUILD libvpx-1.7.0.ebuild 4063 BLAKE2B 4712537cf3ebaa5bffb0af30fa5100e3b5f20c016f8a4d9f68cb2c43317b393a00af19028f4fde48f38e1f66248da5713d653a5c27a87e1f52f29f935c951e9c SHA512 5bdce3f25d09c925de12e986294684a03209def39d630732efb12eda411f3e13a5c64c54d5f9fe51b8cad695dd43c5474eb4bd06a4c59d4dc284b5eb3be5d7d4
EBUILD libvpx-1.8.2.ebuild 3436 BLAKE2B 5c78fa513348cad6d6a1560a72fc4d0c15c746ea6f52843182f3b30d8d71e1f76ee245c95291ba9356a147de1f73f65f5a7a147aa1cd6d861fdaf5831ec7fe62 SHA512 2fc98db752426b5530a3c42b9a4a03a4e38e79d2746d42be3d5ffce155c9aa5e49f6d17a28c2535bb5fbdae8bea31fd90e0e15fa74ee51dface9b90a2357ae1a
EBUILD libvpx-1.9.0.ebuild 3464 BLAKE2B 0c9d235a33c0b764ebf7c5dac44cf78083d81d622ea6c939c897360850ec34fd0e46b24994d1a68e5daf7c1f89edcfb8fa31d3cd9d48d373bbab7900baf04595 SHA512 60595a1d6b225caa1e29ee4a22fd8064cf1e537b3610e1a016052c9fd4c1da2a603b7acb183ccf83ff23ef716ad052b8f88a2a9cc7aa11feca7eddf9070936c5

12
media-libs/libvpx/app.log Normal file
View File

@ -0,0 +1,12 @@
2020-09-07 19:21:43,046 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:44,648 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:46,489 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:48,091 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:49,638 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:51,240 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:51,940 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:53,542 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:54,019 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:55,621 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:59,630 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:22:01,232 [ ERROR]: No Samsung TV found in the network.

View File

@ -0,0 +1,10 @@
--- a/configure
+++ b/configure
@@ -109,6 +109,7 @@
all_platforms="${all_platforms} ppc64-darwin9-gcc"
all_platforms="${all_platforms} ppc64-linux-gcc"
all_platforms="${all_platforms} sparc-solaris-gcc"
+all_platforms="${all_platforms} sparc-linux-gcc"
all_platforms="${all_platforms} x86-android-gcc"
all_platforms="${all_platforms} x86-darwin8-gcc"
all_platforms="${all_platforms} x86-darwin8-icc"

View File

@ -0,0 +1,211 @@
Backports of
From 46e17f0cb4a80b36755c84b8bf15731d3386c08f Mon Sep 17 00:00:00 2001
From: kyslov <kyslov@google.com>
Date: Fri, 4 Jan 2019 17:04:09 -0800
Subject: [PATCH] Fix OOB memory access on fuzzed data
From 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Tue, 24 Jul 2018 21:36:50 -0700
Subject: [PATCH] vp9: fix OOB read in decoder_peek_si_internal
From f00890eecdf8365ea125ac16769a83aa6b68792d Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Tue, 11 Dec 2018 18:06:20 -0800
Subject: [PATCH] update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
From 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Tue, 9 Apr 2019 18:37:44 -0700
Subject: [PATCH] update libwebm to libwebm-1.0.0.27-358-gdbf1d10
From 52add5896661d186dec284ed646a4b33b607d2c7 Mon Sep 17 00:00:00 2001
From: Jerome Jiang <jianj@google.com>
Date: Wed, 23 May 2018 15:43:00 -0700
Subject: [PATCH] VP8: Fix use-after-free in postproc.
to address CVE-2019-9232 CVE-2019-9325 CVE-2019-9371 CVE-2019-9433
--- a/test/decode_api_test.cc
+++ b/test/decode_api_test.cc
@@ -138,8 +138,30 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
}
-TEST(DecodeAPI, Vp9PeekSI) {
+void TestPeekInfo(const uint8_t *const data, uint32_t data_sz,
+ uint32_t peek_size) {
const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
+ // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
+ // to decoder_peek_si_internal on frames of size < 8.
+ if (data_sz >= 8) {
+ vpx_codec_ctx_t dec;
+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM
+ : VPX_CODEC_CORRUPT_FRAME,
+ vpx_codec_decode(&dec, data, data_sz, NULL, 0));
+ vpx_codec_iter_t iter = NULL;
+ EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
+ }
+
+ // Verify behavior of vpx_codec_peek_stream_info.
+ vpx_codec_stream_info_t si;
+ si.sz = sizeof(si);
+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
+ vpx_codec_peek_stream_info(codec, data, data_sz, &si));
+}
+
+TEST(DecodeAPI, Vp9PeekStreamInfo) {
// The first 9 bytes are valid and the rest of the bytes are made up. Until
// size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it
// should return VPX_CODEC_CORRUPT_FRAME.
@@ -150,24 +172,18 @@ TEST(DecodeAPI, Vp9PeekSI) {
};
for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) {
- // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
- // to decoder_peek_si_internal on frames of size < 8.
- if (data_sz >= 8) {
- vpx_codec_ctx_t dec;
- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
- EXPECT_EQ(
- (data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME,
- vpx_codec_decode(&dec, data, data_sz, NULL, 0));
- vpx_codec_iter_t iter = NULL;
- EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
- }
+ TestPeekInfo(data, data_sz, 10);
+ }
+}
+
+TEST(DecodeAPI, Vp9PeekStreamInfoTruncated) {
+ // This profile 1 header requires 10.25 bytes, ensure
+ // vpx_codec_peek_stream_info doesn't over read.
+ const uint8_t profile1_data[10] = { 0xa4, 0xe9, 0x30, 0x68, 0x53,
+ 0xe9, 0x30, 0x68, 0x53, 0x04 };
- // Verify behavior of vpx_codec_peek_stream_info.
- vpx_codec_stream_info_t si;
- si.sz = sizeof(si);
- EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
- vpx_codec_peek_stream_info(codec, data, data_sz, &si));
+ for (uint32_t data_sz = 1; data_sz <= 10; ++data_sz) {
+ TestPeekInfo(profile1_data, data_sz, 11);
}
}
#endif // CONFIG_VP9_DECODER
--- a/third_party/libwebm/mkvparser/mkvparser.cc
+++ b/third_party/libwebm/mkvparser/mkvparser.cc
@@ -5307,8 +5307,8 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info,
const long long stop = pos + s.size;
- Colour* colour = NULL;
- Projection* projection = NULL;
+ std::unique_ptr<Colour> colour_ptr;
+ std::unique_ptr<Projection> projection_ptr;
while (pos < stop) {
long long id, size;
@@ -5357,11 +5357,19 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info,
if (rate <= 0)
return E_FILE_FORMAT_INVALID;
} else if (id == libwebm::kMkvColour) {
- if (!Colour::Parse(pReader, pos, size, &colour))
+ Colour* colour = NULL;
+ if (!Colour::Parse(pReader, pos, size, &colour)) {
return E_FILE_FORMAT_INVALID;
+ } else {
+ colour_ptr.reset(colour);
+ }
} else if (id == libwebm::kMkvProjection) {
- if (!Projection::Parse(pReader, pos, size, &projection))
+ Projection* projection = NULL;
+ if (!Projection::Parse(pReader, pos, size, &projection)) {
return E_FILE_FORMAT_INVALID;
+ } else {
+ projection_ptr.reset(projection);
+ }
}
pos += size; // consume payload
@@ -5392,8 +5400,8 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info,
pTrack->m_display_unit = display_unit;
pTrack->m_stereo_mode = stereo_mode;
pTrack->m_rate = rate;
- pTrack->m_colour = colour;
- pTrack->m_projection = projection;
+ pTrack->m_colour = colour_ptr.release();
+ pTrack->m_projection = projection_ptr.release();
pResult = pTrack;
return 0; // success
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
int ppl = (int)(level + .5);
- const MODE_INFO *mode_info_context = cm->show_frame_mi;
+ const MODE_INFO *mode_info_context = cm->mi;
int mbr, mbc;
/* The pixel thresholds are adjusted according to if or not the macroblock
--- a/vp8/decoder/dboolhuff.h
+++ b/vp8/decoder/dboolhuff.h
@@ -76,7 +76,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
}
{
- register int shift = vp8_norm[range];
+ const unsigned char shift = vp8_norm[(unsigned char)range];
range <<= shift;
value <<= shift;
count -= shift;
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -97,7 +97,7 @@ static vpx_codec_err_t decoder_peek_si_internal(
const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si,
int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) {
int intra_only_flag = 0;
- uint8_t clear_buffer[10];
+ uint8_t clear_buffer[11];
if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM;
@@ -158,6 +158,9 @@ static vpx_codec_err_t decoder_peek_si_internal(
if (profile > PROFILE_0) {
if (!parse_bitdepth_colorspace_sampling(profile, &rb))
return VPX_CODEC_UNSUP_BITSTREAM;
+ // The colorspace info may cause vp9_read_frame_size() to need 11
+ // bytes.
+ if (data_sz < 11) return VPX_CODEC_UNSUP_BITSTREAM;
}
rb.bit_offset += REF_FRAMES; // refresh_frame_flags
vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
--- a/vpx_dsp/bitreader.h
+++ b/vpx_dsp/bitreader.h
@@ -94,7 +94,7 @@ static INLINE int vpx_read(vpx_reader *r, int prob) {
}
{
- register int shift = vpx_norm[range];
+ const unsigned char shift = vpx_norm[(unsigned char)range];
range <<= shift;
value <<= shift;
count -= shift;
--- a/vpx_dsp/bitreader_buffer.c
+++ b/vpx_dsp/bitreader_buffer.c
@@ -23,7 +23,7 @@ int vpx_rb_read_bit(struct vpx_read_bit_buffer *rb) {
rb->bit_offset = off + 1;
return bit;
} else {
- rb->error_handler(rb->error_handler_data);
+ if (rb->error_handler != NULL) rb->error_handler(rb->error_handler_data);
return 0;
}
}

View File

@ -0,0 +1,118 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit toolchain-funcs multilib-minimal
# To create a new testdata tarball:
# 1. Unpack source tarbll or checkout git tag
# 2. export LIBVPX_TEST_DATA_PATH=libvpx-testdata
# 3. configure --enable-unit-tests --enable-vp9-highbitdepth
# 4. make testdata
# 5. tar -cjf libvpx-testdata-${MY_PV}.tar.xz libvpx-testdata
LIBVPX_TESTDATA_VER=1.8.2
DESCRIPTION="WebM VP8 and VP9 Codec SDK"
HOMEPAGE="https://www.webmproject.org"
SRC_URI="https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
test? ( https://dev.gentoo.org/~whissi/dist/libvpx/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )"
LICENSE="BSD"
SLOT="0/6"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="doc +highbitdepth postproc static-libs svc test +threads"
REQUIRED_USE="test? ( threads )"
# Disable test phase when USE="-test"
RESTRICT="!test? ( test )"
BDEPEND="abi_x86_32? ( dev-lang/yasm )
abi_x86_64? ( dev-lang/yasm )
abi_x86_x32? ( dev-lang/yasm )
x86-fbsd? ( dev-lang/yasm )
amd64-fbsd? ( dev-lang/yasm )
doc? (
app-doc/doxygen
dev-lang/php
)
"
PATCHES=(
"${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
)
src_configure() {
# https://bugs.gentoo.org/show_bug.cgi?id=384585
# https://bugs.gentoo.org/show_bug.cgi?id=465988
# copied from php-pear-r1.eclass
addpredict /usr/share/snmp/mibs/.index #nowarn
addpredict /var/lib/net-snmp/ #nowarn
addpredict /var/lib/net-snmp/mib_indexes #nowarn
addpredict /session_mm_cli0.sem #nowarn
multilib-minimal_src_configure
}
multilib_src_configure() {
unset CODECS #357487
# #498364: sse doesn't work without sse2 enabled,
local myconfargs=(
--prefix="${EPREFIX}"/usr
--libdir="${EPREFIX}"/usr/$(get_libdir)
--enable-pic
--enable-vp8
--enable-vp9
--enable-shared
--extra-cflags="${CFLAGS}"
$(use_enable postproc)
$(use_enable svc experimental)
$(use_enable static-libs static)
$(use_enable test unit-tests)
$(use_enable threads multithread)
$(use_enable highbitdepth vp9-highbitdepth)
)
# let the build system decide which AS to use (it honours $AS but
# then feeds it with yasm flags without checking...) #345161
tc-export AS
case "${CHOST}" in
i?86*) export AS=yasm;;
x86_64*) export AS=yasm;;
esac
# powerpc toolchain is not recognized anymore, #694368
[[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu )
# Build with correct toolchain.
tc-export CC CXX AR NM
# Link with gcc by default, the build system should override this if needed.
export LD="${CC}"
if multilib_is_native_abi; then
myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) )
else
# not needed for multilib and will be overwritten anyway.
myconfargs+=( --disable-examples --disable-install-docs --disable-docs )
fi
echo "${S}"/configure "${myconfargs[@]}" >&2
"${S}"/configure "${myconfargs[@]}"
}
multilib_src_compile() {
# build verbose by default and do not build examples that will not be installed
emake verbose=yes GEN_EXAMPLES=
}
multilib_src_test() {
local -x LD_LIBRARY_PATH="${BUILD_DIR}"
local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata"
emake verbose=yes GEN_EXAMPLES= test
}
multilib_src_install() {
emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
multilib_is_native_abi && use doc && dodoc -r docs/html
}

Some files were not shown because too many files have changed in this diff Show More