components/curl/Makefile
changeset 6049 d4f828709d1c
parent 6023 1285c8b9e736
child 6065 1408b9df8875
--- a/components/curl/Makefile	Sat May 21 09:59:28 2016 -0700
+++ b/components/curl/Makefile	Fri May 13 15:40:39 2016 -0500
@@ -97,11 +97,21 @@
 
 ASLR_MODE = $(ASLR_ENABLE)
 
+# If there is no mediator, use MIT.  Note, once all userland build systems have
+# the Userland security/kerberos-5 pkg installed this logic can be removed.
+KRB5_API = $(shell pkg mediator -H kerberos5 2>/dev/null | nawk '{print $$4;}')
+
 REQUIRED_PACKAGES += library/libidn
 REQUIRED_PACKAGES += library/libssh2
 REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/zlib
+ifeq ($(KRB5_API), solaris)
+    # require the solaris version of GSS
+    REQUIRED_PACKAGES += system/library/security/gss
+else
+    # require the Userland version of GSS
+    REQUIRED_PACKAGES += security/kerberos-5
+endif
 REQUIRED_PACKAGES += shell/ksh93
-REQUIRED_PACKAGES += system/library/security/gss
 REQUIRED_PACKAGES += system/network/ldap/openldap