git: 5e33d1709369 - main - devel/binutils: Remove autodependency on devel/elfutils

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 29 Aug 2024 15:06:00 UTC
The branch main has been updated by cy:

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

commit 5e33d1709369d21c966c8ac57443a5af99c8b8fa
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-08-29 15:01:27 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-08-29 15:05:48 +0000

    devel/binutils: Remove autodependency on devel/elfutils
    
    Users who manually pre-install devel/elfutils and subsequently
    manually build and install binutils must now enable the dependency.
    
    The previous commit provided the option but also didn't change the
    implied (autodetect) behavior. This change now disables elfutils
    autodetection. Users must now explicitly enable the option if they
    were previously relying on autodetection.
    
    Requested by:   mat, jrm
---
 UPDATING                | 14 ++++++++++++++
 devel/binutils/Makefile | 21 ++++++---------------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/UPDATING b/UPDATING
index 7f2a8ff47376..3ead1b7de0ed 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,20 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20240829:
+  AFFECTS: devel/binutils
+  AUTHOR: cy@FreeBSD.org
+
+  Historically devel/binutils would implicitly use devel/elfutils when
+  it discovers it previously installed. This resulted in it depending on,
+  though not explicitly if previously found, elfutils when built manually.
+  This behvior has now changed. binutils will now disable any
+  auto-dependency on elfutils. Users who build binutils manually and wish
+  to have it depend on elfutls must now explicitly set the option when
+  building binutils.
+
+  There is no change to packages built by poudriere.
+
 20240824:
   AFFECTS: dns/acme-dns
   AUTHOR: netchild@FreeBSD.org
diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile
index 059ccaa36a8e..d8fa657f2689 100644
--- a/devel/binutils/Makefile
+++ b/devel/binutils/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	binutils
 DISTVERSION=	2.40
-PORTREVISION=	7
+PORTREVISION=	8
 PORTEPOCH?=	1
 CATEGORIES?=	devel
 MASTER_SITES=	GNU \
@@ -49,11 +49,9 @@ LDFLAGS+=	-Wl,--undefined-version
 
 CONFLICTS=	libbfd
 
-OPTIONS_DEFINE=	INFO NLS RELRO
-OPTIONS_DEFAULT=	ELFU_AUTO INFO
+OPTIONS_DEFINE=	ELFU INFO NLS RELRO
+OPTIONS_DEFAULT=	INFO
 OPTIONS_EXCLUDE=	NLS
-OPTIONS_RADIO=	ELFUTILS_ENABLE
-OPTIONS_RADIO_ELFUTILS_ENABLE=	ELFU_AUTO ELFU_YES ELFU_NO
 OPTIONS_SUB=	yes
 
 INFO_EXTRA_PATCHES_OFF=	${PATCHDIR}/extra-patch-no-info
@@ -64,11 +62,9 @@ RELRO_CONFIGURE_ON=	--enable-relro
 RELRO_CONFIGURE_OFF=	--enable-relro=no
 RELRO_DESC=	Enable relocation memory corruption mitigation (-z relro) by default
 NLS_CONFIGURE_ENABLE=	nls
-ELFU_AUTO_DESC=	Auto-detect pre-installed devel/elfutils
-ELFU_YES_DESC=	Depend on and install devel/elfutils
-ELFU_YESLIB_DEPENDS=	libdebuginfod.so:devel/elfutils
-ELFU_NO_DESC=	Ingore pre-installed devel/elfutils
-ELFU_NO_CONFIGURE_ON=	--without-libelf --without-debuginfod
+ELFU_DESC=		Depend on devel/elfutils
+ELFU_CONFIGURE_WITH=	debuginfod
+ELFU_LIB_DEPENDS=	libdebuginfod.so:devel/elfutils
 
 aarch64_COMMENT=	GNU binutils for ${FLAVOR} development
 
@@ -136,11 +132,6 @@ INFO_INFO=	as \
 
 .include <bsd.port.pre.mk>
 
-# In case devel/elfutils has been previously installed.
-.if ${PORT_OPTIONS:MELFU_AUTO} && exists(${LOCALBASE}/lib/libdebuginfod.so)
-LIB_DEPENDS+=	libdebuginfod.so:devel/elfutils
-.endif
-
 # Actual earliest version may differ slightly
 .if (${ARCH} != mips && ${ARCH} != mips64 && ${ARCH} != powerpcspe && ${ARCH} != powerpc && ${ARCH} != powerpc64 && ${ARCH} != riscv64 && !defined(PKGNAMEPREFIX)) || ((${ARCH} == powerpc || ${ARCH} == powerpc64) && ${CHOSEN_COMPILER_TYPE} != gcc && !defined(PKGNAMEPREFIX))
 CONFIGURE_ARGS+=	--enable-gold --enable-plugins