Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/tevent/wscript

    r740 r988  
    22
    33APPNAME = 'tevent'
    4 VERSION = '0.9.11'
     4VERSION = '0.9.28'
    55
    66blddir = 'bin'
     
    1111srcdir = '.'
    1212while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
    13     srcdir = '../' + srcdir
     13    srcdir = srcdir + '/..'
    1414sys.path.insert(0, srcdir + '/buildtools/wafsamba')
    1515
    16 import wafsamba, samba_dist, Options, Logs
     16import wafsamba, samba_dist, samba_utils, Options, Logs
    1717
    18 samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools')
     18samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools third_party/waf:third_party/waf')
    1919
    2020def set_options(opt):
     
    3636
    3737    if not conf.env.standalone_tevent:
    38         if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
     38        if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION,
    3939                                     onlyif='talloc', implied_deps='replace talloc'):
    4040            conf.define('USING_SYSTEM_TEVENT', 1)
     41            if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
     42                conf.define('USING_SYSTEM_PYTEVENT', 1)
    4143
    4244    if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
    4345        conf.DEFINE('HAVE_EPOLL', 1)
     46
     47    tevent_num_signals = 64
     48    v = conf.CHECK_VALUEOF('NSIG', headers='signal.h')
     49    if v is not None:
     50        tevent_num_signals = max(tevent_num_signals, v)
     51    v = conf.CHECK_VALUEOF('_NSIG', headers='signal.h')
     52    if v is not None:
     53        tevent_num_signals = max(tevent_num_signals, v)
     54    v = conf.CHECK_VALUEOF('SIGRTMAX', headers='signal.h')
     55    if v is not None:
     56        tevent_num_signals = max(tevent_num_signals, v)
     57    v = conf.CHECK_VALUEOF('SIGRTMIN', headers='signal.h')
     58    if v is not None:
     59        tevent_num_signals = max(tevent_num_signals, v*2)
     60
     61    if not conf.CONFIG_SET('USING_SYSTEM_TEVENT'):
     62        conf.DEFINE('TEVENT_NUM_SIGNALS', tevent_num_signals)
    4463
    4564    conf.env.disable_python = getattr(Options.options, 'disable_python', False)
     
    4766    if not conf.env.disable_python:
    4867        # also disable if we don't have the python libs installed
     68        conf.find_program('python', var='PYTHON')
    4969        conf.check_tool('python')
    5070        conf.check_python_version((2,4,2))
     
    5676    conf.SAMBA_CONFIG_H()
    5777
     78    conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
     79
    5880def build(bld):
    5981    bld.RECURSE('lib/replace')
     
    6284    SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
    6385             tevent_queue.c tevent_req.c tevent_select.c
    64              tevent_poll.c
     86             tevent_poll.c tevent_threads.c
    6587             tevent_signal.c tevent_standard.c tevent_timed.c tevent_util.c tevent_wakeup.c'''
    6688
     
    6890        SRC += ' tevent_epoll.c'
    6991
     92    if bld.CONFIG_SET('HAVE_SOLARIS_PORTS'):
     93        SRC += ' tevent_port.c'
     94
    7095    if bld.env.standalone_tevent:
    7196        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
    72         bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
    7397        private_library = False
    7498    else:
     
    84108                          abi_match='tevent_* _tevent_*',
    85109                          vnum=VERSION,
    86                           public_headers='tevent.h',
     110                          public_headers=('' if private_library else 'tevent.h'),
    87111                          public_headers_install=not private_library,
     112                          pc_files='tevent.pc',
    88113                          private_library=private_library)
    89114
    90     bld.SAMBA_PYTHON('pytevent',
    91                      'pytevent.c',
    92                      deps='tevent',
    93                      enabled=True,
    94                      realname='_tevent.so')
     115    if not bld.CONFIG_SET('USING_SYSTEM_PYTEVENT') and not bld.env.disable_python:
     116        for env in bld.gen_python_environments(['PKGCONFIGDIR']):
     117            bld.SAMBA_PYTHON('_tevent',
     118                            'pytevent.c',
     119                            deps='tevent',
     120                            realname='_tevent.so',
     121                            cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
     122
     123
     124            bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'tevent.py', flat=False)
     125
     126        # install out various python scripts for use by make test
     127        bld.SAMBA_SCRIPT('tevent_python',
     128                         pattern='tevent.py',
     129                         installdir='python')
    95130
    96131
     
    98133    '''test tevent'''
    99134    print("The tevent testsuite is part of smbtorture in samba4")
     135
     136    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared')
     137    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
     138
     139    pyret = samba_utils.RUN_PYTHON_TESTS(['bindings.py'])
     140    sys.exit(pyret)
    100141
    101142
Note: See TracChangeset for help on using the changeset viewer.