2014-07-18 02:04:35 +04:00
# functions to support third party libraries
2015-10-27 22:46:46 +03:00
import os
2018-01-31 12:48:43 +03:00
from waflib import Utils , Build , Context
from waflib . Configure import conf
2014-07-18 02:04:35 +04:00
@conf
def CHECK_FOR_THIRD_PARTY ( conf ) :
2018-06-27 15:03:08 +03:00
return os . path . exists ( os . path . join ( Context . g_module . top , ' third_party ' ) )
2014-07-18 02:04:35 +04:00
Build . BuildContext . CHECK_FOR_THIRD_PARTY = CHECK_FOR_THIRD_PARTY
2014-07-23 08:34:17 +04:00
@conf
def CHECK_POPT ( conf ) :
return conf . CHECK_BUNDLED_SYSTEM ( ' popt ' , checkfunctions = ' poptGetContext ' , headers = ' popt.h ' )
Build . BuildContext . CHECK_POPT = CHECK_POPT
2017-04-07 16:44:22 +03:00
@conf
def CHECK_CMOCKA ( conf ) :
2018-09-04 18:50:15 +03:00
return conf . CHECK_BUNDLED_SYSTEM_PKG ( ' cmocka ' , minversion = ' 1.1.3 ' )
2017-04-07 16:44:22 +03:00
Build . BuildContext . CHECK_CMOCKA = CHECK_CMOCKA
2017-11-07 12:51:11 +03:00
@conf
def CHECK_SOCKET_WRAPPER ( conf ) :
2023-06-21 13:40:16 +03:00
return conf . CHECK_BUNDLED_SYSTEM_PKG ( ' socket_wrapper ' , minversion = ' 1.4.2 ' )
2017-11-07 12:51:11 +03:00
Build . BuildContext . CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER
2017-11-07 13:40:11 +03:00
@conf
def CHECK_NSS_WRAPPER ( conf ) :
2023-01-24 13:20:49 +03:00
return conf . CHECK_BUNDLED_SYSTEM_PKG ( ' nss_wrapper ' , minversion = ' 1.1.15 ' )
2017-11-07 13:40:11 +03:00
Build . BuildContext . CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER
2017-11-07 13:55:04 +03:00
@conf
def CHECK_RESOLV_WRAPPER ( conf ) :
2022-12-21 10:42:49 +03:00
return conf . CHECK_BUNDLED_SYSTEM_PKG ( ' resolv_wrapper ' , minversion = ' 1.1.8 ' )
2017-11-07 13:55:04 +03:00
Build . BuildContext . CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER
2017-11-07 14:02:19 +03:00
@conf
def CHECK_UID_WRAPPER ( conf ) :
2023-05-23 03:38:24 +03:00
return conf . CHECK_BUNDLED_SYSTEM_PKG ( ' uid_wrapper ' , minversion = ' 1.3.0 ' )
2017-11-07 14:02:19 +03:00
Build . BuildContext . CHECK_UID_WRAPPER = CHECK_UID_WRAPPER
2017-11-24 15:34:25 +03:00
@conf
def CHECK_PAM_WRAPPER ( conf ) :
2021-10-28 11:50:30 +03:00
return conf . CHECK_BUNDLED_SYSTEM_PKG ( ' pam_wrapper ' , minversion = ' 1.1.4 ' )
2017-11-24 15:34:25 +03:00
Build . BuildContext . CHECK_PAM_WRAPPER = CHECK_PAM_WRAPPER