abr: only export when defined, cleanup sccache
This commit is contained in:
parent
e47b48ea7b
commit
f979ec7015
2 changed files with 24 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Maintainer: psykose <alice@ayaya.dev>
|
# Maintainer: psykose <alice@ayaya.dev>
|
||||||
pkgname=abr
|
pkgname=abr
|
||||||
pkgver=1
|
pkgver=2
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="abr~!"
|
pkgdesc="abr~!"
|
||||||
url="https://git.ddd.rip/ptrcnull/aports"
|
url="https://git.ddd.rip/ptrcnull/aports"
|
||||||
|
@ -40,6 +40,6 @@ package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
1a01d9a9cc3fd29622c803193e7b60c4c5855a65db786cb5d826fdd03a2ab071baff70a6bf01d7cd82e2c638a0691700e7810dca070b30071a0ad4066bc73b13 abr
|
77ce846c861098f4a3da15768be1aba6ae4a87dbbddca0146f55b2f6c933b05c6891a649db073f49f4fa33c1e083660a61b54aabbc8b548ebbdacb3b9a385568 abr
|
||||||
71d8cb1e5e57ff739915fa4de1f5699afa60ab36e2e5219c4c366af5ceab24dc6ee55e738d29ca2b63dd5e387de7661594fc86bf2183d787932e75b4c03c6a9f apkbuild-anitya
|
71d8cb1e5e57ff739915fa4de1f5699afa60ab36e2e5219c4c366af5ceab24dc6ee55e738d29ca2b63dd5e387de7661594fc86bf2183d787932e75b4c03c6a9f apkbuild-anitya
|
||||||
"
|
"
|
||||||
|
|
40
abr/abr
40
abr/abr
|
@ -1,25 +1,26 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# clean self and do not pass through any environment
|
# clean self and do not pass through any environment
|
||||||
# except env, because it doesn't matter too much for this specific purpose
|
# except path/home, because it doesn't matter too much for this specific purpose,
|
||||||
|
# and home is required
|
||||||
# and a few that are useful to keep some cache paths
|
# and a few that are useful to keep some cache paths
|
||||||
if [ -z "$_CLEAN" ]; then
|
if [ -z "$_CLEAN" ]; then
|
||||||
exec env -i \
|
exec env -i \
|
||||||
_CLEAN=1 \
|
_CLEAN=1 \
|
||||||
CARGO_HOME="$CARGO_HOME" \
|
|
||||||
GNUPGHOME="$GNUPGHOME" \
|
|
||||||
GOCACHE="$GOCACHE" \
|
|
||||||
GOMODCACHE="$GOMODCACHE" \
|
|
||||||
GOPATH="$GOPATH" \
|
|
||||||
GOTMPDIR="$GOTMPDIR" \
|
|
||||||
HOME="$HOME" \
|
HOME="$HOME" \
|
||||||
PATH="$PATH" \
|
PATH="$PATH" \
|
||||||
XDG_CACHE_HOME="$XDG_CACHE_HOME" \
|
${CARGO_HOME:+CARGO_HOME="$CARGO_HOME"} \
|
||||||
XDG_CONFIG_HOME="$XDG_CONFIG_HOME" \
|
${GNUPGHOME:+GNUPGHOME="$GNUPGHOME"} \
|
||||||
|
${GOCACHE:+GOCACHE="$GOCACHE"} \
|
||||||
|
${GOMODCACHE:+GOMODCACHE="$GOMODCACHE"} \
|
||||||
|
${GOPATH:+GOPATH="$GOPATH"} \
|
||||||
|
${GOTMPDIR:+GOTMPDIR="$GOTMPDIR"} \
|
||||||
|
${XDG_CACHE_HOME:+XDG_CACHE_HOME="$XDG_CACHE_HOME"} \
|
||||||
|
${XDG_CONFIG_HOME:+XDG_CONFIG_HOME="$XDG_CONFIG_HOME"} \
|
||||||
"$0" "$@"
|
"$0" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts "j:fmnx" opt; do
|
while getopts "j:fmnsx" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
'j')
|
'j')
|
||||||
jobs="$OPTARG"
|
jobs="$OPTARG"
|
||||||
|
@ -42,6 +43,9 @@ while getopts "j:fmnx" opt; do
|
||||||
'n')
|
'n')
|
||||||
nonice=1
|
nonice=1
|
||||||
;;
|
;;
|
||||||
|
's')
|
||||||
|
nosccache=1
|
||||||
|
;;
|
||||||
'x')
|
'x')
|
||||||
# skip checks
|
# skip checks
|
||||||
export ABUILD_BOOTSTRAP=1
|
export ABUILD_BOOTSTRAP=1
|
||||||
|
@ -56,18 +60,18 @@ shift "$((OPTIND - 1))"
|
||||||
|
|
||||||
# loop again to check if rootbld
|
# loop again to check if rootbld
|
||||||
for arg; do
|
for arg; do
|
||||||
if eltest "${arg:-x}" =~ "rootbld"; then
|
if eltest "$arg" =~ "rootbld" || [ -n "$nosccache" ]; then
|
||||||
# not available in rootbld
|
# pointless in rootbld
|
||||||
nosccache=1
|
# TODO: maybe we can mount something into rootbld without patches
|
||||||
|
:
|
||||||
|
else
|
||||||
|
extra="$extra sccache"
|
||||||
|
export RUSTC_WRAPPER=sccache
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$nosccache" ]; then
|
|
||||||
export RUSTC_WRAPPER=sccache
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$nomemhack" ]; then
|
if [ -z "$nomemhack" ]; then
|
||||||
extra="scudo-malloc"
|
extra="$extra scudo-malloc"
|
||||||
export LD_PRELOAD="/usr/lib/libscudo.so"
|
export LD_PRELOAD="/usr/lib/libscudo.so"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue