Skip to content

Commit

Permalink
build: Move resolv_wrapper to third_party
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Alexander Bokovoy <[email protected]>
  • Loading branch information
cryptomilk committed Nov 25, 2017
1 parent 5d2b5e9 commit ac65070
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions buildtools/wafsamba/samba_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ def CHECK_SOCKET_WRAPPER(conf):
def CHECK_NSS_WRAPPER(conf):
return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.3')
Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER

@conf
def CHECK_RESOLV_WRAPPER(conf):
return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.4')
Build.BuildContext.CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import os
VERSION="1.1.4"

def configure(conf):
if conf.CHECK_BUNDLED_SYSTEM('resolv_wrapper', minversion=VERSION, set_target=False):
if conf.CHECK_RESOLV_WRAPPER():
conf.DEFINE('USING_SYSTEM_RESOLV_WRAPPER', 1)
libresolv_wrapper_so_path = 'libresolv_wrapper.so'
else:
Expand Down Expand Up @@ -80,7 +80,7 @@ def configure(conf):

# Create full path to resolv_wrapper
blddir = os.path.realpath(conf.blddir)
libresolv_wrapper_so_path = blddir + '/default/lib/resolv_wrapper/libresolv-wrapper.so'
libresolv_wrapper_so_path = blddir + '/default/third_party/resolv_wrapper/libresolv-wrapper.so'

conf.DEFINE('LIBRESOLV_WRAPPER_SO_PATH', libresolv_wrapper_so_path)
conf.DEFINE('RESOLV_WRAPPER', 1)
Expand Down
3 changes: 3 additions & 0 deletions third_party/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def configure(conf):
if conf.CONFIG_GET('ENABLE_SELFTEST'):
conf.RECURSE('socket_wrapper')
conf.RECURSE('nss_wrapper')
conf.RECURSE('resolv_wrapper')


def build(bld):
Expand Down Expand Up @@ -82,3 +83,5 @@ def build(bld):
bld.RECURSE('socket_wrapper')
if bld.CONFIG_GET('NSS_WRAPPER'):
bld.RECURSE('nss_wrapper')
if bld.CONFIG_GET('RESOLV_WRAPPER'):
bld.RECURSE('resolv_wrapper')
6 changes: 5 additions & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ def configure(conf):
else:
conf.define('USING_SYSTEM_NSS_WRAPPER', 1)

if not conf.CHECK_RESOLV_WRAPPER():
raise Utils.WafError('resolv_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
else:
conf.define('USING_SYSTEM_RESOLV_WRAPPER', 1)

conf.RECURSE('lib/ldb')

if not (Options.options.without_ad_dc):
Expand Down Expand Up @@ -194,7 +199,6 @@ def configure(conf):
conf.RECURSE('lib/crypto')
conf.RECURSE('pidl')
if conf.CONFIG_GET('ENABLE_SELFTEST'):
conf.RECURSE('lib/resolv_wrapper')
conf.RECURSE('lib/uid_wrapper')
if Options.options.with_pam:
conf.RECURSE('lib/pam_wrapper')
Expand Down
2 changes: 0 additions & 2 deletions wscript_build
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ bld.RECURSE('source4/lib/cmdline')
bld.RECURSE('source4/lib/http')
if bld.CONFIG_GET('PAM_WRAPPER') and Options.options.with_pam:
bld.RECURSE('lib/pam_wrapper')
if bld.CONFIG_GET('RESOLV_WRAPPER'):
bld.RECURSE('lib/resolv_wrapper')
if bld.CONFIG_GET('UID_WRAPPER'):
bld.RECURSE('lib/uid_wrapper')
if bld.CHECK_FOR_THIRD_PARTY():
Expand Down

0 comments on commit ac65070

Please sign in to comment.