# # jhbuildrc.include # common jhbuildrc settings for Windows targets# # # XXX: Note this assumes you will be working in /jhbuild # import subprocess # # Discover BUILD, HOST and set CC, CXX appropriately # # discover the build machine system name os.environ['BUILD'] = subprocess.check_output(['gcc','-dumpmachine']).strip() # set compiler name ... if not 'HOST' in os.environ: # not cross-compiling os.environ['HOST'] = os.environ['BUILD'] os.environ['CC'] = 'gcc' os.environ['CXX'] = 'g++' cross_target = None else: # cross-compiling os.environ['CC'] = os.environ['HOST'] + '-gcc' os.environ['CXX'] = os.environ['HOST'] + '-g++' if not cross_target: print "You must set cross_target!" exit os.environ['CC_FOR_BUILD'] = 'gcc' # if ccache is available, use it if subprocess.call('ccache --version >/dev/null 2>&1', shell=True) == 0: os.environ['CC'] = 'ccache ' + os.environ['CC'] os.environ['CXX'] = 'ccache ' + os.environ['CXX'] os.environ['CC_FOR_BUILD'] = 'ccache ' + os.environ['CC_FOR_BUILD'] # # determine modules to build # moduleset = '/jhbuild/xorg.modules' if 'TINDERBOX' in os.environ: modules = [ 'xwin', 'The X Window System', 'extras', 'tests' ] else: modules = [ 'xwin', 'The X Window System' ] # skip building stuff which isn't appropriate for Windows target skip = [ 'applewmproto', 'libAppleWM', 'videoproto', 'xf86dgaproto', 'xf86driproto', 'xf86vidmodeproto', 'dri2proto', 'dri3proto', 'libXv', 'libXvMC', 'libXxf86dga', 'libXxf86dga', 'libXxf86vm', 'libxshmfence', 'libxkbui', 'libevdev', 'libpciaccess', 'mesa-drm', 'mtdev', 'app-xdriinfo', 'app-xgamma', 'app-xfs', 'app-xvidtune', 'app-xvinfo' ] # skip building all drivers apart from xf86-video-dummy and xf86-video-nested skip += [ 'glamor', 'xf86-input-acecad', 'xf86-input-aiptek', 'xf86-input-evdev', 'xf86-input-joystick', 'xf86-input-keyboard', 'xf86-input-libinput', 'xf86-input-mouse', 'xf86-input-synaptics', 'xf86-input-vmmouse', 'xf86-input-void', 'xf86-video-apm', 'xf86-video-ark', 'xf86-video-ast', 'xf86-video-ati', 'xf86-video-chips', 'xf86-video-cirrus', 'xf86-video-fbdev', 'xf86-video-geode', 'xf86-video-glint', 'xf86-video-i128', 'xf86-video-i740', 'xf86-video-intel', 'xf86-video-mach64', 'xf86-video-mga', 'xf86-video-modesetting', 'xf86-video-neomagic', 'xf86-video-nouveau', 'xf86-video-nv', 'xf86-video-openchrome', 'xf86-video-r128', 'xf86-video-rendition', 'xf86-video-s3', 'xf86-video-s3virge', 'xf86-video-savage', 'xf86-video-siliconmotion', 'xf86-video-sis', 'xf86-video-sisusb', 'xf86-video-suncg14', 'xf86-video-suncg3', 'xf86-video-suncg6', 'xf86-video-sunffb', 'xf86-video-sunleo', 'xf86-video-suntcx', 'xf86-video-tdfx', 'xf86-video-tga', 'xf86-video-trident', 'xf86-video-tseng', 'xf86-video-v4l', 'xf86-video-vesa', 'xf86-video-vmware', 'xf86-video-wsfb', 'xf86-video-voodoo', 'xf86-video-xgixp' ] if 'mingw' in os.environ['HOST']: # skip building all drivers for MinGW, useless since we can't build Xorg server skip += [ 'The X Video Drivers', 'The X Input Drivers' ] # Leave libGL till later... skip += [ 'mesa-drm', 'mesa-mesa', 'mesa-demos', 'mesa-glut', 'mesa-glu' ] # Some of these don't make much sense to build for MinGW # But some of these are provided with Xming, so clearly can be ported with some work... skip += [ 'libFS', 'app-ico', 'app-luit', 'app-rendercheck', 'app-rstart', 'app-sessreg', 'app-smproxy', 'app-transset', 'app-twm', 'app-x11perf', 'app-xconsole', 'app-xdm', 'app-xfs', 'app-xfsinfo', 'app-xinit', 'app-xkbevd', 'app-xman', 'app-xsm', 'app-xwininfo' ] build_policy = 'updated-deps' if 'TINDERBOX' in os.environ: nopoison = True quiet_mode = True # All source modules will be here after the checkout checkoutroot = '/jhbuild/checkout' # All building takes place here buildroot = os.path.join('/jhbuild', os.environ['HOST'], 'build') # All installed stuff will be here prefix = os.path.join('/jhbuild', os.environ['HOST'], 'install') # # set misc environment variables # os.environ['ACLOCAL'] = 'aclocal -I ' + os.path.join(prefix, 'share', 'aclocal') if cross_target or not 'PKG_CONFIG_PATH' in os.environ: os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') + ':' + os.path.join(prefix, 'share', 'pkgconfig') else: # if not cross compiling, just augment rather than replace PKG_CONFIG_PATH os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') + ':' + os.path.join(prefix, 'share', 'pkgconfig') + ':' + os.environ['PKG_CONFIG_PATH'] #os.environ['PKG_CONFIG_DEBUG_SPEW'] = '1' os.environ['INSTALL'] = '/usr/local/bin/install-check' os.environ['CFLAGS'] = '-g -O0 -fdiagnostics-show-option' os.environ['CXXFLAGS'] = '-g -O0 -fdiagnostics-show-option' os.environ['AUTOMAKE'] = 'automake --force-missing --copy' #os.environ['V'] = '1' # env var to help GLEW install itself properly os.environ['GLEW_DEST'] = prefix # env vars to help some tests find things... os.environ['JHBUILD_CHECKOUTROOT'] = checkoutroot os.environ['JHBUILD_BUILDROOT'] = buildroot os.environ['JHBUILD_PREFIX'] = prefix os.environ['PREFIX'] = prefix # pixman tests run slower when OpenMP is allowed to use multiple threads... # I'm assuming this is a toolchain bug... os.environ['OMP_NUM_THREADS'] = '1' # # global ./configure options # autogenargs = '--cache-file=' + os.path.join('/jhbuild', os.environ['HOST'], 'configure-cache') autogenargs = autogenargs + ' --enable-silent-rules' if cross_target: autogenargs += ' --build=' + os.environ['BUILD'] autogenargs += ' --host=' + os.environ['HOST'] # ipv6 # MinGW targets need to compile with WINVER of at least XP for getaddrinfo(), freeaddrinfo() #autogenargs += ' --enable-ipv6' #os.environ['CFLAGS'] += ' -DWINVER=0x0501' mesonargs = '' # # per module ./configure options # if 'mingw' in os.environ['HOST']: module_autogenargs['xserver'] = autogenargs + ' --disable-glx' else: module_autogenargs['xserver'] = autogenargs + ' --enable-xvfb --enable-xnest --enable-dmx --enable-kdrive --enable-xephyr --enable-xorg --enable-xwin --enable-xf86bigfont --disable-glamor' module_autogenargs['xserver'] = module_autogenargs['xserver'] + ' --enable-debug' 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' module_autogenargs['libXfont'] = autogenargs + ' --disable-static' module_mesonargs['mesa-mesa'] = mesonargs + ' -Degl=false' # xf86-video-dummy config check needs fixing to default to auto, not yes module_autogenargs['xf86-video-dummy'] = autogenargs + ' --disable-dga' # xts can't be built with shared libraries on Windows module_autogenargs['xts'] = autogenargs + ' --disable-shared' # # # # do not start xvfb for any testmodules noxvfb = True # always run 'make check' in tinderbox if 'TINDERBOX' in os.environ: makecheck = True # if cross-compiling, some autoconf tests cannot be run if cross_target: # AC_FUNC_STRNLEN guesses 'yes' when cross-compiling os.environ['ac_cv_func_strnlen_working'] = 'no' # AC_CHECK_FUNC can't find strncasecmp() because of stdcall linkage os.environ['ac_cv_func_strncasecmp'] = 'yes' # --enable-malloc0returnsnull os.environ['xorg_cv_malloc0_returns_null'] = 'yes' # AC_CHECK_FUNC finds unprototyped getpagesize in libgcc.a os.environ['ac_cv_func_getpagesize'] = 'no' # AC_CHECK_FUNC finds unprototyped usleep os.environ['ac_cv_func_usleep'] = 'no' # also, do not search in the BUILD pkgconfig libdir os.environ['PKG_CONFIG_LIBDIR'] = '/usr/' + os.environ['HOST'] + '/sys-root/mingw/lib/pkgconfig' # # some tourist information # if not 'TINDERBOX' in os.environ: for e in ['CC', 'CXX', 'CC_FOR_BUILD', 'BUILD', 'HOST']: print e, '=', os.environ[e] del e