Created
December 12, 2021 12:51
-
-
Save PetrP/7310f2b6bbf25be87f3f04d866104e66 to your computer and use it in GitHub Desktop.
php70-aur-patches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/1011-Accommodate-changes-to-canonicalized-forms-in-ICU-70_1.patch b/1011-Accommodate-changes-to-canonicalized-forms-in-ICU-70_1.patch | |
new file mode 100644 | |
index 0000000..fc5ab7d | |
--- /dev/null | |
+++ b/1011-Accommodate-changes-to-canonicalized-forms-in-ICU-70_1.patch | |
@@ -0,0 +1,53 @@ | |
+From cd1447a6962496fca60a2f5e5d9cf4448575cc24 Mon Sep 17 00:00:00 2001 | |
+From: Ben Ramsey <[email protected]> | |
+Date: Tue, 19 Oct 2021 23:59:11 -0500 | |
+Subject: [PATCH 1/4] Change UBool to bool for equality operators in ICU >= | |
+ 70.1 | |
+ | |
+Refer to: | |
+- https://github.com/unicode-org/icu/commit/633438f8da99fee815e2c61626ea779a84567a3d | |
+- https://github.com/unicode-org/icu/commit/f6325d49ba57ec26f320b2865ce09ca47db458d9 | |
+--- | |
+ ext/intl/breakiterator/codepointiterator_internal.cpp | 4 ++++ | |
+ ext/intl/breakiterator/codepointiterator_internal.h | 4 ++++ | |
+ 2 files changed, 8 insertions(+) | |
+ | |
+--- a/ext/intl/breakiterator/codepointiterator_internal.cpp | |
++++ b/ext/intl/breakiterator/codepointiterator_internal.cpp | |
+@@ -75,7 +75,11 @@ CodePointBreakIterator::~CodePointBreakI | |
+ clearCurrentCharIter(); | |
+ } | |
+ | |
++#if U_ICU_VERSION_MAJOR_NUM >= 70 | |
++bool CodePointBreakIterator::operator==(const BreakIterator& that) const | |
++#else | |
+ UBool CodePointBreakIterator::operator==(const BreakIterator& that) const | |
++#endif | |
+ { | |
+ if (typeid(*this) != typeid(that)) { | |
+ return FALSE; | |
+--- a/ext/intl/breakiterator/codepointiterator_internal.h | |
++++ b/ext/intl/breakiterator/codepointiterator_internal.h | |
+@@ -39,7 +39,11 @@ namespace PHP { | |
+ | |
+ virtual ~CodePointBreakIterator(); | |
+ | |
++#if U_ICU_VERSION_MAJOR_NUM >= 70 | |
++ virtual bool operator==(const BreakIterator& that) const; | |
++#else | |
+ virtual UBool operator==(const BreakIterator& that) const; | |
++#endif | |
+ | |
+ virtual CodePointBreakIterator* clone(void) const; | |
+ | |
+--- a/ext/intl/locale/locale_methods.c | |
++++ b/ext/intl/locale/locale_methods.c | |
+@@ -1326,7 +1326,7 @@ PHP_FUNCTION(locale_filter_matches) | |
+ if( token && (token==cur_lang_tag) ){ | |
+ /* check if the char. after match is SEPARATOR */ | |
+ chrcheck = token + (strlen(cur_loc_range)); | |
+- if( isIDSeparator(*chrcheck) || isEndOfTag(*chrcheck) ){ | |
++ if( isIDSeparator(*chrcheck) || isKeywordSeparator(*chrcheck) || isEndOfTag(*chrcheck) ){ | |
+ if( cur_lang_tag){ | |
+ efree( cur_lang_tag ); | |
+ } | |
diff --git a/PKGBUILD b/PKGBUILD | |
index b9e0bfa..3409d89 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -57,6 +57,7 @@ source=( | |
'php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch' | |
'php-icu-1101-Simplify-namespace-access.patch' | |
'php-gd.patch' | |
+ '1011-Accommodate-changes-to-canonicalized-forms-in-ICU-70_1.patch' | |
) | |
sha512sums=( | |
'9298e185702ea801e9243671ecb0b781c2b04181a2f9fd6490bc14897a333a2c0cc88fe27b0c69c6dd0079629a71c330ed1aa337f48cac6cbd624addb8855500' | |
@@ -71,6 +72,7 @@ sha512sums=( | |
'70c859feff58650ff4a291b1725bce8f290ac6d92cacc4420d3ead5cbbdbcf567cd0ed4d79fdd8b0435cf6833f7b50fff798b2fae274c5fb1bb37a0984a45f9d' | |
'33d40f3ae500cf583519ecfa271e36d727c38ff4ea9547d3d2c4d51c9fadd317ed614a048077ebdb116e3c84c11db95e6455cdfc80d092d217d070c98af56525' | |
'f9e4e5c2604cc35fdfe324fd15f9258cc46e8aa2d909e7ecb7ef35418b08fc16b7037ba586ed72469bcbb2898b6fae35907e8d0dc009764c9907e453235117f8' | |
+ 'ec9ac7e74f77006923b346b93bae53f5c43d668a0aa792c8628b6474201e81bf9ec49f9ae6a87ea78c469c3956d020df8026a8559d6b6c3dd93be3d9da15586c' | |
) | |
validpgpkeys=( | |
@@ -104,6 +106,7 @@ prepare() { | |
patch -p1 -i ../php-icu-1101-Simplify-namespace-access.patch | |
patch -p1 -i ../php-gd.patch | |
patch -p0 -i ../php.ini.patch | |
+ patch -p1 -i ${srcdir}/1011-Accommodate-changes-to-canonicalized-forms-in-ICU-70_1.patch | |
} | |
build() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 06d776e99e5192c4284f1c51061325a6efbcaa71 Mon Sep 17 00:00:00 2001 | |
From: Mihamina <[email protected]> | |
Date: Thu, 30 Sep 2021 23:26:36 +0300 | |
Subject: [PATCH] Get php 7.0 to build | |
--- | |
.gitignore | 5 +++++ | |
PKGBUILD | 11 +++++++--- | |
php-gd.patch | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
3 files changed, 73 insertions(+), 3 deletions(-) | |
create mode 100644 .gitignore | |
create mode 100644 php-gd.patch | |
diff --git a/.gitignore b/.gitignore | |
new file mode 100644 | |
index 0000000..3a79ecd | |
--- /dev/null | |
+++ b/.gitignore | |
@@ -0,0 +1,5 @@ | |
+/*.tar.xz | |
+/*.tar.xz.asc | |
+/*.tar.zst | |
+/pkg/ | |
+/src/ | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 6c1497c..b9e0bfa 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -56,6 +56,7 @@ source=( | |
'php.ini.patch' | |
'php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch' | |
'php-icu-1101-Simplify-namespace-access.patch' | |
+ 'php-gd.patch' | |
) | |
sha512sums=( | |
'9298e185702ea801e9243671ecb0b781c2b04181a2f9fd6490bc14897a333a2c0cc88fe27b0c69c6dd0079629a71c330ed1aa337f48cac6cbd624addb8855500' | |
@@ -69,6 +70,7 @@ sha512sums=( | |
'a98bba8d648853d653946c7a379ef62760282d8856fc1f79f84d66ac3c2082ef62c2fc0ed6a6762b50560ac60168fcdf946536a99131d397e89e906ee855419c' | |
'70c859feff58650ff4a291b1725bce8f290ac6d92cacc4420d3ead5cbbdbcf567cd0ed4d79fdd8b0435cf6833f7b50fff798b2fae274c5fb1bb37a0984a45f9d' | |
'33d40f3ae500cf583519ecfa271e36d727c38ff4ea9547d3d2c4d51c9fadd317ed614a048077ebdb116e3c84c11db95e6455cdfc80d092d217d070c98af56525' | |
+ 'f9e4e5c2604cc35fdfe324fd15f9258cc46e8aa2d909e7ecb7ef35418b08fc16b7037ba586ed72469bcbb2898b6fae35907e8d0dc009764c9907e453235117f8' | |
) | |
validpgpkeys=( | |
@@ -100,10 +102,13 @@ prepare() { | |
patch -p0 -i ../php-fpm.patch | |
patch -p1 -i ../php-icu-1100-Utilize-the-recommended-way-to-handle-the-icu-namespace.patch | |
patch -p1 -i ../php-icu-1101-Simplify-namespace-access.patch | |
+ patch -p1 -i ../php-gd.patch | |
patch -p0 -i ../php.ini.patch | |
} | |
build() { | |
+ export CC="gcc -DTRUE=1 -DFALSE=0" | |
+ export CXX="g++ -DTRUE=1 -DFALSE=0" | |
local phpConfig="\ | |
--srcdir=../${_pkgbase}-${pkgver} \ | |
--config-cache \ | |
@@ -203,7 +208,7 @@ build() { | |
./configure ${phpConfig} \ | |
--with-apxs2 \ | |
${phpExtensions} | |
- make | |
+ make -j4 | |
cd ../ | |
# phpdbg | |
@@ -212,7 +217,7 @@ build() { | |
./configure ${phpConfig} \ | |
--enable-phpdbg \ | |
${phpExtensions} | |
- make | |
+ make -j4 | |
} | |
check() { | |
@@ -236,7 +241,7 @@ package_php70() { | |
backup=("etc/${pkgbase}/php.ini") | |
cd build | |
- make -j1 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd} | |
+ make -j4 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd} | |
install -D -m644 ../${_pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/${pkgbase}/php.ini | |
install -d -m755 ${pkgdir}/etc/${pkgbase}/conf.d/ | |
diff --git a/php-gd.patch b/php-gd.patch | |
new file mode 100644 | |
index 0000000..0fcf3c9 | |
--- /dev/null | |
+++ b/php-gd.patch | |
@@ -0,0 +1,60 @@ | |
+From 998df194133501a6904633e43b12f8cac849e583 Mon Sep 17 00:00:00 2001 | |
+From: Mihamina <[email protected]> | |
+Date: Thu, 30 Sep 2021 22:57:28 +0300 | |
+Subject: [PATCH] php gd | |
+ | |
+--- | |
+ ext/gd/gd.c | 17 ++++++++++------- | |
+ 1 file changed, 10 insertions(+), 7 deletions(-) | |
+ | |
+diff --git a/ext/gd/gd.c b/ext/gd/gd.c | |
+index c0829fb3..198924b1 100644 | |
+--- a/ext/gd/gd.c | |
++++ b/ext/gd/gd.c | |
+@@ -86,7 +86,10 @@ static int le_gd, le_gd_font; | |
+ #ifndef M_PI | |
+ #define M_PI 3.14159265358979323846 | |
+ #endif | |
+- | |
++/* don't used libgd constants, not used, so going to be removed */ | |
++#define PHP_GD_FLIP_HORIZONTAL 1 | |
++#define PHP_GD_FLIP_VERTICAL 2 | |
++#define PHP_GD_FLIP_BOTH 3 | |
+ #ifdef ENABLE_GD_TTF | |
+ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int, int); | |
+ #endif | |
+@@ -1084,9 +1087,9 @@ PHP_MINIT_FUNCTION(gd) | |
+ /* GD2 image format types */ | |
+ REGISTER_LONG_CONSTANT("IMG_GD2_RAW", GD2_FMT_RAW, CONST_CS | CONST_PERSISTENT); | |
+ REGISTER_LONG_CONSTANT("IMG_GD2_COMPRESSED", GD2_FMT_COMPRESSED, CONST_CS | CONST_PERSISTENT); | |
+- REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT); | |
+- REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT); | |
+- REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT); | |
++ REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", PHP_GD_FLIP_HORIZONTAL, CONST_CS | CONST_PERSISTENT); | |
++ REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", PHP_GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT); | |
++ REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", PHP_GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT); | |
+ REGISTER_LONG_CONSTANT("IMG_EFFECT_REPLACE", gdEffectReplace, CONST_CS | CONST_PERSISTENT); | |
+ REGISTER_LONG_CONSTANT("IMG_EFFECT_ALPHABLEND", gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT); | |
+ REGISTER_LONG_CONSTANT("IMG_EFFECT_NORMAL", gdEffectNormal, CONST_CS | CONST_PERSISTENT); | |
+@@ -4539,15 +4542,15 @@ PHP_FUNCTION(imageflip) | |
+ } | |
+ | |
+ switch (mode) { | |
+- case GD_FLIP_VERTICAL: | |
++ case PHP_GD_FLIP_VERTICAL: | |
+ gdImageFlipVertical(im); | |
+ break; | |
+ | |
+- case GD_FLIP_HORINZONTAL: | |
++ case PHP_GD_FLIP_HORIZONTAL: | |
+ gdImageFlipHorizontal(im); | |
+ break; | |
+ | |
+- case GD_FLIP_BOTH: | |
++ case PHP_GD_FLIP_BOTH: | |
+ gdImageFlipBoth(im); | |
+ break; | |
+ | |
+-- | |
+2.33.0 | |
+ | |
-- | |
2.32.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment