Thu Sep 24 11:01:51 2020 UTC ()
lang/rust: On NetBSD >=9, bl3 on openssl

On NetBSD i386 (and sparc64 and powerpc), we have bootstrap kits that
are linked against pkgsrc openssl.  Previously rust BUILD_DEPENDed on
openssl so they could run but this resulted in an installed cargo that
linked against that openssl.  This changes the depend method to
straight bl3, so openssl will be a runtime dependency.

This continues to be icky, but after a long period of discussion on
the lists, no other this-branch fixes to make NetBSD 9/i386 be able to
build rust have been suggested, and further there no objections.

It is expected that the bootstrap process will be rototilled after
2020Q3 is cut; this situation is obviously not a good one to continue.


(gdt)
diff -r1.193 -r1.194 pkgsrc/lang/rust/Makefile

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

--- pkgsrc/lang/rust/Makefile 2020/09/20 22:50:21 1.193
+++ pkgsrc/lang/rust/Makefile 2020/09/24 11:01:51 1.194
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.193 2020/09/20 22:50:21 gdt Exp $ 1# $NetBSD: Makefile,v 1.194 2020/09/24 11:01:51 gdt Exp $
2 2
3DISTNAME= rustc-1.45.2-src 3DISTNAME= rustc-1.45.2-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5PKGREVISION= 2 5PKGREVISION= 2
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]*
@@ -518,23 +518,24 @@ stage0-bootstrap: install @@ -518,23 +518,24 @@ stage0-bootstrap: install
518 ((${MACHINE_ARCH} == "i386") || \ 518 ((${MACHINE_ARCH} == "i386") || \
519 (${MACHINE_ARCH} == "sparc64") || \ 519 (${MACHINE_ARCH} == "sparc64") || \
520 (${MACHINE_ARCH} == "powerpc")) \ 520 (${MACHINE_ARCH} == "powerpc")) \
521 && (empty(OS_VERSION:M[012345678].*) || \ 521 && (empty(OS_VERSION:M[012345678].*) || \
522 !empty(OS_VERSION:M8.99.*)) 522 !empty(OS_VERSION:M8.99.*))
523# Bootstrap kits are built on 8.0, so that a single bootstrap can run 523# Bootstrap kits are built on 8.0, so that a single bootstrap can run
524# on multiple systems. Thus later versions need the compat80 package. 524# on multiple systems. Thus later versions need the compat80 package.
525# \todo Explain why this is limited to a small list of architectures, 525# \todo Explain why this is limited to a small list of architectures,
526# and in particular why not x86_64. 526# and in particular why not x86_64.
527DEPENDS+= compat80>=0:../../emulators/compat80 527DEPENDS+= compat80>=0:../../emulators/compat80
528# Bootstrap kits use openssl, which on NetBSD 8 comes from pkgsrc. 528# Bootstrap kits use openssl, which on NetBSD 8 comes from pkgsrc.
529# Therefore the pkgsrc openssl libs need to be present as well. 529# Therefore the pkgsrc openssl libs need to be present as well.
530# Observed on i386, and presumed true on the other 530# Observed on i386, and presumed true on the other
531# bootstrap-built-for-8 systems. 531# bootstrap-built-for-8 systems. It also is linked against by cargo,
532BUILD_DEPENDS+= openssl>1.1:../../security/openssl 532# so it must be a run-time dependency as well.
 533.include "../../security/openssl/buildlink3.mk"
533.endif 534.endif
534 535
535.include "../../devel/zlib/buildlink3.mk" 536.include "../../devel/zlib/buildlink3.mk"
536.include "../../lang/python/tool.mk" 537.include "../../lang/python/tool.mk"
537.include "../../security/openssl/buildlink3.mk" 538.include "../../security/openssl/buildlink3.mk"
538BUILDLINK_API_DEPENDS.curl+= curl>=7.67.0 539BUILDLINK_API_DEPENDS.curl+= curl>=7.67.0
539.include "../../www/curl/buildlink3.mk" 540.include "../../www/curl/buildlink3.mk"
540.include "../../mk/bsd.pkg.mk" 541.include "../../mk/bsd.pkg.mk"