summaryrefslogtreecommitdiff
path: root/jhbuildrc.i686-w64-mingw32
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-10-10 15:47:55 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-10-10 15:47:55 +0100
commit8be0f8c5b56c66851bb8cd67721c0b66ca78ef31 (patch)
tree4f07bee931cb365f660690c3a766ac0f65147504 /jhbuildrc.i686-w64-mingw32
parentce6ae049e77d140b22034613ed7e98595a1a1177 (diff)
Use host triplet in paths when cross-compiling
Use the host triplet in the build, install and configure cache file paths when cross-compiling.
Diffstat (limited to 'jhbuildrc.i686-w64-mingw32')
-rw-r--r--jhbuildrc.i686-w64-mingw3271
1 files changed, 71 insertions, 0 deletions
diff --git a/jhbuildrc.i686-w64-mingw32 b/jhbuildrc.i686-w64-mingw32
new file mode 100644
index 0000000..6067d12
--- /dev/null
+++ b/jhbuildrc.i686-w64-mingw32
@@ -0,0 +1,71 @@
+#
+# jhbuildrc for building for mingw64
+#
+
+moduleset = '/jhbuild/xorg.modules'
+modules = [ 'xwin', 'xorg' ]
+
+# skip building stuff which isn't appropriate for Windows target
+skip = [ 'appplewmproto', 'libAppleWM',
+ 'videoproto', 'xf86dgaproto', 'xf86driproto', 'xf86vidmodeproto', 'dri2proto',
+ 'libXv', 'libXvMC', 'libXxf86dga', 'libXxf86dga', 'libXxf86vm',
+ 'libxkbui', 'libdrm', 'libpciaccess',
+ 'xvinfo', 'xdriinfo', 'xgamma',
+ 'xorg-drivers',
+ 'libGL', 'mesa-demos',
+ 'luit', 'sessreg', 'smproxy', 'xkbevd', 'xinit',
+ 'ico', 'twm', 'transset', 'x11perf', 'xwininfo'
+ ]
+# libGL is not easily cross-compilable
+# some modules don't make much sense to build for mingw64
+# 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-w64-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')
+
+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-w64-mingw32/sys-root/mingw/lib/pkgconfig'
+
+os.environ['CC'] = 'ccache i686-w64-mingw32-gcc'
+os.environ['CXX'] = 'ccache i686-w64-mingw32-g++'
+os.environ['CC_FOR_BUILD'] = 'ccache gcc'
+
+os.environ['INSTALL'] = '/usr/local/bin/install-check'
+
+os.environ['CFLAGS'] = '-g -O0 -fdiagnostics-show-option'
+os.environ['JHBUILD_CHECKOUTROOT'] = checkoutroot
+os.environ['JHBUILD_BUILDROOT'] = buildroot
+os.environ['JHBUILD_PREFIX'] = prefix
+
+#os.environ['V'] = '1'
+#os.environ['PKG_CONFIG_DEBUG_SPEW'] = '1'
+
+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 --with-arch=le32d8'
+
+os.environ['LIBS'] = '-lws2_32'
+
+# AC_FUNC_STRNLEN guesses 'yes' when cross-compiling
+os.environ['ac_cv_func_strnlen_working'] = 'no'
+