summaryrefslogtreecommitdiff
path: root/jhbuildrc.i686-pc-mingw32
blob: 255638df4e705eaf499bc38cd298ee84251e0932 (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
#
# jhbuildrc for building for mingw
#
cross_target = "cross to MINGW i686"

moduleset = '/jhbuild/xorg.modules'
modules = [ 'xwin', 'xorg' ]

# skip building stuff which isn't appropriate for target
skip = [ 'appplewmproto', 'libAppleWM',
	 'videoproto', 'xf86dgaproto', 'xf86driproto', 'xf86vidmodeproto', 'dri2proto',
	 'libXv', 'libXvMC', 'libXxf86dga', 'libXxf86dga', 'libXxf86vm', 'libxcwm',
	 'libxkbui', 'libdrm', 'libpciaccess',
	 'xvinfo', 'xdriinfo', 'xgamma',
	 'xorg-drivers',
	 'libGL', 'mesa-demos',
	 'libFS',
	 'luit', 'sessreg', 'smproxy', 'xkbevd', 'xinit', 'xpr',
	 'ico', 'rendercheck', 'twm', 'transset', 'x11perf', 'xwininfo'
       ]
# libGL is not easily cross-compilable
# some modules don't make much sense to build for mingw
# some modules are provided with xming, so can be ported with some work...

build_policy = 'updated-deps'


os.environ['BUILD'] = 'i686-pc-cygwin'
os.environ['HOST'] = 'i686-pc-mingw32'

# source checkout, build and install directories
checkoutroot = '/jhbuild/checkout'
buildroot = os.path.join('/jhbuild', os.environ['HOST'], 'build')
prefix = os.path.join('/jhbuild', os.environ['HOST'], 'install')

# configuration
os.environ['ACLOCAL'] = 'aclocal -I ' + os.path.join(prefix, 'share', 'aclocal')
os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') + ':' + os.path.join(prefix, 'share', 'pkgconfig')
# do not search in the host pkgconfig libdir
os.environ['PKG_CONFIG_LIBDIR'] = '/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig'

os.environ['CC'] = 'ccache i686-pc-mingw32-gcc'
os.environ['CXX'] = 'ccache i686-pc-mingw32-g++'
os.environ['INSTALL'] = '/usr/local/bin/install-check'
os.environ['CC_FOR_BUILD'] = 'ccache gcc'
os.environ['CFLAGS'] = '-g -O0 -fdiagnostics-show-option'
#os.environ['V'] = '1'
#os.environ['PKG_CONFIG_DEBUG_SPEW'] = '1'

# env vars to help some tests find things...
os.environ['JHBUILD_CHECKOUTROOT'] = checkoutroot
os.environ['JHBUILD_BUILDROOT'] = buildroot
os.environ['JHBUILD_PREFIX'] = prefix

autogenargs = '--cache-file=' + os.path.join('/jhbuild', os.environ['HOST'], 'configure-cache')
autogenargs += ' --build='+os.environ['BUILD']
autogenargs += ' --host='+os.environ['HOST']

# ipv6
# need to compile with WINVER of at least XP for getaddrinfo(), freeaddrinfo()
#autogenargs += ' --enable-ipv6'
#os.environ['CFLAGS'] += ' -DWINVER=0x0501'

module_autogenargs['xserver'] = autogenargs + ' -disable-glx'
module_autogenargs['xserver'] = module_autogenargs['xserver'] + ' --with-builderstring="Tag: `cd ' + checkoutroot + '/xorg/xserver ; git describe | tr -d \\n`"'

module_autogenargs['xkeyboard-config'] = autogenargs + ' --with-xkb-rules-symlink=xorg'
module_autogenargs['fontconfig'] = autogenargs + ' --enable-libxml2'

# must put pthread into LIBS when building pthread-stubs, as weak cleverness won't work...
os.environ['LIBS'] = '-lpthread'

# do not start xvfb for any testmodules
noxvfb = True

# can't run 'make check' when cross-compiling
makecheck = False

# AC_FUNC_STRNLEN guesses 'yes' when cross-compiling
os.environ['ac_cv_func_strnlen_working'] = 'no'
# AC_SEARCH_LIBS can't find sqrtf() beacuse of stdcall linkage
#os.environ['ac_cv_search_sqrtf'] = 'none required'
# AC_CHECK_FUNC can't find strncasecmp() because of stdcall linkage
os.environ['ac_cv_func_strncasecmp'] = 'yes'