summaryrefslogtreecommitdiff
path: root/security/mit-krb5
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-30 18:07:17 +0000
committerjlam <jlam@pkgsrc.org>2004-03-30 18:07:17 +0000
commite2f5ceaba11e750f28a0958c866b51670197b3c7 (patch)
tree07431aa4b519ee9f6f886e5231aa49f6354c3d27 /security/mit-krb5
parenteba95371ec5f82389712d446f67a1852a3a31486 (diff)
downloadpkgsrc-e2f5ceaba11e750f28a0958c866b51670197b3c7.tar.gz
Import MIT Kerberos 5 as security/mit-krb5. This package is partly based
on the wip/mit-krb5 package by Jeremy Reed, but heavily modified by me to libtoolize the build. Kerberos V5 is an authentication system developed at MIT. It is a network authentication protocol designed to provide strong authentication for client/server applications by using secret-key cryptography. (Kerberos 5 is discussed in RFC 1510.) This package provides Kerberos and GSSAPI (Generic Security Services Application Programming Interface) development headers and libraries. It also includes Kerberos ticket and principal tools, and Kerberized r-services, telnet and ftp services.
Diffstat (limited to 'security/mit-krb5')
-rw-r--r--security/mit-krb5/DESCR9
-rw-r--r--security/mit-krb5/Makefile121
-rw-r--r--security/mit-krb5/PLIST133
-rw-r--r--security/mit-krb5/buildlink2.mk33
-rw-r--r--security/mit-krb5/buildlink3.mk18
-rw-r--r--security/mit-krb5/distinfo13
-rw-r--r--security/mit-krb5/files/kadmind.sh24
-rw-r--r--security/mit-krb5/files/kdc.sh24
-rw-r--r--security/mit-krb5/patches/patch-aa81
-rw-r--r--security/mit-krb5/patches/patch-ab23
-rw-r--r--security/mit-krb5/patches/patch-ac15
-rw-r--r--security/mit-krb5/patches/patch-ad69
-rw-r--r--security/mit-krb5/patches/patch-ae35
-rw-r--r--security/mit-krb5/patches/patch-af95
-rw-r--r--security/mit-krb5/patches/patch-ag28
-rw-r--r--security/mit-krb5/patches/patch-ah31
-rw-r--r--security/mit-krb5/patches/patch-ai13
17 files changed, 765 insertions, 0 deletions
diff --git a/security/mit-krb5/DESCR b/security/mit-krb5/DESCR
new file mode 100644
index 00000000000..4d0405cb144
--- /dev/null
+++ b/security/mit-krb5/DESCR
@@ -0,0 +1,9 @@
+Kerberos V5 is an authentication system developed at MIT. It is a network
+authentication protocol designed to provide strong authentication for
+client/server applications by using secret-key cryptography. (Kerberos
+5 is discussed in RFC 1510.)
+
+This package provides Kerberos and GSSAPI (Generic Security Services
+Application Programming Interface) development headers and libraries.
+It also includes Kerberos ticket and principal tools, and Kerberized
+r-services, telnet and ftp services.
diff --git a/security/mit-krb5/Makefile b/security/mit-krb5/Makefile
new file mode 100644
index 00000000000..c8ba14c4be2
--- /dev/null
+++ b/security/mit-krb5/Makefile
@@ -0,0 +1,121 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+DISTNAME= krb5-1.3.1
+PKGNAME= mit-${DISTNAME}
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
+CATEGORIES= security
+
+MAINTAINER= jlam@NetBSD.org
+HOMEPAGE= http://web.mit.edu/kerberos/www/
+COMMENT= MIT Kerberos 5 authentication system
+
+RESTRICTED= "Redistribution not permitted"
+NO_SRC_ON_FTP= ${RESTRICTED}
+NO_SRC_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+NO_BIN_ON_CDROM= ${RESTRICTED}
+
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(USE_MIT_KRB5_MASTER_SITE)
+MASTER_SITE= # empty
+EXTRACT_SUFX= .tar
+DOWNLOAD= http://web.mit.edu/network/kerberos-form.html
+INTERACTIVE_STAGE= fetch
+
+_FETCH_MESSAGE= \
+ ${ECHO} "==============================================================="; \
+ ${ECHO} " MIT Kerberos V5 source code (${DISTNAME}${EXTRACT_SUFX}) can be fetched"; \
+ ${ECHO} " into ${DISTDIR} from"; \
+ ${ECHO} " ${DOWNLOAD}."; \
+ ${ECHO} "==============================================================="
+
+post-extract:
+ cd ${WRKDIR} && ${PAX} -O -rzf ${WRKDIR}/${DISTNAME}.tar.gz
+.else
+MASTER_SITES= http://www.crypto-publish.org/dist/mit-kerberos5/ \
+ http://www.mirrors.wiretapped.net/security/cryptography/apps/kerberos/krb5-mit/unix/
+EXTRACT_SUFX= .tar.gz
+.endif
+
+CONFLICTS+= heimdal-[0-9]*
+CONFLICTS+= kth-krb4-[0-9]*
+
+.if !exists(/usr/bin/yacc)
+BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
+YACC= ${LOCALBASE}/bin/bison -y
+.endif
+
+USE_BUILDLINK3= yes
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+
+# The actual KDC databases are stored in ${MIT_KRB5_STATEDIR}/krb5kdc.
+MIT_KRB5_STATEDIR?= /var
+FILES_SUBST+= MIT_KRB5_STATEDIR=${MIT_KRB5_STATEDIR}
+
+CONFIGURE_ARGS+= --localstatedir=${MIT_KRB5_STATEDIR}
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --enable-shared
+CONFIGURE_ARGS+= --enable-pkgsrc-libtool
+CONFIGURE_ARGS+= --enable-dns
+CONFIGURE_ARGS+= --enable-kdc-replay-cache
+CONFIGURE_ARGS+= --without-krb4
+CONFIGURE_ARGS+= --without-tcl
+MAKE_ENV+= ROOT_USER=${ROOT_USER}
+
+# Rename some of MIT krb5's applications so they won't conflict with
+# other packages.
+#
+BUILD_DEFS+= KERBEROS_PREFIX_CMDS
+.if !empty(KERBEROS_PREFIX_CMDS:M[yY][eE][sS])
+KRB5_PREFIX= k
+MIT_KRB5_TRANSFORM= s/^ftp/${KRB5_PREFIX}&/; \
+ s/^rcp/${KRB5_PREFIX}&/; \
+ s/^rlogin/${KRB5_PREFIX}&/; \
+ s/^rsh/${KRB5_PREFIX}&/; \
+ s/^telnet/${KRB5_PREFIX}&/
+.else
+KRB5_PREFIX= # empty
+MIT_KRB5_TRANSFORM= s/^ftp/k&/
+.endif
+PLIST_SUBST+= KRB5_PREFIX=${KRB5_PREFIX}
+CONFIGURE_ARGS+= --program-transform-name="${MIT_KRB5_TRANSFORM}"
+
+# Fix some places in the MIT krb5 sources that don't point to the correct
+# Kerberized binaries when exec'ing programs.
+#
+SUBST_CLASSES+= mit-krb5
+SUBST_STAGE.mit-krb5= pre-configure
+SUBST_FILES.mit-krb5= include/krb5/stock/osconf.h
+SUBST_SED.mit-krb5= -e "/KRB5_PATH_RLOGIN/s,/rlogin,/${KRB5_PREFIX}rlogin,g"
+
+INFO_FILES= krb425.info krb5-admin.info krb5-install.info krb5-user.info
+
+USE_PKGINSTALL= yes
+OWN_DIRS_PERMS= ${MIT_KRB5_STATEDIR}/krb5kdc \
+ ${ROOT_USER} ${ROOT_GROUP} 0700
+RCD_SCRIPTS= kadmind kdc
+
+INSTALLATION_DIRS= bin info lib sbin
+
+pre-configure:
+ @cd ${WRKSRC}; ${FIND} . -name configure -print | \
+ while read file; do \
+ (dir=`${DIRNAME} $$file`; \
+ ${ECHO} "=> Generating configure in $$dir"; \
+ cd $$dir && ${AUTOCONF} -I ${WRKSRC} -f); \
+ done
+
+post-install:
+ cd ${WRKSRC}/../doc; for info in ${INFO_FILES}; do \
+ ${INSTALL_MAN} $$info ${PREFIX}/info; \
+ for file in $$info-[0-9]*; do \
+ if [ -f "$$file" ]; then \
+ ${INSTALL_MAN} $$file ${PREFIX}/info; \
+ fi; \
+ done; \
+ done
+
+.include "../../mk/autoconf.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/security/mit-krb5/PLIST b/security/mit-krb5/PLIST
new file mode 100644
index 00000000000..bb2afae8609
--- /dev/null
+++ b/security/mit-krb5/PLIST
@@ -0,0 +1,133 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+bin/compile_et
+bin/gss-client
+bin/kdestroy
+bin/kftp
+bin/kinit
+bin/klist
+bin/kpasswd
+bin/krb5-config
+bin/${KRB5_PREFIX}rcp
+bin/${KRB5_PREFIX}rlogin
+bin/${KRB5_PREFIX}rsh
+bin/ksu
+bin/${KRB5_PREFIX}telnet
+bin/kvno
+bin/sclient
+bin/sim_client
+bin/uuclient
+bin/v5passwd
+etc/rc.d/kadmind
+etc/rc.d/kdc
+include/com_err.h
+include/gssapi/gssapi.h
+include/gssapi/gssapi_generic.h
+include/gssapi/gssapi_krb5.h
+include/krb5.h
+include/profile.h
+lib/libcom_err.a
+lib/libcom_err.la
+lib/libcom_err.so
+lib/libcom_err.so.3
+lib/libcom_err.so.3.0
+lib/libdes425.a
+lib/libdes425.la
+lib/libdes425.so
+lib/libdes425.so.3
+lib/libdes425.so.3.0
+lib/libgssapi_krb5.a
+lib/libgssapi_krb5.la
+lib/libgssapi_krb5.so
+lib/libgssapi_krb5.so.2
+lib/libgssapi_krb5.so.2.2
+lib/libgssrpc.a
+lib/libgssrpc.la
+lib/libgssrpc.so
+lib/libgssrpc.so.3
+lib/libgssrpc.so.3.0
+lib/libk5crypto.a
+lib/libk5crypto.la
+lib/libk5crypto.so
+lib/libk5crypto.so.3
+lib/libk5crypto.so.3.0
+lib/libkadm5clnt.a
+lib/libkadm5clnt.la
+lib/libkadm5clnt.so
+lib/libkadm5clnt.so.5
+lib/libkadm5clnt.so.5.1
+lib/libkadm5srv.a
+lib/libkadm5srv.la
+lib/libkadm5srv.so
+lib/libkadm5srv.so.5
+lib/libkadm5srv.so.5.1
+lib/libkdb5.a
+lib/libkdb5.la
+lib/libkdb5.so
+lib/libkdb5.so.4
+lib/libkdb5.so.4.0
+lib/libkrb5.a
+lib/libkrb5.la
+lib/libkrb5.so
+lib/libkrb5.so.3
+lib/libkrb5.so.3.2
+man/man1/compile_et.1
+man/man1/kdestroy.1
+man/man1/kerberos.1
+man/man1/kftp.1
+man/man1/kinit.1
+man/man1/klist.1
+man/man1/kpasswd.1
+man/man1/krb5-send-pr.1
+man/man1/${KRB5_PREFIX}rcp.1
+man/man1/${KRB5_PREFIX}rlogin.1
+man/man1/${KRB5_PREFIX}rsh.1
+man/man1/ksu.1
+man/man1/${KRB5_PREFIX}telnet.1
+man/man1/kvno.1
+man/man1/sclient.1
+man/man1/v5passwd.1
+man/man5/.k5login.5
+man/man5/kdc.conf.5
+man/man5/krb5.conf.5
+man/man8/k5srvutil.8
+man/man8/kadmin.8
+man/man8/kadmin.local.8
+man/man8/kadmind.8
+man/man8/kdb5_util.8
+man/man8/kftpd.8
+man/man8/klogind.8
+man/man8/kprop.8
+man/man8/kpropd.8
+man/man8/krb5kdc.8
+man/man8/kshd.8
+man/man8/${KRB5_PREFIX}telnetd.8
+man/man8/ktutil.8
+man/man8/login.krb5.8
+man/man8/sserver.8
+sbin/gss-server
+sbin/k5srvutil
+sbin/kadmin
+sbin/kadmin.local
+sbin/kadmind
+sbin/kdb5_util
+sbin/${KRB5_PREFIX}ftpd
+sbin/klogind
+sbin/kprop
+sbin/kpropd
+sbin/krb5-send-pr
+sbin/krb5kdc
+sbin/kshd
+sbin/${KRB5_PREFIX}telnetd
+sbin/ktutil
+sbin/login.krb5
+sbin/sim_server
+sbin/sserver
+sbin/uuserver
+sbin/v5passwdd
+share/et/et_c.awk
+share/et/et_h.awk
+share/gnats/mit
+@dirrm share/gnats
+@dirrm share/et
+@dirrm include/kerberosIV
+@dirrm include/gssapi
diff --git a/security/mit-krb5/buildlink2.mk b/security/mit-krb5/buildlink2.mk
new file mode 100644
index 00000000000..da3dbf113bb
--- /dev/null
+++ b/security/mit-krb5/buildlink2.mk
@@ -0,0 +1,33 @@
+# $NetBSD: buildlink2.mk,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+.if !defined(MITKRB5_BUILDLINK2_MK)
+MITKRB5_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= mit-krb5
+BUILDLINK_DEPENDS.mit-krb5?= mit-krb5>=1.3.1
+BUILDLINK_PKGSRCDIR.mit-krb5?= ../../wip/mit-krb5
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.mit-krb5=mit-krb5
+BUILDLINK_PREFIX.mit-krb5_DEFAULT= ${LOCALBASE}
+
+BUILDLINK_FILES.mit-krb5= include/com_err.h
+BUILDLINK_FILES.mit-krb5+= include/kerberosIV/*
+BUILDLINK_FILES.mit-krb5+= include/gssapi/*
+BUILDLINK_FILES.mit-krb5+= include/krb5.h
+BUILDLINK_FILES.mit-krb5+= include/profile.h
+BUILDLINK_FILES.mit-krb5+= lib/libcom_err.*
+BUILDLINK_FILES.mit-krb5+= lib/libdes425.*
+BUILDLINK_FILES.mit-krb5+= lib/libgssapi_krb5.*
+BUILDLINK_FILES.mit-krb5+= lib/libgssrpc.*
+BUILDLINK_FILES.mit-krb5+= lib/libk5crypto.*
+BUILDLINK_FILES.mit-krb5+= lib/libkadm5clnt.*
+BUILDLINK_FILES.mit-krb5+= lib/libkadm5srv.*
+BUILDLINK_FILES.mit-krb5+= lib/libkdb5.*
+BUILDLINK_FILES.mit-krb5+= lib/libkrb4.*
+BUILDLINK_FILES.mit-krb5+= lib/libkrb5.*
+
+BUILDLINK_TARGETS+= mit-krb5-buildlink
+
+mit-krb5-buildlink: _BUILDLINK_USE
+
+.endif # MITKRB5_BUILDLINK2_MK
diff --git a/security/mit-krb5/buildlink3.mk b/security/mit-krb5/buildlink3.mk
new file mode 100644
index 00000000000..1b6271d97b2
--- /dev/null
+++ b/security/mit-krb5/buildlink3.mk
@@ -0,0 +1,18 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+MIT_KRB5_BUILDLINK3_MK:= ${MIT_KRB5_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= mit-krb5
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nmit-krb5}
+BUILDLINK_PACKAGES+= mit-krb5
+
+.if !empty(MIT_KRB5_BUILDLINK3_MK:M+)
+BUILDLINK_DEPENDS.mit-krb5+= mit-krb5>=1.3.1
+BUILDLINK_PKGSRCDIR.mit-krb5?= ../../security/mit-krb5
+.endif # MIT_KRB5_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/security/mit-krb5/distinfo b/security/mit-krb5/distinfo
new file mode 100644
index 00000000000..b6d6a4993f9
--- /dev/null
+++ b/security/mit-krb5/distinfo
@@ -0,0 +1,13 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+SHA1 (krb5-1.3.1.tar.gz) = 594dfdd61433e0573f8a2445716c455f5fe8b05f
+Size (krb5-1.3.1.tar.gz) = 6157946 bytes
+SHA1 (patch-aa) = 2f4e62e7c8cdee2f58f8dd5b385faea0253c0aa5
+SHA1 (patch-ab) = b9f2f54f9ecfe9eaa168bb68b695a454ac044b9d
+SHA1 (patch-ac) = e1282a6f00e439d83444f5d8f81dceab863ab1d5
+SHA1 (patch-ad) = 819bfde3e63b70db6204d03fe22f33641b2a1568
+SHA1 (patch-ae) = 7e55b4e13b538ea44fe08d4db2e125c7c91c4d4b
+SHA1 (patch-af) = 2306953d969fad34a18dbdebd13b3f56c24e44ac
+SHA1 (patch-ag) = 7c1b4c6e7bb15505d4c27cf48b7024f05d54b38f
+SHA1 (patch-ah) = 59a6bfc341a22234b38db406abe83b0d6d358a9f
+SHA1 (patch-ai) = 51ebf1d271f1e399da1a8d2ed03ad10014414d35
diff --git a/security/mit-krb5/files/kadmind.sh b/security/mit-krb5/files/kadmind.sh
new file mode 100644
index 00000000000..a4f4cc1fb65
--- /dev/null
+++ b/security/mit-krb5/files/kadmind.sh
@@ -0,0 +1,24 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: kadmind.sh,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+#
+# PROVIDE: kadmind
+# REQUIRE: kdc
+# BEFORE: SERVERS
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="kadmind"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+required_files="@PKG_SYSCONFDIR@/krb5.conf @MIT_KRB5_STATEDIR@/krb5kdc/kdc.conf"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${kadmind_flags}
+fi
diff --git a/security/mit-krb5/files/kdc.sh b/security/mit-krb5/files/kdc.sh
new file mode 100644
index 00000000000..ea461dded63
--- /dev/null
+++ b/security/mit-krb5/files/kdc.sh
@@ -0,0 +1,24 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: kdc.sh,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+#
+# PROVIDE: kdc
+# REQUIRE: NETWORKING
+# BEFORE: SERVERS
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="kdc"
+rcvar=$name
+command="@PREFIX@/sbin/krb5kdc"
+required_files="@PKG_SYSCONFDIR@/krb5.conf @MIT_KRB5_STATEDIR@/krb5kdc/kdc.conf"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${kdc_flags}
+fi
diff --git a/security/mit-krb5/patches/patch-aa b/security/mit-krb5/patches/patch-aa
new file mode 100644
index 00000000000..9f050449075
--- /dev/null
+++ b/security/mit-krb5/patches/patch-aa
@@ -0,0 +1,81 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- aclocal.m4.orig Wed May 28 00:06:24 2003
++++ aclocal.m4
+@@ -970,8 +970,10 @@ dnl Pull in the necessary stuff to creat
+
+ AC_DEFUN(KRB5_BUILD_LIBRARY,
+ [KRB5_BUILD_LIBRARY_WITH_DEPS
+-# null out SHLIB_EXPFLAGS because we lack any dependencies
+-SHLIB_EXPFLAGS=])
++# null out SHLIB_EXPFLAGS and LALIB_EXPFLAGS because we lack any dependencies
++SHLIB_EXPFLAGS=
++LALIB_EXPFLAGS=
++])
+
+ dnl
+ dnl KRB5_BUILD_LIBRARY_STATIC
+@@ -1015,6 +1017,9 @@ AC_SUBST(SHLIBVEXT)
+ AC_SUBST(SHLIBSEXT)
+ AC_SUBST(DEPLIBEXT)
+ AC_SUBST(PFLIBEXT)
++AC_SUBST(LALIBEXT)
++AC_SUBST(LALIB_EXPFLAGS)
++AC_SUBST(LIBTOOL_TAIL)
+ AC_SUBST(LIBINSTLIST)])
+
+ dnl
+@@ -1028,6 +1033,7 @@ AC_SUBST(OBJLISTS)
+ AC_SUBST(STOBJEXT)
+ AC_SUBST(SHOBJEXT)
+ AC_SUBST(PFOBJEXT)
++AC_SUBST(LAOBJEXT)
+ AC_SUBST(PICFLAGS)
+ AC_SUBST(PROFFLAGS)])
+
+@@ -1077,6 +1083,8 @@ else
+ LIBINSTLIST=install-static
+ DEPLIBEXT=$STLIBEXT
+ fi
++DEPSTLIBEXT=$STLIBEXT
++AC_SUBST(DEPSTLIBEXT)
+
+ # Check whether to build shared libraries.
+ AC_ARG_ENABLE([shared],
+@@ -1138,8 +1146,35 @@ fi],
+ SHLIBSEXT=.so.s-nobuild
+ )dnl
+
++# Check whether to build libtool archives.
++AC_ARG_ENABLE([pkgsrc-libtool],
++[ --enable-pkgsrc-libtool build libtool archives],
++[
++ case $enableval in
++ /*) LIBTOOL=$enableval ;;
++ *) LIBTOOL=libtool ;;
++ esac
++ AC_MSG_RESULT([Enabling libtool archives.])
++ LIBLIST='lib$(LIB)$(LALIBEXT)'
++ LIBLINKS='$(TOPLIBD)/lib$(LIB)$(LALIBEXT)'
++ OBJLISTS=OBJS.LA
++ LIBINSTLIST=install-libtool
++ DEPLIBEXT=$LALIBEXT
++ DEPSTLIBEXT=$LALIBEXT
++ CC_LINK="$CC_LINK_LIBTOOL"
++ INSTALL_LIBTOOL='$(LIBTOOL) --mode=install'
++ if test "$krb5_force_static" = yes; then
++ LIBTOOL_TAIL=
++ fi
++], [
++ LIBTOOL=:
++ INSTALL_LIBTOOL=
++])
++AC_SUBST(LIBTOOL)
++AC_SUBST(INSTALL_LIBTOOL)
++
+ if test -z "$LIBLIST"; then
+- AC_MSG_ERROR([must enable one of shared or static libraries])
++ AC_MSG_ERROR([must enable one of shared, libtool or static libraries])
+ fi
+
+ # Check whether to build profiled libraries.
diff --git a/security/mit-krb5/patches/patch-ab b/security/mit-krb5/patches/patch-ab
new file mode 100644
index 00000000000..a97f70d71b7
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ab
@@ -0,0 +1,23 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- appl/telnet/telnet/Makefile.in.orig Thu Aug 29 05:10:06 2002
++++ appl/telnet/telnet/Makefile.in
+@@ -45,8 +45,8 @@ OBJS= authenc.o commands.o main.o networ
+
+ all:: telnet
+
+-telnet: $(OBJS) $(KRB4COMPAT_DEPLIBS) ../libtelnet/libtelnet.a
+- $(CC_LINK) -o $@ $(OBJS) ../libtelnet/libtelnet.a $(KRB4COMPAT_LIBS)
++telnet: $(OBJS) $(KRB4COMPAT_DEPLIBS) ../libtelnet/libtelnet$(DEPSTLIBEXT)
++ $(CC_LINK) -o $@ $(OBJS) ../libtelnet/libtelnet$(DEPSTLIBEXT) $(KRB4COMPAT_LIBS)
+
+ clean::
+ $(RM) telnet
+@@ -58,7 +58,6 @@ install::
+ $(INSTALL_DATA) $(srcdir)/$$f.1 \
+ ${DESTDIR}$(CLIENT_MANDIR)/`echo $$f|sed '$(transform)'`.1; \
+ done
+- $(INSTALL_DATA) $(srcdir)/tmac.doc ${DESTDIR}$(CLIENT_MANDIR)/tmac.doc
+
+ authenc.o: defines.h externs.h general.h ring.h types.h $(ARPA_TELNET)
+ commands.o: defines.h externs.h general.h ring.h types.h $(ARPA_TELNET)
diff --git a/security/mit-krb5/patches/patch-ac b/security/mit-krb5/patches/patch-ac
new file mode 100644
index 00000000000..5675a1a2a48
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- appl/telnet/telnetd/Makefile.in.orig Mon Jun 9 17:57:11 2003
++++ appl/telnet/telnetd/Makefile.in
+@@ -58,8 +58,8 @@ OBJS= telnetd.o \
+
+ all:: telnetd
+
+-telnetd: $(OBJS) $(PTY_DEPLIB) $(KRB4COMPAT_DEPLIBS) ../libtelnet/libtelnet.a
+- $(CC_LINK) -o $@ $(OBJS) ../libtelnet/libtelnet.a $(PTY_LIB) $(KRB4COMPAT_LIBS)
++telnetd: $(OBJS) $(PTY_DEPLIB) $(KRB4COMPAT_DEPLIBS) ../libtelnet/libtelnet$(DEPSTLIBEXT)
++ $(CC_LINK) -o $@ $(OBJS) ../libtelnet/libtelnet$(DEPSTLIBEXT) $(PTY_LIB) $(KRB4COMPAT_LIBS)
+
+ clean::
+ $(RM) telnetd
diff --git a/security/mit-krb5/patches/patch-ad b/security/mit-krb5/patches/patch-ad
new file mode 100644
index 00000000000..d944a0d0fdd
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ad
@@ -0,0 +1,69 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- config/lib.in.orig Fri Jan 10 00:55:18 2003
++++ config/lib.in
+@@ -26,8 +26,9 @@
+ # STOBJLISTS=dir1/OBJS.ST dir2/OBJS.ST etc...
+ SHOBJLISTS=$(STOBJLISTS:.ST=.SH)
+ PFOBJLISTS=$(STOBJLISTS:.ST=.PF)
++LAOBJLISTS=$(STOBJLISTS:.ST=.LA)
+
+-dummy-target-1 $(SUBDIROBJLISTS) $(SUBDIROBJLISTS:.ST=.SH) $(SUBDIROBJLISTS:.ST=.PF): all-recurse
++dummy-target-1 $(SUBDIROBJLISTS) $(SUBDIROBJLISTS:.ST=.SH) $(SUBDIROBJLISTS:.ST=.PF) $(SUBDIROBJLISTS.ST=.LA): all-recurse
+
+ lib$(LIB)$(STLIBEXT): $(STOBJLISTS)
+ $(RM) $@
+@@ -66,6 +67,17 @@ lib$(LIB)$(PFLIBEXT): $(PFOBJLISTS)
+ $$d/OBJS.PF; done`
+ $(RANLIB) $@
+
++lib$(LIB)$(LALIBEXT): $(LAOBJLISTS)
++ $(RM) $@
++ @echo "building $(LIB) libtool archive ($(LIBMAJOR).$(LIBMINOR))"
++ @dirs=`echo $(LAOBJLISTS) | \
++ sed -e 's%/OBJS.LA%%g' -e 's%OBJS.LA%.%'`; \
++ $(LIBTOOL) --mode=link $(CC) -o $@ `for d in $$dirs; do \
++ sed -e '/^$$/d' -e "s%^%$$d/%" -e "s% % $$d/%g" \
++ $$d/OBJS.LA; done` \
++ $(LALIB_EXPFLAGS) \
++ $(LIBTOOL_TAIL)
++
+ $(TOPLIBD)/lib$(LIB)$(STLIBEXT): lib$(LIB)$(STLIBEXT)
+ $(RM) $@
+ (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/lib$(LIB)$(STLIBEXT) .)
+@@ -81,6 +93,9 @@ $(TOPLIBD)/lib$(LIB)$(SHLIBVEXT): lib$(L
+ $(TOPLIBD)/lib$(LIB)$(PFLIBEXT): lib$(LIB)$(PFLIBEXT)
+ $(RM) $@
+ (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/lib$(LIB)$(PFLIBEXT) .)
++$(TOPLIBD)/lib$(LIB)$(LALIBEXT): lib$(LIB)$(LALIBEXT)
++ $(RM) $@
++ (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/lib$(LIB)$(LALIBEXT) .)
+
+ all-libs: $(LIBLIST)
+ all-liblinks: $(LIBLINKS)
+@@ -91,6 +106,7 @@ clean-libs:
+ $(RM) lib$(LIB)$(SHLIBSEXT)
+ $(RM) lib$(LIB)$(SHLIBEXT)
+ $(RM) lib$(LIB)$(PFLIBEXT)
++ $(LIBTOOL) mode=uninstall $(RM) lib$(LIB)$(LALIBEXT)
+
+ clean-liblinks:
+ $(RM) $(TOPLIBD)/lib$(LIB)$(STLIBEXT)
+@@ -98,6 +114,7 @@ clean-liblinks:
+ $(RM) $(TOPLIBD)/lib$(LIB)$(SHLIBSEXT)
+ $(RM) $(TOPLIBD)/lib$(LIB)$(SHLIBEXT)
+ $(RM) $(TOPLIBD)/lib$(LIB)$(PFLIBEXT)
++ $(RM) $(TOPLIBD)/lib$(LIB)$(LALIBEXT)
+
+ install-libs: $(LIBINSTLIST)
+ install-static:
+@@ -118,6 +135,9 @@ install-profiled:
+ $(RM) $(DESTDIR)$(KRB5_LIBDIR)/lib$(LIB)$(PFLIBEXT)
+ $(INSTALL_DATA) lib$(LIB)$(PFLIBEXT) $(DESTDIR)$(KRB5_LIBDIR)
+ $(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)/lib$(LIB)$(PFLIBEXT)
++install-libtool:
++ $(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(KRB5_LIBDIR)/lib$(LIB)$(LALIBEXT)
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) lib$(LIB)$(LALIBEXT) $(DESTDIR)$(KRB5_LIBDIR)
+
+ Makefile: $(SRCTOP)/config/lib.in
+ config.status: $(SRCTOP)/config/shlib.conf
diff --git a/security/mit-krb5/patches/patch-ae b/security/mit-krb5/patches/patch-ae
new file mode 100644
index 00000000000..8720a5e345e
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ae
@@ -0,0 +1,35 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- config/libobj.in.orig Mon Mar 3 02:09:44 2003
++++ config/libobj.in
+@@ -7,11 +7,13 @@
+ # STLIBOBJS list of .o objects; this must not contain variable
+ # references.
+
+-.SUFFIXES: .c .so .po
++.SUFFIXES: .c .so .po .lo
+ .c.so:
+ $(CC) $(PICFLAGS) $(ALL_CFLAGS) -c $< -o $*.so.o && $(MV) $*.so.o $*.so
+ .c.po:
+ $(CC) $(PROFFLAGS) $(ALL_CFLAGS) -c $< -o $*.po.o && $(MV) $*.po.o $*.po
++.c.lo:
++ $(LIBTOOL) --mode=compile $(CC) $(ALL_CFLAGS) -c $<
+
+ # rules to generate object file lists
+
+@@ -24,10 +26,14 @@ OBJS.SH: $(SHLIBOBJS)
+ OBJS.PF: $(PFLIBOBJS)
+ @echo $(PFLIBOBJS) > $@
+
++OBJS.LA: $(LALIBOBJS)
++ @echo $(LALIBOBJS) > $@
++
+ all-libobjs: $(OBJLISTS)
+
+ clean-libobjs:
+- $(RM) OBJS.ST OBJS.SH OBJS.PF $(STLIBOBJS) $(SHLIBOBJS) $(PFLIBOBJS)
++ $(RM) OBJS.ST OBJS.SH OBJS.PF OBJS.LA $(STLIBOBJS) $(SHLIBOBJS) $(PFLIBOBJS)
++ $(LIBTOOL) --mode=uninstall $(RM) $(LALIBOBJS)
+
+ Makefile: $(SRCTOP)/config/libobj.in
+ config.status: $(SRCTOP)/config/shlib.conf
diff --git a/security/mit-krb5/patches/patch-af b/security/mit-krb5/patches/patch-af
new file mode 100644
index 00000000000..190b049b6bb
--- /dev/null
+++ b/security/mit-krb5/patches/patch-af
@@ -0,0 +1,95 @@
+$NetBSD: patch-af,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- config/pre.in.orig Wed May 28 00:06:28 2003
++++ config/pre.in
+@@ -134,6 +134,7 @@ ALL_CFLAGS = $(DEFS) $(DEFINES) $(KRB_IN
+ CFLAGS = @CFLAGS@
+ CPPFLAGS = @CPPFLAGS@
+ DEFS = @DEFS@
++LIBTOOL = @LIBTOOL@
+ CC = @CC@
+ LD = $(PURE) @LD@
+ DEPLIBS = @DEPLIBS@
+@@ -151,10 +152,12 @@ CLNTDEPLIBS = @CLNTDEPLIBS@
+
+ INSTALL=@INSTALL@
+ INSTALL_STRIP=
+-INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
++INSTALL_LIBTOOL=@INSTALL_LIBTOOL@
++INSTALL_PROGRAM=$(INSTALL_LIBTOOL) @INSTALL_PROGRAM@ $(INSTALL_STRIP)
++INSTALL_SCRIPT=@INSTALL_SCRIPT@
+ INSTALL_DATA=@INSTALL_DATA@
+ INSTALL_SHLIB=@INSTALL_SHLIB@
+-INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
++INSTALL_SETUID=$(INSTALL_LIBTOOL) $(INSTALL) $(INSTALL_STRIP) -m 4755 -o $(ROOT_USER)
+ ## This is needed because autoconf will sometimes define @exec_prefix@ to be
+ ## ${prefix}.
+ prefix=@prefix@
+@@ -270,6 +273,10 @@ RPATH_FLAG=@RPATH_FLAG@
+ # depending on whether we're building with shared libraries.
+ DEPLIBEXT=@DEPLIBEXT@
+
++# this gets set by configure to either $(STLIBEXT) or $(LALIBEXT),
++# depending on whether we're building libtool archives.
++DEPSTLIBEXT=@DEPSTLIBEXT@
++
+ KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
+ KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
+ KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
+@@ -286,12 +293,12 @@ COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_E
+ COM_ERR_DEPLIB-sys = # empty
+ COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
+
+-# These are forced to use ".a" as an extension because they're never
++# These are forced to use "@DEPSTLIBEXT@" as an extension because they're never
+ # built shared.
+ SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@)
+-SS_DEPLIB-k5 = $(TOPLIBD)/libss.a
++SS_DEPLIB-k5 = $(TOPLIBD)/libss$(DEPSTLIBEXT)
+ SS_DEPLIB-sys =
+-PTY_DEPLIB = $(TOPLIBD)/libpty.a
++PTY_DEPLIB = $(TOPLIBD)/libpty$(DEPSTLIBEXT)
+
+ KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB)
+ KRB4COMPAT_DEPLIBS = $(KRB4_DEPLIB) $(DES425_DEPLIB) $(KRB5_BASE_DEPLIBS)
+@@ -332,7 +339,7 @@ GEN_LIB = @GEN_LIB@
+
+ SS_LIB = $(SS_LIB-@SS_VERSION@)
+ SS_LIB-sys = @SS_LIB@
+-SS_LIB-k5 = $(TOPLIBD)/libss.a
++SS_LIB-k5 = $(TOPLIBD)/libss$(DEPSTLIBEXT)
+ KDB5_LIB = -lkdb5
+ DB_LIB = @DB_LIB@
+ KDB5_DB_LIB = @KDB5_DB_LIB@
+@@ -455,15 +462,23 @@ SHLIBEXT=@SHLIBEXT@
+ # usually _p.a
+ PFLIBEXT=@PFLIBEXT@
+
++# usually .la
++LALIBEXT=@LALIBEXT@
++
+ # "cc -G", "ld -Bshareable", etc.
+ LDCOMBINE=@LDCOMBINE@
+
+ # Misc args to tack on the tail of LDCOMBINE
+ LDCOMBINE_TAIL=@LDCOMBINE_TAIL@
+
++# Args to tack on the tail of LIBTOOL to generate versioned, installable
++# libtool archives.
++LIBTOOL_TAIL=@LIBTOOL_TAIL@
++
+ # flags for explicit libraries depending on this one,
+ # e.g. "-R$(SHLIB_RPATH) $(SHLIB_SHLIB_DIRFLAGS) $(SHLIB_EXPLIBS)"
+ SHLIB_EXPFLAGS=@SHLIB_EXPFLAGS@
++LALIB_EXPFLAGS=@LALIB_EXPFLAGS@
+
+ ## Parameters to be set by configure for use in libobj.in:
+
+@@ -475,6 +490,7 @@ OBJLISTS=@OBJLISTS@
+ # the suffix substitution will break on some platforms!
+ SHLIBOBJS=$(STLIBOBJS:.o=@SHOBJEXT@)
+ PFLIBOBJS=$(STLIBOBJS:.o=@PFOBJEXT@)
++LALIBOBJS=$(STLIBOBJS:.o=@LAOBJEXT@)
+
+ # "$(CC) -G", "$(LD) -Bshareable", etc.
+ LDCOMBINE=@LDCOMBINE@
diff --git a/security/mit-krb5/patches/patch-ag b/security/mit-krb5/patches/patch-ag
new file mode 100644
index 00000000000..9396959f527
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ag
@@ -0,0 +1,28 @@
+$NetBSD: patch-ag,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- config/shlib.conf.orig Mon Mar 3 02:09:45 2003
++++ config/shlib.conf
+@@ -8,12 +8,14 @@ SHLIBVEXT=.so.v-nobuild
+ SHLIBSEXT=.so.s-nobuild
+ # Most systems support profiled libraries.
+ PFLIBEXT=_p.a
++LALIBEXT=.la
+ # Most systems install shared libs as mode 644, etc. while hpux wants 755
+ INSTALL_SHLIB='$(INSTALL_DATA)'
+
+ STOBJEXT=.o
+ SHOBJEXT=.so
+ PFOBJEXT=.po
++LAOBJEXT=.lo
+ # Default for systems w/o shared libraries
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
+
+@@ -300,3 +302,8 @@ mips-*-netbsd*)
+ RUN_ENV='LIBPATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/lib:/usr/local/lib; export LIBPATH; '
+
+ esac
++
++# Settings for building with libtool.
++CC_LINK_LIBTOOL='$(LIBTOOL) --mode=link '"$CC_LINK_SHARED"
++LALIB_EXPFLAGS='$(SHLIB_EXPFLAGS)'
++LIBTOOL_TAIL='-rpath $(KRB5_LIBDIR) -version-info $(LIBMAJOR):$(LIBMINOR)'
diff --git a/security/mit-krb5/patches/patch-ah b/security/mit-krb5/patches/patch-ah
new file mode 100644
index 00000000000..bffd6047fdc
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ah
@@ -0,0 +1,31 @@
+$NetBSD: patch-ah,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- include/krb5/stock/osconf.h.orig Thu Jun 5 21:26:46 2003
++++ include/krb5/stock/osconf.h
+@@ -44,13 +44,13 @@
+ #define DEFAULT_KEYTAB_NAME "FILE:%s\\krb5kt"
+ #else /* !_WINDOWS */
+ #if TARGET_OS_MAC
+-#define DEFAULT_SECURE_PROFILE_PATH "/Library/Preferences/edu.mit.Kerberos:/etc/krb5.conf:@SYSCONFDIR/krb5.conf"
+-#define DEFAULT_PROFILE_PATH ("~/Library/Preferences/edu.mit.Kerberos" ":" DEFAULT_SECURE_PROFILE_PATH)
++#define DEFAULT_SECURE_PROFILE_PATH "@SYSCONFDIR/krb5.conf:/Library/Preferences/edu.mit.Kerberos:/etc/krb5.conf"
++#define DEFAULT_PROFILE_PATH ("@SYSCONFDIR/krb5.conf:~/Library/Preferences/edu.mit.Kerberos:/Library/Preferences/edu.mit.Kerberos:/etc/krb5.conf")
+ #else
+-#define DEFAULT_SECURE_PROFILE_PATH "/etc/krb5.conf:@SYSCONFDIR/krb5.conf"
++#define DEFAULT_SECURE_PROFILE_PATH "@SYSCONFDIR/krb5.conf:/etc/krb5.conf"
+ #define DEFAULT_PROFILE_PATH DEFAULT_SECURE_PROFILE_PATH
+ #endif
+-#define DEFAULT_KEYTAB_NAME "FILE:/etc/krb5.keytab"
++#define DEFAULT_KEYTAB_NAME "FILE:@SYSCONFDIR/krb5.keytab"
+ #define DEFAULT_LNAME_FILENAME "@PREFIX/lib/krb5.aname"
+ #endif /* _WINDOWS */
+
+@@ -97,7 +97,7 @@
+
+ #define KRB5_PATH_TTY "/dev/tty"
+ #define KRB5_PATH_LOGIN "@SBINDIR/login.krb5"
+-#define KRB5_PATH_RLOGIN "@BINDIR/rlogin"
++#define KRB5_PATH_RLOGIN "@BINDIR/krlogin"
+
+ #define KRB5_ENV_CCNAME "KRB5CCNAME"
+
diff --git a/security/mit-krb5/patches/patch-ai b/security/mit-krb5/patches/patch-ai
new file mode 100644
index 00000000000..e10e0a6845a
--- /dev/null
+++ b/security/mit-krb5/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1.1.1 2004/03/30 18:07:18 jlam Exp $
+
+--- kadmin/cli/Makefile.in.orig Fri Feb 7 16:41:20 2003
++++ kadmin/cli/Makefile.in
+@@ -21,7 +21,7 @@ kadmin_ct.o: kadmin_ct.c
+ install::
+ $(INSTALL_PROGRAM) $(PROG).local ${DESTDIR}$(ADMIN_BINDIR)/$(PROG).local
+ $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(ADMIN_BINDIR)/$(PROG)
+- $(INSTALL_PROGRAM) $(srcdir)/k5srvutil.sh ${DESTDIR}$(ADMIN_BINDIR)/k5srvutil
++ $(INSTALL_SCRIPT) $(srcdir)/k5srvutil.sh ${DESTDIR}$(ADMIN_BINDIR)/k5srvutil
+ $(INSTALL_DATA) $(srcdir)/k5srvutil.M ${DESTDIR}$(ADMIN_MANDIR)/k5srvutil.8
+ $(INSTALL_DATA) $(srcdir)/$(PROG).M ${DESTDIR}$(ADMIN_MANDIR)/$(PROG).8
+ $(INSTALL_DATA) $(srcdir)/$(PROG).local.M ${DESTDIR}$(ADMIN_MANDIR)/$(PROG).local.8