| Index: chronochat_0.5.0~rc0/wscript |
| =================================================================== |
| --- chronochat_0.5.0~rc0.orig/wscript 2014-09-04 15:48:47.727801874 -0700 |
| +++ chronochat_0.5.0~rc0/wscript 2014-09-04 15:48:51.000000000 -0700 |
| @@ -9,7 +9,7 @@ |
| |
| opt.load(['compiler_c', 'compiler_cxx', 'qt4', 'gnu_dirs']) |
| |
| - opt.load(['default-compiler-flags', 'boost', 'protoc', |
| + opt.load(['default-compiler-flags', 'boost', 'protoc', 'openssl', |
| 'doxygen', 'sphinx_build'], |
| tooldir=['waf-tools']) |
| |
| @@ -23,7 +23,7 @@ |
| |
| def configure(conf): |
| conf.load(['compiler_c', 'compiler_cxx', 'qt4', |
| - 'default-compiler-flags', 'boost', 'protoc', 'gnu_dirs', |
| + 'default-compiler-flags', 'boost', 'protoc', 'gnu_dirs', 'openssl', |
| 'doxygen', 'sphinx_build']) |
| |
| conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], |
| @@ -37,6 +37,8 @@ |
| conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.1', '--cflags', '--libs'], |
| uselib_store='SYNC', mandatory=True) |
| |
| + conf.check_openssl() |
| + |
| boost_libs = 'system random thread filesystem' |
| if conf.options.with_tests: |
| conf.env['WITH_TESTS'] = 1 |
| @@ -65,7 +67,7 @@ |
| defines = "WAF=1", |
| source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc', 'logging.cc', 'src/*.proto']), |
| includes = "src .", |
| - use = "QTCORE QTGUI QTWIDGETS QTSQL NDN_CXX BOOST LOG4CXX SYNC", |
| + use = "QTCORE QTGUI QTWIDGETS QTSQL NDN_CXX BOOST LOG4CXX SYNC OPENSSL", |
| ) |
| |
| # Unit tests |
| Index: chronochat_0.5.0~rc0/waf-tools/openssl.py |
| =================================================================== |
| --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
| +++ chronochat_0.5.0~rc0/waf-tools/openssl.py 2014-09-04 15:50:42.876551986 -0700 |
| @@ -0,0 +1,46 @@ |
| +#! /usr/bin/env python |
| +# encoding: utf-8 |
| + |
| +''' |
| + |
| +When using this tool, the wscript will look like: |
| + |
| + def options(opt): |
| + opt.tool_options('openssl') |
| + |
| + def configure(conf): |
| + conf.load('compiler_cxx openssl') |
| + conf.check_openssl() |
| + |
| + def build(bld): |
| + bld(source='main.cpp', target='app', use='OPENSSL') |
| + |
| +''' |
| + |
| +from waflib import Options |
| +from waflib.Configure import conf |
| + |
| +@conf |
| +def check_openssl(self,*k,**kw): |
| + root = k and k[0] or kw.get('path', None) or Options.options.with_openssl |
| + mandatory = kw.get('mandatory', True) |
| + var = kw.get('uselib_store', 'OPENSSL') |
| + |
| + if root: |
| + libcrypto = self.check_cxx(lib=['ssl', 'crypto'], |
| + msg='Checking for OpenSSL library', |
| + define_name='HAVE_%s' % var, |
| + uselib_store=var, |
| + mandatory=mandatory, |
| + includes="%s/include" % root, |
| + libpath="%s/lib" % root) |
| + else: |
| + libcrypto = self.check_cxx(lib=['ssl', 'crypto'], |
| + msg='Checking for OpenSSL library', |
| + define_name='HAVE_%s' % var, |
| + uselib_store=var, |
| + mandatory=mandatory) |
| + |
| +def options(opt): |
| + opt.add_option('--with-openssl', type='string', default=None, |
| + dest='with_openssl', help='''Path to OpenSSL''') |