diff options
author | jlam <jlam@pkgsrc.org> | 2004-12-04 03:59:26 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-12-04 03:59:26 +0000 |
commit | 283e91c40ba6063c93e665d6ce91d00349353eef (patch) | |
tree | 412092f12ad4e3bd36dffaeb876e360492505f56 /security | |
parent | 82e6af1f32be2ae5a6a0e889b7c1077ed8327139 (diff) | |
download | pkgsrc-283e91c40ba6063c93e665d6ce91d00349353eef.tar.gz |
Set USE_OLD_DES_API and replace custom changes to work with NetBSD-2.0's
OpenSSL, with patches to use <openssl/des_old.h>.
Diffstat (limited to 'security')
-rw-r--r-- | security/heimdal/Makefile | 19 | ||||
-rw-r--r-- | security/heimdal/distinfo | 5 | ||||
-rw-r--r-- | security/heimdal/patches/patch-ad | 166 | ||||
-rw-r--r-- | security/heimdal/patches/patch-ah | 13 |
4 files changed, 55 insertions, 148 deletions
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index 9e433f3f0d9..7d22a9ff11d 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2004/11/28 19:19:52 jlam Exp $ +# $NetBSD: Makefile,v 1.30 2004/12/04 03:59:26 jlam Exp $ DISTNAME= heimdal-0.6.3 PKGREVISION= 2 @@ -38,6 +38,7 @@ BROKEN_READLINE_DETECTION= yes .include "../../devel/readline/buildlink3.mk" CONFIGURE_ARGS+= --with-openssl=${SSLBASE} +USE_OLD_DES_API= yes .include "../../security/openssl/buildlink3.mk" .if defined(KERBEROS_PREFIX_CMDS) && !empty(KERBEROS_PREFIX_CMDS:M[yY][eE][sS]) @@ -98,22 +99,6 @@ SUBST_SED.heimdal= \ -e "/PATH_RSH/s,/rsh,/${KRB5_PREFIX}rsh,g" \ -e "/PATH_LOGIN/s,/login,/${KRB5_PREFIX}login,g" -# The configure script only groks the OpenSSL 0.9.6 DES API, so make the -# newer OpenSSL releases look more like the old one. -# -post-wrapper: - if ${GREP} -q des_cblock ${SSLBASE}/include/openssl/des.h 2>/dev/null; then \ - : ; \ - else \ - ${MKDIR} -p ${BUILDLINK_DIR}/include/openssl; \ - if [ -f ${SSLBASE}/include/openssl/des_old.h ]; then \ - src="${SSLBASE}/include/openssl/des_old.h"; \ - else \ - src="${SSLBASE}/include/des.h"; \ - fi; \ - ${LN} -fs $$src ${BUILDLINK_DIR}/include/openssl; \ - fi - pre-configure: cd ${WRKSRC}; for file in lib/hdb/hdb.h; do \ ${SED} -e "s|/var/heimdal|${HEIMDAL_STATEDIR}|g" \ diff --git a/security/heimdal/distinfo b/security/heimdal/distinfo index 9dd5e550d47..6451dd01593 100644 --- a/security/heimdal/distinfo +++ b/security/heimdal/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.7 2004/11/19 23:16:02 jlam Exp $ +$NetBSD: distinfo,v 1.8 2004/12/04 03:59:26 jlam Exp $ SHA1 (heimdal-0.6.3.tar.gz) = 91863a1bd9f8a55063a09c28a5f41985b7a31145 Size (heimdal-0.6.3.tar.gz) = 3333604 bytes SHA1 (patch-ab) = 400a9ac3a76ac7e8b4dcc230e0bdf7fc5222fbb7 SHA1 (patch-ac) = 121961811f559822c6a4f3d7f7e4646b16908942 -SHA1 (patch-ad) = 72cb2bb0a92a7ddbaf02b4cedc09f7225949c578 +SHA1 (patch-ad) = b2ebbf5ad71125634fd569a0ee0245d23bcfd068 SHA1 (patch-ae) = 518eabed07d4fc69e86ace3f02d23ca3064d4bd1 +SHA1 (patch-ah) = b7ef27e2a218d5f69180f799b31a1b6c08ec602f diff --git a/security/heimdal/patches/patch-ad b/security/heimdal/patches/patch-ad index 0d45845d408..abdd50b2b5e 100644 --- a/security/heimdal/patches/patch-ad +++ b/security/heimdal/patches/patch-ad @@ -1,4 +1,4 @@ -$NetBSD: patch-ad,v 1.3 2004/11/19 23:16:02 jlam Exp $ +$NetBSD: patch-ad,v 1.4 2004/12/04 03:59:27 jlam Exp $ --- configure.orig 2004-09-13 08:27:10.000000000 -0400 +++ configure @@ -12,131 +12,39 @@ $NetBSD: patch-ad,v 1.3 2004/11/19 23:16:02 jlam Exp $ # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -@@ -22413,6 +22410,127 @@ rm -f conftest.err conftest.$ac_objext \ - LIBS="$save_LIBS" - fi - -+if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then -+ save_CFLAGS="$CFLAGS" -+ save_LIBS="$LIBS" -+ INCLUDE_des= -+ LIB_des= -+ if test "$with_openssl_include" != ""; then -+ INCLUDE_des="-I${with_openssl_include}" -+ fi -+ if test "$with_openssl_lib" != ""; then -+ LIB_des="-L${with_openssl_lib}" -+ fi -+ CFLAGS="-DHAVE_OPENSSL ${INCLUDE_des} ${CFLAGS}" -+ saved_LIB_des="$LIB_des" -+ for lres in "" "-lnsl -lsocket"; do -+ LIB_des="${saved_LIB_des} -ldes -lcrypto $lres" -+ LIB_des_a="$LIB_des" -+ LIB_des_so="$LIB_des" -+ LIB_des_appl="$LIB_des" -+ LIBS="${LIBS} ${LIB_des}" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #undef KRB5 /* makes md4.h et al unhappy */ -+ #ifdef HAVE_OPENSSL -+ #include <openssl/md4.h> -+ #include <openssl/md5.h> -+ #include <openssl/sha.h> -+ #define OPENSSL_DES_LIBDES_COMPATIBILITY -+ #include <openssl/des.h> -+ #include <openssl/rc4.h> -+ #include <openssl/rand.h> -+ #else -+ #include <md4.h> -+ #include <md5.h> -+ #include <sha.h> -+ #include <des.h> -+ #include <rc4.h> -+ #endif -+ #ifdef OLD_HASH_NAMES -+ typedef struct md4 MD4_CTX; -+ #define MD4_Init(C) md4_init((C)) -+ #define MD4_Update(C, D, L) md4_update((C), (D), (L)) -+ #define MD4_Final(D, C) md4_finito((C), (D)) -+ typedef struct md5 MD5_CTX; -+ #define MD5_Init(C) md5_init((C)) -+ #define MD5_Update(C, D, L) md5_update((C), (D), (L)) -+ #define MD5_Final(D, C) md5_finito((C), (D)) -+ typedef struct sha SHA_CTX; -+ #define SHA1_Init(C) sha_init((C)) -+ #define SHA1_Update(C, D, L) sha_update((C), (D), (L)) -+ #define SHA1_Final(D, C) sha_finito((C), (D)) -+ #endif -+ -+int -+main () -+{ -+ -+ void *schedule = 0; -+ MD4_CTX md4; -+ MD5_CTX md5; -+ SHA_CTX sha1; -+ -+ MD4_Init(&md4); -+ MD5_Init(&md5); -+ SHA1_Init(&sha1); -+ #ifdef HAVE_OPENSSL -+ RAND_status(); -+ #endif -+ -+ des_cbc_encrypt(0, 0, 0, schedule, 0, 0); -+ RC4(0, 0, 0, 0); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ -+ crypto_lib=libcrypto openssl=yes -+ echo "$as_me:$LINENO: result: libcrypto" >&5 -+echo "${ECHO_T}libcrypto" >&6 -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ if test "$crypto_lib" = libcrypto ; then -+ break; -+ fi -+ done -+ CFLAGS="$save_CFLAGS" -+ LIBS="$save_LIBS" -+fi -+ - if test "$crypto_lib" = "unknown"; then - - DIR_des='des' +@@ -22005,7 +22002,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #include <openssl/md5.h> + #include <openssl/sha.h> + #define OPENSSL_DES_LIBDES_COMPATIBILITY +- #include <openssl/des.h> ++ #include <openssl/des_old.h> + #include <openssl/rc4.h> + #include <openssl/rand.h> + #else +@@ -22101,7 +22098,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #include <openssl/md5.h> + #include <openssl/sha.h> + #define OPENSSL_DES_LIBDES_COMPATIBILITY +- #include <openssl/des.h> ++ #include <openssl/des_old.h> + #include <openssl/rc4.h> + #include <openssl/rand.h> + #else +@@ -22197,7 +22194,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #include <openssl/md5.h> + #include <openssl/sha.h> + #define OPENSSL_DES_LIBDES_COMPATIBILITY +- #include <openssl/des.h> ++ #include <openssl/des_old.h> + #include <openssl/rc4.h> + #include <openssl/rand.h> + #else +@@ -22324,7 +22321,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #include <openssl/md5.h> + #include <openssl/sha.h> + #define OPENSSL_DES_LIBDES_COMPATIBILITY +- #include <openssl/des.h> ++ #include <openssl/des_old.h> + #include <openssl/rc4.h> + #include <openssl/rand.h> + #else diff --git a/security/heimdal/patches/patch-ah b/security/heimdal/patches/patch-ah new file mode 100644 index 00000000000..81eccd55fa1 --- /dev/null +++ b/security/heimdal/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1 2004/12/04 03:59:27 jlam Exp $ + +--- include/make_crypto.c.orig 2003-05-05 16:10:27.000000000 -0400 ++++ include/make_crypto.c +@@ -61,7 +61,7 @@ main(int argc, char **argv) + fprintf(f, "#define __%s__\n", argv[1]); + #ifdef HAVE_OPENSSL + fputs("#define OPENSSL_DES_LIBDES_COMPATIBILITY\n", f); +- fputs("#include <openssl/des.h>\n", f); ++ fputs("#include <openssl/des_old.h>\n", f); + fputs("#include <openssl/rc4.h>\n", f); + fputs("#include <openssl/md4.h>\n", f); + fputs("#include <openssl/md5.h>\n", f); |