pkgsrc-WIP-changes archive

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

Reduce difference to main pkgsrc lang/rust package.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Fri Apr 9 22:40:46 2021 +0200
Changeset:	2348bcd894f7e838064e99e8f77856bee6eab4f6

Modified Files:
	rust/Makefile
	rust/options.mk

Log Message:
Reduce difference to main pkgsrc lang/rust package.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2348bcd894f7e838064e99e8f77856bee6eab4f6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rust/Makefile   | 39 ++-------------------------------------
 rust/options.mk |  4 +++-
 2 files changed, 5 insertions(+), 38 deletions(-)

diffs:
diff --git a/rust/Makefile b/rust/Makefile
index 41a7dc6ab9..5b8eba8182 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -522,44 +522,9 @@ stage0-bootstrap: install
 #.include "../../www/http-parser/buildlink3.mk"
 #.include "../../devel/jemalloc/buildlink3.mk"
 
-## 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.
-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
-.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:
diff --git a/rust/options.mk b/rust/options.mk
index 88cb35a3a0..6495aa3de3 100644
--- a/rust/options.mk
+++ b/rust/options.mk
@@ -14,7 +14,9 @@ PKG_SUGGESTED_OPTIONS+=		rust-llvm
 .  endif
 .endif
 
-.if ${OPSYS} == "NetBSD"
+# Bundle OpenSSL and curl into the cargo binary when producing
+# bootstraps on NetBSD.
+.if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist"
 PKG_SUGGESTED_OPTIONS+=	rust-cargo-static
 .endif
 


Home | Main Index | Thread Index | Old Index