forked from fontforge/fontforge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPortfile
More file actions
176 lines (142 loc) · 5.37 KB
/
Portfile
File metadata and controls
176 lines (142 loc) · 5.37 KB
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
# -*- 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
# $Id$
### leave the MIQ tags here so that the same portfile can be
### shared in the main github repo and modified to enable
### this local git cache to be used by a local build.
###
### Lines starting with triple # and ending in hash MIQ will be
### uncommented by the mac air build system.
PortSystem 1.0
name fontforge
version 2.0.0_beta1
set docversion 2.0.0_beta1
revision 75
categories graphics fonts
platforms darwin
maintainers Ben Martin
license GPL
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 http://fontforge.org/
master_sites sourceforge:project/fontforge/fontforge-source
distname ${name}-${version}
dist_subdir ${name}/${version}
worksrcdir ${name}-${version}
#master_sites file:///Users/ben/Work/FontForge/2012/mac-build/categories/fontforge
#checksums fontforge-2.0.0_beta1.tar.gz \
# sha1 c89cf3daa09b10d7d017219551c3ed378d9ec92a \
# rmd160 fb2840a0f0e1206d7df914b729d43d34d1479712
# fetch.type git
# git.url https://github.com/monkeyiq/fontforge-fork.git
# git.branch 2012dec/buildwin
# use_autoreconf yes
fetch.type git
git.url https://github.com/fontforge/fontforge.git
git.branch master
use_autoreconf yes
#fetch.type git #MIQ
#git.branch master #MIQ
#git.url /usr/local/src/github-fontforge/fontforge #MIQ
worksrcdir ${name}-${version}
depends_lib \
port:xorg-libXi \
port:xorg-libxkbui \
port:xorg-libXt \
port:freetype \
port:gettext \
port:giflib \
port:jpeg \
port:tiff \
port:pango \
port:cairo \
port:libiconv \
port:glib2 \
port:libpng \
port:libuninameslist \
port:libxml2 \
port:tiff \
port:libtool \
port:zlib \
port:libspiro
depends_build \
port:pkgconfig port:autoconf port:automake
post-extract {
foreach fn { "${worksrcpath}/configure.ac" "${worksrcpath}/configure" } {
set fn [ subst $fn ]
if {[file exists "${fn}"]} {
system "sed -i -e 's/-Werror=missing-prototypes//g' ${fn} "
system "sed -i -e 's/-Werror=implicit//g' ${fn} "
}
}
foreach file [ exec grep -R --include "*.c" "Python\.h" ${worksrcpath} | cut -d: -f1 | sort | uniq ] {
system "sed -i -e 's|Python\.h|python2.7/Python\.h|g' ${file}"
}
set xcodebase [ exec xcode-select -print-path . ]
set xcodesdkpath [ exec ls -rv1 "${xcodebase}/Platforms/MacOSX.platform/Developer/SDKs/" | head -1 ]
system "ln -s ${xcodesdkpath}/Developer ${worksrcpath}/. "
}
configure.args --with-cairo \
--enable-pixmaps-tango \
--mandir=${prefix}/share/man \
--x-includes=${prefix}/include \
--x-libraries=${prefix}/lib
configure.cflags-append -D__GLIB_H_INSIDE__ -Ipython2.7 -g
configure.ldflags-append -lintl
post-configure {
# nasty compiler bug when generating 32bit code for this file.
# but lets not throw our hands up and avoid -O2 for the rest
# of the files!
puts "XXXXXXXXX patching the optimizer flags for metricsview!"
system "sed -i -e 's/-c -o libfontforgeexe_la-metricsview.lo/-O0 -c -o libfontforgeexe_la-metricsview.lo/g' ${worksrcpath}/fontforge/Makefile.in"
puts "path: ${worksrcpath}/fontforge/Makefile.in"
system "grep libfontforgeexe_la-metricsview.lo ${worksrcpath}/fontforge/Makefile.in"
}
set docdir ${prefix}/share/doc/${name}
destroot.args docdir=${docdir}
post-destroot {
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} \
AUTHORS INSTALL LICENSE README-Mac.html README-Unix.html README-unix \
${destroot}${docdir}
}
use_parallel_build yes
#
# These are a collection of bits that might be handy at some stage.
#
#
##build.args-append architecture=x86 address-model=32
# if {![variant_isset universal]} {
# # Honour 'build_arch', if not universal as per #28327
# if {[lsearch ${build_arch} ppc*] != -1} {
# build.args-append architecture=power
# if {${os.arch} != "powerpc"} {
# build.args-append --disable-long-double
# }
# } else {
# if {[lsearch ${build_arch} *86*] != -1} {
# build.args-append architecture=x86
# } else {
# error "Current value of 'build_arch' is not supported."
# }
# }
# if {[lsearch ${build_arch} *64] != -1} {
# build.args-append address-model=64
# } else {
# build.args-append address-model=32
# }
# }
#livecheck.regex ${name}_full-(\\d+)\.
#extract.only ${distname}${extract.suffix}
#
#post-patch {
# if {${os.major} > 11 && ${os.platform} == "darwin"} {
# eval reinplace -W {${worksrcpath}/fontforge} "s|AnchorPoint|FFAnchorPoint|g" \
# [glob -tails -directory ${worksrcpath}/fontforge *.c] \
# splinefont.h baseviews.h views.h
# }
#}