Mon Oct 28 08:56:14 2019 UTC ()
rust: Update SmartOS dependencies and tidy.


(jperkin)
diff -r1.120 -r1.121 pkgsrc/lang/rust/Makefile

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

--- pkgsrc/lang/rust/Makefile 2019/10/28 00:42:21 1.120
+++ pkgsrc/lang/rust/Makefile 2019/10/28 08:56:14 1.121
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.120 2019/10/28 00:42:21 jperkin Exp $ 1# $NetBSD: Makefile,v 1.121 2019/10/28 08:56:14 jperkin Exp $
2 2
3DISTNAME= rustc-1.38.0-src 3DISTNAME= rustc-1.38.0-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5PKGREVISION= 1 5PKGREVISION= 1
6CATEGORIES= lang 6CATEGORIES= lang
7MASTER_SITES= http://static.rust-lang.org/dist/ 7MASTER_SITES= http://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
14USE_GCC_RUNTIME= yes 14USE_GCC_RUNTIME= yes
@@ -360,26 +360,27 @@ do-install: @@ -360,26 +360,27 @@ do-install:
360GENERATE_PLIST+=find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \ 360GENERATE_PLIST+=find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
361 sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ; 361 sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ;
362 362
363# Create a relocatable stage2 bootstrap from the bits we just built that can be 363# Create a relocatable stage2 bootstrap from the bits we just built that can be
364# used to build the next version of rust. Currently only tested on SmartOS. 364# used to build the next version of rust. Currently only tested on SmartOS.
365# 365#
366BOOTSTRAP_TMPDIR= ${WRKDIR}/${PKGNAME_NOREV}-${RUST_ARCH} 366BOOTSTRAP_TMPDIR= ${WRKDIR}/${PKGNAME_NOREV}-${RUST_ARCH}
367USE_TOOLS+= gtar 367USE_TOOLS+= gtar
368 368
369# The NetBSD part is so far untested, because I could not convince 369# The NetBSD part is so far untested, because I could not convince
370# the rust build to use the gcc wrapper when building natively, 370# the rust build to use the gcc wrapper when building natively,
371# so that I could get a placeholder in the RPATH, because chrpath 371# so that I could get a placeholder in the RPATH, because chrpath
372# cannot extend the length of the RPATH... 372# cannot extend the length of the RPATH...
 373ELFEDIT?= /usr/bin/elfedit
373 374
374stage0-bootstrap: install 375stage0-bootstrap: install
375 ${RM} -rf ${BOOTSTRAP_TMPDIR} 376 ${RM} -rf ${BOOTSTRAP_TMPDIR}
376 ${MKDIR} ${BOOTSTRAP_TMPDIR} 377 ${MKDIR} ${BOOTSTRAP_TMPDIR}
377.if ${OPSYS} == "NetBSD" 378.if ${OPSYS} == "NetBSD"
378 (cd ${BOOTSTRAP_TMPDIR}; \ 379 (cd ${BOOTSTRAP_TMPDIR}; \
379 DISTDIR=${WRKSRC}/bild/dist; \ 380 DISTDIR=${WRKSRC}/bild/dist; \
380 VER_ARCH=${PKGVERSION}-${RUST_ARCH}; \ 381 VER_ARCH=${PKGVERSION}-${RUST_ARCH}; \
381 RUSTC=rustc-$${VER_ARCH}; \ 382 RUSTC=rustc-$${VER_ARCH}; \
382 RUSTC_FILE=$${RUSTC}.tar.gz; \ 383 RUSTC_FILE=$${RUSTC}.tar.gz; \
383 RUST_STD=rust-std-$${VER_ARCH}; \ 384 RUST_STD=rust-std-$${VER_ARCH}; \
384 RUST_STD_FILE=$${RUST_STD}.tar.gz; \ 385 RUST_STD_FILE=$${RUST_STD}.tar.gz; \
385 ${GTAR} -xzf $${DISTDIR}/$${RUSTC_FILE}; \ 386 ${GTAR} -xzf $${DISTDIR}/$${RUSTC_FILE}; \
@@ -401,43 +402,48 @@ stage0-bootstrap: install @@ -401,43 +402,48 @@ stage0-bootstrap: install
401 ${ECHO} "Fixed stage0 bootstrap in ${BOOTSTRAP_TMPDIR}:"; \ 402 ${ECHO} "Fixed stage0 bootstrap in ${BOOTSTRAP_TMPDIR}:"; \
402 ${ECHO} "$${RUSTC_FILE}"; \ 403 ${ECHO} "$${RUSTC_FILE}"; \
403 ${ECHO} "$${RUST_STD_FILE}"; \ 404 ${ECHO} "$${RUST_STD_FILE}"; \
404 ) 405 )
405.endif 406.endif
406.if ${OS_VARIANT} == "SmartOS" 407.if ${OS_VARIANT} == "SmartOS"
407 ${CP} -R ${DESTDIR}/${PREFIX}/bin ${BOOTSTRAP_TMPDIR}/ 408 ${CP} -R ${DESTDIR}/${PREFIX}/bin ${BOOTSTRAP_TMPDIR}/
408 ${CP} -R ${DESTDIR}/${PREFIX}/lib ${BOOTSTRAP_TMPDIR}/ 409 ${CP} -R ${DESTDIR}/${PREFIX}/lib ${BOOTSTRAP_TMPDIR}/
409 ${MKDIR} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc 410 ${MKDIR} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc
410 for lib in libgcc_s.so.1 libssp.so.0 libstdc++.so.6; do \ 411 for lib in libgcc_s.so.1 libssp.so.0 libstdc++.so.6; do \
411 ${CP} `${PKG_CC} -print-file-name=$${lib}` \ 412 ${CP} `${PKG_CC} -print-file-name=$${lib}` \
412 ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \ 413 ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
413 done 414 done
414 for lib in libcrypto.so.1.0.0 libcurl.so.4 libhttp_parser.so.2 \ 415 # direct dependencies
415 libiconv.so.2 libidn2.so.0 libintl.so.8 liblber-2.4.so.2 \ 416 for lib in libLLVM-9.so libcrypto.so.1.0.0 libcurl.so.4 \
416 libldap-2.4.so.2 libnghttp2.so.14 libsasl2.so.3 libLLVM-8.so \ 417 libssl.so.1.0.0 libz.so.1; do \
417 libssh2.so.1 libssl.so.1.0.0 libunistring.so.2 libz.so.1; do \ 
418 ${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \ 418 ${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
419 done 419 done
420 for f in ${BOOTSTRAP_TMPDIR}/bin/{cargo,rls,rustc,rustdoc}; do \ 420 # libcurl dependencies
421 /usr/bin/elfedit -e 'dyn:runpath $$ORIGIN/../lib:$$ORIGIN/../lib/pkgsrc' $$f; \ 421 for lib in libiconv.so.2 libidn2.so.0 libintl.so.8 liblber-2.4.so.2 \
 422 libldap-2.4.so.2 libnghttp2.so.14 libsasl2.so.3 \
 423 libssh2.so.1 libunistring.so.2; do \
 424 ${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
 425 done
 426 for f in ${BOOTSTRAP_TMPDIR}/bin/{cargo*,clippy*,miri,rls,rustc,rustdoc,rustfmt}; do \
 427 ${ELFEDIT} -e 'dyn:runpath $$ORIGIN/../lib:$$ORIGIN/../lib/pkgsrc' $$f; \
422 done 428 done
423 for f in ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/*.so*; do \ 429 for f in ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/*.so*; do \
424 /usr/bin/elfedit -e 'dyn:runpath $$ORIGIN' $$f; \ 430 ${ELFEDIT} -e 'dyn:runpath $$ORIGIN' $$f; \
425 done 431 done
426 for f in ${BOOTSTRAP_TMPDIR}/lib/*.so*; do \ 432 for f in ${BOOTSTRAP_TMPDIR}/lib/*.so*; do \
427 /usr/bin/elfedit -e 'dyn:runpath $$ORIGIN:$$ORIGIN/pkgsrc' $$f; \ 433 ${ELFEDIT} -e 'dyn:runpath $$ORIGIN:$$ORIGIN/pkgsrc' $$f; \
428 done 434 done
429 for f in ${BOOTSTRAP_TMPDIR}/lib/rustlib/${RUST_ARCH}/*/*.so*; do \ 435 for f in ${BOOTSTRAP_TMPDIR}/lib/rustlib/${RUST_ARCH}/*/*.so*; do \
430 /usr/bin/elfedit -e 'dyn:runpath $$ORIGIN:$$ORIGIN/../../..:$$ORIGIN/../../../pkgsrc' $$f; \ 436 ${ELFEDIT} -e 'dyn:runpath $$ORIGIN:$$ORIGIN/../../..:$$ORIGIN/../../../pkgsrc' $$f; \
431 done 437 done
432 (cd ${WRKDIR}; \ 438 (cd ${WRKDIR}; \
433 ${GTAR} -zcf ${PKGNAME_NOREV}-${RUST_ARCH}.tar.gz ${PKGNAME_NOREV}-${RUST_ARCH}) 439 ${GTAR} -zcf ${PKGNAME_NOREV}-${RUST_ARCH}.tar.gz ${PKGNAME_NOREV}-${RUST_ARCH})
434.endif 440.endif
435 441
436.include "options.mk" 442.include "options.mk"
437 443
438# These dependencies currently use the bundled sources as they require 444# These dependencies currently use the bundled sources as they require
439# development features not yet available in released versions. 445# development features not yet available in released versions.
440# 446#
441#.include "../../devel/libgit2/buildlink3.mk" 447#.include "../../devel/libgit2/buildlink3.mk"
442#.include "../../security/libssh2/buildlink3.mk" 448#.include "../../security/libssh2/buildlink3.mk"
443#.include "../../www/http-parser/buildlink3.mk" 449#.include "../../www/http-parser/buildlink3.mk"