summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Reiner2018-02-03 23:20:08 +0000
committerWalter Reiner2018-02-03 23:20:08 +0000
commita06651608f5dc448863ea29861bb47f52ddb8dc5 (patch)
tree75d0e677037c6a067903a293c2e3a3461cf38c91
downloadaur-a06651608f5dc448863ea29861bb47f52ddb8dc5.tar.gz
Initial commit
Upstream has a few problems building with GCC 7.2.1 so fixes for that are included. Please be aware that the standard binaries have different names after installing to prevent interferences with other coin software.
-rw-r--r--.SRCINFO19
-rw-r--r--0001-Various-fixes-for-building-with-gcc-7.2.1.patch291
-rw-r--r--PKGBUILD42
-rw-r--r--turtlecoin-git.install15
4 files changed, 367 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d88d67d4d00f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = turtlecoin-git
+ pkgdesc = Turtlecoin simplewallet and miner
+ pkgver = r110.1913ba5
+ pkgrel = 1
+ url = https://turtlecoin.lol
+ install = turtlecoin-git.install
+ arch = x86_64
+ license = custom
+ makedepends = git
+ makedepends = cmake
+ depends = boost-libs
+ depends = boost
+ source = git+https://github.com/turtlecoin/turtlecoin.git
+ source = 0001-Various-fixes-for-building-with-gcc-7.2.1.patch
+ sha256sums = SKIP
+ sha256sums = dd9a54526e68bf40460f7ae341cd1ae5e5d841efe0ec1935b40714863c6598ca
+
+pkgname = turtlecoin-git
+
diff --git a/0001-Various-fixes-for-building-with-gcc-7.2.1.patch b/0001-Various-fixes-for-building-with-gcc-7.2.1.patch
new file mode 100644
index 000000000000..503bdc42a8d1
--- /dev/null
+++ b/0001-Various-fixes-for-building-with-gcc-7.2.1.patch
@@ -0,0 +1,291 @@
+From 1913ba5d8941206c7f5a2d555ae3e0b41d6c9296 Mon Sep 17 00:00:00 2001
+From: Walter Reiner <walter.reiner@wreiner.at>
+Date: Sat, 3 Feb 2018 21:35:57 +0000
+Subject: [PATCH] Various fixes for building with gcc 7.2.1
+
+Fix from Intense Coin project for -Werror=stringop-overflow error: https://github.com/valiant1x/intensecoin/issues/10#issuecomment-355038612
+Fix from rocksdb upstream for missing includes: https://github.com/facebook/rocksdb/commit/816c1e30ca73615c75fc208ddcc4b05012b30951.diff
+Dirty fix from Ceph project for build error when jemalloc is present: https://www.spinics.net/lists/ceph-devel/msg31819.html
+---
+ CMakeLists.txt | 2 +-
+ external/rocksdb/db/db_impl.cc | 2 +-
+ external/rocksdb/db/db_iterator_test.cc | 2 ++
+ external/rocksdb/db/file_indexer.cc | 2 ++
+ external/rocksdb/db/version_builder.cc | 1 +
+ external/rocksdb/db/write_callback_test.cc | 1 +
+ external/rocksdb/include/rocksdb/env.h | 1 +
+ external/rocksdb/java/rocksjni/portal.h | 1 +
+ external/rocksdb/java/rocksjni/rocksjni.cc | 1 +
+ external/rocksdb/tools/ldb_cmd.cc | 1 +
+ external/rocksdb/util/dynamic_bloom_test.cc | 1 +
+ external/rocksdb/util/fault_injection_test_env.cc | 1 +
+ external/rocksdb/util/sync_point.cc | 1 +
+ external/rocksdb/util/thread_local.h | 1 +
+ external/rocksdb/util/xfunc.h | 1 +
+ external/rocksdb/utilities/backupable/backupable_db.cc | 1 +
+ external/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc | 1 +
+ external/rocksdb/utilities/persistent_cache/hash_table_evictable.h | 1 +
+ external/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc | 1 +
+ external/rocksdb/utilities/transactions/optimistic_transaction_test.cc | 1 +
+ external/rocksdb/utilities/transactions/transaction_test.cc | 1 +
+ 21 files changed, 23 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e727d64..fe34f2d 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,7 +53,7 @@ else()
+ else()
+ set(ARCH_FLAG "-march=${ARCH}")
+ endif()
+- set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=unused-function -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-error=unused-result")
++ set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=unused-function -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-error=unused-result")
+ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ set(WARNINGS "${WARNINGS} -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration -Wno-error=unused-function -Wno-error=missing-braces")
+ else()
+diff --git a/external/rocksdb/db/db_impl.cc b/external/rocksdb/db/db_impl.cc
+index f750ef8..727b451 100755
+--- a/external/rocksdb/db/db_impl.cc
++++ b/external/rocksdb/db/db_impl.cc
+@@ -592,7 +592,7 @@ static void DumpMallocStats(std::string* stats) {
+ std::unique_ptr<char> buf{new char[kMallocStatusLen + 1]};
+ mstat.cur = buf.get();
+ mstat.end = buf.get() + kMallocStatusLen;
+- malloc_stats_print(GetJemallocStatus, &mstat, "");
++ //malloc_stats_print(GetJemallocStatus, &mstat, "");
+ stats->append(buf.get());
+ #endif // ROCKSDB_JEMALLOC
+ }
+diff --git a/external/rocksdb/db/db_iterator_test.cc b/external/rocksdb/db/db_iterator_test.cc
+index a971835..069eab6 100755
+--- a/external/rocksdb/db/db_iterator_test.cc
++++ b/external/rocksdb/db/db_iterator_test.cc
+@@ -7,6 +7,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
+
++#include <functional>
++
+ #include "db/db_test_util.h"
+ #include "port/stack_trace.h"
+ #include "rocksdb/iostats_context.h"
+diff --git a/external/rocksdb/db/file_indexer.cc b/external/rocksdb/db/file_indexer.cc
+index 9b31c2b..dc614a8 100755
+--- a/external/rocksdb/db/file_indexer.cc
++++ b/external/rocksdb/db/file_indexer.cc
+@@ -7,6 +7,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
+
++#include <functional>
++
+ #include "db/file_indexer.h"
+ #include <algorithm>
+ #include "rocksdb/comparator.h"
+diff --git a/external/rocksdb/db/version_builder.cc b/external/rocksdb/db/version_builder.cc
+index 2837686..d4c9c2f 100755
+--- a/external/rocksdb/db/version_builder.cc
++++ b/external/rocksdb/db/version_builder.cc
+@@ -13,6 +13,7 @@
+ #define __STDC_FORMAT_MACROS
+ #endif
+
++#include <functional>
+ #include <inttypes.h>
+ #include <algorithm>
+ #include <atomic>
+diff --git a/external/rocksdb/db/write_callback_test.cc b/external/rocksdb/db/write_callback_test.cc
+index 33aaab7..8e167b4 100755
+--- a/external/rocksdb/db/write_callback_test.cc
++++ b/external/rocksdb/db/write_callback_test.cc
+@@ -5,6 +5,7 @@
+
+ #ifndef ROCKSDB_LITE
+
++#include <functional>
+ #include <string>
+ #include <utility>
+ #include <vector>
+diff --git a/external/rocksdb/include/rocksdb/env.h b/external/rocksdb/include/rocksdb/env.h
+index 2d33da2..57212d0 100755
+--- a/external/rocksdb/include/rocksdb/env.h
++++ b/external/rocksdb/include/rocksdb/env.h
+@@ -21,6 +21,7 @@
+ #include <cstdarg>
+ #include <limits>
+ #include <memory>
++#include <functional>
+ #include <string>
+ #include <vector>
+ #include "rocksdb/status.h"
+diff --git a/external/rocksdb/java/rocksjni/portal.h b/external/rocksdb/java/rocksjni/portal.h
+index 4d7e502..e12a9ee 100755
+--- a/external/rocksdb/java/rocksjni/portal.h
++++ b/external/rocksdb/java/rocksjni/portal.h
+@@ -11,6 +11,7 @@
+ #define JAVA_ROCKSJNI_PORTAL_H_
+
+ #include <jni.h>
++#include <functional>
+ #include <limits>
+ #include <string>
+ #include <vector>
+diff --git a/external/rocksdb/java/rocksjni/rocksjni.cc b/external/rocksdb/java/rocksjni/rocksjni.cc
+index 4c68178..6712083 100755
+--- a/external/rocksdb/java/rocksjni/rocksjni.cc
++++ b/external/rocksdb/java/rocksjni/rocksjni.cc
+@@ -9,6 +9,7 @@
+ #include <jni.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <functional>
+ #include <memory>
+ #include <string>
+ #include <tuple>
+diff --git a/external/rocksdb/tools/ldb_cmd.cc b/external/rocksdb/tools/ldb_cmd.cc
+index b56eb4c..66ae9dd 100755
+--- a/external/rocksdb/tools/ldb_cmd.cc
++++ b/external/rocksdb/tools/ldb_cmd.cc
+@@ -40,6 +40,7 @@
+ #include <stdexcept>
+ #include <string>
+ #include <fstream>
++#include <functional>
+
+ namespace rocksdb {
+
+diff --git a/external/rocksdb/util/dynamic_bloom_test.cc b/external/rocksdb/util/dynamic_bloom_test.cc
+index 5b8ec74..0886f79 100755
+--- a/external/rocksdb/util/dynamic_bloom_test.cc
++++ b/external/rocksdb/util/dynamic_bloom_test.cc
+@@ -21,6 +21,7 @@ int main() {
+ #include <memory>
+ #include <thread>
+ #include <vector>
++#include <functional>
+ #include <gflags/gflags.h>
+
+ #include "dynamic_bloom.h"
+diff --git a/external/rocksdb/util/fault_injection_test_env.cc b/external/rocksdb/util/fault_injection_test_env.cc
+index 9898a0d..2123a5c 100755
+--- a/external/rocksdb/util/fault_injection_test_env.cc
++++ b/external/rocksdb/util/fault_injection_test_env.cc
+@@ -13,6 +13,7 @@
+
+ #include "util/fault_injection_test_env.h"
+ #include <utility>
++#include <functional>
+
+ namespace rocksdb {
+
+diff --git a/external/rocksdb/util/sync_point.cc b/external/rocksdb/util/sync_point.cc
+index 2aba000..f0d84bd 100755
+--- a/external/rocksdb/util/sync_point.cc
++++ b/external/rocksdb/util/sync_point.cc
+@@ -5,6 +5,7 @@
+
+ #include "util/sync_point.h"
+ #include <thread>
++#include <functional>
+ #include "port/port.h"
+ #include "util/random.h"
+
+diff --git a/external/rocksdb/util/thread_local.h b/external/rocksdb/util/thread_local.h
+index 08eabd0..de31018 100755
+--- a/external/rocksdb/util/thread_local.h
++++ b/external/rocksdb/util/thread_local.h
+@@ -9,6 +9,7 @@
+
+ #pragma once
+
++#include <functional>
+ #include <atomic>
+ #include <memory>
+ #include <unordered_map>
+diff --git a/external/rocksdb/util/xfunc.h b/external/rocksdb/util/xfunc.h
+index e19a03f..7c6482c 100755
+--- a/external/rocksdb/util/xfunc.h
++++ b/external/rocksdb/util/xfunc.h
+@@ -4,6 +4,7 @@
+ // of patent rights can be found in the PATENTS file in the same directory.
+ #pragma once
+
++#include <functional>
+ #include <cstdlib>
+ #include <string>
+
+diff --git a/external/rocksdb/utilities/backupable/backupable_db.cc b/external/rocksdb/utilities/backupable/backupable_db.cc
+index fb2a68b..67cde26 100755
+--- a/external/rocksdb/utilities/backupable/backupable_db.cc
++++ b/external/rocksdb/utilities/backupable/backupable_db.cc
+@@ -26,6 +26,7 @@
+ #define __STDC_FORMAT_MACROS
+ #endif // __STDC_FORMAT_MACROS
+
++#include <functional>
+ #include <inttypes.h>
+ #include <stdlib.h>
+ #include <algorithm>
+diff --git a/external/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc b/external/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc
+index ef77252..99ffb7b 100755
+--- a/external/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc
++++ b/external/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc
+@@ -6,6 +6,7 @@
+
+ #include "utilities/persistent_cache/block_cache_tier_file.h"
+
++#include <functional>
+ #include <unistd.h>
+ #include <memory>
+ #include <vector>
+diff --git a/external/rocksdb/utilities/persistent_cache/hash_table_evictable.h b/external/rocksdb/utilities/persistent_cache/hash_table_evictable.h
+index da13c0e..4fd97e2 100755
+--- a/external/rocksdb/utilities/persistent_cache/hash_table_evictable.h
++++ b/external/rocksdb/utilities/persistent_cache/hash_table_evictable.h
+@@ -7,6 +7,7 @@
+
+ #ifndef ROCKSDB_LITE
+
++#include <functional>
+ #include "util/random.h"
+ #include "utilities/persistent_cache/hash_table.h"
+ #include "utilities/persistent_cache/lrulist.h"
+diff --git a/external/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc b/external/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc
+index aca9fca..87dbd37 100755
+--- a/external/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc
++++ b/external/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc
+@@ -7,6 +7,7 @@
+
+ #include "utilities/persistent_cache/volatile_tier_impl.h"
+
++#include <functional>
+ #include <string>
+
+ namespace rocksdb {
+diff --git a/external/rocksdb/utilities/transactions/optimistic_transaction_test.cc b/external/rocksdb/utilities/transactions/optimistic_transaction_test.cc
+index fd90f24..2ce0c24 100755
+--- a/external/rocksdb/utilities/transactions/optimistic_transaction_test.cc
++++ b/external/rocksdb/utilities/transactions/optimistic_transaction_test.cc
+@@ -5,6 +5,7 @@
+
+ #ifndef ROCKSDB_LITE
+
++#include <functional>
+ #include <string>
+ #include <thread>
+
+diff --git a/external/rocksdb/utilities/transactions/transaction_test.cc b/external/rocksdb/utilities/transactions/transaction_test.cc
+index 5d8e40c..9966649 100755
+--- a/external/rocksdb/utilities/transactions/transaction_test.cc
++++ b/external/rocksdb/utilities/transactions/transaction_test.cc
+@@ -5,6 +5,7 @@
+
+ #ifndef ROCKSDB_LITE
+
++#include <functional>
+ #include <string>
+ #include <thread>
+
+--
+2.16.1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3be5c585720a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+pkgname=turtlecoin-git
+pkgver=r110.1913ba5
+pkgrel=1
+pkgdesc="Turtlecoin simplewallet and miner"
+arch=('x86_64')
+url="https://turtlecoin.lol"
+license=('custom')
+install="${pkgname}.install"
+makedepends=('git' 'cmake')
+depends=('boost-libs' 'boost')
+source=('git+https://github.com/turtlecoin/turtlecoin.git' '0001-Various-fixes-for-building-with-gcc-7.2.1.patch')
+sha256sums=('SKIP' 'dd9a54526e68bf40460f7ae341cd1ae5e5d841efe0ec1935b40714863c6598ca')
+
+pkgver() {
+ cd "$srcdir/turtlecoin"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare()
+{
+ cd "$srcdir/turtlecoin"
+ git apply ../../0001-Various-fixes-for-building-with-gcc-7.2.1.patch
+}
+
+build() {
+ cd "$srcdir/turtlecoin"
+ mkdir -p build/release
+ cd build/release
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-fassociative-math" -DCMAKE_CXX_FLAGS="-fassociative-math" ../..
+ make
+}
+
+package() {
+ install -D -m755 "$srcdir/turtlecoin/build/release/src/connectivity_tool" -T "$pkgdir/usr/bin/TC-connectivity_tool"
+ install -D -m755 "$srcdir/turtlecoin/build/release/src/miner" -T "$pkgdir/usr/bin/TC-miner"
+ install -D -m755 "$srcdir/turtlecoin/build/release/src/simplewallet" -T "$pkgdir/usr/bin/TC-simplewallet"
+ install -D -m755 "$srcdir/turtlecoin/build/release/src/TurtleCoind" -t "$pkgdir/usr/bin/"
+ install -D -m755 "$srcdir/turtlecoin/build/release/src/walletd" -T "$pkgdir/usr/bin/TC-walletd"
+}
diff --git a/turtlecoin-git.install b/turtlecoin-git.install
new file mode 100644
index 000000000000..ec118d4564f1
--- /dev/null
+++ b/turtlecoin-git.install
@@ -0,0 +1,15 @@
+binary_message() {
+ echo "To prevent problems with software of other coins the binaries for this package are as follows:"
+ echo " connectivity_tool => TC-connectivity_tool"
+ echo " miner => TC-miner"
+ echo " simplewallet => TC-simplewallet"
+ echo " walletd => TC-walletd"
+ echo
+}
+post_install() {
+ binary_message
+}
+
+post_upgrade() {
+ binary_message
+}