Ticket #51310: Portfile-drop-in-replacement

File Portfile-drop-in-replacement, 7.1 KB (added by joostdekeijzer (joost de keijzer), 17 months ago)

Drop-in replacement for /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/graphics/ImageMagick/Portfile to install ImageMagick v7.1 in stead of v6

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2
3PortSystem                  1.0
4PortGroup                   conflicts_build 1.0
5
6# Keep relevant lines in sync between ImageMagick and p5-perlmagick.
7
8# Before updating to a newer version, install phpNN-imagick. After updating, run `phpNN -v`. If the following warning appears, revbump php-imagick.
9# PHP Warning:  Version warning: Imagick was compiled against Image Magick version XXXX but version YYYY is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
10
11name                        ImageMagick
12version                     7.1.0-52
13revision                    0
14checksums                   rmd160  88ffdf7e53565df15411a75eccf1f7e482c27442 \
15                            sha256  49acbe467ae83488f65ce4fc023dd4d545ec52297e4d653b0f64683aaef30586 \
16                            size    10367308
17
18categories                  graphics devel
19maintainers                 {ryandesign @ryandesign}
20license                     Apache-2
21use_xz                      yes
22platforms                   darwin
23use_parallel_build          yes
24
25description                 Tools and libraries to manipulate images in many formats
26
27long_description            ImageMagick is a robust collection of tools and \
28                            libraries to create, edit and compose bitmap images \
29                            in a wide variety of formats. You can crop, resize, \
30                            rotate, sharpen, color reduce or add effects or text \
31                            or straight or curved lines to an image or image \
32                            sequence and save your completed work in the same or \
33                            differing image format. You can even create images \
34                            from scratch. Image processing operations are \
35                            available from the command line as well as through \
36                            C, Ch, C++, Java, Perl, PHP, Python, Ruby and Tcl/Tk \
37                            programming interfaces. Over 90 image formats are \
38                            supported, including GIF, JPEG, JPEG 2000, PNG, PDF, \
39                            PhotoCD and TIFF.
40
41homepage                    https://imagemagick.org
42master_sites                https://download.imagemagick.org/ImageMagick/download/releases/ \
43                            https://github.com/ImageMagick/ImageMagick \
44                            http://mirror.checkdomain.de/imagemagick/releases/ \
45                            ftp://ftp.u-aizu.ac.jp/pub/graphics/image/ImageMagick/imagemagick.org/releases/ \
46                            ftp://sunsite.icm.edu.pl/packages/ImageMagick/releases/
47
48depends_lib                 port:bzip2 \
49                            port:djvulibre \
50                            port:xz \
51                            port:jbigkit \
52                            path:include/turbojpeg.h:libjpeg-turbo \
53                            port:lcms2 \
54                            port:libpng \
55                            port:libraw \
56                            port:tiff \
57                            port:webp \
58                            port:zlib \
59                            port:fftw-3 \
60                            port:freetype \
61                            port:fontconfig \
62                            port:ghostscript \
63                            port:libiconv \
64                            port:libtool \
65                            port:openjpeg \
66                            port:openexr \
67                            port:expat \
68                            port:libxml2 \
69                            port:libheif
70
71# Magick-config etc. use pkg-config
72depends_lib-append          port:pkgconfig
73
74depends_run                 port:urw-fonts
75
76configure.ccache            no
77
78configure.args              --enable-shared \
79                            --enable-static \
80                            --disable-silent-rules \
81                            --with-frozenpaths \
82                            --with-openexr \
83                            --disable-hdri \
84                            --with-dps \
85                            --with-bzlib \
86                            --with-djvu \
87                            --with-fontconfig \
88                            --with-gslib \
89                            --with-jbig \
90                            --with-jpeg \
91                            --with-lcms \
92                            --with-openjp2 \
93                            --with-png \
94                            --with-tiff \
95                            --with-webp \
96                            --with-zlib \
97                            --with-modules \
98                            --with-xml \
99                            --with-heic \
100                            --without-gcc-arch \
101                            --without-perl \
102                            --without-fpx \
103                            --without-wmf \
104                            --without-gvc \
105                            --without-rsvg \
106                            --without-lqr \
107                            --without-pango \
108                            --without-x \
109                            --without-zstd \
110                            --with-gs-font-dir=${prefix}/share/fonts/urw-fonts \
111                            --disable-openmp
112
113if {${os.platform} eq "darwin" && ${os.major} < 11} {
114    configure.args-append   --disable-opencl
115} else {
116    configure.args-append   --disable-opencl
117    # On case-insensitive filesystems, ImageMagick finds cryptlib's libcl and
118    # tries to use it as if it were Apple's OpenCL, which fails; see #23354.
119    if {[file exists ${prefix}/lib/libCL.dylib]} {
120        conflicts_build         cryptlib
121    }
122}
123
124test.run                    yes
125test.target                 check
126test.env                    DYLD_LIBRARY_PATH=${worksrcpath}/magick/.libs
127
128# ImageMagick uses .la files at runtime to find its coder modules.
129destroot.delete_la_files    no
130
131variant graphviz description {Support Graphviz} {
132    depends_lib-append      path:bin/dot:graphviz
133    configure.args-replace  --without-gvc --with-gvc
134}
135
136variant lqr description {Support Liquid Rescale (experimental)} {
137    depends_lib-append      port:liblqr
138    configure.args-replace  --without-lqr --with-lqr
139}
140
141variant pango description {Support Pango} {
142    depends_lib-append      path:lib/pkgconfig/pango.pc:pango
143    configure.args-replace  --without-pango --with-pango
144}
145
146variant rsvg description {Support SVG using librsvg} {
147    depends_lib-append      path:lib/pkgconfig/librsvg-2.0.pc:librsvg
148    configure.args-replace  --without-rsvg --with-rsvg
149}
150
151variant wmf description {Support the Windows Metafile Format} {
152    depends_lib-append      port:libwmf
153    configure.args-replace  --without-wmf --with-wmf
154}
155
156variant x11 {
157    depends_lib-append      port:xorg-libX11 \
158                            port:xorg-libXext \
159                            port:xorg-libXt
160    configure.args-replace  --without-x --with-x
161}
162
163default_variants            +x11
164
165livecheck.type              regex
166livecheck.url               [lindex ${master_sites} 0]
167livecheck.regex             ${name}-(7(?:\\.\\d+)+(?:-\\d+)?)\.tar