8
8
DB_CONFIGURE = '--disable-cryptography --disable-replication ' + \
9
9
'--disable-statistics --disable-shared --enable-static'
11
LIBICONV_VERSION = '1.11'
11
LIBICONV_VERSION = '1.12'
12
12
LIBICONV_URL = 'ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-%s.tar.gz' % LIBICONV_VERSION
13
LIBICONV_CONFIGURE = '--disable-shared'
15
GETTEXT_VERSION = '0.16.1'
13
LIBICONV_CONFIGURE = '--disable-static'
15
LIBGOMP_URL = 'http://www.opensource.apple.com/darwinsource/tarballs/other/gcc_42-5531.tar.gz'
16
LIBGOMP_CONFIGURE = '--disable-multilib --disable-shared --with-pic'
17
LIBGOMP_PATCHES = ['libgomp-sysconf-failure-fix.patch',
18
'libgomp-osx-10.4-fix.patch']
20
GETTEXT_VERSION = '0.17'
16
21
GETTEXT_URL = 'ftp://ftp.gnu.org/pub/gnu/gettext/gettext-%s.tar.gz' % GETTEXT_VERSION
17
GETTEXT_PATCHES = ['gettext-0.16.1-mingw-localenames.patch']
18
GETTEXT_CONFIGURE = '--disable-java ' + \
19
'--disable-rpath --disable-openmp ' + \
22
GETTEXT_CONFIGURE = '--disable-java --disable-rpath ' + \
21
24
GETTEXT_BINARIES = ['msgfmt', 'msgmerge', 'msgunfmt', 'xgettext', 'msgcat']
24
27
WX_URL = 'ftp://ftp.wxwidgets.org/pub/%s/wxWidgets-%s.tar.bz2' % (WX_VERSION, WX_VERSION)
25
WX_PATCHES = ['wx-2.8.6-mac-dialog-fix.patch']
28
WX_PATCHES = ['wx-2.8.7-mac-listctrl-refreshitem.patch',
29
'wx-2.8.7-mac-listctrl-attributes.patch',
30
'wx-2.8.7-msw-clipboard-events.patch',
31
'wx-2.8.7-msw-richedit-border.patch']
26
33
# NB: don't use --enable-debug_info, it forces -O0!
27
34
WX_CONFIGURE = '--disable-shared --enable-unicode --disable-tga'
28
35
WX_WINFLAGS = 'SHARED=0 BUILD=release DEBUG_INFO=1 UNICODE=1 USE_MEDIA=0 USE_AUI=0 USE_RICHTEXT=0 USE_STC=0 USE_QA=1'
57
64
env['OSX_HOST_X86'] = 'i686-apple-darwin8'
59
66
# FIXME: this should be per-agent configuration
60
env['MINGW_HOST'] = 'i686-pc-mingw32'
62
# FIXME: this should be per-agent configuration
63
67
# FIXME: have some directives on specifying what is required from the agent
64
68
# native type of the agent we're executing on
65
69
env['OSX_NATIVE'] = 'ppc' # 'ppc' or 'x86'
85
89
OSX_ENVIRONMENT_X86.update(OSX_ENVIRONMENT_COMMON)
88
# FIXME: these two should be in agent-specific (SCons) environment rather
89
# that agent/target execution (OS) environment
91
'CC' : '$MINGW_HOST-gcc',
92
'CXX' : '$MINGW_HOST-g++',
95
92
VS2005_ENVIRONMENT = {
96
93
'MSVS_PATH' : 'C:\\Program Files\\Microsoft Visual Studio 8',
97
94
'PSDK_PATH' : 'C:\\Program Files\\Microsoft Platform SDK',
171
168
sources=src_libiconv,
174
'./configure --host=$MINGW_HOST %s' % LIBICONV_CONFIGURE,
171
'./configure --host=$$MINGW_HOST %s' % LIBICONV_CONFIGURE,
176
173
'make install DESTDIR=`pwd`/D',
178
environment=MINGW_ENVIRONMENT,
179
outputs=['D/usr/local/*'])
174
'$$MINGW_HOST-strip -x D/usr/local/bin/*.dll', # FIXME
176
outputs=['D/usr/local/*'])
178
# -----------------------------------------------------------------
179
# libgomp (needed by gettext's msgmerge on OS X)
180
# -----------------------------------------------------------------
182
# Apple's GCC 4.2 Preview 1 has broken OpenMP installation:
183
# 1) omp.h header is not installed in SDKs
184
# 2) libgomp.a included in 10.4u SDK is built for 10.5 and depends on
185
# newly added symbols
186
# Because of this, we have to build our own copy if GOMP if we want to
187
# take advantage of OpenMP on OSX 10.4.
189
src_libgomp = env.ComponentSources(
192
patches=LIBGOMP_PATCHES,
197
'mv .junk/gcc/doc/include gcc/doc',
198
'mv .junk/libgomp .',
199
'mv `find .junk -maxdepth 1 -type f` .',
203
libgomp_osx_ppc = env.BuildComponent(
204
name='libgomp-osx-ppc',
209
'mkdir libgomp/build',
211
'../configure --host=$OSX_HOST_PPC CC=$$OSX_CC_42 --prefix=/usr/local %s' % LIBGOMP_CONFIGURE,
213
'make install DESTDIR=`pwd`/../../D',
214
'mkdir ../../D/usr/local/include',
215
'cp omp.h ../../D/usr/local/include',
217
environment=OSX_ENVIRONMENT_PPC,
218
outputs=['D/usr/local/*'])
220
libgomp_osx_x86 = env.BuildComponent(
221
name='libgomp-osx-x86',
226
'mkdir libgomp/build',
228
'../configure --host=$OSX_HOST_X86 CC=$$OSX_CC_42 --prefix=/usr/local %s' % LIBGOMP_CONFIGURE,
230
'make install DESTDIR=`pwd`/../../D',
231
'mkdir ../../D/usr/local/include',
232
'cp omp.h ../../D/usr/local/include',
234
environment=OSX_ENVIRONMENT_X86,
235
outputs=['D/usr/local/*'])
237
libgomp_osx = env.Alias('build-libgomp-osx', [libgomp_osx_ppc, libgomp_osx_x86])
181
240
# -----------------------------------------------------------------
185
244
src_gettext = env.ComponentSources(
188
patches=GETTEXT_PATCHES)
190
248
gettext_osx_ppc = env.BuildComponent(
191
249
name='gettext-osx-ppc',
193
251
sources=src_gettext,
252
deps=[(libgomp_osx_ppc, 'libgomp')],
196
'./configure --host=$OSX_HOST_PPC --with-libiconv-prefix=$OSX_SDKROOT/usr %s' % GETTEXT_CONFIGURE,
254
'./configure --host=$OSX_HOST_PPC'
255
' --with-libiconv-prefix=$OSX_SDKROOT/usr %s'
256
' CC=$$OSX_CC_42 CXX=$$OSX_CXX_42'
257
' CPPFLAGS="-I`pwd`/libgomp/include $$CPPFLAGS"'
258
' LDFLAGS="-L`pwd`/libgomp/lib $$LDFLAGS"' % GETTEXT_CONFIGURE,
198
'make install DESTDIR=`pwd`/D',
260
'make install DESTDIR=`pwd`/D -j1',
200
262
environment=OSX_ENVIRONMENT_PPC,
201
outputs=['D/usr/local/bin/*'])
263
outputs=['D/usr/local/*'])
203
265
gettext_osx_x86 = env.BuildComponent(
204
266
name='gettext-osx-x86',
206
268
sources=src_gettext,
269
deps=[(libgomp_osx_x86, 'libgomp')],
209
'./configure --host=$OSX_HOST_X86 --with-libiconv-prefix=$OSX_SDKROOT/usr %s' % GETTEXT_CONFIGURE,
271
'./configure --host=$OSX_HOST_X86'
272
' --with-libiconv-prefix=$OSX_SDKROOT/usr %s'
273
' CC=$$OSX_CC_42 CXX=$$OSX_CXX_42'
274
' CPPFLAGS="-I`pwd`/libgomp/include $$CPPFLAGS"'
275
' LDFLAGS="-L`pwd`/libgomp/lib $$LDFLAGS"' % GETTEXT_CONFIGURE,
211
'make install DESTDIR=`pwd`/D',
277
'make install DESTDIR=`pwd`/D -j1',
213
279
environment=OSX_ENVIRONMENT_X86,
214
outputs=['D/usr/local/bin/*'])
280
outputs=['D/usr/local/*'])
216
282
gettext_osx = env.BuildComponent(
217
283
name='gettext-osx',
220
286
deps=[(gettext_osx_ppc, 'ppc'), (gettext_osx_x86, 'x86')],
223
'for i in %s ; do lipo -arch ppc ppc/$$i -arch i386 x86/$$i -create -output univ/$$i; done' % ' '.join(GETTEXT_BINARIES)
288
'mkdir -p univ/bin univ/lib',
289
'for i in %s ; do lipo -arch ppc ppc/bin/$$i -arch i386 x86/bin/$$i -create -output univ/bin/$$i; done' % ' '.join(GETTEXT_BINARIES),
290
'for i in ppc/lib/*.dylib ; do lipo -arch ppc ppc/lib/`basename $$i` -arch i386 x86/lib/`basename $$i` -create -output univ/lib/`basename $$i`; done',
291
# FIXME: save dSYM info?
292
'strip -u -r univ/bin/*',
293
'strip -x univ/lib/*.dylib',
225
295
environment=OSX_ENVIRONMENT_COMMON,
226
296
outputs=['univ/*'])
231
301
sources=src_gettext,
232
302
deps=[(libiconv_win32, 'libiconv')],
234
'./configure --host=$MINGW_HOST --with-libiconv-prefix=`pwd`/libiconv %s' % GETTEXT_CONFIGURE,
304
'./configure --host=$$MINGW_HOST --with-libiconv-prefix=`pwd`/libiconv --enable-threads=win32 %s CC=$$MINGW_CC_42 CXX=$$MINGW_CXX_42' % GETTEXT_CONFIGURE,
236
306
'make install-strip DESTDIR=`pwd`/D',
237
'cp COPYING `pwd`/D/usr/local/bin',
307
'cp libiconv/bin/*.dll D/usr/local/bin',
308
'$$MINGW_HOST-strip -x D/usr/local/bin/*.dll', # FIXME
309
'cp COPYING D/usr/local/bin',
310
'cp $$MINGW_DIR/bin/mingwm10.dll D/usr/local/bin',
311
'cp $$MINGW_DIR/bin/pthreadGC2.dll D/usr/local/bin',
239
environment=MINGW_ENVIRONMENT,
240
313
outputs=['D/usr/local/bin/*'])
403
476
'mv src/poedit src/poedit-x86',
404
477
'lipo -arch ppc ../ppc/src/poedit -arch i386 src/poedit-x86 -create -output src/poedit',
405
478
# finally, create the bundle:
406
'GETTEXT_BINARIES="`pwd`/../deps/gettext" WX_ROOT="`pwd`/deps" make dist-osx',
479
'GETTEXT_PREFIX="`pwd`/../deps/gettext" WX_ROOT="`pwd`/deps" make dist-osx',
408
481
environment=OSX_ENVIRONMENT_COMMON,
409
482
outputs=['x86/poedit-*.dmg', 'x86/src/*dSYM*'])