diff --git a/abs.yaml b/abs.yaml new file mode 100644 index 00000000..00830e53 --- /dev/null +++ b/abs.yaml @@ -0,0 +1,9 @@ +aggregate_check: false + +upload_without_merge: true + +upload_channels: + - services + +channels: + - services diff --git a/recipe/0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.diff b/recipe/0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.diff new file mode 100644 index 00000000..291dfa68 --- /dev/null +++ b/recipe/0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.diff @@ -0,0 +1,196 @@ +From 74ec46375ef943ad09ef8b461d3da5868cb37d26 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Tue, 15 Aug 2023 07:20:29 +0200 +Subject: [PATCH] gh-106: install.sh: Perfomance Use more shell builtins + +--- + install.sh | 117 +++++++++++++++++++++++++++-------------------------- + 1 file changed, 59 insertions(+), 58 deletions(-) + +diff --git a/install.sh b/install.sh +index d86cbf2..9a2913d 100755 +--- a/install.sh ++++ b/install.sh +@@ -136,11 +136,16 @@ append_to_file() { + + make_dir_recursive() { + local _dir="$1" +- local _line="$ umask 022 && mkdir -p \"$_dir\"" +- umask 022 && mkdir -p "$_dir" +- local _retval=$? +- log_line "$_line" +- return $_retval ++ # Skip if the last invocation of make_dir_recursive had the same argument ++ if ! [ "$_dir" = "${_make_dir_recursive_cached_key:-}" ] ++ then ++ _make_dir_recursive_cached_key="$_dir" ++ local _line="$ umask 022 && mkdir -p \"$_dir\"" ++ umask 022 && mkdir -p "$_dir" ++ local _retval=$? ++ log_line "$_line" ++ return $_retval ++ fi + } + + putvar() { +@@ -165,11 +170,11 @@ valopt() { + eval $v="$default" + for arg in $CFG_ARGS + do +- if echo "$arg" | grep -q -- "--$op=" +- then +- local val=$(echo "$arg" | cut -f2 -d=) +- eval $v=$val +- fi ++ case "${arg}" in ++ "--${op}="* ) ++ local val="${arg#--${op}=}" ++ eval $v=$val ++ esac + done + putvar $v + else +@@ -271,10 +276,10 @@ validate_opt () { + done + for option in $VAL_OPTIONS + do +- if echo "$arg" | grep -q -- "--$option=" +- then +- is_arg_valid=1 +- fi ++ case "${arg}" in ++ "--${option}="* ) ++ is_arg_valid=1 ++ esac + done + if [ "$arg" = "--help" ] + then +@@ -293,9 +298,10 @@ validate_opt () { + + absolutify() { + local file_path="$1" +- local file_path_dirname="$(dirname "$file_path")" +- local file_path_basename="$(basename "$file_path")" +- local file_abs_path="$(abs_path "$file_path_dirname")" ++ local file_path_dirname="${file_path%/*}" ++ local file_path_basename="${file_path##*/}" ++ abs_path_cached "$file_path_dirname" ++ local file_abs_path="$abs_path_cached_retval" + local file_path="$file_abs_path/$file_path_basename" + # This is the return value + RETVAL="$file_path" +@@ -303,11 +309,21 @@ absolutify() { + + # Prints the absolute path of a directory to stdout + abs_path() { ++ abs_path_cached "$@" ++ printf %s "$abs_path_cached_retval" ++} ++ ++abs_path_cached() { + local path="$1" +- # Unset CDPATH because it causes havok: it makes the destination unpredictable +- # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null +- # for good measure. +- (unset CDPATH && cd "$path" > /dev/null && pwd) ++ # Update return value only if the argument differs from the last invocation ++ if ! [ "$path" = "${_abs_path_cached_key:-}" ] ++ then ++ _abs_path_cached_key="$path" ++ # Unset CDPATH because it causes havok: it makes the destination unpredictable ++ # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null ++ # for good measure. ++ abs_path_cached_retval="$(unset CDPATH && cd "$path" > /dev/null && pwd)" ++ fi + } + + uninstall_legacy() { +@@ -551,35 +567,23 @@ install_components() { + # Decide the destination of the file + local _file_install_path="$_dest_prefix/$_file" + +- if echo "$_file" | grep "^etc/" > /dev/null +- then +- local _f="$(echo "$_file" | sed 's/^etc\///')" +- _file_install_path="$CFG_SYSCONFDIR/$_f" +- fi +- +- if echo "$_file" | grep "^bin/" > /dev/null +- then +- local _f="$(echo "$_file" | sed 's/^bin\///')" +- _file_install_path="$CFG_BINDIR/$_f" +- fi +- +- if echo "$_file" | grep "^lib/" > /dev/null +- then +- local _f="$(echo "$_file" | sed 's/^lib\///')" +- _file_install_path="$CFG_LIBDIR/$_f" +- fi +- +- if echo "$_file" | grep "^share" > /dev/null +- then +- local _f="$(echo "$_file" | sed 's/^share\///')" +- _file_install_path="$CFG_DATADIR/$_f" +- fi +- +- if echo "$_file" | grep "^share/man/" > /dev/null +- then +- local _f="$(echo "$_file" | sed 's/^share\/man\///')" +- _file_install_path="$CFG_MANDIR/$_f" +- fi ++ case "${_file}" in ++ etc/* ) ++ _file_install_path="$CFG_SYSCONFDIR/${_file#etc/}" ++ ;; ++ bin/* ) ++ _file_install_path="$CFG_BINDIR/${_file#bin/}" ++ ;; ++ lib/* ) ++ _file_install_path="$CFG_LIBDIR/${_file#lib/}" ++ ;; ++ share/man/* ) ++ _file_install_path="$CFG_MANDIR/${_file#share/man/}" ++ ;; ++ share/* ) ++ _file_install_path="$CFG_DATADIR/${_file#share/}" ++ ;; ++ esac + + # HACK: Try to support overriding --docdir. Paths with the form + # "share/doc/$product/" can be redirected to a single --docdir +@@ -593,11 +597,10 @@ install_components() { + # this problem to be a big deal in practice. + if [ "$CFG_DOCDIR" != "" ] + then +- if echo "$_file" | grep "^share/doc/" > /dev/null +- then +- local _f="$(echo "$_file" | sed 's/^share\/doc\/[^/]*\///')" +- _file_install_path="$CFG_DOCDIR/$_f" +- fi ++ case "${_file}" in ++ share/doc/* ) ++ _file_install_path="$CFG_DOCDIR/${_file#share/doc/*/}" ++ esac + fi + + # Make sure there's a directory for it +@@ -617,7 +620,7 @@ install_components() { + + maybe_backup_path "$_file_install_path" + +- if echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" ++ if test -z "${_file##bin/*}" || test -x "$_src_dir/$_component/$_file" + then + run cp "$_src_dir/$_component/$_file" "$_file_install_path" + run chmod 755 "$_file_install_path" +@@ -764,8 +767,6 @@ verbose_msg + + need_cmd mkdir + need_cmd printf +-need_cmd cut +-need_cmd grep + need_cmd uname + need_cmd tr + need_cmd sed +-- +2.39.2 (Apple Git-143) diff --git a/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 00000000..1978cced --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,9 @@ +@echo on +set MSYSTEM=MINGW%ARCH% +set MSYS2_PATH_TYPE=inherit +set CHERE_INVOKING=1 +FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%/Library"') DO set "PREFIX=%%i" +FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" +copy "%RECIPE_DIR%\build.sh" . +bash -lce "%SRC_DIR%/build.sh" +if errorlevel 1 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh new file mode 100644 index 00000000..3bb8218e --- /dev/null +++ b/recipe/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -ex + +# windows shell doesn't start here +cd $SRC_DIR + +DESTDIR=$PWD/destdir/ + +# we want to install only a portion of the full installation. +# To do that, let's use destdir and then use the manifest-rust-std-* file +# to install the files corresponding to rust-std +./install.sh --prefix=$PREFIX --destdir=$DESTDIR + +# install.log is large because it records full paths for each file. +# => conda-build is slow to parse ripgrep's output for prefix replacement. +# => replace path records beforehand: +install_log="${DESTDIR}${PREFIX}/lib/rustlib/install.log" +sed \ + -e "s|${PREFIX}|/prefix|g" \ + -e "s|${DESTDIR}|/destdir|g" \ + -e "s|${PWD}|/source|g" \ + -i.bak "${install_log}" +rm "${install_log}.bak" diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 9d29d3dc..0028fb7a 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,7 +1,19 @@ rust_arch: - - x86_64-unknown-linux-gnu # [linux64] - - s390x-unknown-linux-gnu # [s390x] - - aarch64-unknown-linux-gnu # [aarch64] - - powerpc64le-unknown-linux-gnu # [ppc64le] - - x86_64-apple-darwin # [osx and x86_64] - - aarch64-apple-darwin # [osx and arm64] + - x86_64-unknown-linux-gnu # [linux64] + - aarch64-unknown-linux-gnu # [aarch64] + - powerpc64le-unknown-linux-gnu # [ppc64le] + - x86_64-pc-windows-msvc # [win64] + - x86_64-apple-darwin # [osx and x86_64] + - aarch64-apple-darwin # [osx and arm64] + +rust_std_extra: + - aarch64-apple-ios + - x86_64-apple-ios + - aarch64-apple-ios-sim + - aarch64-linux-android + - arm-linux-androideabi + - armv7-linux-androideabi + - i686-linux-android + - wasm32-unknown-unknown + - x86_64-linux-android + - x86_64-pc-windows-msvc # [linux and x86_64] diff --git a/recipe/forge_test.sh b/recipe/forge_test.sh deleted file mode 100644 index c7027997..00000000 --- a/recipe/forge_test.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -e -x - -## TODO: remove the following `unset` lines, once the following issue in `conda-build` is resolved: -## - -unset REQUESTS_CA_BUNDLE -unset SSL_CERT_FILE - -rustc --help -rustdoc --help -cargo --help - -echo "#!/usr/bin/env bash" > ./cc -if [[ ${target_platform} =~ linux.* ]]; then - echo "x86_64-conda_cos6-linux-gnu-cc \"\$@\"" >> ./cc -elif [[ ${target_platform} == osx-64 ]]; then - echo "x86_64-apple-darwin13.4.0-clang \"\$@\"" >> ./cc - export CONDA_BUILD_SYSROOT=/opt/MacOSX10.10.sdk -fi -cat cc -chmod +x cc - -mkdir ~/tmp-cargo || true -CARGO_TARGET_DIR=~/tmp-cargo PATH="$PWD:$PATH" cargo install xsv --force -vv diff --git a/recipe/install-gnu.bat b/recipe/install-gnu.bat deleted file mode 100644 index 7c98cbca..00000000 --- a/recipe/install-gnu.bat +++ /dev/null @@ -1,4 +0,0 @@ -pushd gnu -FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%"') DO set "pfx=%%i" -bash install.sh --prefix=%pfx%/Library -if errorlevel 1 exit 1 diff --git a/recipe/install-msvc.bat b/recipe/install-msvc.bat deleted file mode 100644 index 194eb872..00000000 --- a/recipe/install-msvc.bat +++ /dev/null @@ -1,4 +0,0 @@ -pushd msvc -FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%"') DO set "pfx=%%i" -bash install.sh --prefix=%pfx%/Library -if errorlevel 1 exit 1 diff --git a/recipe/install-rust-src.bat b/recipe/install-rust-src.bat new file mode 100644 index 00000000..3be61a3c --- /dev/null +++ b/recipe/install-rust-src.bat @@ -0,0 +1,8 @@ +set MSYSTEM=MINGW%ARCH% +set MSYS2_PATH_TYPE=inherit +set CHERE_INVOKING=1 +FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i/Library" +FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" +copy "%RECIPE_DIR%\install-rust-src.sh" . +bash -lce "%SRC_DIR%/install-rust-src.sh" +if errorlevel 1 exit 1 diff --git a/recipe/install-rust-src.sh b/recipe/install-rust-src.sh new file mode 100644 index 00000000..f39afd68 --- /dev/null +++ b/recipe/install-rust-src.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -ex + +cd rust-src + +DESTDIR=/ + +./install.sh --prefix="$PREFIX" --destdir="$DESTDIR" + +rm "${DESTDIR}"/"${PREFIX}"/lib/rustlib/components +rm "${DESTDIR}"/"${PREFIX}"/lib/rustlib/install.log +rm "${DESTDIR}"/"${PREFIX}"/lib/rustlib/rust-installer-version +rm "${DESTDIR}"/"${PREFIX}"/lib/rustlib/uninstall.sh diff --git a/recipe/install-rust-std-extra.bat b/recipe/install-rust-std-extra.bat new file mode 100644 index 00000000..cc94c75a --- /dev/null +++ b/recipe/install-rust-std-extra.bat @@ -0,0 +1,8 @@ +set MSYSTEM=MINGW%ARCH% +set MSYS2_PATH_TYPE=inherit +set CHERE_INVOKING=1 +FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i/Library" +FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" +copy "%RECIPE_DIR%\install-rust-std-extra.sh" . +bash -lce "%SRC_DIR%/install-rust-std-extra.sh" +if errorlevel 1 exit 1 diff --git a/recipe/install-rust-std-extra.sh b/recipe/install-rust-std-extra.sh new file mode 100644 index 00000000..73f835d4 --- /dev/null +++ b/recipe/install-rust-std-extra.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -ex + +cd $SRC_DIR/rust-std + +echo $PKG_NAME > ./components + +./install.sh --prefix="$PREFIX" --destdir="$DESTDIR" + +rm "${PREFIX}"/lib/rustlib/components +rm "${PREFIX}"/lib/rustlib/install.log +rm "${PREFIX}"/lib/rustlib/rust-installer-version +rm "${PREFIX}"/lib/rustlib/uninstall.sh diff --git a/recipe/install-rust-std.bat b/recipe/install-rust-std.bat new file mode 100644 index 00000000..d91641bd --- /dev/null +++ b/recipe/install-rust-std.bat @@ -0,0 +1,8 @@ +iset MSYSTEM=MINGW%ARCH% +set MSYS2_PATH_TYPE=inherit +set CHERE_INVOKING=1 +FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%/Library"') DO set "PREFIX=%%i" +FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" +copy "%RECIPE_DIR%\install-rust-std.sh" . +bash -lce "%SRC_DIR%/install-rust-std.sh" +if errorlevel 1 exit 1 diff --git a/recipe/install-rust-std.sh b/recipe/install-rust-std.sh new file mode 100644 index 00000000..9559c49e --- /dev/null +++ b/recipe/install-rust-std.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -ex + +# windows shell doesn't start here +cd $SRC_DIR + +DESTDIR=$PWD/destdir/ + +# we want to install only a portion of the full installation. +# To do that, let's use destdir (populated via build.sh) and then use the +# manifest-rust-std-* file to install the files corresponding to rust-std + +while read line; do + file=$(echo $line | cut -b 6-) + destination=$(echo $file | cut -b ${#DESTDIR}-) + mkdir -p $(dirname $destination) + cp $file ${destination} +done < $DESTDIR$PREFIX/lib/rustlib/manifest-rust-std-$rust_arch diff --git a/recipe/install-rust.bat b/recipe/install-rust.bat new file mode 100644 index 00000000..46d9c30c --- /dev/null +++ b/recipe/install-rust.bat @@ -0,0 +1,8 @@ +set MSYSTEM=MINGW%ARCH% +set MSYS2_PATH_TYPE=inherit +set CHERE_INVOKING=1 +FOR /F "delims=" %%i in ('cygpath.exe -u "%PREFIX%/Library"') DO set "PREFIX=%%i" +FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" +copy "%RECIPE_DIR%\install-rust.sh" . +bash -lce "%SRC_DIR%/install-rust.sh" +if errorlevel 1 exit 1 diff --git a/recipe/install-rust.sh b/recipe/install-rust.sh new file mode 100644 index 00000000..90f17689 --- /dev/null +++ b/recipe/install-rust.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -ex + +# windows shell doesn't start here +cd $SRC_DIR + +DESTDIR=$PWD/destdir/ + +# Copy everything that has been prepared by build.sh from DESTDIR to PREFIX. +cp -aR "${DESTDIR}${PREFIX}"/* "${PREFIX}/" + +# Fun times -- by default, Rust/Cargo tries to link executables on Linux by +# invoking `cc`. An executable of this name is not necessarily available. By +# setting a magic environment variable, we can override this default. + +case "$target_platform" in + linux-64) rust_env_arch=X86_64_UNKNOWN_LINUX_GNU ;; + linux-aarch64) rust_env_arch=AARCH64_UNKNOWN_LINUX_GNU ;; + linux-ppc64le) rust_env_arch=POWERPC64LE_UNKNOWN_LINUX_GNU ;; + win-64) rust_env_arch=X86_64_PC_WINDOWS_MSVC ;; + osx-64) rust_env_arch=X86_64_APPLE_DARWIN ;; + osx-arm64) rust_env_arch=AARCH64_APPLE_DARWIN ;; + *) echo "unknown target_platform $target_platform" ; exit 1 ;; +esac + +if [[ "$target_platform" == linux* ]]; then + + mkdir -p $PREFIX/etc/conda/activate.d $PREFIX/etc/conda/deactivate.d + + cat <$PREFIX/etc/conda/activate.d/rust.sh +export CARGO_TARGET_${rust_env_arch}_LINKER=$CC +EOF + + cat <$PREFIX/etc/conda/deactivate.d/rust.sh +unset CARGO_TARGET_${rust_env_arch}_LINKER +EOF + +fi diff --git a/recipe/install-unix.sh b/recipe/install-unix.sh deleted file mode 100755 index edef476a..00000000 --- a/recipe/install-unix.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -e - -echo ${target_platform} - -[[ ${target_platform} == osx-64 ]] && cp "${RECIPE_DIR}"/xcode-select . -PATH="${PWD}:$PATH" ./install.sh --prefix="${PREFIX}" - -[[ `uname` == Darwin ]] && DSO_EXT='dylib' || DSO_EXT='so' - -# these files appear to be missing from the rustlib dir -ln -s ${PREFIX}/lib/librustc_driver-*.${DSO_EXT} ${PREFIX}/lib/rustlib/${rust_arch}/lib/ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ca5c2f78..08bec3a8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,114 +1,223 @@ -{% set version = "1.71.1" %} +{% set version = "1.74.1" %} package: - name: 'rust-suite' + name: rust-split version: {{ version }} source: - - url: https://static.rust-lang.org/dist/rust-{{ version }}-x86_64-unknown-linux-gnu.tar.gz # [linux64] - sha256: 34778d1cda674990dfc0537bc600066046ae9cb5d65a07809f7e7da31d4689c4 # [linux64] - - url: https://static.rust-lang.org/dist/rust-{{ version }}-aarch64-unknown-linux-gnu.tar.gz # [aarch64] - sha256: c7cf230c740a62ea1ca6a4304d955c286aea44e3c6fc960b986a8c2eeea4ec3f # [aarch64] + # Note! This source file specification is structured specifically to interact + # well with the autotick bot. Importantly, the `patches:` block actually + # applies to *all* of these inputs, not just the last one in the list, because + # of the way that the YAML selector processing works. + - url: https://static.rust-lang.org/dist/rust-{{ version }}-x86_64-unknown-linux-gnu.tar.gz # [linux and x86_64] + sha256: d206888a2a9d55113940151ba16117ce2456d7de021bab18cfcb06dc48d3157c # [linux and x86_64] + - url: https://static.rust-lang.org/dist/rust-{{ version }}-aarch64-unknown-linux-gnu.tar.xz # [aarch64] + sha256: 88d0cd0407ca5bb73b5d72956d85e31e057657c7ec09a58ca634cf36bd5cf626 # [aarch64] - url: https://static.rust-lang.org/dist/rust-{{ version }}-powerpc64le-unknown-linux-gnu.tar.gz # [ppc64le] - sha256: bac57066882366e4628d1ed2bbe4ab19c0b373aaf45582c2da9f639f2f6ea537 # [ppc64le] - - url: https://static.rust-lang.org/dist/rust-{{ version }}-s390x-unknown-linux-gnu.tar.gz # [s390x] - sha256: 4205dc823ef57c4d9bdf80fb4ecb1e23a71af6dca05432b9fb5a6e9e08fe8f19 # [s390x] + sha256: bb1c9f0ab1016a2817afe8f72c03f8f1787fe44d0f9999669e0c1957a08e6213 # [ppc64le] - url: https://static.rust-lang.org/dist/rust-{{ version }}-x86_64-apple-darwin.tar.gz # [osx and x86_64] - sha256: 916056603da88336aba68bbeab49711cc8fdb9cfb46a49b04850c0c09761f58c # [osx and x86_64] + sha256: 54e1ef01d73f6031fbee36bbecd9af4209eb682dea478696e8282ca64d5792e5 # [osx and x86_64] - url: https://static.rust-lang.org/dist/rust-{{ version }}-aarch64-apple-darwin.tar.gz # [osx and arm64] - sha256: f4061b65b31ac75b9b5384c1f518e555f3da23f93bcf64dce252461ee65e9351 # [osx and arm64] + sha256: af6a982cbed85807fb8e5c4ba85b8a76162b58945f4787e0a7dec32e901e8b3b # [osx and arm64] - url: https://static.rust-lang.org/dist/rust-{{ version }}-x86_64-pc-windows-msvc.tar.gz # [win64] - sha256: 0234bf6ef1ef3efe1809ba548d0ac9c6eeb8a91fb25145caf5547d8614da0049 # [win64] - folder: msvc # [win64] - - url: https://static.rust-lang.org/dist/rust-{{ version }}-x86_64-pc-windows-gnu.tar.gz # [win64] - sha256: 15289233721ad7c3d697890d9c6079ca3b8a0f6740c080fbec3e8ae3a5ea5c8c # [win64] - folder: gnu # [win64] + sha256: 14b7646eedf3a627bab88e719aa5c1a1da25366a4658da3e23762d698a191df8 # [win64] + patches: + - 0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.diff + # End of block of primary source files. + - url: https://static.rust-lang.org/dist/rust-src-{{ version }}.tar.gz + sha256: 24aeed06114252059b5ecb671bf20c762ae62a01673444782e5de68c53a0968a + folder: rust-src + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-aarch64-apple-ios.tar.gz # [(linux or win) and x86_64] + sha256: 55a9b27037754ba2ce5a6046ae9b7098a5cd2e59baafbc88c62b6e36ffe6ddb3 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-x86_64-apple-ios.tar.gz # [(linux or win) and x86_64] + sha256: 90052a42942c44bd703b3ab85abedb05c50388943be9bd710d08c1ed47224c43 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-x86_64-pc-windows-msvc.tar.gz # [(linux or win) and x86_64] + sha256: 57164279b477ea779a5237d953d8ee4c0685baf1ea206848b08d1354ca44f149 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-aarch64-apple-ios-sim.tar.gz # [(linux or win) and x86_64] + sha256: 9d447673d9a129c238cffda5d88742ac18a52a141b19485324b86e9831734a77 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-aarch64-linux-android.tar.gz # [(linux or win) and x86_64] + sha256: df103570eb81097b2607276c07072ea5774cd37338f88e43bf29284a415ea67f # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-arm-linux-androideabi.tar.gz # [(linux or win) and x86_64] + sha256: e4c89e8b1c4bda526e5a634ffd1f960f6e18c87a7b799f1ab3f56116e07ac1dd # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-armv7-linux-androideabi.tar.gz # [(linux or win) and x86_64] + sha256: 75c75a7e667b2ec582d18b584438b284c0073094b891f893be5b32298f5b3c40 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-i686-linux-android.tar.gz # [(linux or win) and x86_64] + sha256: 5d3950841fd58a6234423f9c070b7ca8e64e0901cfa8666e01ebdd29d78efd04 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-x86_64-linux-android.tar.gz # [(linux or win) and x86_64] + sha256: 05508c2f79f7436dc98f20c476c56430a0216003d608a41d061d3f2342f45338 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] + - url: https://static.rust-lang.org/dist/rust-std-{{ version }}-wasm32-unknown-unknown.tar.gz # [(linux or win) and x86_64] + sha256: 517e5a9955fcd932dd66a3f6669895d7fd3aa63b1e660bd7bfe996c9c55941b5 # [(linux or win) and x86_64] + folder: rust-std # [(linux or win) and x86_64] build: number: 0 - # the distributed binaries are already relocatable - binary_relocation: False - runpath_whitelist: - - $ORIGIN/../lib - missing_dso_whitelist: - - /usr/lib/libresolv.9.dylib - - /usr/lib/libc++.1.dylib - - /usr/lib/libc++abi.dylib - - /usr/lib/libiconv.2.dylib - - /usr/lib/libcurl.4.dylib - - /usr/lib/libxar.1.dylib - - $RPATH/libLLVM-14-rust-1.64.0-stable.so - # Since 1.32.0 macOS also needs: - - /System/Library/Frameworks/Python.framework/Versions/2.7/Python - - /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols - - /usr/lib/libcompression.dylib - - /usr/lib/libedit.3.dylib - - /usr/lib/libform.5.4.dylib - - /usr/lib/libncurses.5.4.dylib - - /usr/lib/libpanel.5.4.dylib - - /usr/lib/libxml2.2.dylib - # Fixed via install_name_tool now (just declaring it here meant the thing using - - # lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/lldb-argdumper - was - # still unable to find it at runtime). - # - $RPATH/libLLVM.dylib - - '**/ld-linux-x86-64.so.2' - - '**/libc.so.6' - - '**/libdl.so.2' - - '**/ld64.so.*' - - '**/libgcc_s.so.1' - - '**/libm.so.6' - - '**/libpthread.so.0' - - '**/librt.so.1' - - '**/libgcc_s.so.1' - - '**/libz.so.1' - # Since 1.32.0 linux also needs: - - '**/libstdc++.so.6' +requirements: + build: + - posix # [win] + host: outputs: + - name: rust-std-{{ rust_arch }} + build: + noarch: generic + binary_relocation: false + missing_dso_whitelist: # [linux] + - /lib64/librt.so.1 # [linux] + - /lib64/libdl.so.2 # [linux] + - /lib64/libpthread.so.0 # [linux] + - /lib64/libm.so.6 # [linux] + - /lib64/libc.so.6 # [linux] + - /lib64/ld-linux-x86-64.so.2 # [linux] + merge_build_host: false + requirements: + build: + - posix # [win] + host: + run: + # The directory structure of windows and unix is different. + # We should not install the bundled rust-std-x86_64-pc-windows-msvc from this output on unix for example. + - __unix # [unix] + - __win # [win] + run_constrained: + # Having different versions of rust-std and rust is confusing. + - {{ pin_subpackage("rust", min_pin="x.x.x", max_pin="x.x.x") }} + script: install-rust-std.sh # [unix] + script: install-rust-std.bat # [win] + test: + commands: + - test -d $PREFIX/lib/rustlib # [unix] + - if not exist %LIBRARY_PREFIX%/lib/rustlib exit 1 # [win] + - echo {{ rust_arch }} + - name: rust - script: install-msvc.bat # [win] - script: install-unix.sh # [not win] + script: install-rust.sh # [unix] + script: install-rust.bat # [win] + build: + # the distributed binaries are already relocatable + binary_relocation: false + missing_dso_whitelist: # [linux] + - /lib64/librt.so.1 # [linux] + - /lib64/libdl.so.2 # [linux] + - /lib64/libpthread.so.0 # [linux] + - /lib64/libm.so.6 # [linux] + - /lib64/libc.so.6 # [linux] + - /lib64/ld-linux-x86-64.so.2 # [linux] + # Added as run deps: libgcc-ng (via compiler strong run_exports), zlib + # - /lib64/libgcc_s.so.1 # [linux] + # - /lib64/libz.so.1 # [linux] + run_exports: + strong_constrains: + - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] requirements: build: - - {{ compiler('c') }} # [osx] - posix # [win] + host: + - {{ pin_subpackage("rust-std-" ~ rust_arch, exact=True) }} + - {{ compiler('c') }} # [linux] -- rustc needs a toolchain to link executables + # zlib is linked by **/lib/libLLVM-*-rust-*.so + - zlib # [linux] + run: + - {{ pin_subpackage("rust-std-" ~ rust_arch, exact=True) }} + - gcc_impl_{{ target_platform }} # [linux] test: + requires: + - posix # [win] commands: - - rustc --version + - rustc --help + - rustdoc --help - cargo --help + - cargo --config registries.crates-io.protocol=\"sparse\" install --force xsv + - echo {{ rust_arch }} + - if exist %LIBRARY_PREFIX%\share\doc\rust\html\sysroot exit 1 # [win] + + - name: rust-src + script: install-rust-src.sh # [unix] + script: install-rust-src.bat # [win] + build: + skip: {{ rust_arch != "x86_64-unknown-linux-gnu" and rust_arch != "x86_64-pc-windows-msvc" }} + noarch: generic + # Need conda-build >=3.25 to have different hashes. Remove when conda-build 3.25 is out. + string: unix_{{ PKG_BUILDNUM }} # [unix] + string: win_{{ PKG_BUILDNUM }} # [win] + requirements: + build: + - posix # [win] + run: + - __win # [win] + - __unix # [unix] + run_constrained: + # Having different versions of rust-src and rust is confusing. + # `rust-src` is specific to the toolchain in `rustup`, + # and we would like to keep that behavior. + - {{ pin_subpackage("rust", min_pin="x.x.x", max_pin="x.x.x") }} + test: + commands: + - test -f "${PREFIX}"/lib/rustlib/src/rust/Cargo.lock # [unix] + - if not exist "%LIBRARY_PREFIX%/lib/rustlib/src/rust/Cargo.lock" exit 1 # [win] + # Make sure that the outputs do not clobber with other rust components + - test "$(ls "${PREFIX}"/lib/rustlib/)" = "$(printf "manifest-rust-src\nsrc")" # [unix] + - if not exist "%LIBRARY_PREFIX%/lib/rustlib/manifest-rust-src" exit 1 # [win] + - if not exist "%LIBRARY_PREFIX%/lib/rustlib/src" exit 1 # [win] - - name: rust-gnu # [win] - script: install-gnu.bat # [win] - requirements: # [win] - build: # [win] - - posix # [win] - test: # [win] - commands: # [win] - - rustc --version # [win] - - cargo --help # [win] + - name: rust-std-{{ rust_std_extra }} + script: install-rust-std-extra.sh # [unix] + script: install-rust-std-extra.bat # [win] + build: + skip: {{ rust_arch != "x86_64-unknown-linux-gnu" and rust_arch != "x86_64-pc-windows-msvc" }} + noarch: generic + # Need conda-build >=3.25 to have different hashes. Remove when conda-build 3.25 is out. + string: unix_{{ PKG_BUILDNUM }} # [unix] + string: win_{{ PKG_BUILDNUM }} # [win] + requirements: + build: + - posix # [win] + run: + - __win # [win] + - __unix # [unix] + run_constrained: + # Having different versions of rust-std and rust is confusing. + - {{ pin_subpackage("rust", min_pin="x.x.x", max_pin="x.x.x") }} + test: + commands: + - test -d $PREFIX/lib/rustlib/{{ rust_std_extra }} # [unix] + - if not exist "%LIBRARY_PREFIX%/lib/rustlib/{{ rust_std_extra }}" exit 1 # [win] + - test -f $PREFIX/lib/rustlib/manifest-rust-std-{{ rust_std_extra }} # [unix] + - if not exist "%LIBRARY_PREFIX%/lib/rustlib/manifest-rust-std-{{ rust_std_extra }}" exit 1 # [win] + # Make sure that the outputs do not clobber with other rust components + - test -z "$(ls "${PREFIX}"/lib/rustlib/ | grep -v {{ rust_std_extra }})" # [unix] + - dir /b "%LIBRARY_PREFIX%" | findstr /v "{{ rust_std_extra }}" >nul || exit 1 # [win] + - echo {{ rust_std_extra }} about: home: https://www.rust-lang.org - license: MIT AND Apache-2.0 - license_family: OTHER - license_url: https://github.com/rust-lang/rust/blob/{{ version }}/COPYRIGHT + license: MIT + license_file: + - LICENSE-APACHE + - LICENSE-MIT summary: | Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. - description: | This package provides the compiler (rustc) and the documentation utilities rustdoc. - dev_url: https://github.com/rust-lang/rust - doc_url: https://www.rust-lang.org/learn - doc_source_url: https://github.com/rust-lang/rust/tree/{{ version }}/src/doc + dev_url: https://doc.rust-lang.org/std/ + doc_url: https://www.rust-lang.org/en-US/documentation.html extra: - # The license files cannot be found properly on Windows - skip-lints: - - missing_license_file recipe-maintainers: - - abhi18av - - dlaehnemann + - timkpaine + - xhochy - johanneskoester + - abhi18av - pkgw - - katietz + - dlaehnemann + - isuruf + - mbargull diff --git a/recipe/xcode-select b/recipe/xcode-select deleted file mode 100644 index f4b9ad5e..00000000 --- a/recipe/xcode-select +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env sh - -echo "$@" >> /tmp/xcode-select-$$.log - -# We could not care less, luckily this always comes first -if [[ ${1} == --sdk || ${1} == -sdk ]]; then - shift; - shift; -elif [[ ${1} == -version ]]; then - # If Qt uses this to determine C++ features then we need to - # pretend to be a very recent Xcode. - echo "Xcode 8.3.3" >> /tmp/xcode-select-$$.log - echo "Build version 8E3004b" >> /tmp/xcode-select-$$.log - echo "Xcode 8.3.3" - echo "Build version 8E3004b" - exit 0 -fi - -case ${1} in - - -version) - shift - ;; - - [-]-print-path) - echo $(dirname ${CC}) - ;; - - [-]-install) - echo "ERROR :: conda ecosystem fake xcode-select cannot install anything, use conda" - ;; - - -s) - shift - ;; - -esac