From fb8561df5c5f34c1f3c10d6fd2053ffadeaac2ad Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 3 Aug 2021 11:40:16 -0700 Subject: [PATCH 1/5] Bump ImageMagick, build for experimental platforms --- I/ImageMagick/build_tarballs.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/I/ImageMagick/build_tarballs.jl b/I/ImageMagick/build_tarballs.jl index 446fc404841..115b579155e 100644 --- a/I/ImageMagick/build_tarballs.jl +++ b/I/ImageMagick/build_tarballs.jl @@ -2,12 +2,12 @@ # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder name = "ImageMagick" -version = v"6.9.10-12" +version = v"6.9.12-19" # Collection of sources required to build imagemagick sources = [ - ArchiveSource("https://github.com/ImageMagick/ImageMagick6/archive/6.9.10-12.tar.gz", - "efaae51489af9f895762bcb7090636f03194daaa026eda97dae230098d2ccec7"), + ArchiveSource("https://github.com/ImageMagick/ImageMagick6/archive/6.9.12-19.tar.gz", + "2f184f1f5c3e19849347b2b4acb6dd074290903d36fa5924956ee06c85ddf783"), ] # Bash recipe for building across all platforms @@ -20,7 +20,7 @@ make install # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = expand_cxxstring_abis(supported_platforms()) +platforms = expand_cxxstring_abis(supported_platforms(;experimental=true)) # The products that we will ensure are always built products = [ @@ -39,4 +39,4 @@ dependencies = [ ] # Build the tarballs, and possibly a `build.jl` as well. -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6") From 39c486249af7c3b38f8fda81648bdb51cf684302 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 3 Aug 2021 11:40:45 -0700 Subject: [PATCH 2/5] Bump `libtiff` version, as requested by comment --- I/ImageMagick/build_tarballs.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/I/ImageMagick/build_tarballs.jl b/I/ImageMagick/build_tarballs.jl index 115b579155e..b1ed8877865 100644 --- a/I/ImageMagick/build_tarballs.jl +++ b/I/ImageMagick/build_tarballs.jl @@ -34,8 +34,7 @@ dependencies = [ Dependency("Zlib_jll"), Dependency("libpng_jll"), Dependency("JpegTurbo_jll"), - # TODO: v4.3.0 is available, use that next time - Dependency("Libtiff_jll"; compat="4.1.0"), + Dependency("Libtiff_jll"; compat="4.3.0"), ] # Build the tarballs, and possibly a `build.jl` as well. From 26afe07f8b00b027d68570fb22679a825cfc4659 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 3 Aug 2021 11:45:25 -0700 Subject: [PATCH 3/5] Update build_tarballs.jl --- I/ImageMagick/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/I/ImageMagick/build_tarballs.jl b/I/ImageMagick/build_tarballs.jl index b1ed8877865..0318a6f0ca9 100644 --- a/I/ImageMagick/build_tarballs.jl +++ b/I/ImageMagick/build_tarballs.jl @@ -2,7 +2,7 @@ # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder name = "ImageMagick" -version = v"6.9.12-19" +version = v"6.9.12" # Collection of sources required to build imagemagick sources = [ From f3850e77e09444ef681dd26b05231dca78c1cd6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 22 Aug 2021 01:38:18 +0100 Subject: [PATCH 4/5] [ImageMagick] Link some utilities to librt because of `clock_gettime` --- I/ImageMagick/build_tarballs.jl | 23 +++++++-- .../bundled/patches/utilities-link-rt.patch | 51 +++++++++++++++++++ 2 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 I/ImageMagick/bundled/patches/utilities-link-rt.patch diff --git a/I/ImageMagick/build_tarballs.jl b/I/ImageMagick/build_tarballs.jl index 0318a6f0ca9..45046a918de 100644 --- a/I/ImageMagick/build_tarballs.jl +++ b/I/ImageMagick/build_tarballs.jl @@ -2,18 +2,33 @@ # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder name = "ImageMagick" -version = v"6.9.12" +upstream_version = v"6.9.12-19" +version = VersionNumber(upstream_version.major, upstream_version.minor, upstream_version.patch) # Collection of sources required to build imagemagick sources = [ - ArchiveSource("https://github.com/ImageMagick/ImageMagick6/archive/6.9.12-19.tar.gz", - "2f184f1f5c3e19849347b2b4acb6dd074290903d36fa5924956ee06c85ddf783"), + ArchiveSource("https://github.com/ImageMagick/ImageMagick6/archive/$(upstream_version).tar.gz", + "2f184f1f5c3e19849347b2b4acb6dd074290903d36fa5924956ee06c85ddf783"), + DirectorySource("./bundled"), ] # Bash recipe for building across all platforms script = raw""" cd $WORKSPACE/srcdir/ImageMagick6*/ -./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --without-x --disable-openmp --disable-installed --disable-dependency-tracking --without-frozenpaths --without-perl --disable-docs --disable-static +if [[ "${target}" == *-linux-gnu ]]; then + atomic_patch -p1 ../patches/utilities-link-rt.patch +fi +./configure --prefix=${prefix} \ + --build=${MACHTYPE} \ + --host=${target} \ + --without-x \ + --disable-openmp \ + --disable-installed \ + --disable-dependency-tracking \ + --without-frozenpaths \ + --without-perl \ + --disable-docs \ + --disable-static make -j${nproc} make install """ diff --git a/I/ImageMagick/bundled/patches/utilities-link-rt.patch b/I/ImageMagick/bundled/patches/utilities-link-rt.patch new file mode 100644 index 00000000000..ab49e07803e --- /dev/null +++ b/I/ImageMagick/bundled/patches/utilities-link-rt.patch @@ -0,0 +1,51 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -5471,37 +5471,37 @@ + $(UTILITIES_TTF_XFAIL_TESTS) \ + $(UTILITIES_XML_XFAIL_TESTS) + +-utilities_animate_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_animate_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_animate_LDFLAGS = $(LDFLAGS) + utilities_animate_SOURCES = utilities/animate.c +-utilities_compare_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_compare_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_compare_LDFLAGS = $(LDFLAGS) + utilities_compare_SOURCES = utilities/compare.c +-utilities_composite_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_composite_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_composite_LDFLAGS = $(LDFLAGS) + utilities_composite_SOURCES = utilities/composite.c +-utilities_conjure_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_conjure_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_conjure_LDFLAGS = $(LDFLAGS) + utilities_conjure_SOURCES = utilities/conjure.c +-utilities_convert_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_convert_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_convert_LDFLAGS = $(LDFLAGS) + utilities_convert_SOURCES = utilities/convert.c +-utilities_display_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_display_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_display_LDFLAGS = $(LDFLAGS) + utilities_display_SOURCES = utilities/display.c +-utilities_identify_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_identify_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_identify_LDFLAGS = $(LDFLAGS) + utilities_identify_SOURCES = utilities/identify.c +-utilities_import_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_import_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_import_LDFLAGS = $(LDFLAGS) + utilities_import_SOURCES = utilities/import.c +-utilities_mogrify_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_mogrify_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_mogrify_LDFLAGS = $(LDFLAGS) + utilities_mogrify_SOURCES = utilities/mogrify.c +-utilities_montage_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_montage_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_montage_LDFLAGS = $(LDFLAGS) + utilities_montage_SOURCES = utilities/montage.c +-utilities_stream_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) ++utilities_stream_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) -lrt + utilities_stream_LDFLAGS = $(LDFLAGS) + utilities_stream_SOURCES = utilities/stream.c + UTILITIES_MANS = \ From 3fcd22e97ab928555a3bd277e2b397c4ab0a5d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 22 Aug 2021 02:30:36 +0100 Subject: [PATCH 5/5] [ImageMagick] Add more patches for Windows --- I/ImageMagick/build_tarballs.jl | 4 ++++ .../bundled/patches/check-have-clock-realtime.patch | 11 +++++++++++ ...ndows-undefined-reference-__imp_WSAStartup.patch | 13 +++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 I/ImageMagick/bundled/patches/check-have-clock-realtime.patch create mode 100644 I/ImageMagick/bundled/patches/windows-undefined-reference-__imp_WSAStartup.patch diff --git a/I/ImageMagick/build_tarballs.jl b/I/ImageMagick/build_tarballs.jl index 45046a918de..9c68fb3b249 100644 --- a/I/ImageMagick/build_tarballs.jl +++ b/I/ImageMagick/build_tarballs.jl @@ -17,7 +17,11 @@ script = raw""" cd $WORKSPACE/srcdir/ImageMagick6*/ if [[ "${target}" == *-linux-gnu ]]; then atomic_patch -p1 ../patches/utilities-link-rt.patch +elif [[ "${target}" == *-mingw* ]]; then + # Link to ws2_32 to fix undefined reference to `__imp_WSAStartup`. + atomic_patch -p1 ../patches/windows-undefined-reference-__imp_WSAStartup.patch fi +atomic_patch -p1 ../patches/check-have-clock-realtime.patch ./configure --prefix=${prefix} \ --build=${MACHTYPE} \ --host=${target} \ diff --git a/I/ImageMagick/bundled/patches/check-have-clock-realtime.patch b/I/ImageMagick/bundled/patches/check-have-clock-realtime.patch new file mode 100644 index 00000000000..5829cbc2f34 --- /dev/null +++ b/I/ImageMagick/bundled/patches/check-have-clock-realtime.patch @@ -0,0 +1,11 @@ +--- a/magick/timer.c ++++ b/magick/timer.c +@@ -191,7 +191,7 @@ + */ + static double ElapsedTime(void) + { +-#if defined(MAGICKCORE_HAVE_CLOCK_GETTIME) ++#if defined(MAGICKCORE_HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_REALTIME) + #define NANOSECONDS_PER_SECOND 1000000000.0 + #if defined(CLOCK_HIGHRES) + # define CLOCK_ID CLOCK_HIGHRES diff --git a/I/ImageMagick/bundled/patches/windows-undefined-reference-__imp_WSAStartup.patch b/I/ImageMagick/bundled/patches/windows-undefined-reference-__imp_WSAStartup.patch new file mode 100644 index 00000000000..d1d777396e4 --- /dev/null +++ b/I/ImageMagick/bundled/patches/windows-undefined-reference-__imp_WSAStartup.patch @@ -0,0 +1,13 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -4663,8 +4663,8 @@ + MAGICKCORE_LIBS = magick/libMagickCore-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.la + @WITH_MODULES_FALSE@magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES = $(MAGICK_BASE_SRCS) $(MAGICK_PLATFORM_SRCS) $(MAGICK_CODER_SRCS) $(MAGICK_FILTER_SRCS) + @WITH_MODULES_TRUE@magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES = $(MAGICK_BASE_SRCS) $(MAGICK_PLATFORM_SRCS) +-@WITH_MODULES_FALSE@magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LIBADD = $(MAGICK_DEP_LIBS) +-@WITH_MODULES_TRUE@magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LIBADD = $(MAGICK_DEP_LIBS) ++@WITH_MODULES_FALSE@magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LIBADD = $(MAGICK_DEP_LIBS) -lws2_32 ++@WITH_MODULES_TRUE@magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LIBADD = $(MAGICK_DEP_LIBS) -lws2_32 + nodist_magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES = \ + $(am__append_1) + magick_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBRARY_EXTRA_CPPFLAGS)