Open
Conversation
Make --with-sys-gd detect and use public libgd APIs instead of private symbols from libwmf's bundled gd fork. Use gdImageSetClip for the system-gd clipping path, flatten public libgd truecolor rows for wmf_gd_image_pixels(), and link libwmf.la directly against the external libraries that bundled libgd used to provide transitively.
montj2
commented
Apr 23, 2026
|
|
||
| AM_LDFLAGS="$AM_LDFLAGS $WMF_PLOT_LDFLAGS $WMF_GD_LDFLAGS $WMF_FT_LDFLAGS $WMF_X_LDFLAGS $WMF_XML_LIBS" | ||
| AM_LDFLAGS="$AM_LDFLAGS $WMF_JPEG_LDFLAGS $WMF_PNG_LDFLAGS $WMF_Z_LDFLAGS $SYS_LIBM" | ||
| WMF_DEP_LIBS="$WMF_PLOT_LDFLAGS $WMF_GD_LDFLAGS $WMF_FT_LDFLAGS $WMF_X_LDFLAGS $WMF_XML_LIBS" |
Author
There was a problem hiding this comment.
This is needed because the bundled src/extra/gd/libgd.la used to pull several dependency libraries into the final link indirectly. When --with-sys-gd is used,
LIBGD becomes empty and that transitive link path disappears, so libwmf.la needs the same external dependency set explicitly.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes
--with-sys-gdwork with current libgd instead of silently fallingback to the embedded gd copy.
Changes:
gdImageSetClipAPI instead of the privategdClipSetAdd/gdft_draw_bitmapsymbolsHAVE_SYS_GDand switch the xgd clipping helpers to public libgd APIstpixelsrows but not libwmf's private contiguous
_tpixelsbacking storelibwmf.laagainst the external libraries that bundledlibgd.lausedto pull in transitively
Context:
Debian #635328
One behavioral note: public libgd only exposes a single clip rectangle, so the
system-gd path collapses multi-rectangle WMF clip regions to a bounding box.
That keeps the system-gd build working with the public API while preserving the
existing multi-rectangle behavior for the bundled fallback.
Validation on Debian unstable/arm64:
autoreconf -fiv./configure --with-sys-gdmake -j1 V=1make -j1 V=1 checkSupport for GD: sysPASS: check-examples.shA macOS build would also be useful here, given the earlier issue discussion
around macOS build problems.