Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Menu
Projects
Groups
Snippets
Get a free trial
Sign up
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
Widya Walesa
php7-SlackBuild
Commits
af946310
Commit
af946310
authored
Sep 19, 2021
by
Widya Walesa
Browse files
Patch to fix building using gd 2.3.3.
Signed-off-by:
Widya Walesa
<
walecha99@gmail.com
>
parent
f914c7a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
php/php-7.4.23-Dont-rely-on-libgd-unused-constants.patch
0 → 100644
View file @
af946310
--- a/ext/gd/gd.c 2021-08-24 23:33:32.000000000 +0700
+++ b/ext/gd/gd.c 2021-09-19 12:06:28.850375327 +0700
@@ -91,6 +91,11 @@
#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 HAVE_GD_FREETYPE
static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int, int);
#endif
@@ -1137,9 +1142,9 @@
/* 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);
@@ -4696,20 +4701,20 @@
}
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;
default:
- php_error_docref(NULL, E_WARNING, "Unknown flip mode");
+ php_error_docref(NULL, E_WARNING, "must be one of IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
RETURN_FALSE;
}
php/php.SlackBuild
View file @
af946310
...
...
@@ -164,6 +164,9 @@ cat $CWD/php.enchant-2.patch | patch -p1 --verbose || exit 1
export
ENCHANT_CFLAGS
=
"-I/usr/include/enchant-2"
export
ENCHANT_LIBS
=
"-lenchant-2"
# Build error with gd 2.3.3 because of typo of constant name in libgd 2.3.0.
cat
$CWD
/php-7.4.23-Dont-rely-on-libgd-unused-constants.patch | patch
-p1
--verbose
||
exit
1
# Install the build folder into /usr/lib$LIBDIRSUFFIX/php/build
# and adapt phpize accordingly:
sed
-i
"s|build
$|
php/build|"
scripts/Makefile.frag
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment