Browse Source

build: workaround for 'realpath' missing on macOS

hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
5b84e714f2
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 6
      contrib/build_tools_util.sh
  2. 4
      contrib/make_libsecp256k1.sh
  3. 4
      contrib/osx/base.sh

6
contrib/build_tools_util.sh

@ -107,6 +107,12 @@ function host_strip()
fi
}
# on MacOS, there is no realpath by default
if ! [ -x "$(command -v realpath)" ]; then
function realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
fi
export SOURCE_DATE_EPOCH=1530212462

4
contrib/make_libsecp256k1.sh

@ -4,12 +4,12 @@ LIBSECP_VERSION="b408c6a8b287003d1ade5709e6f7bc3c7f1d5be7"
set -e
. $(dirname "$0")/build_tools_util.sh || (echo "Could not source build_tools_util.sh" && exit 1)
here=$(dirname $(realpath "$0" 2> /dev/null || grealpath "$0"))
CONTRIB="$here"
PROJECT_ROOT="$CONTRIB/.."
. "$here"/build_tools_util.sh || (echo "Could not source build_tools_util.sh" && exit 1)
pkgname="secp256k1"
info "Building $pkgname..."

4
contrib/osx/base.sh

@ -21,7 +21,3 @@ function DoCodeSignMaybe { # ARGS: infoName fileOrDirName codesignIdentity
info "Code signing ${infoName}..."
codesign -f -v $deep -s "$identity" "$file" || fail "Could not code sign ${infoName}"
}
function realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}

Loading…
Cancel
Save