summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2013-12-11 10:27:01 +0000
committerjperkin <jperkin@pkgsrc.org>2013-12-11 10:27:01 +0000
commit228be5a6c1af18d6357e31df71fc91db68ef6d47 (patch)
tree05890b1baedf149622c54f8457044b8c8e7b1f7c /security
parent58039a0b72f522bf2927dea737dd7f1ac070568a (diff)
downloadpkgsrc-228be5a6c1af18d6357e31df71fc91db68ef6d47.tar.gz
On SunOS, install a wrapper script for krb5-config to strip away arguments
that are unsupported by the native port of MIT KRB5, and add any flags necessary to support the builtin version. Fixes various packages since the change to support the SunOS builtin. Based on patches by Richard PALO (richard@).
Diffstat (limited to 'security')
-rw-r--r--security/mit-krb5/builtin.mk23
-rw-r--r--security/mit-krb5/files/krb5-config-wrapper.sh19
2 files changed, 41 insertions, 1 deletions
diff --git a/security/mit-krb5/builtin.mk b/security/mit-krb5/builtin.mk
index 49d77b0a8c7..1de9bde4c08 100644
--- a/security/mit-krb5/builtin.mk
+++ b/security/mit-krb5/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.9 2013/11/23 12:10:13 obache Exp $
+# $NetBSD: builtin.mk,v 1.10 2013/12/11 10:27:01 jperkin Exp $
BUILTIN_PKG:= mit-krb5
@@ -86,8 +86,29 @@ ALL_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
BUILDLINK_CPPFLAGS.mit-krb5!= ${SH_KRB5_CONFIG} --cflags
BUILDLINK_LDFLAGS.mit-krb5!= ${SH_KRB5_CONFIG} --libs
+
+#
+# The SunOS builtin krb5-config does not support all of the arguments that the
+# MIT version does so we install a fake script which strips them out.
+#
. if ${OPSYS} == "SunOS"
+KRB5_CONFIG= ${BUILDLINK_DIR}/bin/krb5-config
+BUILDLINK_CPPFLAGS.mit-krb5+= -I/usr/include/gssapi
BUILDLINK_LDFLAGS.mit-krb5+= -lgss
+BUILDLINK_TARGETS+= fake-krb5-config
+
+fake-krb5-config:
+ ${RUN} \
+ src=../../security/mit-krb5/files/krb5-config-wrapper.sh; \
+ dst=${BUILDLINK_DIR}/bin/krb5-config; \
+ if [ ! -f $${dst} ]; then \
+ ${ECHO_BUILDLINK_MSG} "Creating $${dst}"; \
+ ${ECHO} "#!${SH}" > $${dst}; \
+ ${SED} -e "s,@KRB5_CONFIG@,${SH_KRB5_CONFIG:Q},g" \
+ $${src} >> $${dst}; \
+ ${CHMOD} +x $${dst}; \
+ fi
+
. endif
. endif
diff --git a/security/mit-krb5/files/krb5-config-wrapper.sh b/security/mit-krb5/files/krb5-config-wrapper.sh
new file mode 100644
index 00000000000..c339210d623
--- /dev/null
+++ b/security/mit-krb5/files/krb5-config-wrapper.sh
@@ -0,0 +1,19 @@
+#
+# Wrapper for the SunOS builtin krb5-config, which does not accept all of the
+# 'libraries' arguments that the standard MIT krb5-config does.
+#
+
+args=
+for arg; do
+ case "${arg}" in
+ # Unsupported arguments
+ gssapi|kadm-client|kadm-server|kdb)
+ continue
+ ;;
+ *)
+ args="${args} ${arg}"
+ ;;
+ esac
+done
+
+@KRB5_CONFIG@ ${args}