Ticket #51310: Portfile

File Portfile, 7.4 KB (added by josephsacco, 18 months ago)

Portfile for ImageMagick-7

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