Browse Source

lib/functions.in: added support for 'waf' build system

Following new variables have been introduced and are usable in conf files:

runwaf		set to '0' if you want to skip running 'waf' build system.
wafscript	script to run for waf based builds
		(default = './waf')
wafconfopt	options for 'waf configure'
		(default = 'configure --prefix=/$prefix')
wafbuildopt	options for 'waf build'
		(default = 'build')
wafinstopt	options for 'waf install'
		(default = 'install --destdir=$root --force')
user/chris/test/patchcksum
Christian Wiese 13 years ago
parent
commit
c8c8c16f38
2 changed files with 18 additions and 3 deletions
  1. +5
    -0
      doc/PKG-BUILD-VARS
  2. +13
    -3
      lib/functions.in

+ 5
- 0
doc/PKG-BUILD-VARS

@ -84,15 +84,20 @@ cleanconfopt .. set to '0' if you don't want to remove unsupported options
pyscript ...... script to run 'setup.py', python by default. pyscript ...... script to run 'setup.py', python by default.
pyconfopt ..... options for 'setup.py' - Python setup scripts pyconfopt ..... options for 'setup.py' - Python setup scripts
plconfopt ..... options for 'Makefile.pl' - Perl setup scripts plconfopt ..... options for 'Makefile.pl' - Perl setup scripts
wafscript ..... script to run for waf based builds (default = './waf')
wafconfopt .... options for 'waf configure' (default = 'configure --prefix=/$prefix')
runcmake ...... set to '0' if you want to skip running 'cmake' (default 1) runcmake ...... set to '0' if you want to skip running 'cmake' (default 1)
runxmkmf ...... set to '0' if you want to skip running 'xmkmf' runxmkmf ...... set to '0' if you want to skip running 'xmkmf'
runmkpl ....... set to '0' if you want to skip running 'perl Makefile.PL' runmkpl ....... set to '0' if you want to skip running 'perl Makefile.PL'
runpysetup .... set to '0' if you want to skip running 'python setup.py' runpysetup .... set to '0' if you want to skip running 'python setup.py'
runwaf ........ set to '0' if you want to skip running 'waf' build system.
cmakeopt ...... options for 'cmake' cmakeopt ...... options for 'cmake'
makeopt ....... options for 'make' (default = ' ') makeopt ....... options for 'make' (default = ' ')
makeinstopt ... options for 'make install' (default = 'install') makeinstopt ... options for 'make install' (default = 'install')
wafbuildopt ... options for 'waf build' (default = 'build')
wafinstopt .... options for 'waf install' (default = 'install --destdir=$root --force')
crossnative ... has the value 'cross' or 'native' crossnative ... has the value 'cross' or 'native'
archprefix .... prefix for binutils and compiler binaries (for cross-building) archprefix .... prefix for binutils and compiler binaries (for cross-building)

+ 13
- 3
lib/functions.in

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# #
# Filename: lib/functions.in # Filename: lib/functions.in
# Copyright (C) 2006 - 2010 The OpenSDE Project
# Copyright (C) 2006 - 2011 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf # Copyright (C) 1998 - 2003 Clifford Wolf
# #
@ -960,6 +960,16 @@ build_this_package() {
hook_eval premake hook_eval premake
eval ${pyscript:-python} setup.py build install $pyconfopt eval ${pyscript:-python} setup.py build install $pyconfopt
hook_eval postmake hook_eval postmake
elif [ -f waf -a $runwaf = 1 ] ; then
wafconfopt="${wafconfopt:=configure --prefix=/$prefix}"
wafbuildopt="${wafbuildopt:=build}"
wafinstopt="${wafinstopt:=install --destdir=$root --force}"
hook_eval premake
eval ${wafscript:-./waf} $wafconfopt
eval ${wafscript:-./waf} $wafbuildopt
hook_eval inmake
eval ${wafscript:-./waf} $wafinstopt
hook_eval postmake
else # styles that include a make run else # styles that include a make run
if [ ! -f Makefile -a ! -f makefile -a \ if [ ! -f Makefile -a ! -f makefile -a \
-f Makefile.PL -a $runmkpl = 1 ]; then -f Makefile.PL -a $runmkpl = 1 ]; then
@ -1195,8 +1205,8 @@ init_vars_and_hooks()
taropt="--use-compress-program=bzip2 -xf" taropt="--use-compress-program=bzip2 -xf"
mainfunction="build_this_package" mainfunction="build_this_package"
runconf=1 ; runcmake=1 ; runxmkmf=1 ; runmkpl=1 ; runpysetup=1 ; autopatch=1
autoextract=1 ; chownsrcdir=1 ; nocvsinsrcdir=1 ; cleanconfopt=1
runconf=1 ; runcmake=1 ; runxmkmf=1 ; runmkpl=1 ; runpysetup=1 ; runwaf=1 ;
autopatch=1 ; autoextract=1 ; chownsrcdir=1 ; nocvsinsrcdir=1 ; cleanconfopt=1
patchopt="-bfp1 -z .orig" patchopt="-bfp1 -z .orig"
createprefix=1 ; createdocs= ; rmemptydir= createprefix=1 ; createdocs= ; rmemptydir=

Loading…
Cancel
Save