Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 May 2021 17:33:16 GMT
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d50822c34fe1 - main - lang/rust, lang/rust-bootstrap: Simplify makesum
Message-ID:  <202105111733.14BHXG5n050033@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tobik:

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

commit d50822c34fe1d8adf879745d2b26c000af2e8862
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-05-11 16:56:40 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-05-11 17:29:32 +0000

    lang/rust, lang/rust-bootstrap: Simplify makesum
---
 lang/rust-bootstrap/Makefile | 17 +++++------------
 lang/rust/Makefile           | 23 ++++++-----------------
 2 files changed, 11 insertions(+), 29 deletions(-)

diff --git a/lang/rust-bootstrap/Makefile b/lang/rust-bootstrap/Makefile
index 9f1bb4afaaec..797637e9bead 100644
--- a/lang/rust-bootstrap/Makefile
+++ b/lang/rust-bootstrap/Makefile
@@ -127,6 +127,11 @@ IGNORE=	will not build on 12.x due to old system
 EXTRA_PATCHES+=	${PATCHDIR}/${FLAVOR:S/_/-/}
 .endif
 
+.if make(makesum)
+DISTFILES:=	${DISTFILES:M*\:rust} \
+		${FLAVORS:O:@_flavor@${:!${SETENV} FLAVOR=${_flavor} ${MAKE} -V'DISTFILES:N*\:rust'!}@}
+.endif
+
 post-patch:
 # Disable vendor checksums
 	@${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \
@@ -238,16 +243,4 @@ do-install:
 	@cd ${STAGEDIR}${PREFIX} && \
 		${FIND} rust-bootstrap -type f >> ${TMPPLIST}
 
-.if !defined(_RUST_MAKESUM_GUARD)
-makesum:
-	${MAKE} -D_RUST_MAKESUM_GUARD makesum FLAVOR=${FLAVORS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp
-.for _flavor in ${FLAVORS:O:[2..-1]}
-	${MAKE} -D_RUST_MAKESUM_GUARD makesum FLAVOR=${_flavor} DISTINFO_FILE=${DISTINFO_FILE}.${_flavor}
-	${SED} 1d ${DISTINFO_FILE}.${_flavor} >> ${DISTINFO_FILE}.tmp
-	${RM} ${DISTINFO_FILE}.${_flavor}
-.endfor
-	${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE}
-	${RM} ${DISTINFO_FILE}.tmp
-.endif
-
 .include <bsd.port.post.mk>
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index cfabc443d9dd..400eb27e9558 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -110,6 +110,12 @@ IGNORE=	fails to run due to a bug in rtld, update to 12.2-RELEASE or newer
 IGNORE=	fails to build with qemu-user-static
 .endif
 
+.if make(makesum)
+DISTFILES:=	${DISTFILES:M*\:src} \
+		${ONLY_FOR_ARCHS:O:@_arch@${:!${MAKE} ARCH=${_arch} PPC_ABI=ELFv1 -V'DISTFILES:N*\:src'!}@} \
+		${ONLY_FOR_ARCHS:Mpowerpc64:@_arch@${:!${MAKE} ARCH=${_arch} PPC_ABI=ELFv2 -V'DISTFILES:N*\:src'!}@}
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} 's,gdb,${LOCALBASE}/bin/gdb,' ${WRKSRC}/src/etc/rust-gdb
 .if defined(NIGHTLY_DATE)
@@ -251,21 +257,4 @@ do-test:
 	@cd ${WRKSRC} && \
 		${SETENV} ${TEST_ENV} ${PYTHON_CMD} x.py test --jobs=${MAKE_JOBS_NUMBER}
 
-.if !defined(_RUST_MAKESUM_GUARD)
-makesum:
-	${MAKE} -D_RUST_MAKESUM_GUARD -DTRYBROKEN makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp
-.for arch in ${ONLY_FOR_ARCHS:O:[2..-1]}
-	${MAKE} -D_RUST_MAKESUM_GUARD -DTRYBROKEN makesum PPC_ABI=ELFv1 ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch}
-	${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp
-	${RM} ${DISTINFO_FILE}.${arch}
-.endfor
-.if ${ONLY_FOR_ARCHS:Mpowerpc64}
-	${MAKE} -D_RUST_MAKESUM_GUARD -DTRYBROKEN makesum PPC_ABI=ELFv2 ARCH=powerpc64 DISTINFO_FILE=${DISTINFO_FILE}.powerpc64-elfv2
-	${SED} 1d ${DISTINFO_FILE}.powerpc64-elfv2 >> ${DISTINFO_FILE}.tmp
-	${RM} ${DISTINFO_FILE}.powerpc64-elfv2
-.endif
-	${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE}
-	${RM} ${DISTINFO_FILE}.tmp
-.endif
-
 .include <bsd.port.post.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105111733.14BHXG5n050033>