Skip to content

Commit

Permalink
Merge pull request #66 from glemercier/1.3.xc
Browse files Browse the repository at this point in the history
1.3.x
  • Loading branch information
thesolarminer authored Jun 17, 2020
2 parents e3d2be7 + 263d419 commit 2076361
Show file tree
Hide file tree
Showing 110 changed files with 3,714 additions and 2,507 deletions.
1 change: 1 addition & 0 deletions contrib/bitcoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FORMS += \
../src/qt/forms/aboutdialog.ui \
../src/qt/forms/addmilestonedialog.ui \
../src/qt/forms/addressbookpage.ui \
../src/qt/forms/addressconverter.ui \
../src/qt/forms/askpassphrasedialog.ui \
../src/qt/forms/castvotesdialog.ui \
../src/qt/forms/coincontroldialog.ui \
Expand Down
112 changes: 112 additions & 0 deletions contrib/gitian-descriptors/gitian-rpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
name: "smartcash-rpi-1.3"
enable_cache: true
suites:
- "trusty"
architectures:
- "amd64"
packages:
- "g++-multilib"
- "git-core"
- "pkg-config"
- "autoconf2.13"
- "libtool"
- "automake"
- "faketime"
- "bsdmainutils"
- "binutils-gold"
reference_datetime: "2017-01-01 00:00:00"
remotes:
- "url": "https://github.com/smartcash/core-smart.git"
"dir": "core-smart"
files:
- "raspberrypi-tools.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="arm-linux-gnueabihf"
CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="date ar ranlib nm strip"
tar --warning=no-timestamp -xzf raspberrypi-tools.tar.gz
export TOOLCHAIN_BIN=$(pwd)/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
export PATH=$PATH:$TOOLCHAIN_BIN
export QT_RCC_TEST=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
export BUILD_DIR=`pwd`
mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
fi
# Create global faketime wrappers
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
done
# Create per-host faketime wrappers
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
done
done
export PATH=${WRAP_DIR}:${PATH}
cd core-smart
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
make ${MAKEOPTS} NO_QT=1 -C ${BASEPREFIX} HOST="${i}"
done
# Create the release tarball using (arbitrarily) the first host
./autogen.sh
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make NO_QT=1 dist
SOURCEDIST=`echo smartcash-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
# Correct tar file order
mkdir -p temp
pushd temp
tar xf ../$SOURCEDIST
find smartcash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
ORIGPATH="$PATH"
# Extract the release tarball into a dir for each host and build
for i in ${HOSTS}; do
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i}
cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME}
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
make ${MAKEOPTS} NO_QT=1
make NO_QT=1 install-strip
cd installed
find . -name "lib*.la" -delete
find . -name "lib*.a" -delete
rm -rf ${DISTNAME}/lib/pkgconfig
find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
cd ../../
done
mkdir -p $OUTDIR/src
mv $SOURCEDIST $OUTDIR/src
mv ${OUTDIR}/${DISTNAME}-arm-*.tar.gz ${OUTDIR}/${DISTNAME}-arm-rpi.tar.gz
4 changes: 3 additions & 1 deletion contrib/seeds/nodes_main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
64.110.130.146:9678
103.42.212.200:9678
45.76.38.200:9678
198.245.51.138:19678
[2620:1e8:2:1::300:9678]
[2604:880:a:6::776:9678]
172.110.9.185:19678
24 changes: 18 additions & 6 deletions depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
package=zeromq
$(package)_version=4.1.4
$(package)_download_path=http://download.zeromq.org
$(package)_version=4.3.1
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=e99f44fde25c2e4cb84ce440f87ca7d3fe3271c2b8cfbc67d55e4de25e6fe378
$(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb
$(package)_patches=0001-fix-build-with-older-mingw64.patch 0002-disable-pthread_set_name_np.patch

define $(package)_set_vars
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium
$(package)_config_opts=--without-docs --disable-shared --disable-curve --disable-curve-keygen --disable-perf
$(package)_config_opts += --without-libsodium --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci
$(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov --disable-dependency-tracking
$(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cxxflags=-std=c++11
endef

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/0001-fix-build-with-older-mingw64.patch && \
patch -p1 < $($(package)_patch_dir)/0002-disable-pthread_set_name_np.patch && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
endef

define $(package)_config_cmds
$($(package)_autoconf)
endef

define $(package)_build_cmds
$(MAKE) libzmq.la
$(MAKE) src/libzmq.la
endef

define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA
endef

define $(package)_postprocess_cmds
rm -rf bin share
sed -i.old "s/ -lstdc++//" lib/pkgconfig/libzmq.pc && \
rm -rf bin share lib/*.la
endef
30 changes: 30 additions & 0 deletions depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From f6866b0f166ad168618aae64c7fbee8775d3eb23 Mon Sep 17 00:00:00 2001
From: mruddy <[email protected]>
Date: Sat, 30 Jun 2018 09:44:58 -0400
Subject: [PATCH] fix build with older mingw64

---
src/windows.hpp | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/src/windows.hpp b/src/windows.hpp
index 6c3839fd..2c32ec79 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
@@ -58,6 +58,13 @@
#include <winsock2.h>
#include <windows.h>
#include <mswsock.h>
+
+#if defined __MINGW64_VERSION_MAJOR && __MINGW64_VERSION_MAJOR < 4
+// Workaround for mingw-w64 < v4.0 which did not include ws2ipdef.h in iphlpapi.h.
+// Fixed in mingw-w64 by 9bd8fe9148924840d315b4c915dd099955ea89d1.
+#include <ws2def.h>
+#include <ws2ipdef.h>
+#endif
#include <iphlpapi.h>

#if !defined __MINGW32__
--
2.17.1

35 changes: 35 additions & 0 deletions depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From c9bbdd6581d07acfe8971e4bcebe278a3676cf03 Mon Sep 17 00:00:00 2001
From: mruddy <[email protected]>
Date: Sat, 30 Jun 2018 09:57:18 -0400
Subject: [PATCH] disable pthread_set_name_np

pthread_set_name_np adds a Glibc requirement on >= 2.12.
---
src/thread.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/thread.cpp b/src/thread.cpp
index a1086b0c..9943f354 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -308,7 +308,7 @@ void zmq::thread_t::setThreadName (const char *name_)
*/
if (!name_)
return;
-
+#if 0
#if defined(ZMQ_HAVE_PTHREAD_SETNAME_1)
int rc = pthread_setname_np (name_);
if (rc)
@@ -324,6 +324,8 @@ void zmq::thread_t::setThreadName (const char *name_)
#elif defined(ZMQ_HAVE_PTHREAD_SET_NAME)
pthread_set_name_np (_descriptor, name_);
#endif
+#endif
+ return;
}

#endif
--
2.17.1

7 changes: 7 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ QT_TS = \

QT_FORMS_UI = \
qt/forms/addressbookpage.ui \
qt/forms/addressconverter.ui \
qt/forms/addmilestonedialog.ui \
qt/forms/askpassphrasedialog.ui \
qt/forms/coincontroldialog.ui \
Expand Down Expand Up @@ -130,6 +131,7 @@ QT_FORMS_UI = \

QT_MOC_CPP = \
qt/moc_addressbookpage.cpp \
qt/moc_addressconverter.cpp \
qt/moc_addmilestonedialog.cpp \
qt/moc_addresstablemodel.cpp \
qt/moc_askpassphrasedialog.cpp \
Expand Down Expand Up @@ -178,6 +180,7 @@ QT_MOC_CPP = \
qt/moc_smartproposaltab.cpp \
qt/moc_splashscreen.cpp \
qt/moc_specialtransactiondialog.cpp \
qt/moc_timelocksettingswidget.cpp \
qt/moc_trafficgraphwidget.cpp \
qt/moc_transactiondesc.cpp \
qt/moc_transactiondescdialog.cpp \
Expand Down Expand Up @@ -214,6 +217,7 @@ PROTOBUF_PROTO = qt/paymentrequest.proto

BITCOIN_QT_H = \
qt/addressbookpage.h \
qt/addressconverter.h \
qt/addmilestonedialog.h \
qt/addresstablemodel.h \
qt/askpassphrasedialog.h \
Expand Down Expand Up @@ -266,6 +270,7 @@ BITCOIN_QT_H = \
qt/smartproposaltab.h \
qt/splashscreen.h \
qt/specialtransactiondialog.h \
qt/timelocksettingswidget.h \
qt/trafficgraphdata.h \
qt/trafficgraphwidget.h \
qt/transactiondesc.h \
Expand Down Expand Up @@ -372,6 +377,7 @@ BITCOIN_QT_WINDOWS_CPP = qt/winshutdownmonitor.cpp

BITCOIN_QT_WALLET_CPP = \
qt/addressbookpage.cpp \
qt/addressconverter.cpp \
qt/addmilestonedialog.cpp \
qt/addresstablemodel.cpp \
qt/askpassphrasedialog.cpp \
Expand Down Expand Up @@ -401,6 +407,7 @@ BITCOIN_QT_WALLET_CPP = \
qt/smartvotingmanager.cpp \
qt/smartproposaltab.cpp \
qt/specialtransactiondialog.cpp \
qt/timelocksettingswidget.cpp \
qt/transactiondesc.cpp \
qt/transactiondescdialog.cpp \
qt/transactionfilterproxy.cpp \
Expand Down
Loading

0 comments on commit 2076361

Please sign in to comment.