-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathPortfile
236 lines (198 loc) · 8.66 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# -*- 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 legacysupport 1.1
PortGroup github 1.0
PortGroup active_variants 1.1
PortGroup app 1.1
PortGroup cmake 1.1
PortGroup perl5 1.0
PortGroup compiler_blacklist_versions 1.0
PortGroup conflicts_build 1.0
github.setup darktable-org darktable 4.4.1 release-
name darktable
conflicts darktable-devel
set my_name darktable
revision 7
categories graphics
license GPL-3+
maintainers {mcalhoun @MarcusCalhoun-Lopez} {mascguy @mascguy} openmaintainer
description Virtual lighttable and darkroom for photographers
long_description Darktable is a virtual lighttable and darkroom for \
photographers: it manages your digital negatives in a \
database and lets you view them through a zoomable \
lighttable. It also enables you to develop raw images \
and enhance them.
homepage https://www.darktable.org/
known_fail yes
supported_archs x86_64 arm64
github.tarball_from releases
dist_subdir ${my_name}
use_xz yes
checksums rmd160 333a470af1a86a1035f40366188c2573e6cbc418 \
sha256 e043d38d2e8adb67af7690b12b535a40e8ec7bea05cfa8684db8b21a626e0f0d \
size 5956860
# If lua installed, those headers are found first, rather than lua54
conflicts_build-append lua
# Enable use of 'macports-libcxx' for macOS 10.12 and earlier, as port uses
# libcxx features normally only available on 10.13 and later.
legacysupport.use_mp_libcxx \
yes
# Upstream includes stricter compiler restrictions than are necessary, vis-a-vis
# MacPorts toolchain components. So replace stock versions, with our own dummy
# empty cmake file.
post-patch {
set cmake_compiler_versions_targets \
[list \
cmake/compiler-versions.cmake \
src/external/rawspeed/cmake/compiler-versions.cmake \
]
foreach f ${cmake_compiler_versions_targets} {
set ftgt ${worksrcpath}/${f}
ui_info "Overlaying stock compiler-versions.cmake: ${f}"
delete ${ftgt}
copy ${filespath}/cmake-compiler-versions.cmake ${ftgt}
}
}
# Supported build types: Debug:RelWithDebInfo;Release;Coverage;Sanitize;Tsan;Fuzz
if {[variant_isset debug]} {
cmake.build_type RelWithDebInfo
} else {
cmake.build_type Release
}
perl5.branches 5.34
# darktable sets its own optimization flags
configure.optflags
# disable deprecation warnings
configure.cppflags-append \
-Wno-deprecated-declarations
depends_build-append \
port:cctools \
port:gettext \
port:intltool \
port:perl${perl5.major} \
port:pkgconfig \
port:po4a
depends_lib-append \
port:atk \
path:lib/pkgconfig/cairo.pc:cairo \
port:curl \
port:desktop-file-utils \
port:exiv2 \
port:flickcurl \
port:GraphicsMagick \
path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
port:gettext-runtime \
path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:gmic-lib \
path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
path:lib/pkgconfig/icu-uc.pc:icu \
port:jasper \
port:libavif \
port:libheif \
port:libjxl \
port:lua54 \
port:imath \
port:iso-codes \
path:include/turbojpeg.h:libjpeg-turbo \
port:json-glib \
port:lcms2 \
port:lensfun \
port:libgphoto2 \
port:libpng \
path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
port:libsecret \
path:lib/pkgconfig/libsoup-2.4.pc:libsoup \
path:lib/pkgconfig/libusb-1.0.pc:libusb \
port:libxml2 \
port:openexr \
port:openjpeg \
port:osm-gps-map \
path:lib/pkgconfig/pango.pc:pango \
port:portmidi \
port:pugixml \
port:sqlite3 \
port:webp \
port:tiff \
port:zlib
depends_run port:adwaita-icon-theme \
port:tango-icon-theme \
port:exiftool
# sets march optimization to generic
configure.args-append -DBINARY_PACKAGE_BUILD=ON
configure.args-append -DBUILD_CMSTEST=OFF \
-DBUILD_CURVE_TOOLS=ON \
-DBUILD_NOISE_TOOLS=ON \
-DTESTBUILD_OPENCL_PROGRAMS=OFF \
-DUSE_COLORD=OFF \
-DUSE_KWALLET=OFF \
-DUSE_OPENMP=OFF \
-DUSE_UNITY=OFF \
-DDONT_USE_INTERNAL_LUA=OFF \
-Dperl_BIN=${perl5.bin}
# For ARM build, we must disable Intel instruction set use.
if {${configure.build_arch} eq "arm64"} {
configure.args-append \
-DBUILD_SSE2_CODEPATHS=OFF
}
post-build {
set wrap [open "${workpath}/darktable-app" w 0755]
puts ${wrap} "#!/bin/sh"
puts ${wrap} ""
puts ${wrap} "export XDG_DATA_DIRS=${prefix}/share:\$XDG_DATA_DIRS"
puts ${wrap} "exec ${prefix}/bin/darktable --moduledir ${prefix}/lib/darktable"
puts ${wrap} ""
close ${wrap}
}
post-destroot {
# need to determine why lib is not going where expected, until then...
move ${destroot}${prefix}/lib/darktable/libdarktable.dylib ${destroot}${prefix}/lib/
# create symlinks for tools
set port_tools_dir ${prefix}/libexec/darktable/tools
foreach f [glob ${destroot}${port_tools_dir}/darktable-*] {
set fn [file tail ${f}]
ln -s ${port_tools_dir}/${fn} ${destroot}${prefix}/bin/${fn}
}
}
post-activate {
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
# Note: mime db update now handled automatically by shared-mime-info
# system "env XDG_DATA_DIRS=${prefix}/share ${prefix}/bin/update-mime-database -V ${prefix}/share/mime"
}
app.name ${my_name}
app.executable ${workpath}/darktable-app
app.icon packaging/macosx/Icons.icns
universal_variant no
compiler.cxx_standard 2017
# compiling src/osx/osx.mm with GCC results in a cascade of errors
compiler.blacklist-append *gcc*
# NOTE: Now requires a minimum of Xcode Clang 10.0.1, as of v3.6.x
# However, runtime crashes occur with Xcode Clang 10.x and 11.x, so be sure to avoid both
# See: https://trac.macports.org/ticket/64252
compiler.blacklist-append {clang < 1200}
#--------------------------------------------------------------------------------------------------
# Blacklist MacPorts Clang 14 and newer (up to 19) for now, due to compilation crashes.
# See: https://trac.macports.org/ticket/65246
#--------------------------------------------------------------------------------------------------
compiler.blacklist-append {macports-clang-1[4-9]}
variant x11 conflicts quartz {
require_active_variants gtk3 x11 quartz
configure.args-append -DUSE_MAC_INTEGRATION=OFF
}
variant quartz conflicts x11 {
require_active_variants gtk3 quartz x11
depends_lib-append port:gtk-osx-application-gtk3
}
if {![variant_isset quartz]} {
default_variants-append +x11
}
variant openmp description {enable support for OpenMP} {
configure.args-replace -DUSE_OPENMP=OFF -DUSE_OPENMP=ON
}
if {[variant_isset openmp]} {
compiler.openmp_version 4.5
compiler.log_verbose_output no
}
livecheck.url https://github.com/darktable-org/darktable/releases
livecheck.regex {darktable (\d+(?:\.\d+)*) released}