diff options
author | B. Watson <yalhcru@gmail.com> | 2021-11-24 13:31:38 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-04 10:08:58 +0700 |
commit | fa5698e965eda9cffb247bec1b99944491dc3416 (patch) | |
tree | 289151ad69fcdf865a0a199e3329bf06d6366149 /libraries/libopenraw/mkvendored.sh | |
parent | c97dc622724f677a46f153409600330ef91cf13d (diff) | |
download | slackbuilds-fa5698e965eda9cffb247bec1b99944491dc3416.tar.gz |
libraries/libopenraw: Updated for version 0.3.0.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libopenraw/mkvendored.sh')
-rw-r--r-- | libraries/libopenraw/mkvendored.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libraries/libopenraw/mkvendored.sh b/libraries/libopenraw/mkvendored.sh new file mode 100644 index 0000000000..0d70bc8abd --- /dev/null +++ b/libraries/libopenraw/mkvendored.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# 20211124 bkw: mkvendored.sh, part of libopenraw SBo SlackBuild. +# create libopenraw-vendored-sources-$VERSION-$BUILD.tar.xz +# requires network access, but does not require root privilege. + +PRGNAM=libopenraw +CWD=$(pwd) +source ./$PRGNAM.info + +set -e +WORKDIR=$( mktemp -d ) +cd $WORKDIR + +# don't depend on user's ~/.cargo +mkdir -p cargohome +export CARGO_HOME=$(pwd)/cargohome + +grep '^BUILD=' $CWD/$PRGNAM.SlackBuild > 1 +source ./1 + +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION/lib/mp4 + +for i in . mp4parse mp4parse_capi; do + cd $i + cargo vendor + find vendor -type f -a -name \*.a -print0 | xargs -0 rm -f + mkdir -p .cargo + cat <<EOF >.cargo/config.toml +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF + cd - +done + +cd $WORKDIR +tar cvfJ $CWD/libopenraw-vendored-sources-$VERSION-$BUILD.tar.xz \ + $PRGNAM-$VERSION/lib/mp4/{,mp4parse/,mp4parse_capi/}{vendor,.cargo} +cd $CWD +rm -rf $WORKDIR |