1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00
Andreas Schneider 8479401b02 lib: Add support to parse MS Catalog files
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Aug  9 19:57:02 CEST 2018 on sn-devel-144
2018-08-09 19:57:02 +02:00

45 lines
1.5 KiB
Python

#!/usr/bin/env python
import os
import Logs
import sys
def configure(conf):
pkg_name = 'libtasn1'
pkg_minversion = '3.8'
if conf.CHECK_BUNDLED_SYSTEM_PKG(pkg_name, minversion=pkg_minversion):
if not conf.find_program('asn1Parser', var='ASN1PARSER'):
Logs.warn('WARNING: ans1Parser hasn\'t been found! Please install it (e.g. libtasn1-bin)')
conf.CHECK_FUNCS_IN('gnutls_pkcs7_get_embedded_data_oid', 'gnutls')
def build(bld):
if (bld.CONFIG_SET('HAVE_LIBTASN1') and
bld.env.ASN1PARSER and
bld.CONFIG_SET('HAVE_GNUTLS_PKCS7_GET_EMBEDDED_DATA_OID')):
bld.SAMBA_GENERATOR('MSCAT_PARSER',
source='mscat.asn',
target='mscat_asn1_tab.c',
rule='${ASN1PARSER} --output ${TGT} ${SRC}',
group='build_source')
bld.SAMBA_LIBRARY('mscat',
source='''
mscat_asn1_tab.c
mscat_ctl.c
mscat_pkcs7.c
''',
deps='''
talloc
gnutls
libtasn1
samba-util
''',
private_library=True)
bld.SAMBA_BINARY('dumpmscat',
source='dumpmscat.c',
deps='mscat')