build: pass pkg_config_path to check_cfg() when looking for libndn-cxx
Instead of modifying os.environ Refs: #5042 Change-Id: If6ac10e5f83a48fa85d9b1dec1a2ae1a59d686ac
This commit is contained in:
1 parent
584e120f3c
commit
34f7eea5b6
3 files changed
+24
-27
No files matched your search
@@ -44,28 +44,28 @@ def apply_sphinx(self):
|
||||
task.inputs.append(conf)
|
||||
|
||||
confdir = conf.parent.abspath()
|
||||
buildername = getattr(self, "builder", "html")
|
||||
srcdir = getattr(self, "srcdir", confdir)
|
||||
outdir = self.path.find_or_declare(getattr(self, "outdir", buildername)).get_bld()
|
||||
doctreedir = getattr(self, "doctreedir", os.path.join(outdir.abspath(), ".doctrees"))
|
||||
buildername = getattr(self, 'builder', 'html')
|
||||
srcdir = getattr(self, 'srcdir', confdir)
|
||||
outdir = self.path.find_or_declare(getattr(self, 'outdir', buildername)).get_bld()
|
||||
doctreedir = getattr(self, 'doctreedir', os.path.join(outdir.abspath(), '.doctrees'))
|
||||
|
||||
task.env['BUILDERNAME'] = buildername
|
||||
task.env['SRCDIR'] = srcdir
|
||||
task.env['DOCTREEDIR'] = doctreedir
|
||||
task.env['OUTDIR'] = outdir.abspath()
|
||||
task.env['VERSION'] = "version=%s" % self.VERSION
|
||||
task.env['RELEASE'] = "release=%s" % self.VERSION
|
||||
task.env['VERSION'] = 'version=%s' % self.version
|
||||
task.env['RELEASE'] = 'release=%s' % getattr(self, 'release', self.version)
|
||||
|
||||
import imp
|
||||
confData = imp.load_source('sphinx_conf', conf.abspath())
|
||||
|
||||
if buildername == "man":
|
||||
if buildername == 'man':
|
||||
for i in confData.man_pages:
|
||||
target = outdir.find_or_declare('%s.%d' % (i[1], i[4]))
|
||||
task.outputs.append(target)
|
||||
|
||||
if self.install_path:
|
||||
self.bld.install_files("%s/man%d/" % (self.install_path, i[4]), target)
|
||||
self.bld.install_files('%s/man%d/' % (self.install_path, i[4]), target)
|
||||
else:
|
||||
task.outputs.append(outdir)
|
||||
|
||||
|
||||
+1
-2
@@ -3,8 +3,7 @@ libdir=@LIBDIR@
|
||||
includedir=@INCLUDEDIR@
|
||||
|
||||
Name: PSync
|
||||
Description: PSync library
|
||||
Description: NDN PSync library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lPSync
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -27,9 +27,8 @@ def configure(conf):
|
||||
conf.env.WITH_EXAMPLES = conf.options.with_examples
|
||||
conf.env.WITH_TESTS = conf.options.with_tests
|
||||
|
||||
if 'PKG_CONFIG_PATH' not in os.environ:
|
||||
os.environ['PKG_CONFIG_PATH'] = Utils.subst_vars('${LIBDIR}/pkgconfig', conf.env)
|
||||
conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], uselib_store='NDN_CXX')
|
||||
conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], uselib_store='NDN_CXX',
|
||||
pkg_config_path=os.environ.get('PKG_CONFIG_PATH', '%s/pkgconfig' % conf.env.LIBDIR))
|
||||
|
||||
boost_libs = ['system', 'iostreams']
|
||||
if conf.env.WITH_TESTS:
|
||||
@@ -56,14 +55,13 @@ def configure(conf):
|
||||
conf.write_config_header('PSync/detail/config.hpp', define_prefix='PSYNC_')
|
||||
|
||||
def build(bld):
|
||||
bld.shlib(
|
||||
target='PSync',
|
||||
vnum=VERSION,
|
||||
cnum=VERSION,
|
||||
source=bld.path.ant_glob('PSync/**/*.cpp'),
|
||||
use='BOOST NDN_CXX',
|
||||
includes='.',
|
||||
export_includes='.')
|
||||
bld.shlib(target='PSync',
|
||||
vnum=VERSION,
|
||||
cnum=VERSION,
|
||||
source=bld.path.ant_glob('PSync/**/*.cpp'),
|
||||
use='NDN_CXX BOOST',
|
||||
includes='.',
|
||||
export_includes='.')
|
||||
|
||||
if bld.env.WITH_TESTS:
|
||||
bld.recurse('tests')
|
||||
@@ -72,7 +70,8 @@ def build(bld):
|
||||
bld.recurse('examples')
|
||||
|
||||
headers = bld.path.ant_glob('PSync/**/*.hpp')
|
||||
bld.install_files(bld.env['INCLUDEDIR'], headers, relative_trick=True)
|
||||
bld.install_files(bld.env.INCLUDEDIR, headers,
|
||||
relative_trick=True)
|
||||
|
||||
bld.install_files('${INCLUDEDIR}/PSync/detail',
|
||||
bld.path.find_resource('PSync/detail/config.hpp'))
|
||||
@@ -80,10 +79,8 @@ def build(bld):
|
||||
bld(features='subst',
|
||||
source='PSync.pc.in',
|
||||
target='PSync.pc',
|
||||
install_path = '${LIBDIR}/pkgconfig',
|
||||
PREFIX = bld.env['PREFIX'],
|
||||
INCLUDEDIR = bld.env['INCLUDEDIR'],
|
||||
VERSION = VERSION)
|
||||
install_path='${LIBDIR}/pkgconfig',
|
||||
VERSION=VERSION)
|
||||
|
||||
def docs(bld):
|
||||
from waflib import Options
|
||||
@@ -121,7 +118,8 @@ def sphinx(bld):
|
||||
config='docs/conf.py',
|
||||
outdir='docs',
|
||||
source=bld.path.ant_glob('docs/**/*.rst'),
|
||||
VERSION=VERSION)
|
||||
version=VERSION_BASE,
|
||||
release=VERSION)
|
||||
|
||||
def version(ctx):
|
||||
# don't execute more than once
|
||||
|
||||
Reference in new issue
Block a user