Skip to content

deps: Add build recipe for GIF #4653

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hisergiorojas
Copy link
Contributor

Description

As requested in #4387.

Checklist:

  • [ x] I have read the contribution guidelines.
  • I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

@lgritz
Copy link
Collaborator

lgritz commented Mar 6, 2025

How did you test this and verify that it works?

@hisergiorojas
Copy link
Contributor Author

I'm still working on the pull request -

Here's what I'm currently doing to test and verify the CMake files:

  1. I've turned on the "ignore homebrew-installed dependencies" option in the CMakeLists.txt file.
  2. Then I'm building with these commands:
mkdir build
cd build
cmake .. -DOpenImageIO_BUILD_MISSING_DEPS=all

This makes CMake to build all dependencies locally instead of using system-installed versions.

@hisergiorojas
Copy link
Contributor Author

Screenshot 2025-03-05 at 11 00 27 PM

@hisergiorojas
Copy link
Contributor Author

Screenshot 2025-03-05 at 11 01 04 PM

@hisergiorojas
Copy link
Contributor Author

Another way to test and verify:

  1. To build oiiotool specifically, you can continue the build process with:

make -j8 # Adjust based on the number of CPU cores

  1. Once the build completes, you can verify GIF support by:

a. Converting an image to GIF format:
./bin/oiiotool path/to/some/image.jpg -o test_output.gif

b. You can also try to convert a GIF to another format to further verify that it's working:
./bin/oiiotool ~/Downloads/earth.gif -o earth.jpg

Comment on lines 27 to 29
PATCH_COMMAND
curl -L https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch -o Makefile.patch &&
patch -p0 < Makefile.patch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be bothered by the fact that the build_dependency_with_cmake function doesn't take a "PATCH_COMMAND" argument, and so this extra patch won't be applied?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, build_dependency_with_cmake doesn't take a URL or URL_HASH argument, and in fact the only kind of download it knows how to do is to clone a git repo? I just don't understand how the code as presented here can work.

Are you sure you aren't locally running and testing a version of this patch that is different from the one currently in this PR?

This hypothesis is also supported by the fact that the screenshots you attached have messages about FetchContent, which we do not call anywhere and also aren't mentioned in this patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just realized I forgot to push my latest change where I removed the build_dependency_with_cmake method since it only accepts a git repository

Copy link

linux-foundation-easycla bot commented Mar 27, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants