svn commit: r421567 - head/security/gnupg1

Dmitry Marakasov amdmi3 at FreeBSD.org
Thu Sep 8 17:04:14 UTC 2016


Author: amdmi3
Date: Thu Sep  8 17:04:12 2016
New Revision: 421567
URL: https://svnweb.freebsd.org/changeset/ports/421567

Log:
  - Add LICENSE
  - While here, convert to options helpers and new test framework
  
  PR:		207449
  Submitted by:	dewayne at heuristicsystems.com.au
  Approved by:	maintainer timeout (kuriyama, 6 months)

Modified:
  head/security/gnupg1/Makefile
  head/security/gnupg1/pkg-plist

Modified: head/security/gnupg1/Makefile
==============================================================================
--- head/security/gnupg1/Makefile	Thu Sep  8 17:02:12 2016	(r421566)
+++ head/security/gnupg1/Makefile	Thu Sep  8 17:04:12 2016	(r421567)
@@ -12,6 +12,9 @@ EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 MAINTAINER=	kuriyama at FreeBSD.org
 COMMENT=	The GNU Privacy Guard
 
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/COPYING
+
 USES=		charsetfix cpe gmake tar:bzip2
 GNU_CONFIGURE=	YES
 CPE_VENDOR=	gnupg
@@ -23,14 +26,37 @@ INFO=		gnupg1
 DOCSDIR=	${PREFIX}/share/doc/gnupg1
 PORTDOCS=	*
 
+TEST_TARGET=	check
+
 OPTIONS_DEFINE=	LDAP LIBICONV LIBUSB SUID_GPG NLS CURL DOCS
 OPTIONS_DEFAULT=	CURL
+OPTIONS_SUB=	yes
 LDAP_DESC=	LDAP keyserver interface
 LIBICONV_DESC=	use libiconv
 LIBUSB_DESC=	use libusb
 SUID_GPG_DESC=	install GPG with suid
 CURL_DESC=	use libcurl for the keyserver interface
 
+LIBICONV_USES=		iconv
+LIBICONV_CONFIGURE_OFF=	--disable-gnupg-iconv
+
+LIBUSB_CONFIGURE_ON=	--with-libusb=${LOCALBASE}
+LIBUSB_CONFIGURE_OFF=	--without-libusb
+
+LDAP_USE=		OPENLDAP=yes
+LDAP_CONFIGURE_ON=	--with-ldap=${LOCALBASE}
+#LDAP_CONFIGURE_ENV+=	LDFLAGS="-L/usr/lib"
+LDAP_CONFIGURE_OFF=	--disable-ldap
+
+NLS_USES=		gettext
+NLS_CONFIGURE_ENABLE=	nls
+
+CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
+CURL_CONFIGURE_ON=	--with-libcurl=${LOCALBASE}
+# Work around a GnuPG configure buglet
+CURL_CONFIGURE_ENV=	_libcurl_config=${LOCALBASE}/bin/curl-config
+CURL_CONFIGURE_OFF=	--without-libcurl
+
 .include <bsd.port.options.mk>
 
 .if ${CC} == "clang" || ${OSVERSION} >= 1000024
@@ -40,47 +66,8 @@ CFLAGS:=	${CFLAGS:S/$/ -fheinous-gnu-ext
 .endif
 .endif
 
-.if ${PORT_OPTIONS:MLIBICONV}
-USES+=		iconv
-.else
-CONFIGURE_ARGS+=	--disable-gnupg-iconv
-.endif
-
-.if ${PORT_OPTIONS:MLIBUSB}
-CONFIGURE_ARGS+=	--with-libusb=${LOCALBASE}
-.else
-CONFIGURE_ARGS+=	--without-libusb
-.endif
-
-.if ${PORT_OPTIONS:MLDAP}
-USE_OPENLDAP=	yes
-PLIST_SUB+=	WITH_LDAP=""
-CONFIGURE_ARGS+=	--with-ldap=${LOCALBASE}
-#CONFIGURE_ENV+=	LDFLAGS="-L/usr/lib"
-.else
-PLIST_SUB+=	WITH_LDAP="@comment "
-CONFIGURE_ARGS+=	--disable-ldap
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-USES+=		gettext
-PLIST_SUB+=	NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+=	NLS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MCURL}
-LIB_DEPENDS+=	libcurl.so:ftp/curl
-CONFIGURE_ARGS+=--with-libcurl=${LOCALBASE}
-# Work around a GnuPG configure buglet
-CONFIGURE_ENV+=	_libcurl_config=${LOCALBASE}/bin/curl-config
-.else
-CONFIGURE_ARGS+=--without-libcurl
-.endif
-
 post-install:
-	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for i in DETAILS FAQ HACKING OpenPGP
 	${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${DOCSDIR}
 .endfor
@@ -92,7 +79,4 @@ post-install:
 	${CHMOD} u+s ${STAGEDIR}${PREFIX}/bin/gpg
 .endif
 
-check:
-	(cd ${WRKSRC}; ${MAKE} check)
-
 .include <bsd.port.mk>

Modified: head/security/gnupg1/pkg-plist
==============================================================================
--- head/security/gnupg1/pkg-plist	Thu Sep  8 17:02:12 2016	(r421566)
+++ head/security/gnupg1/pkg-plist	Thu Sep  8 17:04:12 2016	(r421567)
@@ -2,7 +2,7 @@ bin/gpg
 bin/gpg-zip
 bin/gpgsplit
 bin/gpgv
-%%WITH_LDAP%%libexec/gnupg/gpgkeys_ldap
+%%LDAP%%libexec/gnupg/gpgkeys_ldap
 libexec/gnupg/gpgkeys_curl
 libexec/gnupg/gpgkeys_finger
 libexec/gnupg/gpgkeys_hkp


More information about the svn-ports-all mailing list