Skip to content

Update gd extension preprocessor macros help texts #15296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

petk
Copy link
Member

@petk petk commented Aug 8, 2024

PHP_GD_CHECK_FORMAT macro 2nd argument is changed from automatic AC_DEFINE_UNQUOTED to manual action for easier usage.

PHP_GD_CHECK_FORMAT macro 2nd argument is changed from automatic
AC_DEFINE_UNQUOTED to manual action for easier usage.
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks good to me, but maybe @devnexen likes to double-check.

Comment on lines +213 to +215
[AC_DEFINE([HAVE_GD_GET_INTERPOLATION], [1],
[Define to 1 if GD library has the 'gdImageGetInterpolationMethod'
function.])],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. gdImageGetInterpolationMethod() is available as of libgd 2.1.1; do we still support such old versions?

However, not really related to this PR; just mentioning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be merged as is however centos 8 libgd version is 2.2.5. can be addressed in another PR eventually.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm all in favor of bumping the libgd minimum version however issue is that bundled libgd is of version ~2.0.35. Probably adjusted already to a partially newer version. But it doesn't have the gdImageGetInterpolationMethod as an exported function yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bundled libgd is of version ~2.0.35

Yeah, that is bad. There is special support for this, so it claims to be 2.1.0 compatible, but that is also wrong. In fact it is closer to 2.2 or likely even 2.3, although it is certainly not fully compatible with any system libgd. Long time ago I suggested to update the bundled GD version numbers/string, but that was rejected because the goal was to drop bundled GD – but that still didn't happen.

Anyway, we can resolve this in another PR, and just ignore this for this PR.

AC_DEFINE('HAVE_XPM', 1, "Define to 1 if you have the xpm library.");
AC_DEFINE('HAVE_GD_XPM', 1, "Define to 1 if gd extension has XPM support.");
AC_DEFINE('HAVE_LIBFREETYPE', 1, "Define to 1 if you have the FreeType library.");
AC_DEFINE('HAVE_GD_FREETYPE', 1, "Define to 1 if gd extension has FreeType support.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I thought that the bundled libgd also has JIT-mapped Japanese font support on Windows, but apparently not. For better compatibility with system libgd, we may consider to add that; on the other hand, this is a feature which always looked somewhat arbitrary to me – why not have that for other character encodings, too. Or maybe better, why not leave converting to UTF-8 up to users?

Anyhow, again unrelated to the PR at hand.

@petk petk merged commit 72fb00b into php:master Aug 9, 2024
2 checks passed
@petk petk deleted the patch-AC_DEFINE-gd branch August 9, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants