error in meson build when using custom libpng build
lucebac <[email protected]> Fri, 3 Oct 2025 19:25:17 +0200
| Newsgroups | gmane.comp.fonts.freetype.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------FbxEptA0blr2v2mM926NWGsz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello team, I've found myself in a situation where I was unable to build freetype using meson. The issue seems to be that I was using a variant of libpng locally built with CMake. As it turns out, with the current build script meson expects certain files to be named libpngconfig.cmake for example but libpng installs them as pngconfig.cmake. Meson is hence not able to recognize them and falls back to the subproject wrap file which doesn't have that issue. However, this does not work for me because I forbid downloading additional packages. To fix this, I changed the meson build file to include a fallback 'png' library name in addition to the existing 'libpng' (new feature as of meson v0.60.0). With that, I was successfully able to build freetype. I'd like to contribute my fix to freetype, please find a patch file attached. If you have any question regarding my patch and/or the problem I'm trying to address, please let me know. Regards lucebac --------------FbxEptA0blr2v2mM926NWGsz Content-Type: text/plain; charset=UTF-8; name="fix_png_dep.diff" Content-Disposition: attachment; filename="fix_png_dep.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL21lc29uLmJ1aWxkIGIvbWVzb24uYnVpbGQKaW5kZXggMDkzODJmYmVm Li4xZmI3MmYxODggMTAwNjQ0Ci0tLSBhL21lc29uLmJ1aWxkCisrKyBiL21lc29uLmJ1aWxk CkBAIC0yNCw3ICsyNCw3IEBACiAjCiAKIHByb2plY3QoJ2ZyZWV0eXBlMicsICdjJywKLSAg bWVzb25fdmVyc2lvbjogJz49IDAuNTUuMCcsCisgIG1lc29uX3ZlcnNpb246ICc+PSAwLjYw LjAnLAogICB2ZXJzaW9uOiBydW5fY29tbWFuZCgnYnVpbGRzL21lc29uL2V4dHJhY3RfZnJl ZXR5cGVfdmVyc2lvbi5weScsCiAgICAgICAgICAgICAgICAgICAgICAgICdpbmNsdWRlL2Zy ZWV0eXBlL2ZyZWV0eXBlLmgnLAogICAgICAgICAgICAgICAgICAgICAgICBjaGVjazogdHJ1 ZSkuc3Rkb3V0KCkuc3RyaXAoKSwKQEAgLTMzOSw3ICszMzksNyBAQCBpZiBiemlwMl9kZXAu Zm91bmQoKQogZW5kaWYKIAogIyBQTkcgc3VwcG9ydC4KLWxpYnBuZ19kZXAgPSBkZXBlbmRl bmN5KCdsaWJwbmcnLAorbGlicG5nX2RlcCA9IGRlcGVuZGVuY3koJ2xpYnBuZycsICdwbmcn LAogICByZXF1aXJlZDogZ2V0X29wdGlvbigncG5nJyksCiAgIGZhbGxiYWNrOiAnbGlicG5n JykKIAo= --------------FbxEptA0blr2v2mM926NWGsz--