Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2016 11:31:11 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r417651 - in head: . Mk Mk/Scripts Mk/Uses devel/libopkele devel/p5-Event-RPC dns/opendd ftp/vsftpd ftp/vsftpd-ext net/isc-dhcp43-server security/R-cran-openssl security/ftimes
Message-ID:  <201606271131.u5RBVBuX088905@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon Jun 27 11:31:10 2016
New Revision: 417651
URL: https://svnweb.freebsd.org/changeset/ports/417651

Log:
  Replace bsd.openssl.mk with USES=ssl
  
  Add a qa hint about needing, or not, USES=ssl.
  
  Fix ports doing silly things, like including bsd.openssl.mk directly.
  
  PR:		210322
  Submitted by:	mat
  Exp-run by:	antoine
  Sponsored by:	Absolight
  Differential Revision:	https://reviews.freebsd.org/D6866

Added:
  head/Mk/Uses/ssl.mk
     - copied, changed from r417650, head/Mk/bsd.openssl.mk
Deleted:
  head/Mk/bsd.openssl.mk
Modified:
  head/CHANGES
  head/Mk/Scripts/qa.sh   (contents, props changed)
  head/Mk/bsd.port.mk   (contents, props changed)
  head/Mk/bsd.sanity.mk   (contents, props changed)
  head/devel/libopkele/Makefile   (contents, props changed)
  head/devel/p5-Event-RPC/Makefile   (contents, props changed)
  head/dns/opendd/Makefile   (contents, props changed)
  head/ftp/vsftpd-ext/Makefile   (contents, props changed)
  head/ftp/vsftpd/Makefile   (contents, props changed)
  head/net/isc-dhcp43-server/Makefile   (contents, props changed)
  head/security/R-cran-openssl/Makefile   (contents, props changed)
  head/security/ftimes/Makefile   (contents, props changed)

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/CHANGES	Mon Jun 27 11:31:10 2016	(r417651)
@@ -10,6 +10,11 @@ in the release notes and/or placed into 
 
 All ports committers are allowed to commit to this file.
 
+20160627:
+AUTHOR: mat@FreeBSD.org
+
+  USE_OPENSSL has been replaced by USES=ssl.
+
 20160625:
 AUTHOR: adamw@FreeBSD.org
 

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/Mk/Scripts/qa.sh	Mon Jun 27 11:31:10 2016	(r417651)
@@ -98,6 +98,7 @@ shebang() {
 
 baselibs() {
 	local rc
+	local found_openssl
 	[ "${PKGBASE}" = "pkg" -o "${PKGBASE}" = "pkg-devel" ] && return
 	while read f; do
 		case ${f} in
@@ -109,12 +110,20 @@ baselibs() {
 			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}
 }
 

Copied and modified: head/Mk/Uses/ssl.mk (from r417650, head/Mk/bsd.openssl.mk)
==============================================================================
--- head/Mk/bsd.openssl.mk	Mon Jun 27 10:56:14 2016	(r417650, copy source)
+++ head/Mk/Uses/ssl.mk	Mon Jun 27 11:31:10 2016	(r417651)
@@ -1,18 +1,12 @@
-#
 # $FreeBSD$
-# bsd.openssl.mk - Support for OpenSSL based ports.
-#
-# Use of 'USE_OPENSSL=yes' includes this Makefile after bsd.ports.pre.mk
 #
-# The 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.
-#
-# Overrideable defaults:
+# The use can choose which ssl library he wants with:
 #
 # DEFAULT_VERSIONS+=	ssl=<openssl variant>
 #
@@ -29,8 +23,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"
 
@@ -113,5 +110,4 @@ OPENSSL_LDFLAGS+=	-Wl,-rpath,${OPENSSLRP
 
 LDFLAGS+=		${OPENSSL_LDFLAGS}
 
-### crypto
-#RESTRICTED=		"Contains cryptography."
+.endif

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/Mk/bsd.port.mk	Mon Jun 27 11:31:10 2016	(r417651)
@@ -1352,7 +1352,7 @@ PKGCOMPATDIR?=		${LOCALBASE}/lib/compat/
 .endif
 
 .if defined(USE_OPENSSL)
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USES+=	ssl
 .endif
 
 .if defined(USE_EMACS)
@@ -1525,6 +1525,9 @@ QA_ENV+=		STAGEDIR=${STAGEDIR} \
 				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

Modified: head/Mk/bsd.sanity.mk
==============================================================================
--- head/Mk/bsd.sanity.mk	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/Mk/bsd.sanity.mk	Mon Jun 27 11:31:10 2016	(r417651)
@@ -177,7 +177,8 @@ SANITY_UNSUPPORTED=	USE_OPENAL USE_FAM U
 		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_FIREBIRD_ALT=	USES=firebird
 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})

Modified: head/devel/libopkele/Makefile
==============================================================================
--- head/devel/libopkele/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/devel/libopkele/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -19,7 +19,7 @@ LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libxslt.so:textproc/libxslt
 
 USE_LDCONFIG=	yes
-USES=		libtool gmake pkgconfig compiler:c++11-lang
+USES=		libtool gmake pkgconfig compiler:c++11-lang ssl
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	"OPENSSL_CFLAGS=${CFLAGS} -l${OPENSSLINC}" \
 		OPENSSL_LIBS=-L${OPENSSLLIB}
@@ -27,13 +27,8 @@ CPPFLAGS+=	-I${LOCALBASE}/include
 CFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-# This port needs OpenSSL 0.9.8b which is present in 7.0 and up
-USE_OPENSSL=	yes
-
 .include <bsd.port.pre.mk>
 
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-
 # If we use the base OpenSSL either by default or
 # by design, we need to remove the openssl dependency
 # in pkgconfig/libopkele.pc.

Modified: head/devel/p5-Event-RPC/Makefile
==============================================================================
--- head/devel/p5-Event-RPC/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/devel/p5-Event-RPC/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -26,7 +26,6 @@ SSL_DESC=	Dependency to SSL lib
 OPTIONS_DEFAULT=	EVENT ANYEVENT SSL
 
 .include <bsd.port.options.mk>
-.include <bsd.port.pre.mk>
 
 BUILD_DEPENDS=	p5-Storable>=0:devel/p5-Storable
 
@@ -43,11 +42,10 @@ BUILD_DEPENDS+=	p5-Glib2>=0:devel/p5-Gli
 .endif
 
 .if ${PORT_OPTIONS:MSSL}
-# we can't use USE_OPENSSL=yes after including bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USES+=		ssl
 BUILD_DEPENDS+=	p5-IO-Socket-SSL>=0:security/p5-IO-Socket-SSL
 .endif
 
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/dns/opendd/Makefile
==============================================================================
--- head/dns/opendd/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/dns/opendd/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -30,7 +30,7 @@ USE_RC_SUBR=	${PORTNAME}
 .endif
 
 .if ${PORT_OPTIONS:MOPENSSL}
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USES+=		ssl
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}
 MAKE_ENV+=	"USE_SOCKET_SSL=yes"

Modified: head/ftp/vsftpd-ext/Makefile
==============================================================================
--- head/ftp/vsftpd-ext/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/ftp/vsftpd-ext/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -57,7 +57,7 @@ VSFTPD_NO_OPTIMIZED=	-e "s|-O2 ||"
 .endif
 
 .if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USES+=		ssl
 SSL_SUFFIX=	-ssl
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}

Modified: head/ftp/vsftpd/Makefile
==============================================================================
--- head/ftp/vsftpd/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/ftp/vsftpd/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -33,7 +33,7 @@ STACKPROTECTOR_DESC=	Build with stack-pr
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USES+=		ssl
 SSL_SUFFIX=	-ssl
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}

Modified: head/net/isc-dhcp43-server/Makefile
==============================================================================
--- head/net/isc-dhcp43-server/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/net/isc-dhcp43-server/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -108,10 +108,9 @@ PLIST_SUB+=	LDAP="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MLDAP_SSL} && ${PORT_OPTIONS:MLDAP}
-USE_OPENSSL=	yes
+USES+=		ssl
 CONFIGURE_ARGS+=--with-ldapcrypto
 LIBS+=		-lssl
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
 .endif
 
 .if ${PORT_OPTIONS:MIPV6}

Modified: head/security/R-cran-openssl/Makefile
==============================================================================
--- head/security/R-cran-openssl/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/security/R-cran-openssl/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -18,7 +18,7 @@ USES=	cran:auto-plist
 .if ${OSVERSION} < 1000015
 WITH_OPENSSL_PORT=	yes
 R_POSTCMD_INSTALL_OPTIONS+=	--configure-vars="INCLUDE_DIR=${OPENSSLINC} LIB_DIR=${OPENSSLLIB}"
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+USES+=		ssl
 .endif
 
 .include <bsd.port.mk>

Modified: head/security/ftimes/Makefile
==============================================================================
--- head/security/ftimes/Makefile	Mon Jun 27 10:56:14 2016	(r417650)
+++ head/security/ftimes/Makefile	Mon Jun 27 11:31:10 2016	(r417651)
@@ -61,6 +61,8 @@ HASHDIG_TOOLS_DESC=	Install hashdig tool
 MAP_TOOLS_DESC=		Install map tools
 XMAGIC_DESC=		XMagic support
 
+SSL_USES=	ssl
+
 .include <bsd.port.pre.mk>
 
 LIB_DEPENDS+=		libpcre.so:devel/pcre
@@ -110,8 +112,6 @@ PLIST_SUB+=		MAP_TOOLS="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MSSL}
-# we can't use USE_OPENSSL=yes after including bsd.port.pre.mk
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
 CONFIGURE_ARGS+=	--with-ssl=${OPENSSLBASE}
 .else
 CONFIGURE_ARGS+=	--without-ssl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606271131.u5RBVBuX088905>