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