-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from glemercier/1.3.xc
1.3.x
- Loading branch information
Showing
110 changed files
with
3,714 additions
and
2,507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
30
depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
35
depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.