-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
95 lines (77 loc) · 3.56 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
# -*- 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 meson 1.0
PortGroup debug 1.0
name babl
conflicts babl-devel
set my_name babl
version 0.1.108
revision 0
license LGPL-3+
set branch [join [lrange [split ${version} .] 0 1] .]
categories graphics
maintainers {mascguy @mascguy} openmaintainer
platforms darwin
description Babl is a library for dynamically handling pixel formats and managing \
conversions between them.
long_description ${description}
homepage http://gegl.org/babl
master_sites gimp:${my_name}/${branch}/
dist_subdir ${my_name}
distname ${my_name}-${version}
use_xz yes
checksums rmd160 4664f9386b2fe69a4a11ebee901a825576a98a59 \
sha256 26defe9deaab7ac4d0e076cab49c2a0d6ebd0df0c31fd209925a5f07edee1475 \
size 317036
configure.args-append \
-Dwith-docs=false
depends_build-append \
port:pkgconfig
depends_lib-append port:lcms2 \
path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \
path:bin/vala:vala
# Vapigen is broken on PPC: https://gitlab.gnome.org/GNOME/vala/-/issues/1297
platform darwin powerpc {
depends_lib-delete \
path:bin/vala:vala
configure.args-append \
-Denable-vapi=false
}
patchfiles-append patch-babl-linker-fix-darwin.diff
patchfiles-append patch-babl-allow-non-clang-compilers-on-darwin.diff
# require C11 (typedef redefinition)
# babl-icc.c:1031:25: error: redefinition of typedef 'UTF8' is invalid in C
compiler.c_standard 2011
# In 0.1.12, i386 fails to compile with SL's gcc-4.2:
# babl-cpuaccel.c:169: error: ‘asm’ operand has impossible constraints
compiler.blacklist-append *gcc-3.* *gcc-4.*
# babl-0.1.72 default compiler on macOS 10.10 (clang-700.1.81) has trouble with extension sse-half
# babl-0.1.72/extensions/sse-half.c:49:24: error: invalid conversion between vector type '__v4sf' (vector of 4 'float' values) and integer type 'int' of different size
# __v4sf out_val = (__v4sf)_mm_cvtph_ps(in_val);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compiler.blacklist-append {clang < 900}
# gobject-introspection uses g-ir-scanner, which uses $CC from env
if {${universal_possible} && [variant_isset universal]} {
foreach arch ${configure.universal_archs} {
lappend merger_build_env(${arch}) "CC=${configure.cc} -arch ${arch}"
lappend merger_destroot_env(${arch}) "CC=${configure.cc} -arch ${arch}"
}
} else {
build.env-append "CC=${configure.cc} ${configure.cc_archflags}"
destroot.env-append "CC=${configure.cc} ${configure.cc_archflags}"
}
variant docs description {Generate optional docs} {
depends_build-append port:w3m \
path:lib/pkgconfig/librsvg-2.0.pc:librsvg
configure.args-delete -Dwith-docs=false
configure.args-append -Dwith-docs=true
post-destroot {
xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 0644 -W ${build.dir} README \
${destroot}${prefix}/share/doc/${name}
}
}
livecheck.type regex
livecheck.url http://download.gimp.org/pub/${my_name}/${branch}/
livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)+)"