aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-12-27 18:09:45 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:20 +0800
commit980e57e46f0c7b29357baf31447871abff8192d6 (patch)
tree965f985f56f219418f5f577e18f72b37b49e4626 /vendor/github.com/dexon-foundation
parenta7bb33e5dba4f4b24a848c64954bf1659583e5a4 (diff)
downloadgo-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.tar
go-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.tar.gz
go-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.tar.bz2
go-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.tar.lz
go-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.tar.xz
go-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.tar.zst
go-tangerine-980e57e46f0c7b29357baf31447871abff8192d6.zip
vendor: sync dexon-foundation/bls to latest dev (#108)
Diffstat (limited to 'vendor/github.com/dexon-foundation')
-rw-r--r--vendor/github.com/dexon-foundation/bls/Makefile26
-rw-r--r--vendor/github.com/dexon-foundation/bls/ffi/go/bls/bls.go4
-rw-r--r--vendor/github.com/dexon-foundation/bls/readme.md6
3 files changed, 7 insertions, 29 deletions
diff --git a/vendor/github.com/dexon-foundation/bls/Makefile b/vendor/github.com/dexon-foundation/bls/Makefile
index 8ce73a5a1..556f625ec 100644
--- a/vendor/github.com/dexon-foundation/bls/Makefile
+++ b/vendor/github.com/dexon-foundation/bls/Makefile
@@ -32,34 +32,10 @@ MCL_LIB=../mcl/lib/libmcl.a
$(MCL_LIB):
$(MAKE) -C ../mcl lib/libmcl.a
-ifeq ($(DOCKER),alpine)
-GMP_PREFIX=/usr/lib
-OPENSSL_PREFIX=/usr/lib
-else ifeq ($(OS),mac)
-GMP_PREFIX=$(shell brew --prefix gmp)/lib
-OPENSSL_PREFIX=$(shell brew --prefix openssl)/lib
-else
-GMP_PREFIX=/usr/lib/x86_64-linux-gnu
-OPENSSL_PREFIX=/usr/lib/x86_64-linux-gnu
-endif
-
-GMP_STATIC_LIB=$(GMP_PREFIX)/libgmp.a
-GMPXX_STATIC_LIB=$(GMP_PREFIX)/libgmpxx.a
-
-OPENSSL_STATIC_LIB=$(OPENSSL_PREFIX)/libcrypto.a
-
$(BLS256_LIB): $(OBJ_DIR)/bls_c256.o
$(AR) $@ $<
$(BLS384_LIB): $(OBJ_DIR)/bls_c384.o $(MCL_LIB)
- rm -rf tmp
- mkdir -p tmp
- cd tmp && \
- ar x ../$(MCL_LIB) && \
- ar x $(OPENSSL_STATIC_LIB) && \
- ar x $(GMP_STATIC_LIB) && \
- ar x $(GMPXX_STATIC_LIB)
- $(AR) $@ $< tmp/*.o
- rm -rf tmp
+ $(AR) $@ $<
ifneq ($(findstring $(OS),mac/mingw64),)
BLS256_SLIB_LDFLAGS+=-lgmpxx -lgmp -lcrypto -lstdc++
diff --git a/vendor/github.com/dexon-foundation/bls/ffi/go/bls/bls.go b/vendor/github.com/dexon-foundation/bls/ffi/go/bls/bls.go
index b6ffe49d0..5123a07e6 100644
--- a/vendor/github.com/dexon-foundation/bls/ffi/go/bls/bls.go
+++ b/vendor/github.com/dexon-foundation/bls/ffi/go/bls/bls.go
@@ -2,8 +2,10 @@ package bls
/*
#cgo CFLAGS:-I../../../include -I../../../../mcl/include/
-#cgo LDFLAGS:${SRCDIR}/../../../lib/libbls384.a -lstdc++
+#cgo LDFLAGS:${SRCDIR}/../../../lib/libbls384.a ${SRCDIR}/../../../../mcl/lib/libmcl.a -lgmpxx -lgmp -lstdc++
#cgo CFLAGS:-DMCLBN_FP_UNIT_SIZE=6
+#cgo pkg-config: libcrypto
+#cgo static pkg-config: --static
#include <bls/bls.h>
*/
import "C"
diff --git a/vendor/github.com/dexon-foundation/bls/readme.md b/vendor/github.com/dexon-foundation/bls/readme.md
index 544fee3ca..08aac6ca1 100644
--- a/vendor/github.com/dexon-foundation/bls/readme.md
+++ b/vendor/github.com/dexon-foundation/bls/readme.md
@@ -1,4 +1,4 @@
-[![Build Status](https://travis-ci.com/Spiderpowa/bls.png?branch=dev)](https://travis-ci.com/Spiderpowa/bls)
+[![Build Status](https://travis-ci.com/dexon-foundation/bls.png?branch=dev)](https://travis-ci.com/dexon-foundation/bls)
# BLS threshold signature
@@ -10,8 +10,8 @@ Create a working directory (e.g., work) and clone the following repositories.
```
mkdir work
cd work
-git clone git://github.com/herumi/mcl.git
-git clone git://github.com/herumi/bls.git
+git clone git://github.com/dexon-foundation/mcl.git
+git clone git://github.com/dexon-foundation/bls.git
git clone git://github.com/herumi/cybozulib_ext ; for only Windows
```