Patch 2 was added in February 2019 with the GIT commit "gif rework"
9afc3844e37c6db23435d5d0c33129dcc81061e4 and per the Release Notes:

Gif native capability has been completely upgraded to allow for reading and writing the gif format
in singles, sequences or lists. As a side effect of this effort all of the other sequences have had the
letter “s” added at the end of the extension filename automatically generated on a render.

It must be needed, but why did it work with giflib 5.2.1 but not 5.2.2 for termux? I don't know -- I still think I must have done something wrong with the patch and will check again anyway.

On Wed, Sep 4, 2024 at 11:38 AM Andrew Randrianasulu <randrianasulu@gmail.com> wrote:
due to giflib-5.2.2.patch2

I removed patch and build is ok. Not sure where this  patch was needed, may be on older distros?

I also tried to "set -e" before building cingg and get build breaking error somewhere in x265 dir, as reported already.

but for me default (seen with "set -o" ) errexit=off, you can set it off for specific build by executing  "set  +e" before building cingg.