Sun Oct 4 09:26:09 2020 UTC ()
Pullup ticket #6329 - requested by gdt
lang/rust: NetBSD build fix

Revisions pulled up:
- lang/rust/Makefile                                            1.196

---
   Module Name:	pkgsrc
   Committed By:	gdt
   Date:		Tue Sep 29 16:24:28 UTC 2020

   Modified Files:
   	pkgsrc/lang/rust: Makefile

   Log Message:
   lang/rust: Adjust openssl bootstrap depends (NetBSD only)

   On NetBSD, further limit the DEPENDS on openssl to i386.  It turns out
   that the sparc64 and powerpc bootstraps are not linked against openssl
   as I previously assumed.

   No change to limiting this DEPENDS to 9+.  No change to any other OS.

   This change is believed to fix rust building on NetBSD 9 sparc64.

   As discussed on tech-pkg@.


(bsiegert)
diff -r1.195 -r1.195.2.1 pkgsrc/lang/rust/Makefile

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

--- pkgsrc/lang/rust/Makefile 2020/09/25 12:21:02 1.195
+++ pkgsrc/lang/rust/Makefile 2020/10/04 09:26:08 1.195.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.195 2020/09/25 12:21:02 gdt Exp $ 1# $NetBSD: Makefile,v 1.195.2.1 2020/10/04 09:26:08 bsiegert 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]*
@@ -111,29 +111,29 @@ CONFIGURE_ARGS+= --set llvm.targets="ARM @@ -111,29 +111,29 @@ CONFIGURE_ARGS+= --set llvm.targets="ARM
111# http://mail-index.netbsd.org/source-changes/2020/04/19/msg116337.html 111# http://mail-index.netbsd.org/source-changes/2020/04/19/msg116337.html
112# These were pulled up to netbsd-9 on 2020-05-13: 112# These were pulled up to netbsd-9 on 2020-05-13:
113# http://releng.netbsd.org/cgi-bin/req-9.cgi?show=907 113# http://releng.netbsd.org/cgi-bin/req-9.cgi?show=907
114# This has not been pulled up to netbsd-8 114# This has not been pulled up to netbsd-8
115# \todo Explain if it's not applicable, shouldn't be pulled up, should be 115# \todo Explain if it's not applicable, shouldn't be pulled up, should be
116# but hasn't, is too hard, etc. 116# but hasn't, is too hard, etc.
117# 117#
118# On pkgbuild for 2020Q1 9.0_RELEASE amd64, rust did not build despite 118# On pkgbuild for 2020Q1 9.0_RELEASE amd64, rust did not build despite
119# MAKE_JOBS_SAFE=no, but setting MAKE_JOBS=1 resulted in success. (No 119# MAKE_JOBS_SAFE=no, but setting MAKE_JOBS=1 resulted in success. (No
120# PR is open for this.) \todo Understand and fix. 120# PR is open for this.) \todo Understand and fix.
121# 121#
122# If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel. 122# If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel.
123# \todo Consider avoiding setting this on netbsd-9 past the fix. 123# \todo Consider avoiding setting this on netbsd-9 past the fix.
124. if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*} 124#. if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*}
125MAKE_JOBS_SAFE= no 125#MAKE_JOBS_SAFE= no
126. endif 126#. endif
127 127
128# Open PRs 128# Open PRs
129# 129#
130# Broken package with PREFIX not /usr/pkg: 130# Broken package with PREFIX not /usr/pkg:
131# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54453 131# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54453
132# 132#
133# NetBSD 8.1 earmv7hf: unknown configure option 133# NetBSD 8.1 earmv7hf: unknown configure option
134# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54621 134# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54621
135# 135#
136# NetBSD 9 i386: bootstrap fails with missing libcurl.so.4 136# NetBSD 9 i386: bootstrap fails with missing libcurl.so.4
137# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=55368 137# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=55368
138 138
139# Stale PRs (a reason to believe they no longer apply) 139# Stale PRs (a reason to believe they no longer apply)
@@ -515,30 +515,36 @@ stage0-bootstrap: install @@ -515,30 +515,36 @@ stage0-bootstrap: install
515# https://github.com/rust-lang/rust/issues/65862) 515# https://github.com/rust-lang/rust/issues/65862)
516 516
517.if (${OPSYS} == "NetBSD") && \ 517.if (${OPSYS} == "NetBSD") && \
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.endif
 529
 530.if (${OPSYS} == "NetBSD") && \
 531 ((${MACHINE_ARCH} == "i386")) \
 532 && (empty(OS_VERSION:M[012345678].*) || \
 533 !empty(OS_VERSION:M8.99.*))
528# Bootstrap kits use openssl, which on NetBSD 8 comes from pkgsrc. 534# Bootstrap kits use openssl, which on NetBSD 8 comes from pkgsrc.
529# Therefore the pkgsrc openssl libs need to be present as well. 535# Therefore the pkgsrc openssl libs need to be present as well.
530# (Observed on i386, and presumed true on the other 536# The 1.44.1 i686 bootstrap links with pkgsrc openssl. The others do
531# bootstrap-built-for-8 systems.) Then, when the package is built, 537# not. When the package is built,
532# cargo links against pkgsrc openssl, so it must be a run-time 538# cargo links against pkgsrc openssl, so it must be a run-time
533# dependency as well. Forcing USE_BUILTIN.openssl=no results in a 539# dependency as well. Forcing USE_BUILTIN.openssl=no results in a
534# mysterious heimdal error, but straight DEPENDS seems to result in a 540# mysterious heimdal error, but straight DEPENDS seems to result in a
535# satisfactory package build. 541# satisfactory package build.
536# While this is icky, it is for the time being better than no rust package. 542# While this is icky, it is for the time being better than no rust package.
537DEPENDS+= openssl>=1.1:../../security/openssl 543DEPENDS+= openssl>=1.1:../../security/openssl
538.endif 544.endif
539 545
540.include "../../devel/zlib/buildlink3.mk" 546.include "../../devel/zlib/buildlink3.mk"
541.include "../../lang/python/tool.mk" 547.include "../../lang/python/tool.mk"
542.include "../../security/openssl/buildlink3.mk" 548.include "../../security/openssl/buildlink3.mk"
543BUILDLINK_API_DEPENDS.curl+= curl>=7.67.0 549BUILDLINK_API_DEPENDS.curl+= curl>=7.67.0
544.include "../../www/curl/buildlink3.mk" 550.include "../../www/curl/buildlink3.mk"