As discussed in the comment in this commit, we hard code the options the
Homebrew libgd package is built with.¹ It seems not possible to build a libgd
without GIF support, so perhaps the `HAVE_GD_GIF` logic in the Graphviz code
base could be simplified in future.
Gitlab: #1786
¹ https://github.com/Homebrew/homebrew-core/blob/
1a7c405f0e4da91c378d1ebb73ee0d90b2775d32/Formula/gd.rb#L27-L48
assert shutil.which(tool) is None, f"{tool} has been resurrected in the " \
f'{os.getenv("build_system")} build on {os_id}. Please remove skip.'
-@pytest.mark.xfail(is_cmake() and not is_centos(),
+@pytest.mark.xfail(is_cmake() and not is_centos()
+ and not platform.system() == "Darwin",
reason="png:gd unavailable when built with CMake",
strict=True) # FIXME
def test_1786():
set(HAVE_GD_GIF 1)
endif()
else()
- message(WARNING "gdlib-config not found; skipping feature checks")
+ if(APPLE)
+ # At time of writing, Macports does not package libgd. So assume the user
+ # obtained this through Homebrew and hard code the options the Homebrew
+ # package enables.
+ set(HAVE_GD_PNG 1)
+ set(HAVE_GD_JPEG 1)
+ set(HAVE_GD_FONTCONFIG 1)
+ set(HAVE_GD_FREETYPE 1)
+ set(HAVE_GD_GIF 1)
+ else()
+ message(WARNING "gdlib-config not found; skipping feature checks")
+ endif()
endif()
endif()