aboutsummaryrefslogtreecommitdiff
path: root/security/heimdal
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2001-01-04 16:30:04 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2001-01-04 16:30:04 +0000
commita207a15093cad6901190cb8087a5a365221b810d (patch)
treef5f003711c5ecbd2352487e36bfee9c6e6cb40fa /security/heimdal
parent1c9523727951fecdcbf6b239bff973c48bbadedd (diff)
downloadports-a207a15093cad6901190cb8087a5a365221b810d.tar.gz
ports-a207a15093cad6901190cb8087a5a365221b810d.zip
= Update to use OpenSSL in the base if it has MD4 support (version 0.9.6
or later). If these libraries are used, then this port's libdes will not be built nor installed. = A man page was renamed that I missed earlier: afs.3 -> kafs.3
Notes
Notes: svn path=/head/; revision=36783
Diffstat (limited to 'security/heimdal')
-rw-r--r--security/heimdal/Makefile28
-rw-r--r--security/heimdal/files/patch-cb18
-rw-r--r--security/heimdal/files/patch-cc20
-rw-r--r--security/heimdal/files/patch-cl1
-rw-r--r--security/heimdal/files/patch-cs38
-rw-r--r--security/heimdal/pkg-plist4
-rw-r--r--security/heimdal/pkg-plist.des9
7 files changed, 107 insertions, 11 deletions
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile
index 7fe9aec1a3e7..eaf75cdfd8c8 100644
--- a/security/heimdal/Makefile
+++ b/security/heimdal/Makefile
@@ -7,6 +7,7 @@
PORTNAME= heimdal
PORTVERSION= 0.3d
+PORTREVISION= 1
CATEGORIES= security ipv6
MASTER_SITES= ftp://ftp.pdc.kth.se/pub/heimdal/src/ \
ftp://ftp.replay.com/pub/replay/crypto/APPS/kerberos/heimdal/ \
@@ -24,7 +25,7 @@ RESTRICTED= "Crypto; export-controlled"
MAN1= ftp.1 kdestroy.1 kf.1 kgetcred.1 kinit.1 klist.1 kpasswd.1 \
krb5-config.1 kx.1 otp.1 otpprint.1 pfrom.1 rxtelnet.1 \
rxterm.1 telnet.1 tenletxr.1 xnlock.1
-MAN3= editline.3 afs.3 krb5_425_conv_principal.3 krb5_appdefault.3 \
+MAN3= editline.3 kafs.3 krb5_425_conv_principal.3 krb5_appdefault.3 \
krb5_build_principal.3 krb5_config.3 krb5_free_principal.3 \
krb5_openlog.3 krb5_parse_name.3 krb5_sname_to_principal.3 \
krb5_unparse_name.3 krb5_warn.3
@@ -39,6 +40,7 @@ MAN8= ftpd.8 hprop.8 hpropd.8 kadmin.8 kadmind.8 kdc.8 kerberos.8 \
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}--freebsd${OSREL}
INSTALLS_SHLIB= yes
+CONFIGURE_ENV= CPPFLAGS="${OPENSSL_INCLUDE}"
CONFIGURE_ARGS= --prefix=${PREFIX} --enable-shared
.if defined(WITH_LDAP)
CONFIGURE_ARGS+= --with-openldap=${LOCALBASE}
@@ -64,13 +66,34 @@ CONFIGURE_ARGS+= --with-krb4
CONFIGURE_ARGS+= --without-krb4
.endif
+# OpenSSL 0.9.6 and later have MD4 and can be used in the build
+.if exists(/usr/include/openssl/md4.h) && exists(/usr/lib/libdes.a)
+OPENSSL_INCLUDE= -I/usr/include/openssl
+OPENSSL_IN_BASE= YES
+.endif
+
PLIST:= ${WRKDIR}/PLIST
+# The crypto APIs in the included libdes are trivially different from
+# those in OpenSSL, e.g. MD5Init versus MD5_Init. To make things simpler,
+# we normalize the API to use the latter naming convention. These are a
+# list of the files that must be munged.
+CRYPTO_FIXUP= lib/des/fcrypt.c lib/des/md4.c lib/des/md4.h \
+ lib/des/md5.c lib/des/md5.h lib/des/mdtest.c \
+ lib/des/sha.c lib/des/sha.h lib/gssapi/8003.c \
+ lib/gssapi/get_mic.c lib/gssapi/unwrap.c \
+ lib/gssapi/verify_mic.c lib/gssapi/wrap.c \
+ lib/krb5/crypto.c lib/krb5/replay.c lib/otp/otp_md.c
+
pre-configure:
@(set -e; \
cd ${CONFIGURE_WRKSRC}; \
find . -type f -name 'Makefile.in' -print | xargs perl -i -pe \
's,\$$\(top_builddir\)/lib/com_err/compile_et,compile_et,';)
+ (cd ${WRKSRC} && ${PERL} -i.orig -p \
+ -e 's/(SHA1|MD5|MD4)(Init|Update|Final)/$$1_$$2/g;' \
+ -e 's/SHA1_CTX/SHA_CTX/g;' \
+ ${CRYPTO_FIXUP})
pre-install:
@${CP} ${PKGDIR}/pkg-plist ${PLIST}
@@ -80,6 +103,9 @@ pre-install:
.if defined(USE_XLIB)
@${CAT} ${PKGDIR}/pkg-plist.x11 >> ${PLIST}
.endif
+.if !defined(OPENSSL_IN_BASE)
+ @${CAT} ${PKGDIR}/pkg-plist.des >> ${PLIST}
+.endif
# awful hack to avoid running automake after patching configure
pre-configure:
diff --git a/security/heimdal/files/patch-cb b/security/heimdal/files/patch-cb
index 8b37f0216780..ce1c4ad6646c 100644
--- a/security/heimdal/files/patch-cb
+++ b/security/heimdal/files/patch-cb
@@ -1,5 +1,5 @@
---- configure.in.orig Wed Aug 30 07:17:26 2000
-+++ configure.in Wed Aug 30 07:18:03 2000
+--- configure.in.orig Sun Dec 10 21:19:36 2000
++++ configure.in Thu Jan 4 08:49:14 2001
@@ -83,6 +83,10 @@
LIB_openldap="-rpath $openldap_libdir $LIB_openldap"
fi
@@ -11,3 +11,17 @@
AC_TEST_PACKAGE_NEW(krb4,[#include <krb.h>],-lkrb,-ldes,/usr/athena, KRB4)
LIB_kdb=
+@@ -561,7 +565,12 @@
+ \( "$ac_cv_func_SHA1Init" = "yes" -o "$ac_cv_func_SHA1_Init" = "yes" \) -a \
+ "$ac_cv_func_RC4" = "yes"; then
+ DIR_des=''
+- LIB_des="-rpath $krb4_libdir -L$krb4_libdir $ac_cv_funclib_MD4Init"
++ LIB_des="-rpath $krb4_libdir -L$krb4_libdir"
++ if test "$ac_cv_func_MD4Init" = "yes"; then
++ LIB_des="$LIB_des $ac_cv_funclib_MD4Init"
++ else
++ LIB_des="$LIB_des $ac_cv_funclib_MD4_Init"
++ fi
+ else
+ DIR_des='des'
+ LIB_des='$(top_builddir)/lib/des/libdes.la'
diff --git a/security/heimdal/files/patch-cc b/security/heimdal/files/patch-cc
index d4fd8fc8359a..eaf8dbd24672 100644
--- a/security/heimdal/files/patch-cc
+++ b/security/heimdal/files/patch-cc
@@ -1,6 +1,6 @@
---- configure.orig Wed Aug 30 07:17:21 2000
-+++ configure Wed Aug 30 07:18:31 2000
-@@ -9346,6 +9346,10 @@
+--- configure.orig Sun Dec 10 21:21:14 2000
++++ configure Thu Jan 4 08:53:33 2001
+@@ -9511,6 +9511,10 @@
LIB_openldap="-rpath $openldap_libdir $LIB_openldap"
fi
@@ -11,3 +11,17 @@
# Check whether --with-krb4 or --without-krb4 was given.
if test "${with_krb4+set}" = set; then
withval="$with_krb4"
+@@ -18164,7 +18168,12 @@
+ \( "$ac_cv_func_SHA1Init" = "yes" -o "$ac_cv_func_SHA1_Init" = "yes" \) -a \
+ "$ac_cv_func_RC4" = "yes"; then
+ DIR_des=''
+- LIB_des="-rpath $krb4_libdir -L$krb4_libdir $ac_cv_funclib_MD4Init"
++ LIB_des="-rpath $krb4_libdir -L$krb4_libdir"
++ if test "$ac_cv_func_MD4Init" = "yes"; then
++ LIB_des="$LIB_des $ac_cv_funclib_MD4Init"
++ else
++ LIB_des="$LIB_des $ac_cv_funclib_MD4_Init"
++ fi
+ else
+ DIR_des='des'
+ LIB_des='$(top_builddir)/lib/des/libdes.la'
diff --git a/security/heimdal/files/patch-cl b/security/heimdal/files/patch-cl
index 87e7d1b21bfe..015645d31f68 100644
--- a/security/heimdal/files/patch-cl
+++ b/security/heimdal/files/patch-cl
@@ -31,4 +31,3 @@
+/*
* Enable debug on `sock'.
*/
-
diff --git a/security/heimdal/files/patch-cs b/security/heimdal/files/patch-cs
new file mode 100644
index 000000000000..6d774125905a
--- /dev/null
+++ b/security/heimdal/files/patch-cs
@@ -0,0 +1,38 @@
+--- lib/otp/otp_md.c.orig Tue Jul 11 19:26:43 2000
++++ lib/otp/otp_md.c Thu Jan 4 09:38:17 2001
+@@ -212,7 +212,7 @@
+ */
+
+ static void
+-SHA1Final_little_endian (void *res, struct sha1 *m)
++SHA1Final_little_endian (void *res, SHA_CTX *m)
+ {
+ unsigned char tmp[20];
+ unsigned char *p = res;
+@@ -231,7 +231,7 @@
+ otp_sha_init (OtpKey key, const char *pwd, const char *seed)
+ {
+ unsigned char res[20];
+- struct sha1 sha1;
++ SHA_CTX sha1;
+
+ return otp_md_init (key, pwd, seed,
+ (void (*)(void *))SHA1Init,
+@@ -245,7 +245,7 @@
+ size_t len,
+ unsigned char *res)
+ {
+- struct sha1 sha1;
++ SHA_CTX sha1;
+
+ return otp_md_hash (data, len,
+ (void (*)(void *))SHA1Init,
+@@ -258,7 +258,7 @@
+ otp_sha_next (OtpKey key)
+ {
+ unsigned char res[20];
+- struct sha1 sha1;
++ SHA_CTX sha1;
+
+ return otp_md_next (key,
+ (void (*)(void *))SHA1Init,
diff --git a/security/heimdal/pkg-plist b/security/heimdal/pkg-plist
index 97e53177f79c..94e4a48f4e0c 100644
--- a/security/heimdal/pkg-plist
+++ b/security/heimdal/pkg-plist
@@ -1,4 +1,3 @@
-bin/des
bin/ftp
bin/kauth
bin/kdestroy
@@ -64,9 +63,6 @@ info/heimdal.info
lib/libasn1.a
lib/libasn1.so
lib/libasn1.so.3
-lib/libdes.a
-lib/libdes.so
-lib/libdes.so.2
lib/libeditline.a
lib/libgssapi.a
lib/libgssapi.so
diff --git a/security/heimdal/pkg-plist.des b/security/heimdal/pkg-plist.des
new file mode 100644
index 000000000000..94b1dba30847
--- /dev/null
+++ b/security/heimdal/pkg-plist.des
@@ -0,0 +1,9 @@
+bin/des
+include/des.h
+include/md4.h
+include/md5.h
+include/rc4.h
+include/sha.h
+lib/libdes.a
+lib/libdes.so
+lib/libdes.so.2