From ad3366e1d489b6796bd7385f35bcc19e0c8f4a43 Mon Sep 17 00:00:00 2001 From: Ken Cunningham Date: Sat, 29 Apr 2017 11:52:19 -0700 Subject: [PATCH] ImageMagick: add openmp variant Closes: https://trac.macports.org/ticket/54050 --- graphics/ImageMagick/Portfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/graphics/ImageMagick/Portfile b/graphics/ImageMagick/Portfile index 897893cd7b093..940c028737ad3 100644 --- a/graphics/ImageMagick/Portfile +++ b/graphics/ImageMagick/Portfile @@ -10,6 +10,7 @@ PortGroup conflicts_build 1.0 name ImageMagick version 6.9.8-4 +revision 1 set reasonable_version [lindex [split ${version} -] 0] homepage http://www.imagemagick.org/ categories graphics devel @@ -110,6 +111,7 @@ configure.args --enable-shared \ --without-rsvg \ --without-lqr \ --without-pango \ + --disable-openmp \ --without-x \ --with-gs-font-dir=${prefix}/share/fonts/urw-fonts @@ -120,6 +122,23 @@ test.env DYLD_LIBRARY_PATH=${worksrcpath}/magick/.libs # ImageMagick uses .la files at runtime to find its coder modules. destroot.delete_la_files no +variant openmp description {Enable OpenMP} { + configure.args-replace --disable-openmp --enable-openmp + + # Clang >3.8 supports OpenMP - support is best in newest clang versions + # leave older systems alone - they can't build new clangs, but get openmp via gcc + if {${os.platform} eq "darwin" && ${os.major} > 9} { + depends_lib-append port:libomp + compiler.whitelist macports-clang-3.9 macports-clang-4.0 + } + + notes-append " +Using ImageMagick with OpenMP can require specific tuning. \ +See the following page for an exhaustive list of the consequences of this feature: +https://www.imagemagick.org/script/architecture.php +" +} + variant graphviz description {Support Graphviz} { depends_lib-append path:bin/dot:graphviz configure.args-replace --without-gvc --with-gvc