Bug 276811

Summary: sysutils/u-boot-master used BINARY_ALIAS with = could we change this to +=?
Product: Ports & Packages Reporter: crb <crb>
Component: Individual Port(s)Assignee: freebsd-uboot (Nobody) <uboot>
Status: New ---    
Severity: Affects Only Me CC: imp, mandree, tijl
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description crb 2024-02-03 19:32:47 UTC
I have a port for u-boot that uses the u-boot-master framework however my port needs to call gdd instead of the system dd.  I want to use BINARY_ALIAS but the master port Makefile use = instead of += to set its own BINARY_ALIAS thus blowing away mine.  could we change this?

diff --git a/sysutils/u-boot-master/Makefile b/sysutils/u-boot-master/Makefile
index 646876fdb261..d35cca756ecb 100644
--- a/sysutils/u-boot-master/Makefile
+++ b/sysutils/u-boot-master/Makefile
@@ -28,7 +28,7 @@ BUILD_DEPENDS+=       e2fsprogs-libuuid>=0:misc/e2fsprogs-libuuid \
                gnutls>=0:security/gnutls
 
 USES=          bison gmake python:build pkgconfig shebangfix tar:bz2
-BINARY_ALIAS=  bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
+BINARY_ALIAS+= bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
 
 SHEBANG_FILES= tools/binman/binman
 SSP_UNSAFE=    yes
Comment 1 crb 2024-02-04 03:58:59 UTC
It would also be nice if we could use ?= for assignment of UBOOT_PLIST_ZYNQ_7000 and 
UBOOT_MOVE_ZYNQ_7000 so that my port could override them. (I don't need uEnv.txt)

diff --git a/sysutils/u-boot-master/Makefile b/sysutils/u-boot-master/Makefile
index 646876fdb261..120ad397aa57 100644
--- a/sysutils/u-boot-master/Makefile
+++ b/sysutils/u-boot-master/Makefile
@@ -28,7 +28,7 @@ BUILD_DEPENDS+=       e2fsprogs-libuuid>=0:misc/e2fsprogs-libuuid \
                gnutls>=0:security/gnutls
 
 USES=          bison gmake python:build pkgconfig shebangfix tar:bz2
-BINARY_ALIAS=  bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
+BINARY_ALIAS+= bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
 
 SHEBANG_FILES= tools/binman/binman
 SSP_UNSAFE=    yes
@@ -82,8 +82,8 @@ UBOOT_METADATA_ALLWINNER64_RAW_OFFSET=        1
 UBOOT_METADATA_ALLWINNER64_RAW_BS=     128k
 
 # Overrides for Zynq 7000 family
-UBOOT_PLIST_ZYNQ_7000=u-boot.img boot.bin uEnv.txt
-UBOOT_MOVE_ZYNQ_7000=${WRKSRC}/spl/boot.bin ${.CURDIR}/files/uEnv.txt
+UBOOT_PLIST_ZYNQ_7000?=u-boot.img boot.bin uEnv.txt
+UBOOT_MOVE_ZYNQ_7000?=${WRKSRC}/spl/boot.bin ${.CURDIR}/files/uEnv.txt
 
 # Overrides for RPI family
 UBOOT_PLIST_RPI=       u-boot.bin
Comment 2 Warner Losh freebsd_committer freebsd_triage 2024-02-06 19:26:44 UTC
You could add / override those items after the .include of the master makefile, no? Wouldn't that work?