pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/mozjs78 mozjs78: fix NetBSD i386 builds with Rust...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/663964dbe83e
branches:  trunk
changeset: 454678:663964dbe83e
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Mon Jun 14 22:07:35 2021 +0000

description:
mozjs78: fix NetBSD i386 builds with Rust >= 1.50

The NetBSD i386 Rust 1.50 builds introduced two different targets (i586
and i686), where previously there was only one (i686). Unfortunately,
the upstream mozjs78 configuration script that narrows to the
appropriate compiler target is confused by this, since it was receiving
"i486" from pkgsrc tooling and didn't know how to pick from more than
one potential approximate match. I'm addressing it this (kludgy) way
for now, as I don't have time to go through Mozilla's scripting and
make adjustments, and I would like this building in the 2021Q2 branch.
If someone else feels there's a better way, please have at it. With
this tweak in place, I'm able to build the xfce4 meta package for
NetBSD/i386 9.2.

diffstat:

 lang/mozjs78/Makefile |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 82d4668d1561 -r 663964dbe83e lang/mozjs78/Makefile
--- a/lang/mozjs78/Makefile     Mon Jun 14 21:08:05 2021 +0000
+++ b/lang/mozjs78/Makefile     Mon Jun 14 22:07:35 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2021/05/24 19:52:34 wiz Exp $
+# $NetBSD: Makefile,v 1.21 2021/06/14 22:07:35 gutteridge Exp $
 
 DISTNAME=      mozjs78_78.4.0.orig
 PKGNAME=       ${DISTNAME:S/_/-/:S/.orig//}
@@ -34,9 +34,20 @@
 CONFIGURE_ARGS+=       --enable-strip
 CONFIGURE_ARGS+=       --with-intl-api
 # --disable-optimize
+
 # For rustc/cargo detection
+.include "../../mk/bsd.prefs.mk"
+
+# This is to work around build failures where an upstream configuration script
+# is confused by having more than one approximate match to MACHINE_GNU_PLATFORM
+# "i486" when attempting to select the Rust compiler target.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386)
+CONFIGURE_ARGS+=       --target=i586-unknown-netbsd
+CONFIGURE_ARGS+=       --host=i586-unknown-netbsd
+.else
 CONFIGURE_ARGS+=       --target=${MACHINE_GNU_PLATFORM}
 CONFIGURE_ARGS+=       --host=${MACHINE_GNU_PLATFORM}
+.endif
 
 BUILDLINK_TRANSFORM.SunOS+=    rm:-pie
 



Home | Main Index | Thread Index | Old Index