Mon Jul 12 12:56:13 2021 UTC ()
Pullup ticket #6486 - requested by he
lang/rust: build fix

Revisions pulled up:
- lang/rust/Makefile                                            1.242
- lang/rust/options.mk                                          1.15

---
   Module Name:	pkgsrc
   Committed By:	he
   Date:		Sun Jul 11 22:13:38 UTC 2021

   Modified Files:
   	pkgsrc/lang/rust: Makefile options.mk

   Log Message:
   Evidently, cmake is needed in all cases.

   Move cmake dependency out of condition on PKG_OPTIONS.rust-llvm.


(bsiegert)
diff -r1.241 -r1.241.2.1 pkgsrc/lang/rust/Makefile
diff -r1.14 -r1.14.2.1 pkgsrc/lang/rust/options.mk

cvs diff -r1.241 -r1.241.2.1 pkgsrc/lang/rust/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/rust/Makefile 2021/06/13 12:19:16 1.241
+++ pkgsrc/lang/rust/Makefile 2021/07/12 12:56:13 1.241.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.241 2021/06/13 12:19:16 he Exp $ 1# $NetBSD: Makefile,v 1.241.2.1 2021/07/12 12:56:13 bsiegert Exp $
2 2
3DISTNAME= rustc-1.52.1-src 3DISTNAME= rustc-1.52.1-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5PKGREVISION= 4 5PKGREVISION= 4
6CATEGORIES= lang 6CATEGORIES= lang
7MASTER_SITES= https://static.rust-lang.org/dist/ 7MASTER_SITES= https://static.rust-lang.org/dist/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.rust-lang.org/ 10HOMEPAGE= https://www.rust-lang.org/
11COMMENT= Safe, concurrent, practical language 11COMMENT= Safe, concurrent, practical language
12LICENSE= mit OR apache-2.0 12LICENSE= mit OR apache-2.0
13 13
14CONFLICTS+= rust-bin-[0-9]* 14CONFLICTS+= rust-bin-[0-9]*
@@ -584,16 +584,18 @@ stage0-bootstrap: install @@ -584,16 +584,18 @@ stage0-bootstrap: install
584.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) && empty(OS_VERSION:M8.*) 584.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) && empty(OS_VERSION:M8.*)
585BUILD_DEPENDS+= compat80>=0:../../emulators/compat80 585BUILD_DEPENDS+= compat80>=0:../../emulators/compat80
586.endif 586.endif
587 587
588# This is for when we build natively: 588# This is for when we build natively:
589.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \ 589.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \
590 !empty(MACHINE_PLATFORM:MNetBSD-*-i386) 590 !empty(MACHINE_PLATFORM:MNetBSD-*-i386)
591# LLVM needs libatomic for 64-bit atomics on powerpc and i386 591# LLVM needs libatomic for 64-bit atomics on powerpc and i386
592.include "../../devel/libatomic/buildlink3.mk" 592.include "../../devel/libatomic/buildlink3.mk"
593# Make those libraries available via a unique directory: 593# Make those libraries available via a unique directory:
594DEPENDS+= libatomic-links>=0:../../devel/libatomic-links 594DEPENDS+= libatomic-links>=0:../../devel/libatomic-links
595.endif 595.endif
596 596
 597BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake
 598.include "../../devel/cmake/buildlink3.mk"
597.include "../../devel/zlib/buildlink3.mk" 599.include "../../devel/zlib/buildlink3.mk"
598.include "../../lang/python/tool.mk" 600.include "../../lang/python/tool.mk"
599.include "../../mk/bsd.pkg.mk" 601.include "../../mk/bsd.pkg.mk"

cvs diff -r1.14 -r1.14.2.1 pkgsrc/lang/rust/options.mk (expand / switch to unified diff)

--- pkgsrc/lang/rust/options.mk 2021/04/04 08:51:20 1.14
+++ pkgsrc/lang/rust/options.mk 2021/07/12 12:56:13 1.14.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: options.mk,v 1.14 2021/04/04 08:51:20 he Exp $ 1# $NetBSD: options.mk,v 1.14.2.1 2021/07/12 12:56:13 bsiegert Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.rust 3PKG_OPTIONS_VAR= PKG_OPTIONS.rust
4PKG_SUPPORTED_OPTIONS+= rust-cargo-static 4PKG_SUPPORTED_OPTIONS+= rust-cargo-static
5 5
6.include "../../mk/bsd.fast.prefs.mk" 6.include "../../mk/bsd.fast.prefs.mk"
7 7
8# The bundled LLVM current has issues building on SunOS. 8# The bundled LLVM current has issues building on SunOS.
9.if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" 9.if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin"
10PKG_SUPPORTED_OPTIONS+= rust-llvm 10PKG_SUPPORTED_OPTIONS+= rust-llvm
11# There may be compatibility issues with base LLVM. 11# There may be compatibility issues with base LLVM.
12. if !empty(HAVE_LLVM) 12. if !empty(HAVE_LLVM)
13PKG_SUGGESTED_OPTIONS+= rust-llvm 13PKG_SUGGESTED_OPTIONS+= rust-llvm
14. endif 14. endif
@@ -16,30 +16,27 @@ PKG_SUGGESTED_OPTIONS+= rust-llvm @@ -16,30 +16,27 @@ PKG_SUGGESTED_OPTIONS+= rust-llvm
16 16
17# Bundle OpenSSL and curl into the cargo binary when producing 17# Bundle OpenSSL and curl into the cargo binary when producing
18# bootstraps on NetBSD. 18# bootstraps on NetBSD.
19.if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist" 19.if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist"
20PKG_SUGGESTED_OPTIONS+= rust-cargo-static 20PKG_SUGGESTED_OPTIONS+= rust-cargo-static
21.endif 21.endif
22 22
23.include "../../mk/bsd.options.mk" 23.include "../../mk/bsd.options.mk"
24 24
25# 25#
26# Use the internal copy of LLVM. 26# Use the internal copy of LLVM.
27# This contains some extra optimizations. 27# This contains some extra optimizations.
28# 28#
29.if !empty(PKG_OPTIONS:Mrust-llvm) 29.if empty(PKG_OPTIONS:Mrust-llvm)
30BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake 
31.include "../../devel/cmake/buildlink3.mk" 
32.else 
33.include "../../lang/llvm/buildlink3.mk" 30.include "../../lang/llvm/buildlink3.mk"
34CONFIGURE_ARGS+= --enable-llvm-link-shared 31CONFIGURE_ARGS+= --enable-llvm-link-shared
35CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} 32CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm}
36# XXX: fix for Rust 1.41.0 https://github.com/rust-lang/rust/issues/68714 33# XXX: fix for Rust 1.41.0 https://github.com/rust-lang/rust/issues/68714
37MAKE_ENV+= LIBRARY_PATH=${BUILDLINK_PREFIX.llvm}/lib 34MAKE_ENV+= LIBRARY_PATH=${BUILDLINK_PREFIX.llvm}/lib
38.endif 35.endif
39 36
40# 37#
41# Link cargo statically against "native" libraries. 38# Link cargo statically against "native" libraries.
42# (openssl and curl specifically). 39# (openssl and curl specifically).
43# 40#
44.if !empty(PKG_OPTIONS:Mrust-cargo-static) 41.if !empty(PKG_OPTIONS:Mrust-cargo-static)
45CONFIGURE_ARGS+= --enable-cargo-native-static 42CONFIGURE_ARGS+= --enable-cargo-native-static