Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/rust lang/rust: fix unsatisfiable condition in ca...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ad3f6595cebb
branches:  trunk
changeset: 434304:ad3f6595cebb
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Jun 14 11:19:34 2020 +0000

description:
lang/rust: fix unsatisfiable condition in cargo.mk

The condition had been the same as in Makefile before 1.174.

Testing for OPSYS was unnecessary since that is included in
MACHINE_PLATFORM as well.

The ${VAR} syntax is easier readable since the number of exclamation
marks matches the number of negations, contrary to !empty, which is
effectively a positive test.

Swapped the order of the conditions since it is easier to read
"generally, but not" than "not this and the general case".

diffstat:

 lang/rust/Makefile |  6 +++---
 lang/rust/cargo.mk |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 4325f885e944 -r ad3f6595cebb lang/rust/Makefile
--- a/lang/rust/Makefile        Sun Jun 14 11:17:13 2020 +0000
+++ b/lang/rust/Makefile        Sun Jun 14 11:19:34 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.177 2020/06/13 14:26:00 gdt Exp $
+# $NetBSD: Makefile,v 1.178 2020/06/14 11:19:34 rillig Exp $
 
 DISTNAME=      rustc-1.43.1-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -158,9 +158,9 @@
 #
 # If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel.
 # \todo Consider avoiding setting this on netbsd-9 past the fix.
-.if empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && !empty(MACHINE_PLATFORM:MNetBSD-[1-9].*)
+.  if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*}
 MAKE_JOBS_SAFE=        no
-.endif
+.  endif
 .endif
 
 #
diff -r 4325f885e944 -r ad3f6595cebb lang/rust/cargo.mk
--- a/lang/rust/cargo.mk        Sun Jun 14 11:17:13 2020 +0000
+++ b/lang/rust/cargo.mk        Sun Jun 14 11:19:34 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.15 2020/06/08 22:37:28 he Exp $
+# $NetBSD: cargo.mk,v 1.16 2020/06/14 11:19:34 rillig Exp $
 #
 # Common logic that can be used by packages that depend on cargo crates
 # from crates.io. This lets existing pkgsrc infrastructure fetch and verify
@@ -42,8 +42,8 @@
 
 .include "../../mk/bsd.prefs.mk"
 # Triggers NetBSD ld.so bug (PR toolchain/54192)
-.if ${OPSYS} == "NetBSD" && !empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && \
-    !empty(MACHINE_PLATFORM:MNetBSD-[1-9][0-9].*)
+# See Makefile for further information.
+.if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*}
 MAKE_JOBS_SAFE=        no
 .endif
 



Home | Main Index | Thread Index | Old Index