git: 732684602aa2 - main - devel/binutils: Add INFO option

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 30 Nov 2023 04:35:06 UTC
The branch main has been updated by cy:

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

commit 732684602aa22ecace935d2f61f6aff709d543bc
Author:     firk <firk@cantconnect.ru>
AuthorDate: 2023-11-30 04:33:18 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-11-30 04:34:44 +0000

    devel/binutils: Add INFO option
    
    Add INFO option to remove unconditional texinfo dependency.
    
    PR:                     275378
    Reviewed by:            cy
    Differential Revision:  https://reviews.freebsd.org/D37013
---
 devel/binutils/Makefile                  |   9 +-
 devel/binutils/files/extra-patch-no-info | 152 +++++++++++++++++++++++++++++++
 2 files changed, 158 insertions(+), 3 deletions(-)

diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile
index 7114e9a98614..ab19761d2f13 100644
--- a/devel/binutils/Makefile
+++ b/devel/binutils/Makefile
@@ -25,7 +25,7 @@ FLAVORS=	native aarch64 aarch64_none_elf amd64 arm_gnueabi arm_none_eabi \
 		riscv64_none_elf s390x sparc64 riscv32_unknown_elf
 FLAVOR?=	native
 
-USES=		bison:alias compiler:env cpe gmake localbase libtool makeinfo perl5 pkgconfig tar:lz
+USES=		bison:alias compiler:env cpe gmake localbase libtool perl5 pkgconfig tar:lz
 USE_PERL5=	build
 CPE_VENDOR=	gnu
 GNU_CONFIGURE=	yes
@@ -50,7 +50,8 @@ LDFLAGS+=	-Wl,--undefined-version
 
 CONFLICTS=	libbfd
 
-OPTIONS_DEFINE=	NLS RELRO
+OPTIONS_DEFINE=	INFO NLS RELRO
+OPTIONS_DEFAULT=	INFO
 OPTIONS_SUB=	yes
 
 RELRO_DESC=	Enable relocation memory corruption mitigation (-z relro) by default
@@ -58,6 +59,8 @@ RELRO_CONFIGURE_ON=	--enable-relro
 RELRO_CONFIGURE_OFF=	--enable-relro=no
 NLS_USES=	gettext
 NLS_CONFIGURE_ENABLE=	nls
+INFO_EXTRA_PATCHES_OFF=	${PATCHDIR}/extra-patch-no-info
+INFO_USES=	makeinfo
 
 aarch64_COMMENT=	GNU binutils for ${FLAVOR} development
 
@@ -116,7 +119,7 @@ CONFIGURE_ARGS+=	--with-system-zlib \
 			--enable-threads=yes
 # XXX Needed to support gcc10 and earlier:
 CONFIGURE_ARGS+=	--with-isa-spec=2.2
-INFO=		as \
+INFO_INFO=	as \
 		binutils \
 		ctf-spec \
 		gprof \
diff --git a/devel/binutils/files/extra-patch-no-info b/devel/binutils/files/extra-patch-no-info
new file mode 100644
index 000000000000..79a4d9a43b1a
--- /dev/null
+++ b/devel/binutils/files/extra-patch-no-info
@@ -0,0 +1,152 @@
+From: firk <firk@cantconnect.ru>
+
+--- bfd/Makefile.in.orig	2023-01-14 03:00:00.000000000 +0300
++++ bfd/Makefile.in	2023-11-27 02:50:29.374411000 +0300
+@@ -2053,7 +2053,7 @@
+ check-am: all-am
+ check: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+-all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) \
++all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) \
+ 		config.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+@@ -2122,8 +2122,7 @@
+ 
+ info-am: $(INFO_DEPS)
+ 
+-install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES \
+-	install-info-am
++install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES
+ 
+ install-dvi: install-dvi-recursive
+ 
+@@ -2311,7 +2310,7 @@
+ 	  | LC_ALL=C sort > tmp.bld \
+ 	  && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
+ 
+-all diststuff: info
++diststuff: info
+ 
+ stamp-ofiles: Makefile
+ 	rm -f tofiles
+--- binutils/Makefile.in.orig	2023-01-14 03:00:00.000000000 +0300
++++ binutils/Makefile.in	2023-11-27 03:00:41.684013000 +0300
+@@ -1568,7 +1568,7 @@
+ 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+ check: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+-all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h
++all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+ 	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+@@ -1647,7 +1647,7 @@
+ 
+ info-am: $(INFO_DEPS) info-local
+ 
+-install-data-am: install-info-am install-man
++install-data-am: install-man
+ 
+ install-dvi: install-dvi-recursive
+ 
+--- gas/Makefile.in.orig	2023-01-14 03:00:00.000000000 +0300
++++ gas/Makefile.in	2023-11-27 03:02:45.161723000 +0300
+@@ -1794,7 +1794,7 @@
+ check-am: all-am
+ 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+ check: check-recursive
+-all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h
++all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+ 	for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+@@ -1870,7 +1870,7 @@
+ 
+ info-am: $(INFO_DEPS) info-local
+ 
+-install-data-am: install-info-am install-man
++install-data-am: install-man
+ 
+ install-dvi: install-dvi-recursive
+ 
+--- gprof/Makefile.in.orig	2021-07-18 19:44:34.000000000 +0300
++++ gprof/Makefile.in	2022-10-16 18:26:01.598791000 +0300
+@@ -935,7 +935,7 @@
+ check-am: all-am
+ check: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+-all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(MANS) $(HEADERS) gconfig.h
++all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) gconfig.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+ 	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+@@ -998,7 +998,7 @@
+ 
+ info-am: $(INFO_DEPS)
+ 
+-install-data-am: install-info-am install-man
++install-data-am: install-man
+ 
+ install-dvi: install-dvi-recursive
+ 
+--- ld/Makefile.in.orig	2021-07-18 19:38:34.000000000 +0300
++++ ld/Makefile.in	2022-10-16 18:31:53.484540000 +0300
+@@ -1945,7 +1945,7 @@
+ 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+ check: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+-all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(PROGRAMS) $(MANS) \
++all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) \
+ 		config.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+@@ -2020,7 +2020,7 @@
+ info-am: $(INFO_DEPS)
+ 
+ install-data-am: install-bfdpluginLTLIBRARIES install-data-local \
+-	install-info-am install-man
++	install-man
+ 
+ install-dvi: install-dvi-recursive
+ 
+--- libctf/Makefile.in.orig	2023-01-14 03:00:00.000000000 +0300
++++ libctf/Makefile.in	2023-11-28 00:05:24.527961000 +0300
+@@ -1449,7 +1449,7 @@
+ check-am: all-am
+ 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+ check: check-am
+-all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(HEADERS) config.h
++all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
+ installdirs:
+ 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(includedir)"; do \
+ 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+@@ -1513,7 +1513,7 @@
+ 
+ info-am: $(INFO_DEPS)
+ 
+-install-data-am: install-includeHEADERS install-info-am
++install-data-am: install-includeHEADERS
+ 
+ install-dvi: install-dvi-am
+ 
+--- libsframe/Makefile.in.orig	2023-01-14 03:00:00.000000000 +0300
++++ libsframe/Makefile.in	2023-11-28 00:07:32.222018000 +0300
+@@ -1215,7 +1215,7 @@
+ 	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+ check: check-am
+-all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(HEADERS) config.h
++all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
+ installdirs:
+ 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(includedir)"; do \
+ 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+@@ -1284,7 +1284,7 @@
+ 
+ info-am: $(INFO_DEPS)
+ 
+-install-data-am: install-includeHEADERS install-info-am
++install-data-am: install-includeHEADERS
+ 
+ install-dvi: install-dvi-am
+