File: gtk-build.txt

package info (click to toggle)
libgtkada2 2.4.0-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,400 kB
  • ctags: 4,705
  • sloc: ada: 90,819; ansic: 32,798; perl: 4,017; sh: 2,747; makefile: 1,023
file content (325 lines) | stat: -rw-r--r-- 8,225 bytes parent folder | download
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
319
320
321
322
323
324
325
Here are the complete procedures to build Gtk+ 2.2.4 from scratch
(Systems tested are Redhat 8.0, Solaris/sparc 2.5.1, Solaris/sparc 8,
 Solaris/x86 2.6, Tru64 5.1a, HP-UX 11.00).

Note that these instructions are provided as is, and do not represent a
100% guaranteed method. This is merely an empirical list of steps that
are required for a given version and for a given set of OS.

If you have trouble building Gtk+ from sources, the proper place to ask help
is on the various Gtk+ lists.

On linux systems, you can skip the steps from libiconv to libjpeg, and
ignore the special comments.

On HP-UX, a recent version of GCC (e.g 3.2) should be used

On x86-solaris, use GCC 3.4, since earlier versions have lots of subtle
problems related e.g. to include files.

On AiX and IRIX, the vendor C compiler is used:
# CC=cc
# export CC

Once all these steps have been done successfully, only glib, atk, pango and gtk
need to be rebuilt when their version change.

Download

pkgconfig, glib, pango, atk, gtk+ can be found at ftp://ftp.gtk.org/pub/gtk/

##############

prefix=/opt/gtk-2.0

##############
# pkg-config #
##############
tar xzvf pkgconfig-0.14.0.tar.gz
cd pkgconfig-0.14.0

# IRIX: Apply the following patch to avoid an error with SGI cc:
# patch -p0 < .../GtkAda/contrib/pkgconfig-0.14.0.diff

./configure --prefix=$prefix
make all install
cd ..

PATH=$prefix/bin:$PATH
LD_LIBRARY_PATH=$prefix/lib:$LD_LIBRARY_PATH
LDFLAGS=-L$prefix/lib
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig

export PATH LDFLAGS LD_LIBRARY_PATH PKG_CONFIG_PATH

# Needed so that gcc finds libiconv.h (and libpng.h, ...) when configuring
# and building subsequent packages

C_INCLUDE_PATH="$prefix/include"
export C_INCLUDE_PATH

# When using the native C compiler (e.g. under AiX):
# CFLAGS="-I$C_INCLUDE_PATH -O2 -g"
# export CFLAGS

########
# zlib #
########

# Not needed on Linux, Tru64 5.1a nor IRIX 6.5

# AiX 5.1: although this library seems to be provided by the system, building
# it is still needed, as the headers were not installed.

tar xzvf zlib-1.1.4.tar.gz
ln -s zlib-* zlib
cd zlib
./configure --prefix=$prefix

# Under HP-UX and Solaris: add -fPIC to CFLAGS in Makefile
# make
# for HP-UX: ld -z -b -o libz.sl `ar t libz.a`
# for Solaris: gcc -shared -o libz.so `ar t libz.a`
# cp libz.s? $prefix/lib

make
make install
cd ..

# At this point, follow instructions in xft-built.txt if you want to
# enable Xft support on non Linux platforms

############
# libiconv #
############
# This step isn't needed on Linux nor AiX 5.1
# It is needed under Solaris, HP-UX, Tru64 and IRIX

tar xzvf libiconv-1.7.tar.gz
cd libiconv-1.7
./configure --prefix=$prefix
make
make install

##########
# libpng #
##########

# Note: This step is needed on IRIX 6.5 too, because the version of
# libpng installed is too old for GTK to compile.

tar xzvf libpng-1.0.10.tar.gz
cd libpng-1.0.10
cp scripts/makefile.gcc makefile
# check makefile & pngconf.h

# Under HP-UX and Solaris:
# make CFLAGS="-O2 -fPIC"
# for HP-UX: ld -z -b -o libpng.sl `ar t libpng.a` $LDFLAGS -lz
# for Solaris: gcc -shared -o libpng.so `ar t libpng.a` $LDFLAGS -lz
# cp -p libpng.s? $prefix/lib

# Under IRIX:
# make CC=cc

make
mkdir -p $prefix/include $prefix/lib
cp -p png.h pngconf.h $prefix/include
chmod 644 $prefix/include/png.h $prefix/include/pngconf.h
cp -p libpng.a $prefix/lib
cd ..

###########
# libjpeg #
###########

# Not needed on IRIX 6.5

tar xzvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=$prefix

# Under HP-UX and Solaris:
# make CFLAGS="-O2 -fPIC"
# for HP-UX: ld -z -b -o libjpeg.sl `ar t libjpeg.a`
# for Solaris: gcc -shared -o libjpeg.so `ar t libjpeg.a`
# cp -p libjpeg.s? $prefix/lib

make
cp -p libjpeg.a $prefix/lib
cp -p jpeglib.h jconfig.h jmorecfg.h $prefix/include
chmod 644 $prefix/include/j*.h
cd ..

###########
# gettext #
###########

# This step is not needed under Solaris & Linux
# It is needed under HP-UX, Tru64 5.1a, IRIX 6.5, AiX 5.1

tar xzvf gettext-0.11.5.tar.gz
cd gettext-0.11.5
./configure --prefix=$prefix

make
make install

# Under HP-UX, remove -R$prefix/lib in $prefix/lib/libintl.la to work around
# a gettext bug, fixed in recent (CVS) versions of gettext.

# On AiX 5.1, the AiX C compiler does not seem to like the _Bool
# name for the {true, false} enum name. This causes a compilation error
# in stdbool.h. So before doing a make, update stdbool.h.in around line
# 34, and replace all instances of _Bool by BOOL.

cd ..

########
# glib #
########
tar xzvf glib-2.2.3.tar.gz
cd glib-2.2.3

# On IRIX, when using the SGI C compiler, configure verifies that
# the preprocessor accepts the libintl.h include. Unfortunately,
# the default expression to call the preprocessor is not honoring
# the C_INCLUDE_PATH. So we need to give configure a small hand:
# CPP="cc -E -I$C_INCLUDE_PATH"
# export CPP

# On x86-solaris, there is a dependency on libgcc_s.so for which GCC didn't
# add a rpath, so we need to help the loader find it by adding
# the path to this library in LD_LIBRARY_PATH. This will be needed
# throughout the rest of the gtk builds, so let's export the change.
# LD_LIBRARY_PATH=...gcc-install/lib:$LD_LIBRARY_PATH

# on Linux:
./configure --prefix=$prefix --disable-debug

# on other systems:
./configure --prefix=$prefix --disable-debug --with-libiconv

# possible switches for debugging:
# --enable-gc-friendly --disable-mem-pools

# on Tru64:
make CFLAGS="-g -O2 -mieee -DTRIO_COMPILER_DECC" all install

# on other systems:
make all install

cd ..

#######
# atk #
#######
tar xzvf atk-1.2.4.tar.gz
cd atk-1.2.4

./configure --prefix=$prefix
make all install
cd ..

#########
# pango #
#########
tar xzvf pango-1.2.5.tar.gz
cd pango-1.2.5

# Apply this patch if you want to ease distributing stand alone executables:
patch -p0 < .../GtkAda/contrib/pango-1.2.5.diff
touch -r aclocal.m4 configure.in

# Note: to get all modules included, we could use --with-included-modules=yes
# but basic-x should be all we need. In the future, we may want to also
# include basic-xft, which requires additional librairies. Other modules are:
# arabic-x,arabic-xft,hebrew-x,basic-x,basic-ft2,basic-xft,basic-win32,
# hangul-x,tamil-x,tamil-xft,thai-x,gurmukhi-x,bengali-x,gujarati-x,
# devanagari-x,myanmar-x

# If you have Xft2 available, e.g. under Redhat 8.0 and above
./configure --prefix=$prefix \
	--with-included-modules=basic-x,basic-xft --disable-debug

# On other platforms:
# Replace /bin/sh by /bin/bash in order to work around a sh bug under some
# systems (e.g. HP-UX, IRIX):

bash ./configure --prefix=$prefix \
	--with-included-modules=basic-x --disable-debug

# On x86-solaris 2.6, there seems to be something going on with respect to
# Xlib.h.  When we include this file, there's apparently some macro defined
# that prevents the XEvent structures from being defined.  These definitions
# are forced by defining DNeedFunctionPrototypes.
#
# make CFLAGS='-g -O2 -DNeedFunctionPrototypes' all install
# 
# This doesn't seem to be the case for x86-solaris 2.8.

# On all other platforms, simply do:
make all install
cd ..

#######
# gtk #
#######
tar xzvf gtk+-2.2.4.tar.gz
cd gtk+-2.2.4

# Under certain platforms such as AiX or NT, a very recent version of
# libtool may be needed. To install the most recent version of libtool,
# do the following:
# rm -f config.cache
# libtoolize --force --copy
# aclocal
# autoconf

# This patch fixes regressions in Gtk+
patch -p0 < .../GtkAda/contrib/gtk+-2.2.4.diff

./configure --disable-modules --without-libtiff \
  --with-included-loaders=xpm,png,gif,jpeg --prefix=$prefix --disable-debug

# For debugging Gtk+ and enable Gtk+ traces, use --enable-debug=full

make all install
cd ..

#####################
# optional: glade 2 #
#####################

###########
# libxml2 #
###########

# libxml2 is only needed by glade

tar xzvf libxml2-2.5.7.tar.gz
cd libxml2-2.5.7
./configure --prefix=$prefix
make
make install
cd ..

#########
# glade #
#########

tar xzvf glade-2.0.0.tar.gz
cd glade-2.0.0
patch -p0 < .../GtkAda/contrib/glade-2.0.0.diff
autoconf
./configure --prefix=$prefix --disable-gnome

# Under Tru64:
make CFLAGS="-g -O2 -mieee -DTRIO_COMPILER_DECC"

# On other platforms:
make

make install
cd ..