Index: Mk/Scripts/qa.sh =================================================================== --- Mk/Scripts/qa.sh +++ Mk/Scripts/qa.sh @@ -98,6 +98,7 @@ baselibs() { local rc + local found_openssl [ "${PKGBASE}" = "pkg" -o "${PKGBASE}" = "pkg-devel" ] && return while read f; do case ${f} in @@ -109,12 +110,20 @@ err "Bad linking on ${f##* } please add USES=libedit" rc=1 ;; + *NEEDED*\[libcrypto.so.*]|*NEEDED*\[libssl.so.*]) + found_openssl=1 + ;; esac done <<-EOF $(find ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin \ ${STAGEDIR}${PREFIX}/lib ${STAGEDIR}${PREFIX}/libexec \ -type f -exec readelf -d {} + 2>/dev/null) EOF + if [ -z "${USESSSL}" -a -n "${found_openssl}" ]; then + warn "you need USES=nssl" + elif [ -n "${USESSSL}" -a -z "${found_openssl}" ]; then + warn "you may not need USES=ssl" + fi return ${rc} } Index: Mk/Uses/ssl.mk =================================================================== --- Mk/Uses/ssl.mk +++ Mk/Uses/ssl.mk @@ -1,21 +1,17 @@ -# # $FreeBSD$ -# bsd.openssl.mk - Support for OpenSSL based ports. -# -# Use of 'USE_OPENSSL=yes' includes this Makefile after bsd.ports.pre.mk # -# The user/port can now set these options in the Makefiles. +# Handle dependency on *ssl ports. # -# WITH_OPENSSL_BASE=yes - Use the version in the base system. -# WITH_OPENSSL_PORT=yes - Use the OpenSSL port, even if base is up to date. +# Feature: SSL_DEFAULT +# Usage: USES=ssl +# Valid ARGS: none # -# USE_OPENSSL_RPATH=yes - Pass RFLAGS options in CFLAGS, -# needed for ports who don't use LDFLAGS. +# The use can choose which ssl library he wants with: # -# Overrideable defaults: +# DEFAULT_VERSIONS+= ssl=openssl # -# OPENSSL_SHLIBVER= 8 -# OPENSSL_PORT= security/openssl +# valid values are base, openssl, openssl-devel, libressl, +# and libressl-devel. # # The Makefile sets these variables: # OPENSSLBASE - "/usr" or ${LOCALBASE} @@ -28,8 +24,11 @@ # CONFIGURE_ENV - extended with LDFLAGS # BUILD_DEPENDS - are added if needed # RUN_DEPENDS - are added if needed - -OpenSSL_Include_MAINTAINER= dinoex@FreeBSD.org +# +# MAINTAINER: portmgr@FreeBSD.org +# +.if !defined(_INCLUDE_USES_SSL_MK) +_INCLUDE_USES_SSL_MK= yes .include "${PORTSDIR}/Mk/bsd.default-versions.mk" @@ -112,5 +111,4 @@ LDFLAGS+= ${OPENSSL_LDFLAGS} -### crypto -#RESTRICTED= "Contains cryptography." +.endif Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1352,7 +1352,7 @@ .endif .if defined(USE_OPENSSL) -.include "${PORTSDIR}/Mk/bsd.openssl.mk" +USES+= ssl .endif .if defined(USE_EMACS) @@ -1524,6 +1524,9 @@ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ PKGBASE=${PKGBASE} +.if !empty(USES:Mssl) +QA_ENV+= USESSSL=yes +.endif .if !empty(USES:Mdesktop-file-utils) QA_ENV+= USESDESKTOPFILEUTILS=yes .endif Index: Mk/bsd.sanity.mk =================================================================== --- Mk/bsd.sanity.mk +++ Mk/bsd.sanity.mk @@ -177,7 +177,8 @@ PYDISTUTILS_AUTOPLIST PYTHON_PY3K_PLIST_HACK PYDISTUTILS_NOEGGINFO \ USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \ UNIQUENAME LATEST_LINK USE_SQLITE USE_FIREBIRD -SANITY_DEPRECATED= PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS PLIST_DIRSTRY USE_BDB USE_MYSQL WANT_MYSQL_VER +SANITY_DEPRECATED= PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS PLIST_DIRSTRY \ + USE_BDB USE_MYSQL WANT_MYSQL_VER USE_OPENSSL SANITY_NOTNEEDED= WX_UNICODE USE_AUTOTOOLS_ALT= USES=autoreconf and GNU_CONFIGURE=yes @@ -221,6 +222,7 @@ USE_BDB_ALT= USES=bdb:${USE_BDB} USE_MYSQL_ALT= USES=mysql:${USE_MYSQL} WANT_MYSQL_VER_ALT= USES=mysql:${WANT_MYSQL_VER} +USE_OPENSSL_ALT= USES=ssl .for a in ${SANITY_DEPRECATED} .if defined(${a})