blob: 56bdf8086bcac34b2f8bac5ef119a9fba8536d5a (
plain)
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
|
#!/bin/sh
function die () {
echo $*
exit 1
}
set -e
clean=
parallel=2
patch_gtk_osx=
PREFIX=$HOME/gtk/inst
while [ $# -gt 0 ] ; do
case $1 in
--clean*) clean=1 ; shift ;;
--prefix*) PREFIX=`echo $1 | sed 's/--prefix=//'` ; shift ;;
--patch*) patch_gtk_osx=1 ; shift ;;
-j*) parallel=`echo $1 | sed 's/-j//'` ; shift ;;
esac
done
if [ $clean ] ; then
if [ ! -d gtk+ ] ; then
echo "This doesn't appear to be your source directory. Don't run --clean here."
exit 1
fi
rm -rf `ls -ld * | awk '/^d/ {print $9;}' | grep -v gtk+`
# have to use sudo because we used sudo for libxml2 install, sigh.
sudo rm -rf $PREFIX
exit 0
fi
mkdir -p $PREFIX
export MAKEFLAGS=-j$parallel
PATH=$PREFIX/bin:$PATH
if uname -a | grep --silent arwin ; then
# its OS X! run for the hills !!
export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}
# force compilation to use 10.4 APIs only. could be overkill, but better safe than sorry
GLOBAL_CFLAGS="-DMAC_OSX_VERSION_MAX_ALLOWED=1040 -mmacosx-version-min=10.4 -O3"
# for 10.5 and above, add to CFLAGS
# -sysroot=/Developer/SDKs/MacOSX10.4u.sdk"
GLOBAL_LDFLAGS="-headerpad_max_install_names"
# for 10.5 and above, add to LDFLAGS
# "-syslibroot /Developer/SDKs/MacOSX10.4u.sdk"
export MACOSX_DEPLOYMENT_TARGET=10.4
# If the default python is not new enough, set PYTHON to point to a
# suitably new (2.7 or later) version of Python's framework
#PYTHON=
PYTHON=/Library/Frameworks/Python.framework/Versions/2.7
else
export LD_LIBRARY_PATH=$PREFIX/lib{$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
GLOBAL_CFLAGS=
GLOBAL_LDFLAGS=
fi
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
GLOBAL_CONF="--prefix=$PREFIX"
if [ ! -f xz-5.0.3.tar.bz2 ] ; then
echo xz
curl -LO http://tukaani.org/xz/xz-5.0.3.tar.bz2
fi
if [ ! -f tar-1.26.tar.bz2 ] ; then
echo tar
curl -LO http://ftp.gnu.org/gnu/tar/tar-1.26.tar.bz2
fi
if [ ! -f m4-1.4.16.tar.bz2 ] ; then
echo m4
curl -LO http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.bz2
fi
if [ ! -f automake-1.11.3.tar.gz ] ; then
echo automake
curl -LO http://ftp.gnu.org/gnu/automake/automake-1.11.3.tar.gz
fi
if [ ! -f autoconf-2.68.tar.bz2 ] ; then
echo autoconf
curl -LO http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.bz2
fi
if [ ! -f libtool-2.4.2.tar.gz ] ; then
echo libtool
curl -LO http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/libtool/libtool-2.4.2.tar.gz
fi
if [ ! -f make-3.82.tar.bz2 ] ; then
echo make
curl -LO http://ftp.gnu.org/gnu/make/make-3.82.tar.bz2
fi
if [ ! -f bison-2.5.tar.bz2 ] ; then
echo bison
curl -LO ftp://ftp.gnu.org/gnu/bison/bison-2.5.tar.bz2
fi
if [ ! -f glib-2.31.2.tar.bz2 ] ; then
echo glib
curl -LO http://ftp.gnome.org/pub/gnome/sources/glib/2.31/glib-2.31.2.tar.bz2
fi
if [ ! -f pkg-config-0.26.tar.gz ] ; then
echo pkg-config
curl -LO http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz
fi
if [ ! -f readline-6.2.tar.gz ] ; then
echo readline
curl -LO ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz
fi
if [ ! -f zlib-1.2.6.tar.bz2 ] ; then
echo zlib
curl -LO http://zlib.net/zlib-1.2.6.tar.bz2
fi
if [ ! -f libiconv-1.14.tar.gz ] ; then
echo libiconv
curl -LO ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz
fi
if [ ! -f gettext-0.18.1.1.tar.gz ] ; then
echo gettext
curl -LO http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.1.1.tar.gz
fi
if [ ! -f libxml2-2.7.8.tar.gz ] ; then
echo libxml2
curl -LO ftp://xmlsoft.org/libxslt/libxml2-2.7.8.tar.gz
fi
if [ ! -f libxslt-1.1.26.tar.gz ] ; then
echo libxslt
curl -LO ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz
fi
if [ ! -f tiff-4.0.1.tar.gz ] ; then
echo tiff
curl -LO ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.1.tar.gz
fi
if [ ! -f libpng-1.5.9.tar.gz ] ; then
echo png
curl -LO ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.9.tar.gz
fi
if [ ! -f jpegsrc.v8d.tar.gz ] ; then
echo jpeg
curl -LO http://www.ijg.org/files/jpegsrc.v8d.tar.gz
fi
if [ ! -f XML-Parser-2.41.tar.gz ] ; then
echo perl xml parser
curl -L -o XML-Parser-2.41.tar.gz http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/XML-Parser-2.41.tar.gz
fi
if [ ! -f XML-Simple-2.18.tar.gz ] ; then
echo perl xml
curl -L -o XML-Simple-2.18.tar.gz http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-Simple-2.18.tar.gz
fi
if [ ! -f atk-2.2.0.tar.bz2 ] ; then
echo atk
curl -LO http://ftp.gnome.org/pub/GNOME/sources/atk/2.2/atk-2.2.0.tar.bz2
fi
if [ ! -f gnome-common-2.34.0.tar.bz2 ] ; then
echo gnome-common
curl -LO http://ftp.acc.umu.se/pub/gnome/sources/gnome-common/2.34/gnome-common-2.34.0.tar.bz2
fi
if [ ! -f gtk-doc-1.18.tar.bz2 ] ; then
echo gtk-doc
curl -LO http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/1.18/gtk-doc-1.18.tar.bz2
fi
if [ ! -f gnome-doc-utils-0.20.6.tar.bz2 ] ; then
echo gnome-doc
curl -LO http://ftp.acc.umu.se/pub/gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.6.tar.bz2
fi
if [ ! -f pixman-0.24.4.tar.gz ] ; then
echo pixman
curl -LO http://cgit.freedesktop.org/pixman/snapshot/pixman-0.24.4.tar.gz
fi
if [ ! -f libffi-3.0.10.tar.gz ] ; then
echo ffi
curl -LO ftp://sourceware.org/pub/libffi/libffi-3.0.10.tar.gz
fi
if [ ! -f freetype-2.4.8.tar.bz2 ] ; then
echo freetype
curl -L -o freetype-2.4.8.tar.bz2 http://sourceforge.net/projects/freetype/files/freetype2/2.4.8/freetype-2.4.8.tar.bz2/download
fi
if [ ! -f fontconfig-2.8.0.tar.gz ] ; then
echo fontconfig
curl -LO http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz
fi
if [ ! -f cairo-1.10.2.tar.gz ] ; then
echo cairo
curl -LO http://cairographics.org/releases/cairo-1.10.2.tar.gz
fi
if [ ! -f pango-1.29.5.tar.bz2 ] ; then
echo pango
curl -LO http://ftp.gnome.org/pub/GNOME/sources/pango/1.29/pango-1.29.5.tar.bz2
fi
if [ ! -f gdk-pixbuf-2.25.0.tar.xz ] ; then
echo gdk-pixbuf
curl -LO http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.25/gdk-pixbuf-2.25.0.tar.xz
fi
if [ ! -f intltool-0.50.2.tar.gz ] ; then
echo intltool
curl -LO https://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz
fi
if [ ! -f gtk-osx-docbook-1.0.tar.gz ] ; then
echo gtk-osx-docbook
curl -L -o gtk-osx-docbook-1.0.tar.gz http://sourceforge.net/projects/gtk-osx/files/GTK-OSX%20Build/gtk-osx-docbook-1.0.tar.gz/download
fi
if [ ! -f gobject-introspection-1.31.10.tar.xz ] ; then
echo gobject-introspection
curl -LO http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.31/gobject-introspection-1.31.10.tar.xz
fi
if [ ! -d gtk+ ] ; then
echo "GTK+ (2.24 branch)"
git clone git://git.gnome.org/gtk+
(cd gtk+ && git checkout --track -b gtk-2-24 origin/gtk-2-24)
fi
if [ x$patch_gtk_osx != x ] ; then
this_script_dir="`/usr/bin/dirname \"$0\"`"
cd gtk+
echo "Testing patches ... "
patches=`ls $this_script_dir/current_gtk_osx_patches/*.patch`
for patch in $patches ; do
if patch --dry-run -p0 < $patch >/dev/null 2>&1 ; then
echo "Patch $patch no longer applies cleanly."
exit 1
fi
done
echo "Applying patches ..."
for patch in $patches ; do
patch --dry-run -p0 < $patch
done
exit 0
fi
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
tar jxf xz-5.0.3.tar.bz2 && (cd xz-5.0.3 && LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure $GLOBAL_CONF && make && make install) || die "xz build failed"
tar jxf tar-1.26.tar.bz2 && (cd tar-1.26 && LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure $GLOBAL_CONF && make && make install) || die "tar build failed"
#
# now we have a working, modern tar we can drop the compression-type flag
#
hash tar
#
# well, we do now ..
#
tar xf m4-1.4.16.tar.bz2 && (cd m4-1.4.16 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "m4 build failed"
tar xf make-3.82.tar.bz2 && (cd make-3.82 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "make build failed"
tar xf zlib-1.2.6.tar.bz2 && (cd zlib-1.2.6 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && PATH=/usr/bin:$PATH make && make install) || die "zlib build failed"
tar xf autoconf-2.68.tar.bz2 && (cd autoconf-2.68 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "autoconf build failed"
tar xf automake-1.11.3.tar.gz && (cd automake-1.11.3 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "automake build failed"
tar xf libtool-2.4.2.tar.gz && (cd libtool-2.4.2 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "libtool build failed"
tar xf make-3.82.tar.bz2 && (cd make-3.82 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "make build failed"
tar xf bison-2.5.tar.bz2 && (cd bison-2.5 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "bison build failed"
#
# libxml2 tries to install python modules in the system python folders and thus needs sudo for the install step.
# clean up afterwards to reset ownership on dirs and files created under $PREFIX as root
#
tar xf libxml2-2.7.8.tar.gz && (cd libxml2-2.7.8 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF --with-zlib=$PREFIX ${PYTHON:+--with-python=$PYTHON} && make && sudo make install && sudo chown -R `whoami` $PREFIX) || die "libxml2 build failed"
tar xf libxslt-1.1.26.tar.gz && (cd libxslt-1.1.26 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "libxslt build failed"
tar xf readline-6.2.tar.gz && (cd readline-6.2 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "readline build failed"
tar xf libiconv-1.14.tar.gz && (cd libiconv-1.14 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "libiconv build failed"
tar xf intltool-0.50.2.tar.gz && (cd intltool-0.50.2 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "intltool build failed"
tar xf gettext-0.18.1.1.tar.gz && (cd gettext-0.18.1.1 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "gettext build failed"
tar xf tiff-4.0.1.tar.gz && (cd tiff-4.0.1 && CFLAGS="$GLOBAL_CFLAGS -DHAVE_APPLE_OPENGL_FRAMEWORK" LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "tiff build failed"
tar xf libpng-1.5.9.tar.gz && (cd libpng-1.5.9 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "libpng build failed"
tar xf jpegsrc.v8d.tar.gz && (cd jpeg-8d && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "jpegsrc build failed"
tar xf XML-Simple-2.18.tar.gz && (cd XML-Simple-2.18 && perl Makefile.PL PREFIX=$PREFIX && make && make install) || die "XML-Simple build failed"
tar xf XML-Parser-2.41.tar.gz && (cd XML-Parser-2.41 && perl Makefile.PL PREFIX=$PREFIX && make && make install) || die "XML-Parser build failed"
#
# libffi has a bug that is caused by it depending on the output format of GNU wc(1)
# it can be avoided by changing into the target build directory, re-running configure and then running make from there.
# the target dir gets built by the first invocation of configure, and is the newest dir, so we find its name with ls and awk.
#
tar xf libffi-3.0.10.tar.gz && (cd libffi-3.0.10 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && cd `ls -ltd * | awk '/^d/ {print $9; exit}'` && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ../configure $GLOBAL_CONF && make && make install) || die "libffi build failed"
# time to bootstrap the circular dependency between pkg-config and glib.
#
# step one: build glib with everything specified so that pkg-config is not used or required
#
tar xf glib-2.31.2.tar.bz2 && (cd glib-2.31.2 && LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ZLIB_CFLAGS=-I$PREFIX/include ZLIB_LIBS=-I$PREFIX/lib LIBFFI_CFLAGS=-I$PREFIX/lib/libffi-3.0.10/include LIBFFI_LIBS="-L$PREFIX/lib -lffi" ./configure $GLOBAL_CONF --with-pcre=internal --disable-silent-rules && make && make install) && rm -rf glib-2.31.2 || die "glib build1 failed"
#
# step two: build pkg-config with glib flags specified so that pkg-config is not used or required
#
tar xf pkg-config-0.26.tar.gz && (cd pkg-config-0.26 && GLIB_CFLAGS="-I$PREFIX/include/glib-2.0 -I$PREFIX/lib/glib-2.0/include" GLIB_LIBS="-L$PREFIX/lib -lglib-2.0 -lintl" ./configure --prefix=$HOME/gtk/inst && make && make install) && rm -rf pkg-config-0.26 || die "pkg-config build1 failed"
#
# step three: rebuild glib (still need CFLAGS in order to find libintl)
#
tar xf glib-2.31.2.tar.bz2 && (cd glib-2.31.2 && LDFLAGS="$GLOBAL_LDFLAGS -L$PREFIX/lib -lintl" CFLAGS="$GLOBAL_CFLAGS -I$PREFIX/include" ./configure --prefix=$HOME/gtk/inst && make && make install) || die "glib build failed"
#
# step four: rebuilding pkg-config now that glib is all set
#
tar xf pkg-config-0.26.tar.gz && (cd pkg-config-0.26 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "pkg build failed"
#
# now we can start on the GTK stack itself
#
tar xf atk-2.2.0.tar.bz2 && (cd atk-2.2.0 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "atk build failed"
tar xf gnome-common-2.34.0.tar.bz2 && (cd gnome-common-2.34.0 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "gnome build failed"
tar xf gtk-osx-docbook-1.0.tar.gz && (cd gtk-osx-docbook-1.0 && JHBUILD_PREFIX=$PREFIX make install) || die "gtk build failed"
# gnome-doc-utils is not parallel-build safe so turn off make -j2
tar xf gnome-doc-utils-0.20.6.tar.bz2 && (cd gnome-doc-utils-0.20.6 && PYTHONPATH=$PREFIX/lib/python2.7/site-packages CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF --disable-scrollkeeper && PYTHONPATH=$PREFIX/lib/python2.7/site-packages MAKEFLAGS= make && PYTHONPATH=$PREFIX/lib/python2.7/site-packages MAKEFLAGS= make install) || die "gnome build failed"
tar xf gtk-doc-1.18.tar.bz2 && (cd gtk-doc-1.18 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure --disable-scrollkeeper --with-xml-catalog=$PREFIX/etc/xml/catalog --prefix=$PREFIX && PYTHONPATH=$PREFIX/lib/python2.7/site-packages make && make install) || die "gtk build failed"
tar xf pixman-0.24.4.tar.gz && (cd pixman-0.24.4 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" sh ./autogen.sh --prefix=$PREFIX && make && make install) || die "pixman build failed"
tar xf freetype-2.4.8.tar.bz2 && (cd freetype-2.4.8 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "freetype build failed"
tar xf fontconfig-2.8.0.tar.gz && (cd fontconfig-2.8.0 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "fontconfig build failed"
tar xf cairo-1.10.2.tar.gz && (cd cairo-1.10.2 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "cairo build failed"
tar xf pango-1.29.5.tar.bz2 && (cd pango-1.29.5 && CFLAGS=$GLOBAL_CFLAGS LD_FLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "pango build failed"
tar xf gdk-pixbuf-2.25.0.tar.xz && (cd gdk-pixbuf-2.25.0 && LDFLAGS="$GLOBAL_LDFLAGS -L$PREFIX/lib" CFLAGS="-I$PREFIX/include $GLOBAL_CFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "gdk build failed"
# gobject-introspection uses #include <libintl.h> and there's no way to force the "scanner" to look outside the system tree
if [ ! -f /usr/include/libintl.h ] ; then
sudo ln -s $PREFIX/include/libintl.h /usr/include
fi
tar xf gobject-introspection-1.31.10.tar.xz && (cd gobject-introspection-1.31.10 && LDFLAGS="$GLOBAL_LDFLAGS -L$PREFIX/lib -lintl" CFLAGS="-I$PREFIX/include $GLOBAL_CFLAGS" ./configure $GLOBAL_CONF --disable-silent-rules && make && make install) || die "gobject build failed"
sudo rm /usr/include/libintl.h
#
# now gtk itself
#
#
(cd gtk+ && CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" sh autogen.sh --enable-maintainer-mode --prefix=$PREFIX --libdir=$PREFIX/lib --disable-cups --disable-papi --disable-introspection --with-gdktarget=quartz && make && make install) || die "GTK build failed"
|