-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
133 lines (115 loc) · 5.87 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
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup cmake 1.1
PortGroup compiler_blacklist_versions 1.0
github.setup fontforge fontforge 20200314
revision 2
github.tarball_from releases
use_xz yes
categories graphics fonts
platforms darwin
maintainers nomaintainer
license BSD
description Outline and bitmap font editor/converter for many formats
long_description FontForge allows you to edit outline and bitmap fonts. You may create \
new ones or modify old ones. It is also a format converter and can \
interconvert between PostScript (ascii & binary Type1, some Type3, \
some Type0), TrueType, OpenType (Type2), CID, SVG. Previously known as \
pfaedit.
homepage https://fontforge.org
checksums rmd160 c7368a53f6a5b6649f7bc18a957368006870b67b \
sha256 cd190b237353dc3f48ddca7b0b3439da8ec4fcf27911d14cc1ccc76c1a47c861 \
size 13850076
# don't override cmake build dependencies
depends_build-append \
port:pkgconfig
depends_lib path:lib/pkgconfig/cairo.pc:cairo \
port:readline \
port:freetype \
port:gettext \
port:giflib \
path:include/turbojpeg.h:libjpeg-turbo \
port:libiconv \
port:libpng \
port:libspiro \
port:libuninameslist \
port:libxml2 \
path:lib/pkgconfig/pango.pc:pango \
port:potrace \
port:tiff \
port:woff2 \
port:zlib
compiler.c_standard 2011
# Work around MacPorts 2.6.2 C11 compiler selection bug.
# https://github.com/macports/macports-base/pull/196
compiler.blacklist-append {clang < 500}
# fix 32bit builds by masking an old Carbon call to GetTime
patchfiles-append patch-fontforge-carbon-gettime-namecollision.diff
# use older noerr macros, and replace missing SRefCon definition
if {${os.platform} eq "darwin" && ${os.major} <= 9} {
patchfiles-append \
patch-fontforge-startui-require-noerr-and-SRefCon-fix.diff \
}
# the date command on Tiger is too old for this port, use gnu coreutils dates instead
platform darwin 8 {
depends_build-append path:libexec/coreutils/libstdbuf.so:coreutils
configure.env-append PATH=${prefix}/libexec/gnubin/:$env(PATH)
}
configure.args-append -DENABLE_GUI=False \
-DENABLE_LIBGIF=True \
-DENABLE_LIBJPEG=True \
-DENABLE_LIBPNG=True \
-DENABLE_LIBREADLINE=True \
-DENABLE_LIBSPIRO=True \
-DENABLE_LIBTIFF=True \
-DENABLE_UNINAMELIST=True \
-DENABLE_PYTHON_SCRIPTING=False \
-DENABLE_PYTHON_EXTENSION=False \
-DENABLE_WOFF2=True \
-DENABLE_WRITE_PFM=False \
-DENABLE_X11=False
variant python37 conflicts python38 python39 description {Enable Python support (Python 3.7)} {
depends_lib-append port:python37
configure.args-replace -DENABLE_PYTHON_EXTENSION=False \
-DENABLE_PYTHON_EXTENSION=True
configure.args-replace -DENABLE_PYTHON_SCRIPTING=False \
-DENABLE_PYTHON_SCRIPTING=True
configure.args-append -DPython3_EXECUTABLE="${prefix}/bin/python3.7" \
-DPYHOOK_INSTALL_DIR="${frameworks_dir}/Python.framework/Versions/3.7/lib/python3.7/site-packages"
configure.pkg_config_path \
"${frameworks_dir}/Python.framework/Versions/3.7/lib/pkgconfig"
}
variant python38 conflicts python37 python39 description {Enable Python support (Python 3.8)} {
depends_lib-append port:python38
configure.args-replace -DENABLE_PYTHON_EXTENSION=False \
-DENABLE_PYTHON_EXTENSION=True
configure.args-replace -DENABLE_PYTHON_SCRIPTING=False \
-DENABLE_PYTHON_SCRIPTING=True
configure.args-append -DPython3_EXECUTABLE="${prefix}/bin/python3.8" \
-DPYHOOK_INSTALL_DIR="${frameworks_dir}/Python.framework/Versions/3.8/lib/python3.8/site-packages"
configure.pkg_config_path \
"${frameworks_dir}/Python.framework/Versions/3.8/lib/pkgconfig"
}
variant python39 conflicts python37 python38 description {Enable Python support (Python 3.9)} {
depends_lib-append port:python39
configure.args-replace -DENABLE_PYTHON_EXTENSION=False \
-DENABLE_PYTHON_EXTENSION=True
configure.args-replace -DENABLE_PYTHON_SCRIPTING=False \
-DENABLE_PYTHON_SCRIPTING=True
configure.args-append -DPython3_EXECUTABLE="${prefix}/bin/python3.9" \
-DPYHOOK_INSTALL_DIR="${frameworks_dir}/Python.framework/Versions/3.9/lib/python3.9/site-packages"
configure.pkg_config_path \
"${frameworks_dir}/Python.framework/Versions/3.9/lib/pkgconfig"
}
variant gui description {Enable GUI support} {
PortGroup app 1.0
depends_lib-append path:lib/pkgconfig/gtk+-3.0.pc:gtk3
configure.args-replace -DENABLE_GUI=False -DENABLE_GUI=True
app.name FontForge
app.icon ${worksrcpath}/osx/FontForge.app/Contents/Resources/FontForge.icns
}
default_variants +gui
if {![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
default_variants-append +python39
}