-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust v1.50.0 #75
Merged
isuruf
merged 13 commits into
conda-forge:master
from
regro-cf-autotick-bot:1.50.0_hcfb706
Feb 26, 2021
+279
−14
Merged
rust v1.50.0 #75
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ea6c6e3
updated v1.50.0
regro-cf-autotick-bot 2716cb4
MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.8.6, and con…
regro-cf-autotick-bot 66513eb
Avoid twofold build; remove .old backups from rust
mbargull 2fd5b38
Add 0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.patch
mbargull 1ac4c7f
Adjust patch for filename/mode
mbargull f6175bb
Cross build for linux-aarch64
mbargull cee4d72
MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.8.6, and con…
mbargull 6386291
Replace prefix paths in install.log
mbargull 4d7dbec
linux-aarch64: Use native build again
mbargull 016ba74
MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.8.6, and con…
mbargull b1dd508
Update 0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.diff
mbargull c9cb0f9
Add __osx>=10.10 requirement for osx-64
mbargull 84dbfd2
Move __osx>=10.10 to run_exports/strong_constrains
mbargull File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ rust_arch: | |
- x86_64-unknown-linux-gnu | ||
target_platform: | ||
- linux-64 | ||
zip_keys: | ||
- - cdt_name | ||
- docker_image |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
173 changes: 173 additions & 0 deletions
173
recipe/0001-gh-106-install.sh-Perfomance-Use-more-shell-builtins.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
From 3d7ed69185bda705171729e01c84c12143332236 Mon Sep 17 00:00:00 2001 | ||
From: Marcel Bargull <[email protected]> | ||
Date: Fri, 19 Feb 2021 12:49:34 +0100 | ||
Subject: [PATCH] install.sh: Perfomance: Use more shell builtins | ||
|
||
Replace echo/grep/cut/dirname/basename by variable substitutions and | ||
case pattern matching to reduce the amount of subprocesses called for | ||
every copied file. | ||
--- | ||
install.sh | 91 +++++++++++++++++++-------------------------- | ||
1 file changed, 38 insertions(+), 53 deletions(-) | ||
|
||
diff --git a/install.sh b/install.sh | ||
index e68be89..3120e5d 100755 | ||
--- a/install.sh | ||
+++ b/install.sh | ||
@@ -174,11 +174,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 | ||
@@ -280,10 +280,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 | ||
@@ -302,8 +302,8 @@ validate_opt () { | ||
|
||
absolutify() { | ||
local file_path="$1" | ||
- local file_path_dirname="$(dirname "$file_path")" | ||
- local file_path_basename="$(basename "$file_path")" | ||
+ local file_path_dirname="${file_path%/*}" | ||
+ local file_path_basename="${file_path##*/}" | ||
local file_abs_path="$(abs_path "$file_path_dirname")" | ||
local file_path="$file_abs_path/$file_path_basename" | ||
# This is the return value | ||
@@ -442,8 +442,8 @@ uninstall_components() { | ||
local _directive | ||
while read _directive; do | ||
|
||
- local _command=`echo $_directive | cut -f1 -d:` | ||
- local _file=`echo $_directive | cut -f2 -d:` | ||
+ local _command="${_directive%%:*}" | ||
+ local _file="${_directive#*:}" | ||
|
||
# Sanity checks | ||
if [ ! -n "$_command" ]; then critical_err "malformed installation directive"; fi | ||
@@ -549,8 +549,8 @@ install_components() { | ||
local _directive | ||
while read _directive; do | ||
|
||
- local _command=`echo $_directive | cut -f1 -d:` | ||
- local _file=`echo $_directive | cut -f2 -d:` | ||
+ local _command="${_directive%%:*}" | ||
+ local _file="${_directive#*:}" | ||
|
||
# Sanity checks | ||
if [ ! -n "$_command" ]; then critical_err "malformed installation directive"; fi | ||
@@ -559,35 +559,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 | ||
@@ -601,15 +589,14 @@ install_components() { | ||
# this problem to be a big deal in practice. | ||
if [ "$CFG_DOCDIR" != "<default>" ] | ||
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 | ||
- make_dir_recursive "$(dirname "$_file_install_path")" | ||
+ make_dir_recursive "${_file_install_path%/*}" | ||
critical_need_ok "directory creation failed" | ||
|
||
# Make the path absolute so we can uninstall it later without | ||
@@ -625,7 +612,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" | ||
@@ -770,8 +757,6 @@ verbose_msg | ||
|
||
need_cmd mkdir | ||
need_cmd printf | ||
-need_cmd cut | ||
-need_cmd grep | ||
need_cmd uname | ||
need_cmd tr | ||
need_cmd sed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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%\build.sh" . | ||
bash -lce "%SRC_DIR%/build.sh" | ||
if errorlevel 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternative (if nobody wants/needs
install.log
):