Skip to content

Fix GH-14443: Cross-compiling with external GD library #14901

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

Draft
wants to merge 3 commits into
base: PHP-8.2
Choose a base branch
from

Conversation

petk
Copy link
Member

@petk petk commented Jul 10, 2024

This enables cross-compiling simplifications when using external GD library as requested in GH-14443 using cache variables:

  • php_cv_lib_gd_gdImageCreateFromPng
  • php_cv_lib_gd_gdImageCreateFromAvif
  • php_cv_lib_gd_gdImageCreateFromWebp
  • php_cv_lib_gd_gdImageCreateFromJpeg
  • php_cv_lib_gd_gdImageCreateFromXpm
  • php_cv_lib_gd_gdImageCreateFromBmp
  • php_cv_lib_gd_gdImageCreateFromTga

For example:

./configure --host=... --build=... --enable-gd --with-external-gd \
    php_cv_lib_gd_gdImageCreateFromPng=yes

Note that this has already been implemented in master branch (PHP-8.4-dev) and this one is targeting PHP-8.2.

This enables cross-compiling simplifications when using external GD
library as requested in phpGH-14443 using cache variables:

* php_cv_lib_gd_gdImageCreateFromPng
* php_cv_lib_gd_gdImageCreateFromAvif
* php_cv_lib_gd_gdImageCreateFromWebp
* php_cv_lib_gd_gdImageCreateFromJpeg
* php_cv_lib_gd_gdImageCreateFromXpm
* php_cv_lib_gd_gdImageCreateFromBmp
* php_cv_lib_gd_gdImageCreateFromTga

For example:

    ./configure --host=... --build=... --enable-gd --with-external-gd \
        php_cv_lib_gd_gdImageCreateFromPng=yes
@petk petk marked this pull request as draft July 10, 2024 17:29
@petk
Copy link
Member Author

petk commented Jul 10, 2024

I'll also adjust these help texts because they are not what they say at the moment. They are actually if the libgd is built with support for certain library...

@petk
Copy link
Member Author

petk commented Jul 10, 2024

I've just found that libgd uses pkg-config's Requires.private which can be an option to simplify the cross-compilation completely without using these cache variables but the macro will become a bit more complex...

cc @orlitzky I'll append one possible solution here.

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.

1 participant