dot.dot.dot.exampol
This commit is contained in:
commit
a0bc2d79de
406 changed files with 34577 additions and 0 deletions
67
node_modules/lnsocket/tools/0001-configure-customizable-AR-and-RANLIB.patch
generated
vendored
Normal file
67
node_modules/lnsocket/tools/0001-configure-customizable-AR-and-RANLIB.patch
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
From 0d253d52e804a5affb0f1c851ec250071e7345d9 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Ruffing <crypto@timruffing.de>
|
||||
Date: Sun, 13 Mar 2022 10:39:55 +0100
|
||||
Subject: [PATCH] configure: Use modern way to set AR
|
||||
|
||||
This uses AM_PROG_AR to discover ar, which is the recommended way to do
|
||||
so. Among other advantages, it honors the AR environment variable (as
|
||||
set from the outside). The macro has been around since automake 1.11.2
|
||||
(Dec 2011).
|
||||
|
||||
This commit also removes code that discovers ranlib and strip. ranlib
|
||||
has been obsolete for decades (ar does its task now automatically), and
|
||||
anyway LT_INIT takes care of discovering it. The code we used to set
|
||||
STRIP was last mentioned in the automake 1.5 manual. Since automake 1.6
|
||||
(Mar 2002), strip is discovered automatically when necessary (look for
|
||||
the *private* macro AM_PROG_INSTALL_STRIP in the automake manual).
|
||||
---
|
||||
.gitignore | 1 +
|
||||
configure.ac | 11 +++++------
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 53941f23a..d88627d72 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -46,6 +46,7 @@ coverage.*.html
|
||||
|
||||
src/libsecp256k1-config.h
|
||||
src/libsecp256k1-config.h.in
|
||||
+build-aux/ar-lib
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
build-aux/depcomp
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cc766b20a..16a492071 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -25,24 +25,23 @@ AC_CANONICAL_HOST
|
||||
AH_TOP([#ifndef LIBSECP256K1_CONFIG_H])
|
||||
AH_TOP([#define LIBSECP256K1_CONFIG_H])
|
||||
AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/])
|
||||
-AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
-LT_INIT([win32-dll])
|
||||
+# Require Automake 1.11.2 for AM_PROG_AR
|
||||
+AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects])
|
||||
|
||||
# Make the compilation flags quiet unless V=1 is used.
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
-AC_PATH_TOOL(AR, ar)
|
||||
-AC_PATH_TOOL(RANLIB, ranlib)
|
||||
-AC_PATH_TOOL(STRIP, strip)
|
||||
-
|
||||
AC_PROG_CC
|
||||
if test x"$ac_cv_prog_cc_c89" = x"no"; then
|
||||
AC_MSG_ERROR([c89 compiler support required])
|
||||
fi
|
||||
AM_PROG_AS
|
||||
+AM_PROG_AR
|
||||
+
|
||||
+LT_INIT([win32-dll])
|
||||
|
||||
build_windows=no
|
||||
|
42
node_modules/lnsocket/tools/refresh-submodules.sh
generated
vendored
Executable file
42
node_modules/lnsocket/tools/refresh-submodules.sh
generated
vendored
Executable file
|
@ -0,0 +1,42 @@
|
|||
#! /bin/sh
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "Usage: $0 <submoduledir1>..." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If no git dir (or, if we're a submodule, git file), forget it.
|
||||
[ -e .git ] || exit 0
|
||||
|
||||
# git submodule can't run in parallel. Really.
|
||||
# Wait for it to finish if in parallel.
|
||||
if ! mkdir .refresh-submodules 2>/dev/null ; then
|
||||
# If we don't make progress in ~60 seconds, force delete and retry.
|
||||
LIMIT=$((50 + $$ % 20))
|
||||
i=0
|
||||
while [ $i -lt $LIMIT ]; do
|
||||
[ -d .refresh-submodules ] || exit 0
|
||||
sleep 1
|
||||
i=$((i + 1))
|
||||
done
|
||||
rmdir .refresh-submodules
|
||||
exec "$0" "$@" || exit 1
|
||||
fi
|
||||
|
||||
trap "rmdir .refresh-submodules" EXIT
|
||||
|
||||
# Be a little careful here, since we do rm -rf!
|
||||
for m in "$@"; do
|
||||
if ! grep -q "path = $m\$" .gitmodules; then
|
||||
echo "$m is not a submodule!" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# git submodule can segfault. Really.
|
||||
if [ "$(git submodule status "$@" | grep -c '^ ')" != $# ]; then
|
||||
echo Reinitializing submodules "$@" ...
|
||||
git submodule sync "$@"
|
||||
rm -rf "$@"
|
||||
git submodule update --init --recursive "$@"
|
||||
fi
|
74
node_modules/lnsocket/tools/secp-ios.sh
generated
vendored
Executable file
74
node_modules/lnsocket/tools/secp-ios.sh
generated
vendored
Executable file
|
@ -0,0 +1,74 @@
|
|||
#! /usr/bin/env bash
|
||||
#
|
||||
# Step 1.
|
||||
# Configure for base system so simulator is covered
|
||||
#
|
||||
# Step 2.
|
||||
# Make for iOS and iOS simulator
|
||||
#
|
||||
# Step 3.
|
||||
# Merge libs into final version for xcode import
|
||||
|
||||
cd deps/secp256k1
|
||||
|
||||
export PREFIX="$(pwd)/libsecp256k1-ios"
|
||||
export IOS64_PREFIX="$PREFIX/tmp/ios64"
|
||||
export SIMULATOR64_PREFIX="$PREFIX/tmp/simulator64"
|
||||
export XCODEDIR=$(xcode-select -p)
|
||||
export IOS_SIMULATOR_VERSION_MIN=${IOS_SIMULATOR_VERSION_MIN-"6.0.0"}
|
||||
export IOS_VERSION_MIN=${IOS_VERSION_MIN-"6.0.0"}
|
||||
|
||||
mkdir -p $SIMULATOR64_PREFIX $IOS64_PREFIX || exit 1
|
||||
|
||||
# Build for the simulator
|
||||
export BASEDIR="${XCODEDIR}/Platforms/iPhoneSimulator.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/iPhoneSimulator.sdk"
|
||||
|
||||
## x86_64 simulator
|
||||
export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN} -flto"
|
||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN} -flto"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=x86_64-apple-darwin10 \
|
||||
--disable-shared \
|
||||
--enable-module-ecdh \
|
||||
--prefix="$SIMULATOR64_PREFIX"
|
||||
|
||||
make -j3 install || exit 1
|
||||
|
||||
# Build for iOS
|
||||
export BASEDIR="${XCODEDIR}/Platforms/iPhoneOS.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
|
||||
|
||||
## 64-bit iOS
|
||||
export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN} -flto -fembed-bitcode"
|
||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN} -flto -fembed-bitcode"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=arm-apple-darwin10 \
|
||||
--disable-shared \
|
||||
--enable-module-ecdh \
|
||||
--prefix="$IOS64_PREFIX" || exit 1
|
||||
|
||||
make -j3 install || exit 1
|
||||
|
||||
# Create universal binary and include folder
|
||||
rm -fr -- "$PREFIX/include" "$PREFIX/libsecp256k1.a" 2> /dev/null
|
||||
mkdir -p -- "$PREFIX/lib"
|
||||
lipo -create \
|
||||
"$SIMULATOR64_PREFIX/lib/libsecp256k1.a" \
|
||||
"$IOS64_PREFIX/lib/libsecp256k1.a" \
|
||||
-output "$PREFIX/lib/libsecp256k1.a"
|
||||
|
||||
echo
|
||||
echo "libsecp256k1 has been installed into $PREFIX"
|
||||
echo
|
||||
file -- "$PREFIX/lib/libsecp256k1.a"
|
||||
|
||||
# Cleanup
|
||||
rm -rf -- "$PREFIX/tmp"
|
||||
make distclean > /dev/null
|
27
node_modules/lnsocket/tools/secp-wasm.sh
generated
vendored
Executable file
27
node_modules/lnsocket/tools/secp-wasm.sh
generated
vendored
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd deps/secp256k1
|
||||
|
||||
export CC=emcc
|
||||
export AR=emar
|
||||
export RANLIB=emranlib
|
||||
|
||||
export PREFIX="$(pwd)/libsecp256k1-wasm"
|
||||
|
||||
mkdir -p $PREFIX || exit 1
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
patch -N -p1 < ../../tools/0001-configure-customizable-AR-and-RANLIB.patch
|
||||
|
||||
./configure --disable-shared \
|
||||
--disable-tests \
|
||||
--disable-exhaustive-tests \
|
||||
--disable-benchmark \
|
||||
--enable-module-ecdh \
|
||||
--prefix="$PREFIX"
|
||||
|
||||
make -j3 install || exit 1
|
||||
|
||||
rm -rf -- "$PREFIX/tmp"
|
||||
make distclean > /dev/null
|
Loading…
Add table
Add a link
Reference in a new issue