pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/rust rust: Fix and improve SunOS stage0-bootstrap.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a800e2b06e8d
branches:  trunk
changeset: 457850:a800e2b06e8d
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Sep 03 09:28:04 2021 +0000

description:
rust: Fix and improve SunOS stage0-bootstrap.

Catch up with newer library versions from pkgsrc and the additional rust bin
directory, and ensure everything is running under set -e to catch failures.

diffstat:

 lang/rust/Makefile |  41 +++++++++++++++++++++++++----------------
 1 files changed, 25 insertions(+), 16 deletions(-)

diffs (70 lines):

diff -r 9bab34d07e7f -r a800e2b06e8d lang/rust/Makefile
--- a/lang/rust/Makefile        Fri Sep 03 03:55:36 2021 +0000
+++ b/lang/rust/Makefile        Fri Sep 03 09:28:04 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.243 2021/08/11 12:28:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.244 2021/09/03 09:28:04 jperkin Exp $
 
 DISTNAME=      rustc-1.52.1-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -536,36 +536,45 @@
        ${CP} -R ${DESTDIR}/${PREFIX}/bin ${BOOTSTRAP_TMPDIR}/
        ${CP} -R ${DESTDIR}/${PREFIX}/lib ${BOOTSTRAP_TMPDIR}/
        ${MKDIR} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc
+       set -e; \
        for lib in libgcc_s.so.1 libssp.so.0 libstdc++.so.6; do \
                ${CP} `${PKG_CC} -print-file-name=$${lib}` \
                    ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
-       done
-       # direct dependencies
-       for lib in libLLVM-10.so libcrypto.so.1.1 libcurl.so.4 \
+       done; \
+       for lib in libLLVM-12.so libcrypto.so.1.1 libcurl.so.4 \
                   libssl.so.1.1 libz.so.1; do \
                ${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
-       done
-       # libcurl dependencies
-       for lib in libiconv.so.2 libidn2.so.0 libintl.so.8 liblber-2.4.so.2 \
-                  libldap-2.4.so.2 libnghttp2.so.14 libsasl2.so.3 \
+       done; \
+       for lib in libiconv.so.2 libidn2.so.0 libintl.so.8 liblber-2.5.so.0 \
+                  libldap-2.5.so.0 libnghttp2.so.14 libsasl2.so.3 \
                   libssh2.so.1 libunistring.so.2; do \
                ${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
-       done
+       done; \
        for f in ${BOOTSTRAP_TMPDIR}/bin/*; do \
                /bin/file -b "$$f" | grep ^ELF >/dev/null || continue; \
                ${ELFEDIT} -e 'dyn:runpath $$ORIGIN/../lib:$$ORIGIN/../lib/pkgsrc' $$f; \
-       done
+       done; \
        for f in ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/*.so*; do \
                ${ELFEDIT} -e 'dyn:runpath $$ORIGIN' $$f; \
-       done
+       done; \
        for f in ${BOOTSTRAP_TMPDIR}/lib/*.so*; do \
                ${ELFEDIT} -e 'dyn:runpath $$ORIGIN:$$ORIGIN/pkgsrc' $$f; \
-       done
-       for f in ${BOOTSTRAP_TMPDIR}/lib/rustlib/*/*/*.so*; do \
+       done; \
+       for f in ${BOOTSTRAP_TMPDIR}/lib/rustlib/*/*/*.so* \
+                ${BOOTSTRAP_TMPDIR}/lib/rustlib/*/bin/*; do \
                ${ELFEDIT} -e 'dyn:runpath $$ORIGIN:$$ORIGIN/../../..:$$ORIGIN/../../../pkgsrc' $$f; \
-       done
-       (cd ${WRKDIR}; \
-        ${GTAR} -zcf ${BOOTSTRAP_NAME}.tar.gz ${BOOTSTRAP_NAME})
+       done; \
+       cd ${WRKDIR}; ${GTAR} -zcf ${BOOTSTRAP_NAME}.tar.gz ${BOOTSTRAP_NAME}
+       @${ECHO} ""
+       @${ECHO} "Verify correct library paths using the following:"
+       @${ECHO} ""
+       @${ECHO} "      cd ${BOOTSTRAP_TMPDIR}"
+       @${ECHO} "      find . -type f | xargs ldd 2>/dev/null | egrep 'not.found|${PREFIX}'"
+       @${ECHO} ""
+       @${ECHO} "If there is no output then this bootstrap kit is ready to go:"
+       @${ECHO} ""
+       @${ECHO} "      ${WRKDIR}/${BOOTSTRAP_NAME}.tar.gz"
+       @${ECHO} ""
 .endif
 
 .include "options.mk"



Home | Main Index | Thread Index | Old Index