import sys
# Variables for 'waf dist'
-VERSION = '3.0rc1'
+VERSION = '3.0rc2'
APPNAME = 'Ardour3'
# Mandatory variables
# Version stuff
def fetch_svn_revision (path):
- # the fifth line has the revision number. we can't grep because of i18n issues changing the string
- cmd = "svn info " + path + " | sed -n '5s/^[^:]*:[ \t][ \t]*//p'"
- return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
+ cmd = "svnversion | cut -d: -f1"
+ output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding)
+ return output.rstrip(os.linesep)
def fetch_gcc_version (CC):
cmd = "LANG= %s --version" % CC
return version
def fetch_git_revision (path):
- cmd = "LANG= git log --abbrev HEAD^..HEAD " + path
+ cmd = "LANG= git log --abbrev HEAD^..HEAD"
output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
o = output[0].decode('utf-8')
rev = o.replace ("commit", "git")[0:10]
+ cmd = "LANG= git log --abbrev -n1 --grep 'git-svn-id'"
+ output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
for line in output:
try:
if "git-svn-id" in line:
try:
text = '#include "ardour/svn_revision.h"\n'
text += 'namespace ARDOUR { const char* svn_revision = \"%s\"; }\n' % rev
- print('Writing svn revision info to libs/ardour/svn_revision.cc')
+ print('Writing svn revision info to libs/ardour/svn_revision.cc using ' + rev)
o = open('libs/ardour/svn_revision.cc', 'w')
o.write(text)
o.close()
#
user_gtk_root = os.path.expanduser ('~/gtk/inst')
pkg_config_path = os.getenv('PKG_CONFIG_PATH')
- if not os.path.isfile ('/usr/include/libintl.h') or (pkg_config_path is not None and pkg_config_path.find (user_gtk_root) >= 0):
- # XXXX hack hack hack
- prefinclude = ''.join ([ '-I', user_gtk_root + '/include'])
- preflib = ''.join ([ '-L', user_gtk_root + '/lib'])
- conf.env.append_value('CFLAGS', [ prefinclude ])
- conf.env.append_value('CXXFLAGS', [prefinclude ])
- conf.env.append_value('LINKFLAGS', [ preflib ])
- conf.define ('NEED_INTL', 1)
- autowaf.display_msg(conf, 'Will use explicit linkage against libintl in ' + user_gtk_root, 'yes')
+ if os.path.isfile ('/usr/include/libintl.h'):
+ # libintl is part of the system., so use it
+ autowaf.display_msg(conf, 'Will reply on libintl built into libc', 'yes')
else:
- autowaf.display_msg(conf, 'Will use explicit linkage against libintl in ', 'no')
+ if (pkg_config_path is not None):
+ # told to search for pkgconfig files
+ if pkg_config_path.find (user_gtk_root) >= 0:
+ # told to search user_gtk_root
+ prefinclude = ''.join ([ '-I', user_gtk_root + '/include'])
+ preflib = ''.join ([ '-L', user_gtk_root + '/lib'])
+ conf.env.append_value('CFLAGS', [ prefinclude ])
+ conf.env.append_value('CXXFLAGS', [prefinclude ])
+ conf.env.append_value('LINKFLAGS', [ preflib ])
+ conf.define ('NEED_INTL', 1)
+ autowaf.display_msg(conf, 'Will use explicit linkage against libintl in ' + user_gtk_root, 'yes')
+ else:
+ print ('\n\n**** Cannot locate libintl.h and PKG_CONFIG_PATH does not include ', user_gtk_root, '- this needs fixing before the build can continue')
+ sys.exit (-1)
+ else:
+ print ('\n\n**** Cannot locate libintl.h and PKG_CONFIG_PATH is not set - this needs fixing before the build can continue')
+
user_ardour_root = os.path.expanduser ('~/a3/inst')
if pkg_config_path is not None and os.getenv('PKG_CONFIG_PATH').find (user_ardour_root) >= 0:
# XXXX hack hack hack