From c8c8c16f38ec02b370dd295f7d71411346513f20 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sun, 3 Apr 2011 11:09:13 +0200 Subject: [PATCH] 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') --- doc/PKG-BUILD-VARS | 5 +++++ lib/functions.in | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/PKG-BUILD-VARS b/doc/PKG-BUILD-VARS index 823a30f..79baf60 100644 --- a/doc/PKG-BUILD-VARS +++ b/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. pyconfopt ..... options for 'setup.py' - Python 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) runxmkmf ...... set to '0' if you want to skip running 'xmkmf' 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' +runwaf ........ set to '0' if you want to skip running 'waf' build system. cmakeopt ...... options for 'cmake' makeopt ....... options for 'make' (default = ' ') 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' archprefix .... prefix for binutils and compiler binaries (for cross-building) diff --git a/lib/functions.in b/lib/functions.in index 28fe00f..fdb0e00 100644 --- a/lib/functions.in +++ b/lib/functions.in @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # 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) 1998 - 2003 Clifford Wolf # @@ -960,6 +960,16 @@ build_this_package() { hook_eval premake eval ${pyscript:-python} setup.py build install $pyconfopt 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 if [ ! -f Makefile -a ! -f makefile -a \ -f Makefile.PL -a $runmkpl = 1 ]; then @@ -1195,8 +1205,8 @@ init_vars_and_hooks() taropt="--use-compress-program=bzip2 -xf" 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" createprefix=1 ; createdocs= ; rmemptydir=