# source file. Note that in the case of a option_file, we have more than
# one source file
cd_rule = 'cd "${TGT[0].parent.abspath(env)}"'
- asn1_rule = cd_rule + ' && "${BLDBIN}/asn1_compile" ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
+ asn1_rule = cd_rule + ' && "${ASN1_COMPILE}" ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
source = to_list(source)
if option_file is not None:
source.append(option_file)
+ deps = ''
+ if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
+ deps = 'asn1_compile'
+
t = bld(rule=asn1_rule,
ext_out = '.x',
before = 'cc',
shell = True,
source = source,
target = out_files,
- depends_on = 'asn1_compile',
+ depends_on = deps,
name=name + '_ASN1')
t.env.ASN1NAME = asn1name
name=name)
-def HEIMDAL_LIBRARY(libname, source, deps, vnum, includes='', cflags='',
- version_script=None):
+def HEIMDAL_LIBRARY(libname, source, deps, vnum, version_script, includes='', cflags=''):
'''define a Heimdal library'''
obj_target = libname + '.objlist'
bundled_name = libname
version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION)
- if version_script:
- version_script = heimdal_path(version_script)
- elif bld.env.HAVE_LD_VERSION_SCRIPT:
- version_script = "%s.vscript" % libname
- namespace = version.replace("-","_").replace("+","_").upper(),
- HEIMDAL_GENERATOR(version_script,
- rule="echo %s \{ global: \*\; \}\; > ${TGT}" % namespace,
- group='vscripts',
- target=version_script)
- deps.append(version_script)
- version_script = os.path.join(bld.path.abspath(bld.env), version_script)
-
features = 'cc cshlib symlink_lib install_lib'
bld.set_group('libraries')
ldflags = ldflags,
vars = [version],
private_library = bundled_build,
- version_script = version_script,
+ version_script = heimdal_path(version_script),
)
)
-HEIMDAL_ASN1('HEIMDAL_KRB5_ASN1',
- 'lib/asn1/krb5.asn1',
- option_file='lib/asn1/krb5.opt',
- directory='lib/asn1'
- )
-
-
HEIMDAL_ASN1('HEIMDAL_DIGEST_ASN1',
'lib/asn1/digest.asn1',
directory='lib/asn1'
)
-HEIMDAL_ASN1('HEIMDAL_RFC2459_ASN1',
- 'lib/asn1/rfc2459.asn1',
- options='--preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints',
- directory='lib/asn1'
- )
-
-
-HEIMDAL_ASN1('HEIMDAL_PKINIT_ASN1',
- 'lib/asn1/pkinit.asn1',
- directory='lib/asn1'
- )
-
-
HEIMDAL_ASN1('HEIMDAL_KX509_ASN1',
'lib/asn1/kx509.asn1',
directory='lib/asn1'
HEIMDAL_LIBRARY('kdc', source=KDC_SOURCE,
includes='../heimdal/kdc',
- deps='roken krb5 hdb asn1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 heimntlm HEIMDAL_HCRYPTO com_err wind HEIMDAL_BASE',
+ deps='roken krb5 hdb asn1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 heimntlm hcrypto com_err wind heimbase',
vnum='2.0.0',
version_script='kdc/version-script.map')
HEIMDAL_AUTOPROTO('kdc/kdc-protos.h', KDC_SOURCE)
HEIMDAL_LIBRARY('heimntlm',
source=HEIMNTLM_SOURCE,
includes='../heimdal/lib/ntlm',
- deps='roken HEIMDAL_HCRYPTO krb5',
+ deps='roken hcrypto krb5',
vnum='1.0.1',
version_script='lib/ntlm/version-script.map',
)
HEIMDAL_SUBSYSTEM('HEIMDAL_HDB_KEYS',
'lib/hdb/keys.c',
includes='../heimdal/lib/hdb',
- deps='roken HEIMDAL_HCRYPTO krb5 HEIMDAL_HDB_ASN1'
+ deps='roken hcrypto krb5 HEIMDAL_HDB_ASN1'
)
version_script='lib/hdb/version-script.map',
source=HDB_SOURCE,
includes='../heimdal/lib/hdb',
- deps='krb5 HEIMDAL_HDB_KEYS roken HEIMDAL_HCRYPTO com_err HEIMDAL_HDB_ASN1 wind',
+ deps='krb5 HEIMDAL_HDB_KEYS roken hcrypto com_err HEIMDAL_HDB_ASN1 wind',
vnum='11.0.2',
)
HEIMDAL_AUTOPROTO('lib/hdb/hdb-protos.h', HDB_SOURCE)
lib/gssapi/mech/gss_export_sec_context.c lib/gssapi/mech/gss_inquire_context.c lib/gssapi/mech/gss_release_name.c
lib/gssapi/mech/gss_set_cred_option.c lib/gssapi/mech/gss_pseudo_random.c ../heimdal_build/gssapi-glue.c''',
includes='../heimdal/lib/gssapi ../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech',
- deps='HEIMDAL_HCRYPTO asn1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 roken krb5 com_err wind',
+ deps='hcrypto asn1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 roken krb5 com_err wind',
vnum='2.0.0',
+ version_script='lib/gssapi/version-script.map',
)
# expand_path.c needs some of the install paths
'lib/krb5/expand_path.c lib/krb5/plugin.c lib/krb5/context.c',
includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
cflags=bld.dynconfig_cflags('LIBDIR BINDIR LIBEXECDIR SBINDIR'),
- deps='HEIMDAL_HCRYPTO HEIMDAL_BASE wind hx509 com_err'
+ deps='hcrypto heimbase wind hx509 com_err'
)
KRB5_SOURCE = [os.path.join('lib/krb5/', x) for x in to_list(
heim_err.c k524_err.c krb_err.c''')] + ["../heimdal_build/krb5-glue.c"]
HEIMDAL_LIBRARY('krb5', KRB5_SOURCE,
+ version_script='lib/krb5/version-script.map',
includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
- deps='roken HEIMDAL_PKINIT_ASN1 wind HEIMDAL_KRB5_ASN1 hx509 HEIMDAL_HCRYPTO samba-hostconfig intl com_err HEIMDAL_CONFIG HEIMDAL_BASE',
+ deps='roken wind asn1 hx509 hcrypto samba-hostconfig intl com_err HEIMDAL_CONFIG heimbase',
vnum='26.0.0',
)
KRB5_PROTO_SOURCE = KRB5_SOURCE + ['lib/krb5/expand_path.c', 'lib/krb5/plugin.c', 'lib/krb5/context.c']
deps='roken com_err'
)
+ HEIMDAL_ASN1('HEIMDAL_RFC2459_ASN1',
+ 'lib/asn1/rfc2459.asn1',
+ options='--preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints',
+ directory='lib/asn1'
+ )
+
+ HEIMDAL_ASN1('HEIMDAL_KRB5_ASN1',
+ 'lib/asn1/krb5.asn1',
+ option_file='lib/asn1/krb5.opt',
+ directory='lib/asn1'
+ )
+
+ HEIMDAL_ASN1('HEIMDAL_PKINIT_ASN1',
+ 'lib/asn1/pkinit.asn1',
+ directory='lib/asn1'
+ )
+
+ HEIMDAL_ASN1('HEIMDAL_CMS_ASN1',
+ 'lib/asn1/cms.asn1',
+ option_file='lib/asn1/cms.opt',
+ directory='lib/asn1'
+ )
+
HEIMDAL_LIBRARY('asn1',
- deps="HEIMDAL_HEIM_ASN1",
+ version_script='lib/asn1/version-script.map',
+ deps="HEIMDAL_HEIM_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_KRB5_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_CMS_ASN1",
source='',
vnum='8.0.0')
-
-if not bld.CONFIG_SET("USING_SYSTEM_TOMMATH"):
- HEIMDAL_SUBSYSTEM('tommath',
+if not bld.CONFIG_SET('USING_SYSTEM_HCRYPTO'):
+ if not bld.CONFIG_SET("USING_SYSTEM_TOMMATH"):
+ HEIMDAL_SUBSYSTEM('tommath',
'lib/hcrypto/libtommath/bncore.c lib/hcrypto/libtommath/bn_mp_init.c lib/hcrypto/libtommath/bn_mp_clear.c lib/hcrypto/libtommath/bn_mp_exch.c lib/hcrypto/libtommath/bn_mp_grow.c lib/hcrypto/libtommath/bn_mp_shrink.c lib/hcrypto/libtommath/bn_mp_clamp.c lib/hcrypto/libtommath/bn_mp_zero.c lib/hcrypto/libtommath/bn_mp_zero_multi.c lib/hcrypto/libtommath/bn_mp_set.c lib/hcrypto/libtommath/bn_mp_set_int.c lib/hcrypto/libtommath/bn_mp_init_size.c lib/hcrypto/libtommath/bn_mp_copy.c lib/hcrypto/libtommath/bn_mp_init_copy.c lib/hcrypto/libtommath/bn_mp_abs.c lib/hcrypto/libtommath/bn_mp_neg.c lib/hcrypto/libtommath/bn_mp_cmp_mag.c lib/hcrypto/libtommath/bn_mp_cmp.c lib/hcrypto/libtommath/bn_mp_cmp_d.c lib/hcrypto/libtommath/bn_mp_rshd.c lib/hcrypto/libtommath/bn_mp_lshd.c lib/hcrypto/libtommath/bn_mp_mod_2d.c lib/hcrypto/libtommath/bn_mp_div_2d.c lib/hcrypto/libtommath/bn_mp_mul_2d.c lib/hcrypto/libtommath/bn_mp_div_2.c lib/hcrypto/libtommath/bn_mp_mul_2.c lib/hcrypto/libtommath/bn_s_mp_add.c lib/hcrypto/libtommath/bn_s_mp_sub.c lib/hcrypto/libtommath/bn_fast_s_mp_mul_digs.c lib/hcrypto/libtommath/bn_s_mp_mul_digs.c lib/hcrypto/libtommath/bn_fast_s_mp_mul_high_digs.c lib/hcrypto/libtommath/bn_s_mp_mul_high_digs.c lib/hcrypto/libtommath/bn_fast_s_mp_sqr.c lib/hcrypto/libtommath/bn_s_mp_sqr.c lib/hcrypto/libtommath/bn_mp_add.c lib/hcrypto/libtommath/bn_mp_sub.c lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c lib/hcrypto/libtommath/bn_mp_mul.c lib/hcrypto/libtommath/bn_mp_karatsuba_sqr.c lib/hcrypto/libtommath/bn_mp_sqr.c lib/hcrypto/libtommath/bn_mp_div.c lib/hcrypto/libtommath/bn_mp_mod.c lib/hcrypto/libtommath/bn_mp_add_d.c lib/hcrypto/libtommath/bn_mp_sub_d.c lib/hcrypto/libtommath/bn_mp_mul_d.c lib/hcrypto/libtommath/bn_mp_div_d.c lib/hcrypto/libtommath/bn_mp_mod_d.c lib/hcrypto/libtommath/bn_mp_expt_d.c lib/hcrypto/libtommath/bn_mp_addmod.c lib/hcrypto/libtommath/bn_mp_submod.c lib/hcrypto/libtommath/bn_mp_mulmod.c lib/hcrypto/libtommath/bn_mp_sqrmod.c lib/hcrypto/libtommath/bn_mp_gcd.c lib/hcrypto/libtommath/bn_mp_lcm.c lib/hcrypto/libtommath/bn_fast_mp_invmod.c lib/hcrypto/libtommath/bn_mp_invmod.c lib/hcrypto/libtommath/bn_mp_reduce.c lib/hcrypto/libtommath/bn_mp_montgomery_setup.c lib/hcrypto/libtommath/bn_fast_mp_montgomery_reduce.c lib/hcrypto/libtommath/bn_mp_montgomery_reduce.c lib/hcrypto/libtommath/bn_mp_exptmod_fast.c lib/hcrypto/libtommath/bn_mp_exptmod.c lib/hcrypto/libtommath/bn_mp_2expt.c lib/hcrypto/libtommath/bn_mp_n_root.c lib/hcrypto/libtommath/bn_mp_jacobi.c lib/hcrypto/libtommath/bn_reverse.c lib/hcrypto/libtommath/bn_mp_count_bits.c lib/hcrypto/libtommath/bn_mp_read_unsigned_bin.c lib/hcrypto/libtommath/bn_mp_read_signed_bin.c lib/hcrypto/libtommath/bn_mp_to_unsigned_bin.c lib/hcrypto/libtommath/bn_mp_to_signed_bin.c lib/hcrypto/libtommath/bn_mp_unsigned_bin_size.c lib/hcrypto/libtommath/bn_mp_signed_bin_size.c lib/hcrypto/libtommath/bn_mp_xor.c lib/hcrypto/libtommath/bn_mp_and.c lib/hcrypto/libtommath/bn_mp_or.c lib/hcrypto/libtommath/bn_mp_rand.c lib/hcrypto/libtommath/bn_mp_montgomery_calc_normalization.c lib/hcrypto/libtommath/bn_mp_prime_is_divisible.c lib/hcrypto/libtommath/bn_prime_tab.c lib/hcrypto/libtommath/bn_mp_prime_fermat.c lib/hcrypto/libtommath/bn_mp_prime_miller_rabin.c lib/hcrypto/libtommath/bn_mp_prime_is_prime.c lib/hcrypto/libtommath/bn_mp_prime_next_prime.c lib/hcrypto/libtommath/bn_mp_find_prime.c lib/hcrypto/libtommath/bn_mp_isprime.c lib/hcrypto/libtommath/bn_mp_dr_reduce.c lib/hcrypto/libtommath/bn_mp_dr_is_modulus.c lib/hcrypto/libtommath/bn_mp_dr_setup.c lib/hcrypto/libtommath/bn_mp_reduce_setup.c lib/hcrypto/libtommath/bn_mp_toom_mul.c lib/hcrypto/libtommath/bn_mp_toom_sqr.c lib/hcrypto/libtommath/bn_mp_div_3.c lib/hcrypto/libtommath/bn_s_mp_exptmod.c lib/hcrypto/libtommath/bn_mp_reduce_2k.c lib/hcrypto/libtommath/bn_mp_reduce_is_2k.c lib/hcrypto/libtommath/bn_mp_reduce_2k_setup.c lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c lib/hcrypto/libtommath/bn_mp_reduce_is_2k_l.c lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c lib/hcrypto/libtommath/bn_mp_radix_smap.c lib/hcrypto/libtommath/bn_mp_read_radix.c lib/hcrypto/libtommath/bn_mp_toradix.c lib/hcrypto/libtommath/bn_mp_radix_size.c lib/hcrypto/libtommath/bn_mp_fread.c lib/hcrypto/libtommath/bn_mp_fwrite.c lib/hcrypto/libtommath/bn_mp_cnt_lsb.c lib/hcrypto/libtommath/bn_error.c lib/hcrypto/libtommath/bn_mp_init_multi.c lib/hcrypto/libtommath/bn_mp_clear_multi.c lib/hcrypto/libtommath/bn_mp_exteuclid.c lib/hcrypto/libtommath/bn_mp_toradix_n.c lib/hcrypto/libtommath/bn_mp_prime_random_ex.c lib/hcrypto/libtommath/bn_mp_get_int.c lib/hcrypto/libtommath/bn_mp_sqrt.c lib/hcrypto/libtommath/bn_mp_is_square.c lib/hcrypto/libtommath/bn_mp_init_set.c lib/hcrypto/libtommath/bn_mp_init_set_int.c lib/hcrypto/libtommath/bn_mp_invmod_slow.c lib/hcrypto/libtommath/bn_mp_prime_rabin_miller_trials.c lib/hcrypto/libtommath/bn_mp_to_signed_bin_n.c lib/hcrypto/libtommath/bn_mp_to_unsigned_bin_n.c',
includes='../heimdal/lib/hcrypto/libtommath'
- )
+ )
-# FIXME: This should be a library:
-HEIMDAL_SUBSYSTEM('HEIMDAL_HCRYPTO',
- 'lib/hcrypto/aes.c lib/hcrypto/bn.c lib/hcrypto/dh.c lib/hcrypto/dh-ltm.c lib/hcrypto/des.c lib/hcrypto/dsa.c lib/hcrypto/engine.c lib/hcrypto/md2.c lib/hcrypto/md4.c lib/hcrypto/md5.c lib/hcrypto/rsa.c lib/hcrypto/rsa-ltm.c lib/hcrypto/rc2.c lib/hcrypto/rc4.c lib/hcrypto/rijndael-alg-fst.c lib/hcrypto/rnd_keys.c lib/hcrypto/sha.c lib/hcrypto/sha256.c lib/hcrypto/sha512.c lib/hcrypto/ui.c lib/hcrypto/evp.c lib/hcrypto/evp-hcrypto.c lib/hcrypto/pkcs5.c lib/hcrypto/pkcs12.c lib/hcrypto/rand.c lib/hcrypto/rand-egd.c lib/hcrypto/rand-unix.c lib/hcrypto/rand-fortuna.c lib/hcrypto/rand-timer.c lib/hcrypto/hmac.c lib/hcrypto/camellia.c lib/hcrypto/camellia-ntt.c lib/hcrypto/common.c lib/hcrypto/validate.c',
- includes='../heimdal/lib/hcrypto ../heimdal/lib ../heimdal/include',
- deps='roken asn1 HEIMDAL_RFC2459_ASN1 tommath'
- )
+ HEIMDAL_LIBRARY('hcrypto',
+ 'lib/hcrypto/aes.c lib/hcrypto/bn.c lib/hcrypto/dh.c lib/hcrypto/dh-ltm.c lib/hcrypto/des.c lib/hcrypto/dsa.c lib/hcrypto/engine.c lib/hcrypto/md2.c lib/hcrypto/md4.c lib/hcrypto/md5.c lib/hcrypto/rsa.c lib/hcrypto/rsa-ltm.c lib/hcrypto/rc2.c lib/hcrypto/rc4.c lib/hcrypto/rijndael-alg-fst.c lib/hcrypto/rnd_keys.c lib/hcrypto/sha.c lib/hcrypto/sha256.c lib/hcrypto/sha512.c lib/hcrypto/ui.c lib/hcrypto/evp.c lib/hcrypto/evp-hcrypto.c lib/hcrypto/pkcs5.c lib/hcrypto/pkcs12.c lib/hcrypto/rand.c lib/hcrypto/rand-egd.c lib/hcrypto/rand-unix.c lib/hcrypto/rand-fortuna.c lib/hcrypto/rand-timer.c lib/hcrypto/hmac.c lib/hcrypto/camellia.c lib/hcrypto/camellia-ntt.c lib/hcrypto/common.c lib/hcrypto/validate.c',
+ includes='../heimdal/lib/hcrypto ../heimdal/lib ../heimdal/include',
+ deps='roken asn1 tommath replace',
+ version_script='lib/hcrypto/version-script.map',
+ vnum='5.0.1',
+ )
-HEIMDAL_SUBSYSTEM('HEIMDAL_BASE',
- 'base/array.c base/bool.c base/dict.c base/heimbase.c base/string.c base/number.c base/null.c',
- includes='../heimdal/base ../heimdal/include',
- deps='roken replace'
- )
+if not bld.CONFIG_SET('USING_SYSTEM_HEIMBASE'):
+ HEIMDAL_LIBRARY('heimbase',
+ 'base/array.c base/bool.c base/dict.c base/heimbase.c base/string.c base/number.c base/null.c',
+ includes='../heimdal/base ../heimdal/include',
+ deps='roken replace',
+ version_script='base/version-script.map',
+ vnum='1.0.0',
+ )
if not bld.CONFIG_SET("USING_SYSTEM_HX509"):
directory='lib/asn1'
)
- HEIMDAL_ASN1('HEIMDAL_CMS_ASN1',
- 'lib/asn1/cms.asn1',
- option_file='lib/asn1/cms.opt',
- directory='lib/asn1'
- )
-
HEIMDAL_ASN1('HEIMDAL_PKCS10_ASN1',
'lib/hx509/pkcs10.asn1',
options='--preserve-binary=CertificationRequestInfo',
HEIMDAL_LIBRARY('hx509',
'lib/hx509/ca.c lib/hx509/cert.c lib/hx509/cms.c lib/hx509/collector.c lib/hx509/crypto.c lib/hx509/error.c lib/hx509/env.c lib/hx509/file.c lib/hx509/keyset.c lib/hx509/ks_dir.c lib/hx509/ks_file.c lib/hx509/ks_keychain.c lib/hx509/ks_mem.c lib/hx509/ks_null.c lib/hx509/ks_p11.c lib/hx509/ks_p12.c lib/hx509/lock.c lib/hx509/name.c lib/hx509/peer.c lib/hx509/print.c lib/hx509/req.c lib/hx509/revoke.c lib/hx509/sel.c lib/hx509/hx509_err.c lib/hx509/sel-lex.c lib/hx509/sel-gram.c',
includes='../heimdal/lib/hx509',
- deps='roken com_err asn1 HEIMDAL_HCRYPTO HEIMDAL_CMS_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_PKCS10_ASN1 wind HEIMDAL_KRB5_ASN1',
+ deps='roken com_err asn1 hcrypto asn1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKCS10_ASN1 wind',
vnum='5.0.0',
+ version_script='lib/hx509/version-script.map',
)
if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
group='build_compilers',
deps='roken replace')
-# here is the asn1 compiler build rule
-HEIMDAL_BINARY('asn1_compile',
+
+if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
+ # here is the asn1 compiler build rule
+ HEIMDAL_BINARY('asn1_compile',
'lib/asn1/main.c lib/asn1/gen.c lib/asn1/gen_copy.c lib/asn1/gen_decode.c lib/asn1/gen_encode.c lib/asn1/gen_free.c lib/asn1/gen_glue.c lib/asn1/gen_length.c lib/asn1/gen_seq.c lib/asn1/gen_template.c lib/asn1/hash.c lib/asn1/symbol.c lib/asn1/asn1parse.c lib/asn1/lex.c',
use_hostcc=True,
use_global_deps=False,
deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
install=False
)
+ bld.env['ASN1_COMPILE'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'asn1_compile')
if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):