summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordevelnk2019-10-10 03:37:41 +0300
committerdevelnk2019-10-10 03:37:41 +0300
commit4bb67b4b2aba49e20a44358164b3f5fdb04331d5 (patch)
treee8d2d33cd02a13398315e4a7b92d2578f084e15d
parent2e17ac2728f53035c897b1ec357dcaee9f9001cc (diff)
downloadaur-4bb67b4b2aba49e20a44358164b3f5fdb04331d5.tar.gz
Updated build system
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD87
-rw-r--r--libsnark-no-gtest.patch22
-rw-r--r--use-system-qpid-proton.patch26
-rw-r--r--use-system-rust.patch20
5 files changed, 156 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 520a646d68c3..c5a700a0cab4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,30 @@
pkgbase = asofe
pkgdesc = Permissionless financial system employing zero-knowledge security
- pkgver = 2.0.6
+ pkgver = 2.0.6_1
pkgrel = 1
url = https://asofe.org/
arch = x86_64
license = MIT
- checkdepends = python
- checkdepends = python2
- checkdepends = python2-pyzmq
- makedepends = cargo
+ makedepends = boost
makedepends = cmake
makedepends = git
makedepends = gmock
makedepends = python
+ makedepends = rustup
makedepends = wget
+ depends = boost-libs
depends = libevent
+ depends = qpid-proton
depends = zeromq
source = git+https://github.com/TheLightSide/asofe.git#commit=1be9a53fdfb7f264a64a90bfb90625e53e7db1ef
+ source = libsnark-no-gtest.patch
+ source = use-system-qpid-proton.patch
+ source = use-system-rust.patch
source = asofed.service
sha512sums = SKIP
+ sha512sums = b4792cc6f4c1e4e633d34257b68a4fbf882dfc692fedc14a06905705dd0778f22097b1e0645e00231ddc366245fe76ff63a43b53fb468496daf5100b15ad2fee
+ sha512sums = 019870971a0cec093d0552585f4140f39dd65f90cb56b97e512bbaf0d79c0f1574295e722310d4e1762af12ff693802fc465765d4d1410d209e259326f307d6a
+ sha512sums = e2bdf46696e70a93ffcb45bf4e081c780cda8f11f6fa346b6807731f7c739f18c689c4e78a71f8bd7099874108b6b6584b8a96395bbca8d5441f7600a3fe0ebe
sha512sums = bfc39352e50078c7897ae3b8167f06d152f26c52dc7199ae952bad85b99a9da4f9d25d63edfe52291ad27b6e08b828c5db205eb0dc6091ec3fc75dc2b1bfca19
pkgname = asofe
diff --git a/PKGBUILD b/PKGBUILD
index 92c3ada55643..df4e1891df0f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,19 +2,25 @@
# Maintainer: Nikolay Kuzin <develnk@gmail.com>
pkgname=asofe
-pkgver=2.0.6
+pkgver=2.0.6_1
_commit=1be9a53fdfb7f264a64a90bfb90625e53e7db1ef
pkgrel=1
pkgdesc='Permissionless financial system employing zero-knowledge security'
arch=('x86_64')
url='https://asofe.org/'
license=('MIT')
-depends=('libevent' 'zeromq')
-makedepends=('cargo' 'cmake' 'git' 'gmock' 'python' 'wget')
-checkdepends=('python' 'python2' 'python2-pyzmq')
+depends=('boost-libs' 'libevent' 'qpid-proton' 'zeromq')
+makedepends=('boost' 'cmake' 'git' 'gmock' 'python' 'rustup' 'wget')
+heckdepends=('python2-pyblake2' 'python2-pyzmq' 'python2-qpid-proton')
source=("git+https://github.com/TheLightSide/asofe.git#commit=${_commit}"
+ 'libsnark-no-gtest.patch'
+ 'use-system-qpid-proton.patch'
+ 'use-system-rust.patch'
'asofed.service')
sha512sums=('SKIP'
+ 'b4792cc6f4c1e4e633d34257b68a4fbf882dfc692fedc14a06905705dd0778f22097b1e0645e00231ddc366245fe76ff63a43b53fb468496daf5100b15ad2fee'
+ '019870971a0cec093d0552585f4140f39dd65f90cb56b97e512bbaf0d79c0f1574295e722310d4e1762af12ff693802fc465765d4d1410d209e259326f307d6a'
+ 'e2bdf46696e70a93ffcb45bf4e081c780cda8f11f6fa346b6807731f7c739f18c689c4e78a71f8bd7099874108b6b6584b8a96395bbca8d5441f7600a3fe0ebe'
'bfc39352e50078c7897ae3b8167f06d152f26c52dc7199ae952bad85b99a9da4f9d25d63edfe52291ad27b6e08b828c5db205eb0dc6091ec3fc75dc2b1bfca19')
prepare() {
@@ -22,25 +28,86 @@ prepare() {
# Set gitattributes on src/clientversion.cpp
git archive --format=tar ${_commit} -- src/clientversion.cpp | tar -xf -
+
+ patch -Np1 -i ../libsnark-no-gtest.patch
+ patch -Np1 -i ../use-system-qpid-proton.patch
+ patch -Np1 -i ../use-system-rust.patch
+
+ # Runs forever
+ sed -e '/prioritisetransaction.py/d' -i qa/pull-tester/rpc-tests.sh
}
build() {
cd ${pkgname}
- HOST="$(./depends/config.guess)" BUILD="$(./depends/config.guess)" make -C ./depends/ V=1
+ # Temporary, due to llvm-libs 9 being in [staging]
+ rustup update stable
+
+ cd depends
+ rust_crates=(
+ crate_aes
+ crate_aesni
+ crate_aes_soft
+ crate_arrayvec
+ crate_bellman
+ crate_bitflags
+ crate_bit_vec
+ crate_blake2_rfc
+ crate_block_cipher_trait
+ crate_byte_tools
+ crate_byteorder
+ crate_constant_time_eq
+ crate_crossbeam
+ crate_digest
+ crate_fpe
+ crate_fuchsia_zircon
+ crate_fuchsia_zircon_sys
+ crate_futures_cpupool
+ crate_futures
+ crate_generic_array
+ crate_lazy_static
+ crate_libc
+ crate_nodrop
+ crate_num_bigint
+ crate_num_cpus
+ crate_num_integer
+ crate_num_traits
+ crate_opaque_debug
+ crate_pairing
+ crate_rand
+ crate_sapling_crypto
+ crate_stream_cipher
+ crate_typenum
+ crate_winapi_i686_pc_windows_gnu
+ crate_winapi
+ crate_winapi_x86_64_pc_windows_gnu
+ crate_zip32
+ )
+ make install \
+ native_packages='' \
+ packages="bdb ${rust_crates[*]} librustzcash"
+ cd ..
- CPPFLAGS="${CPPFLAGS} -I$PWD/depends/${CARCH}-unknown-linux-gnu/include"
- LDFLAGS="${LDFLAGS} -L${PWD}/depends/${CARCH}-unknown-linux-gnu/lib -L${PWD}/depends/x86_64-unknown-linux-gnu/lib64"
+ BUILD="$(./depends/config.guess)"
+ CPPFLAGS="${CPPFLAGS} -I${PWD}/depends/${BUILD}/include"
+ LDFLAGS="${LDFLAGS} -L${PWD}/depends/${BUILD}/lib"
./autogen.sh
- depends_prefix="${PWD}/depends/x86_64-unknown-linux-gnu" ./configure --prefix=/usr
- make -i
+ depends_prefix="${PWD}/depends/${BUILD}" ./configure --prefix=/usr
+ make
}
check() {
cd ${pkgname}
- ./zcutil/fetch-params.sh
+
+ # Tests require python2
+ mkdir "${srcdir}/python"
+ ln -s /usr/bin/python2 "${srcdir}/python/python"
+ export PATH="${srcdir}/python:${PATH}"
+
+ ./zcutil/fetch-params.sh --testnet
# ./qa/zcash/full_test_suite.py
+ # ./qa/pull-tester/rpc-tests.sh
}
package() {
diff --git a/libsnark-no-gtest.patch b/libsnark-no-gtest.patch
new file mode 100644
index 000000000000..821ca594bb19
--- /dev/null
+++ b/libsnark-no-gtest.patch
@@ -0,0 +1,22 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -61,7 +61,7 @@ $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
+
+ LIBSNARK_CXXFLAGS = $(AM_CXXFLAGS) $(PIC_FLAGS) -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all
+-LIBSNARK_CONFIG_FLAGS = CURVE=ALT_BN128 NO_PROCPS=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT NO_COPY_DEPINST=1 NO_COMPILE_LIBGTEST=1
++LIBSNARK_CONFIG_FLAGS = CURVE=ALT_BN128 NO_PROCPS=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT NO_COPY_DEPINST=1 NO_COMPILE_LIBGTEST=1 NO_GTEST=1
+ if HAVE_OPENMP
+ LIBSNARK_CONFIG_FLAGS += MULTICORE=1
+ endif
+--- a/src/snark/Makefile
++++ b/src/snark/Makefile
+@@ -175,7 +175,7 @@ EXEC_OBJS =$(patsubst %,%.o,$(EXECUTABLES) $(EXECUTABLES_WITH_GTEST) $(EXECUTABL
+ GTEST_OBJS =$(patsubst %.cpp,%.o,$(GTEST_SRCS))
+
+ all: \
+- $(if $(NO_GTEST),,$(EXECUTABLES_WITH_GTEST) $(GTEST_TESTS)) \
++ $(if $(NO_GTEST),$(LIBSNARK_A),$(EXECUTABLES_WITH_GTEST) $(GTEST_TESTS)) \
+ $(if $(NO_SUPERCOP),,$(EXECUTABLES_WITH_SUPERCOP)) \
+ $(EXECUTABLES) \
+ $(if $(NO_DOCS),,doc)
diff --git a/use-system-qpid-proton.patch b/use-system-qpid-proton.patch
new file mode 100644
index 000000000000..396822e59595
--- /dev/null
+++ b/use-system-qpid-proton.patch
@@ -0,0 +1,26 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -587,17 +587,13 @@
+ [],
+ [AC_MSG_WARN([Proton headers not found, disabling Proton support])
+ use_proton=no])
+- AC_CHECK_LIB([qpid-proton-cpp-static], [main],
+- [PROTON_LIBS="-lqpid-proton-cpp-static"],
+- [AC_MSG_WARN([Proton qpid-proton-cpp-static library not found, disabling Proton support])
++ AC_CHECK_LIB([qpid-proton-cpp], [main],
++ [PROTON_LIBS="-lqpid-proton-cpp"],
++ [AC_MSG_WARN([Proton qpid-proton-cpp library not found, disabling Proton support])
+ use_proton=no])
+- AC_CHECK_LIB([qpid-proton-core-static], [main],
+- [PROTON_LIBS+=" -lqpid-proton-core-static"],
+- [AC_MSG_WARN([Proton qpid-proton-core-static library not found, disabling Proton support])
+- use_proton=no])
+- AC_CHECK_LIB([qpid-proton-static], [main],
+- [PROTON_LIBS+=" -lqpid-proton-static"],
+- [AC_MSG_WARN([Proton qpid-proton-static library not found, disabling Proton support])
++ AC_CHECK_LIB([qpid-proton-core], [main],
++ [PROTON_LIBS+=" -lqpid-proton-core"],
++ [AC_MSG_WARN([Proton qpid-proton-core library not found, disabling Proton support])
+ use_proton=no])
+ fi
+ if test x$use_proton = xyes; then
diff --git a/use-system-rust.patch b/use-system-rust.patch
new file mode 100644
index 000000000000..b9abf1664302
--- /dev/null
+++ b/use-system-rust.patch
@@ -0,0 +1,20 @@
+--- a/depends/packages/librustzcash.mk
++++ b/depends/packages/librustzcash.mk
+@@ -5,7 +5,7 @@
+ $(package)_download_file=$($(package)_git_commit).tar.gz
+ $(package)_sha256_hash=9909ec59fa7a411c2071d6237b3363a0bc6e5e42358505cf64b7da0f58a7ff5a
+ $(package)_git_commit=06da3b9ac8f278e5d4ae13088cf0a4c03d2c13f5
+-$(package)_dependencies=rust $(rust_crates)
++$(package)_dependencies=$(rust_crates)
+ $(package)_patches=cargo.config 0001-Start-using-cargo-clippy-for-CI.patch remove-dev-dependencies.diff
+
+ $(package)_rust_target=$(if $(rust_rust_target_$(canonical_host)),$(rust_rust_target_$(canonical_host)),$(canonical_host))
+@@ -33,7 +33,7 @@
+ endef
+
+ define $(package)_build_cmds
+- $(host_prefix)/native/bin/cargo build --package librustzcash $($(package)_build_opts)
++ cargo build --package librustzcash $($(package)_build_opts)
+ endef
+
+ define $(package)_stage_cmds