mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-12 21:49:51 +00:00
Build libsecp256k1
This commit is contained in:
parent
1e06b1921e
commit
c76375de91
2 changed files with 17 additions and 0 deletions
|
@ -5,6 +5,7 @@ PYTHON_VERSION=3.6.4
|
||||||
BUILDDIR=/tmp/electrum-build
|
BUILDDIR=/tmp/electrum-build
|
||||||
PACKAGE=Electrum
|
PACKAGE=Electrum
|
||||||
GIT_REPO=https://github.com/spesmilo/electrum
|
GIT_REPO=https://github.com/spesmilo/electrum
|
||||||
|
LIBSECP_VERSION=452d8e4d2a2f9f1b5be6b02e18f1ba102e5ca0b4
|
||||||
|
|
||||||
. $(dirname "$0")/base.sh
|
. $(dirname "$0")/base.sh
|
||||||
|
|
||||||
|
@ -14,6 +15,8 @@ cd $src_dir/../..
|
||||||
export PYTHONHASHSEED=22
|
export PYTHONHASHSEED=22
|
||||||
VERSION=`git describe --tags --dirty`
|
VERSION=`git describe --tags --dirty`
|
||||||
|
|
||||||
|
which brew > /dev/null 2>&1 || fail "Please install brew from https://brew.sh/ to continue"
|
||||||
|
|
||||||
info "Installing Python $PYTHON_VERSION"
|
info "Installing Python $PYTHON_VERSION"
|
||||||
export PATH="~/.pyenv/bin:~/.pyenv/shims:~/Library/Python/3.6/bin:$PATH"
|
export PATH="~/.pyenv/bin:~/.pyenv/shims:~/Library/Python/3.6/bin:$PATH"
|
||||||
if [ -d "~/.pyenv" ]; then
|
if [ -d "~/.pyenv" ]; then
|
||||||
|
@ -52,6 +55,19 @@ curl https://homebrew.bintray.com/bottles/libusb-1.0.22.el_capitan.bottle.tar.gz
|
||||||
tar xz --directory $BUILDDIR
|
tar xz --directory $BUILDDIR
|
||||||
cp $BUILDDIR/libusb/1.0.22/lib/libusb-1.0.dylib contrib/build-osx
|
cp $BUILDDIR/libusb/1.0.22/lib/libusb-1.0.dylib contrib/build-osx
|
||||||
|
|
||||||
|
info "Building libsecp256k1"
|
||||||
|
brew install autoconf automake libtool
|
||||||
|
git clone https://github.com/bitcoin-core/secp256k1 $BUILDDIR/secp256k1
|
||||||
|
pushd $BUILDDIR/secp256k1
|
||||||
|
git reset --hard $LIBSECP_VERSION
|
||||||
|
git clean -f -x -q
|
||||||
|
./autogen.sh
|
||||||
|
./configure --enable-module-recovery --enable-experimental --enable-module-ecdh --disable-jni
|
||||||
|
make
|
||||||
|
popd
|
||||||
|
cp $BUILDDIR/secp256k1/.libs/libsecp256k1.0.dylib contrib/build-osx
|
||||||
|
|
||||||
|
|
||||||
info "Installing requirements..."
|
info "Installing requirements..."
|
||||||
python3 -m pip install -Ir ./contrib/deterministic-build/requirements.txt --user && \
|
python3 -m pip install -Ir ./contrib/deterministic-build/requirements.txt --user && \
|
||||||
python3 -m pip install -Ir ./contrib/deterministic-build/requirements-binaries.txt --user || \
|
python3 -m pip install -Ir ./contrib/deterministic-build/requirements-binaries.txt --user || \
|
||||||
|
|
|
@ -43,6 +43,7 @@ datas += collect_data_files('keepkeylib')
|
||||||
|
|
||||||
# Add libusb so Trezor will work
|
# Add libusb so Trezor will work
|
||||||
binaries = [(electrum + "contrib/build-osx/libusb-1.0.dylib", ".")]
|
binaries = [(electrum + "contrib/build-osx/libusb-1.0.dylib", ".")]
|
||||||
|
binaries += [(electrum + "contrib/build-osx/libsecp256k1.0.dylib", ".")]
|
||||||
|
|
||||||
# Workaround for "Retro Look":
|
# Workaround for "Retro Look":
|
||||||
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]]
|
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]]
|
||||||
|
|
Loading…
Add table
Reference in a new issue