-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
192 lines (166 loc) · 7.07 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# -*- 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
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
PortGroup cmake 1.1
PortGroup boost 1.0
name inkscape-devel
conflicts inkscape
set my_name inkscape
set ver_num 1.3.2
set ver_date 2023-11-25
set ver_hash 091e20ef0f
set ver_gal_item 44615
version ${ver_num}
revision 1
epoch 2
categories graphics gnome
license GPL-3+
maintainers {mascguy @mascguy} openmaintainer
description This is the current development pre-release version of Inkscape.
long_description Inkscape is an multi-platform, Open-Source Vector Graphics Editor \
that uses SVG as its native file format. \
{*}${description}
homepage https://inkscape.org/
master_sites https://inkscape.org/gallery/item/${ver_gal_item}
worksrcdir ${my_name}-${ver_num}_${ver_date}_${ver_hash}
distname ${my_name}-${ver_num}
dist_subdir ${my_name}
use_xz yes
checksums rmd160 74eccccef78c5a7887f8867646413d019fe7c037 \
sha256 dbd1844dc443fe5e10d3e9a887144e5fb7223852fff191cfb5ef7adeab0e086b \
size 44720944
cmake.generator Ninja
set python_major 3
set python_minor 12
set python_version ${python_major}${python_minor}
# Blacklist older Clang versions, for compilation errors:
# src/display/cairo-utils.cpp:
# No matching function for call to 'isnan'
# src/ui/dialog/objects.cpp:
# No member named 'extract'
# See: https://trac.macports.org/ticket/65002
compiler.blacklist-append \
{clang < 1001}
# Blacklist macports-clang-15+ to prevent
# error: no template named 'unary_function' in namespace 'std'
compiler.blacklist-append \
{macports-clang-1[5-9]}
# Need no-invalid-constexpr, due to lib2geom. Remove if/when fixed in future
if { [string match *clang* ${configure.compiler}] } {
configure.cxxflags-append \
-Wno-invalid-constexpr \
-Wno-error=unknown-warning-option \
-Wno-unknown-warning-option
}
# this port only uses boost headers during build
# and does not link with any boost libraries
# no need to rebuild due to boost library ABI changes
boost.depends_type build
depends_build-append \
port:gettext \
port:gtest \
path:bin/pkg-config:pkgconfig
depends_lib-append \
port:boehmgc \
path:lib/pkgconfig/cairo.pc:cairo \
port:desktop-file-utils \
port:double-conversion \
port:fontconfig \
path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
port:gdl3 \
port:gettext-runtime \
path:lib/pkgconfig/glibmm-2.68.pc:glibmm \
port:gsl \
port:gspell \
port:gtkmm3 \
port:gtksourceview4 \
path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
port:ImageMagick \
port:lcms2 \
port:lib2geom \
port:libcdr-0.1 \
port:libepoxy \
path:include/turbojpeg.h:libjpeg-turbo \
port:libpng \
port:libsigcxx2 \
path:lib/pkgconfig/libsoup-2.4.pc:libsoup \
port:libvisio-0.1 \
port:libwpg-0.3 \
port:libxml2 \
port:libxslt \
path:lib/pkgconfig/pango.pc:pango \
path:lib/pkgconfig/poppler.pc:poppler \
port:potrace \
port:python${python_version} \
port:zlib
depends_run-append \
port:adwaita-icon-theme \
port:py${python_version}-cssselect \
port:py${python_version}-lxml \
port:py${python_version}-numpy \
port:py${python_version}-scour
patchfiles libxml2-2.12.0.patch \
poppler-24.03.0.patch
post-patch {
reinplace "s|\"python-interpreter\", *\{\"python3\"|\"python-interpreter\", \{\"python${python_major}.${python_minor}\"|g" \
${worksrcpath}/src/extension/implementation/script.cpp
reinplace "s|COMMAND python3 |COMMAND ${prefix}/bin/python${python_major}.${python_minor} |g" \
${worksrcpath}/share/filters/CMakeLists.txt \
${worksrcpath}/share/markers/CMakeLists.txt \
${worksrcpath}/share/paint/CMakeLists.txt \
${worksrcpath}/share/palettes/CMakeLists.txt \
${worksrcpath}/share/symbols/CMakeLists.txt \
${worksrcpath}/share/templates/CMakeLists.txt
reinplace {s|^#include "Object\.h"|#include <poppler/Object.h>|} \
${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.cpp \
${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.h
reinplace "s|\"\$\{CMAKE_INSTALL_LIBDIR\}/inkscape\"|\$\{CMAKE_INSTALL_LIBDIR\}|" \
${worksrcpath}/src/CMakeLists.txt
}
compiler.cxx_standard \
2017
configure.args-append \
-DBUILD_TESTING=OFF \
-DENABLE_LCMS=ON \
-DENABLE_POPPLER=ON \
-DENABLE_POPPLER_CAIRO=OFF \
-DWITH_ASAN=OFF \
-DWITH_GNU_READLINE=OFF \
-DWITH_GRAPHICS_MAGICK=OFF \
-DWITH_GSOURCEVIEW=ON \
-DWITH_GSPELL=ON \
-DWITH_IMAGE_MAGICK=ON \
-DWITH_INTERNAL_CAIRO=OFF \
-DWITH_INTERNAL_2GEOM=OFF \
-DWITH_JEMALLOC=OFF \
-DWITH_LIBCDR=ON \
-DWITH_LIBVISIO=ON \
-DWITH_LIBWPG=ON \
-DWITH_MANPAGE_COMPRESSION=OFF \
-DWITH_NLS=ON \
-DWITH_OPENMP=OFF \
-DWITH_PROFILING=OFF \
-DWITH_X11=OFF
# The following dummy variants are used to identify this port's binary dependencies,
# based on which variant of gtkmm is used for the build.
variant x11 conflicts quartz {}
variant quartz conflicts x11 {}
if {![variant_isset quartz]} {
default_variants +x11
}
variant tests description {Enable tests} {
configure.args-replace \
-DBUILD_TESTING=OFF \
-DBUILD_TESTING=ON
test.run yes
}
post-activate {
system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}
notes {
Install port 'inkscape-app', to create a macOS app launcher.
}
livecheck.type regex
livecheck.url https://inkscape.org/release/
livecheck.regex ">Inkscape (\\d+(?:\\.\\d+)*)<"