git: fe14cd83dad6 - main - security/libgcrypt: optionalize INFO

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 27 Jan 2022 05:09:08 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fe14cd83dad652fbccffcdcaa81f73637f008c15

commit fe14cd83dad652fbccffcdcaa81f73637f008c15
Author:     Greg V <greg@unrelenting.technology>
AuthorDate: 2021-10-30 15:38:41 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-01-27 05:08:40 +0000

    security/libgcrypt: optionalize INFO
    
    Allow the user to optionally exclude INFO files, allowing the space
    conscious user the ability to install a minimual package. The default
    remains to install INOF files as before.
    
    PR:             259552
    Reported by:    Greg V <greg@unrelenting.technology>
    Submitted by:   Greg V <greg@unrelenting.technology>
---
 security/libgcrypt/Makefile                  | 13 ++++++++-----
 security/libgcrypt/files/extra-patch-no-info | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/security/libgcrypt/Makefile b/security/libgcrypt/Makefile
index 967ce24dbe81..38d3efb710ea 100644
--- a/security/libgcrypt/Makefile
+++ b/security/libgcrypt/Makefile
@@ -12,26 +12,29 @@ LICENSE_COMB=	multi
 BUILD_DEPENDS=	libgpg-error>=1.32:security/libgpg-error
 RUN_DEPENDS=	libgpg-error>=1.32:security/libgpg-error
 
-USES=		cpe libtool makeinfo tar:bzip2
+USES=		cpe libtool tar:bzip2
 
 CPE_VENDOR=	gnupg
 USE_CSTD=	gnu89
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--disable-drng-support
-CONFIGURE_ENV=	MAKEINFO="${MAKEINFO} --no-split"
 CONFIGURE_TARGET=${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL}
 USE_LDCONFIG=	yes
 TEST_TARGET=	check
 
 DOCS=		AUTHORS ChangeLog ChangeLog-2011 INSTALL NEWS THANKS TODO \
 		doc/HACKING doc/README.apichanges
-INFO=		gcrypt
 PORTDOCS=	*
 
-OPTIONS_DEFINE=		DOCS STATIC
-OPTIONS_DEFAULT=	DOCS STATIC
+OPTIONS_DEFINE=		DOCS INFO STATIC
+OPTIONS_DEFAULT=	DOCS INFO STATIC
 OPTIONS_SUB=	yes
 
+INFO_EXTRA_PATCHES_OFF=	${PATCHDIR}/extra-patch-no-info
+INFO_CONFIGURE_ENV=	MAKEINFO="${MAKEINFO} --no-split"
+INFO_INFO=		gcrypt
+INFO_USES=	makeinfo
+
 STATIC_CONFIGURE_ENABLE=	static
 
 .include <bsd.port.options.mk>
diff --git a/security/libgcrypt/files/extra-patch-no-info b/security/libgcrypt/files/extra-patch-no-info
new file mode 100644
index 000000000000..85d58af1cd98
--- /dev/null
+++ b/security/libgcrypt/files/extra-patch-no-info
@@ -0,0 +1,20 @@
+--- doc/Makefile.in.orig	2021-08-22 16:00:24 UTC
++++ doc/Makefile.in
+@@ -690,7 +690,7 @@ distdir-am: $(DISTFILES)
+ check-am: all-am
+ check: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) check-am
+-all-am: Makefile $(INFO_DEPS) $(MANS)
++all-am: Makefile $(MANS)
+ installdirs:
+ 	for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+ 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+@@ -750,7 +750,7 @@ info: info-am
+ 
+ info-am: $(INFO_DEPS)
+ 
+-install-data-am: install-info-am install-man
++install-data-am: install-man
+ 
+ install-dvi: install-dvi-am
+