So, I found a few extra minutes today.
It's not actually libgd that needs to be customized, but the installation of the GD library: I had to manually configure the Makefile.PL options, and I had to tweak the Makefile.PL, because I couldn't figure out how to disable HAVE_GD2 option from the command-line, and it would auto-use that, causing a test failure.
Using cpanm as my client, I followed the following procedure:
- cpanm --uninstall GD
this will make sure your old setup of GD is removed first
- cpanm --look GD
gets into a directory where you can do the manual build
- perl Makefile.PL
it will ask to confirm libgd location; it should be right, if you're in strawberry, so you can just hit ENTER. Copy the at the "Included Features" line, and strip out all the GD_ prefixes; add in GIFANIM right after GIF in the list.
- edit Makefile.PL
comment out the $DEFINES .= ' -DHAVE_GD2' if $HAVE_GD2; line (there might be a way to force that from options, but I didn't have a chance to experiment with that)
- perl Makefile.PL --options="GIF GIFANIM OPENPOLYGON ZLIB PNG FREETYPE FONTCONFIG JPEG XPM TIFF WEBP AVIF HEIF UNCLOSEDPOLY FTCIRCLE VERSION_33 WINDOWS_BMP"
where the options are the SPACE-separated list that you got from the earlier step (this is just my example)
- gmake test
this runs the test; it should pass. (If you don't disable the HAVE_GD2, it will fail the GD.t test)
- gmake install
this installs it
- exit
this gets out of the cpanm --look environment
- perl -MGD -le "print for GD::LIBGD_VERSION, GD::VERSION_STRING"
this should show 2.0303 and 2.3.3
- perldoc GD::Image
this should list that includes formats like PNG, JPEG, GIF, and GifAnim. It should exclude GD and GD2.
At this point, I can successfully run one of my scripts that creates an animated GIF, whereas I couldn't earlier today.