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.diff -r1.241 -r1.241.2.1 pkgsrc/lang/rust/Makefile
(bsiegert)
@@ -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 | |||
3 | DISTNAME= rustc-1.52.1-src | 3 | DISTNAME= rustc-1.52.1-src | |
4 | PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} | 4 | PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} | |
5 | PKGREVISION= 4 | 5 | PKGREVISION= 4 | |
6 | CATEGORIES= lang | 6 | CATEGORIES= lang | |
7 | MASTER_SITES= https://static.rust-lang.org/dist/ | 7 | MASTER_SITES= https://static.rust-lang.org/dist/ | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://www.rust-lang.org/ | 10 | HOMEPAGE= https://www.rust-lang.org/ | |
11 | COMMENT= Safe, concurrent, practical language | 11 | COMMENT= Safe, concurrent, practical language | |
12 | LICENSE= mit OR apache-2.0 | 12 | LICENSE= mit OR apache-2.0 | |
13 | 13 | |||
14 | CONFLICTS+= rust-bin-[0-9]* | 14 | CONFLICTS+= 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.*) | |
585 | BUILD_DEPENDS+= compat80>=0:../../emulators/compat80 | 585 | BUILD_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: | |
594 | DEPENDS+= libatomic-links>=0:../../devel/libatomic-links | 594 | DEPENDS+= libatomic-links>=0:../../devel/libatomic-links | |
595 | .endif | 595 | .endif | |
596 | 596 | |||
597 | BUILD_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" |
@@ -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 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.rust | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.rust | |
4 | PKG_SUPPORTED_OPTIONS+= rust-cargo-static | 4 | PKG_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" | |
10 | PKG_SUPPORTED_OPTIONS+= rust-llvm | 10 | PKG_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) | |
13 | PKG_SUGGESTED_OPTIONS+= rust-llvm | 13 | PKG_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" | |
20 | PKG_SUGGESTED_OPTIONS+= rust-cargo-static | 20 | PKG_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) | |
30 | BUILD_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" | |
34 | CONFIGURE_ARGS+= --enable-llvm-link-shared | 31 | CONFIGURE_ARGS+= --enable-llvm-link-shared | |
35 | CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} | 32 | CONFIGURE_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 | |
37 | MAKE_ENV+= LIBRARY_PATH=${BUILDLINK_PREFIX.llvm}/lib | 34 | MAKE_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) | |
45 | CONFIGURE_ARGS+= --enable-cargo-native-static | 42 | CONFIGURE_ARGS+= --enable-cargo-native-static |