pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/rust
Module Name: pkgsrc
Committed By: nia
Date: Tue Mar 30 09:50:14 UTC 2021
Modified Files:
pkgsrc/lang/rust: Makefile options.mk
Log Message:
rust: normalize workarounds for cargo dependencies on NetBSD
Havard would like all rusts to be built with rust-cargo-static,
because this makes it easier to produce working bootstaps.
In order to do this, we need to handle the OpenSSL and curl
dependencies in older bootstrap kits properly.
This means, for the remaining bootstraps that do not yet have
cargo with static/vendored dependencies:
- depend on base 8.0 openssl (compat80) on i386.
- depend on pkgsrc curl on aarch64 and earmv7.
the armv7 bootstrap is built for 9.0 so does not need compat80.
the aarch64 bootstrap is built for 8.99.50 so does not need compat80.
To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 pkgsrc/lang/rust/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/rust/options.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.220 pkgsrc/lang/rust/Makefile:1.221
--- pkgsrc/lang/rust/Makefile:1.220 Mon Mar 29 08:45:34 2021
+++ pkgsrc/lang/rust/Makefile Tue Mar 30 09:50:14 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.220 2021/03/29 08:45:34 he Exp $
+# $NetBSD: Makefile,v 1.221 2021/03/30 09:50:14 nia Exp $
DISTNAME= rustc-1.49.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -532,42 +532,28 @@ stage0-bootstrap: install
## Issues specific to: bootstrap AND NetBSD follow
-# (I wish this worked on powerpc, but it doesn't since
-# I can't build with the internal LLVM, ref.
-# https://github.com/rust-lang/rust/issues/65862)
-
-.if (${OPSYS} == "NetBSD") && \
- ((${MACHINE_ARCH} == "i386") || \
- (${MACHINE_ARCH} == "sparc64") || \
- (${MACHINE_ARCH} == "powerpc")) \
- && (empty(OS_VERSION:M[012345678].*) || \
- !empty(OS_VERSION:M8.99.*))
-# Bootstrap kits are built on 8.0, so that a single bootstrap can run
-# on multiple systems. Thus later versions need the compat80 package.
-# \todo Explain why this is limited to a small list of architectures,
-# and in particular why not x86_64.
+# rust-1.48.0 i386 bootstraps are built for 8.0 and still depend on
+# base OpenSSL for cargo. Pull in compat80 on 9.x and newer.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) && empty(OS_VERSION:M8.*)
DEPENDS+= compat80>=0:../../emulators/compat80
.endif
-.if (${OPSYS} == "NetBSD") && \
- ((${MACHINE_ARCH} == "i386")) \
- && (empty(OS_VERSION:M[012345678].*) || \
- !empty(OS_VERSION:M8.99.*))
-# Bootstrap kits use openssl, which on NetBSD 8 comes from pkgsrc.
-# Therefore the pkgsrc openssl libs need to be present as well.
-# The 1.44.1 i686 bootstrap links with pkgsrc openssl. The others do
-# not. When the package is built,
-# cargo links against pkgsrc openssl, so it must be a run-time
-# dependency as well. Forcing USE_BUILTIN.openssl=no results in a
-# mysterious heimdal error, but straight DEPENDS seems to result in a
-# satisfactory package build.
-# While this is icky, it is for the time being better than no rust package.
-DEPENDS+= openssl>=1.1:../../security/openssl
+# As of 2021-02-25 cargo is only a static binary in x86_64,
+# powerpc, and sparc64 bootstraps.
+# he@ says this should be fixed after the bootstraps are updated
+# to 1.49.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf)
+BUILDLINK_API_DEPENDS.nghttp2+= nghttp2>=1.41.0
+BUILDLINK_API_DEPENDS.curl+= curl>=7.67.0
+. include "../../www/curl/buildlink3.mk"
+. include "../../security/openssl/buildlink3.mk"
.endif
# This is for when we build natively:
-.if ((${OPSYS} == "NetBSD") && \
- ((${MACHINE_ARCH} == "powerpc") || (${MACHINE_ARCH} == "i386")))
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-*-i386)
# LLVM needs libatomic for 64-bit atomics on powerpc and i386
.include "../../devel/libatomic/buildlink3.mk"
# Make those libraries available via a unique directory:
Index: pkgsrc/lang/rust/options.mk
diff -u pkgsrc/lang/rust/options.mk:1.11 pkgsrc/lang/rust/options.mk:1.12
--- pkgsrc/lang/rust/options.mk:1.11 Thu Feb 25 08:54:05 2021
+++ pkgsrc/lang/rust/options.mk Tue Mar 30 09:50:14 2021
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.11 2021/02/25 08:54:05 wiz Exp $
+# $NetBSD: options.mk,v 1.12 2021/03/30 09:50:14 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.rust
PKG_SUPPORTED_OPTIONS+= rust-cargo-static
@@ -14,13 +14,7 @@ PKG_SUGGESTED_OPTIONS+= rust-llvm
. endif
.endif
-# As of 2021-02-25 cargo is only a static binary in x86_64 and
-# powerpc bootstraps
-.if ${OPSYS} == "NetBSD" && \
- ${MACHINE_ARCH} != "i386" && \
- ${MACHINE_ARCH} != "aarch64" && \
- ${MACHINE_ARCH} != "earmv7hf" && \
- ${MACHINE_ARCH} != "sparc64"
+.if ${OPSYS} == "NetBSD"
PKG_SUGGESTED_OPTIONS+= rust-cargo-static
.endif
Home |
Main Index |
Thread Index |
Old Index