diff options
author | Noel Kuntze | 2017-06-20 12:25:32 +0200 |
---|---|---|
committer | Noel Kuntze | 2017-06-20 12:25:32 +0200 |
commit | 035432e33961f2ef726b7dcf9e5c55251972d46e (patch) | |
tree | caa76a1ed8fd905a731c0a5cf841272808371dbf | |
parent | 8e8a73a5e98689db1ff5829fcb28c296c326472d (diff) | |
download | aur-035432e33961f2ef726b7dcf9e5c55251972d46e.tar.gz |
Apply patches from Debian, fix PKGBUILD for openssl-1.0, bump PKGREL
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | 0001-configure.ac_use_PIC.patch | 11 | ||||
-rw-r--r-- | 0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch | 524 | ||||
-rw-r--r-- | 0004-rename-RAND_egd.patch | 17 | ||||
-rw-r--r-- | PKGBUILD | 27 |
5 files changed, 583 insertions, 10 deletions
@@ -1,7 +1,9 @@ +# Generated by mksrcinfo v8 +# Tue Jun 20 10:25:17 UTC 2017 pkgbase = dogecoin-qt pkgdesc = Cryptocurrency pkgver = 1.10.0 - pkgrel = 1 + pkgrel = 2 url = http://dogecoin.com/ install = dogecoin.install arch = x86_64 @@ -20,12 +22,18 @@ pkgbase = dogecoin-qt depends = miniupnpc depends = boost-libs depends = protobuf - depends = openssl + depends = openssl-1.0 depends = db provides = dogecoin-qt source = https://github.com/dogecoin/dogecoin/archive/v1.10.0.tar.gz + source = 0001-configure.ac_use_PIC.patch + source = 0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch + source = 0004-rename-RAND_egd.patch source = dogecoin.desktop - sha256sums = 2c279a7ee425b3706ce635c74a27fd813ac3605a37f6f13e63775ec311f90f7c + sha256sums = e392f4142819fdab313ba921af53fdbd2cf6ee8965d237d0cb5cda8a52c97084 + sha256sums = 243ee3a86d91b408fad90f956a891c10958993ef170b4168444e09d78b8c0bac + sha256sums = 215cab9e24d2c5583370979e4a0a9b46ccc5f4595233bb1a6a2eb4586773efbb + sha256sums = 38e6a8cc94ab53901919c672ce1cf808c82cd2f32e6e5514fd4ecba94d0d26cc sha256sums = 04d41773462ad6609658e291d22b15cd8d58b8eb5e4391a80cd1dae75e7df0e6 pkgname = dogecoin-qt diff --git a/0001-configure.ac_use_PIC.patch b/0001-configure.ac_use_PIC.patch new file mode 100644 index 000000000000..fe9db0a2c4b2 --- /dev/null +++ b/0001-configure.ac_use_PIC.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -417,7 +417,7 @@ + + if test x$TARGET_OS != xwindows; then + # All windows code is PIC, forcing it on just adds useless compile warnings +- AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) ++ AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"]) + AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"]) + fi + diff --git a/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch b/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch new file mode 100644 index 000000000000..239f829eab92 --- /dev/null +++ b/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch @@ -0,0 +1,524 @@ +From 1a9b78f89d7999df16d5b114eea0b2645b5d19eb Mon Sep 17 00:00:00 2001 +From: Patrick Lodder <patrick.lodder@intellibiz.org> +Date: Sat, 13 Feb 2016 12:06:49 +0100 +Subject: [PATCH] rename libbitcoinconsensus to libdogecoinconsensus + +Changes all consensus library name tags from bitcoinconsensus +to dogecoinconsensus to prevent packagers from having to deal +with our shared library and headers having the same name as +Bitcoin's. + +Also changes all exported names to create incompatibility +between the two libraries, so that one cannot accidentally link +code for bitcoin consensus but instead get dogecoin consensus. +--- + .gitignore | 2 +- + Makefile.am | 2 +- + configure.ac | 2 +- + libbitcoinconsensus.pc.in | 11 ----- + libdogecoinconsensus.pc.in | 11 +++++ + src/Makefile.am | 20 ++++----- + src/script/bitcoinconsensus.cpp | 91 ---------------------------------------- + src/script/bitcoinconsensus.h | 68 ------------------------------ + src/script/dogecoinconsensus.cpp | 91 ++++++++++++++++++++++++++++++++++++++++ + src/script/dogecoinconsensus.h | 68 ++++++++++++++++++++++++++++++ + src/test/script_tests.cpp | 4 +- + 11 files changed, 185 insertions(+), 185 deletions(-) + delete mode 100644 libbitcoinconsensus.pc.in + create mode 100644 libdogecoinconsensus.pc.in + delete mode 100644 src/script/bitcoinconsensus.cpp + delete mode 100644 src/script/bitcoinconsensus.h + create mode 100644 src/script/dogecoinconsensus.cpp + create mode 100644 src/script/dogecoinconsensus.h + +diff --git a/.gitignore b/.gitignore +index a809323..a0a22be 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -112,4 +112,4 @@ qa/pull-tester/test.*/* + + /doc/doxygen/ + +-libbitcoinconsensus.pc ++libdogecoinconsensus.pc +diff --git a/Makefile.am b/Makefile.am +index 60d7b04..e7012e3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,7 +6,7 @@ GZIP_ENV="-9n" + + if BUILD_BITCOIN_LIBS + pkgconfigdir = $(libdir)/pkgconfig +-pkgconfig_DATA = libbitcoinconsensus.pc ++pkgconfig_DATA = libdogecoinconsensus.pc + endif + + BITCOIND_BIN=$(top_builddir)/src/dogecoind$(EXEEXT) +diff --git a/configure.ac b/configure.ac +index 5453481..1849ccf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -709,7 +709,7 @@ AC_MSG_CHECKING([whether to build libraries]) + AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes]) + if test x$build_bitcoin_libs = xyes; then + AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built]) +- AC_CONFIG_FILES([libbitcoinconsensus.pc:libbitcoinconsensus.pc.in]) ++ AC_CONFIG_FILES([libdogecoinconsensus.pc:libdogecoinconsensus.pc.in]) + fi + AC_MSG_RESULT($build_bitcoin_libs) + +diff --git a/libbitcoinconsensus.pc.in b/libbitcoinconsensus.pc.in +deleted file mode 100644 +index 3ca1696..0000000 +--- a/libbitcoinconsensus.pc.in ++++ /dev/null +@@ -1,11 +0,0 @@ +-prefix=@prefix@ +-exec_prefix=@exec_prefix@ +-libdir=@libdir@ +-includedir=@includedir@ +- +-Name: Bitcoin Core consensus library +-Description: Library for the Bitcoin consensus protocol. +-Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lbitcoinconsensus +-Cflags: -I${includedir} +-Requires.private: libcrypto +diff --git a/libdogecoinconsensus.pc.in b/libdogecoinconsensus.pc.in +new file mode 100644 +index 0000000..9b5e5d7 +--- /dev/null ++++ b/libdogecoinconsensus.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: Dogecoin Core consensus library ++Description: Library for the Dogecoin consensus protocol. ++Version: @PACKAGE_VERSION@ ++Libs: -L${libdir} -ldogecoinconsensus ++Cflags: -I${includedir} ++Requires.private: libcrypto +diff --git a/src/Makefile.am b/src/Makefile.am +index 53601a1..35f5a6d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -50,8 +50,8 @@ EXTRA_LIBRARIES += libbitcoin_wallet.a + endif + + if BUILD_BITCOIN_LIBS +-lib_LTLIBRARIES = libbitcoinconsensus.la +-LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la ++lib_LTLIBRARIES = libdogecoinconsensus.la ++LIBBITCOIN_CONSENSUS=libdogecoinconsensus.la + else + LIBBITCOIN_CONSENSUS= + endif +@@ -375,10 +375,10 @@ dogecoin_tx_LDADD = \ + dogecoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) + # + +-# bitcoinconsensus library # ++# dogecoinconsensus library # + if BUILD_BITCOIN_LIBS +-include_HEADERS = script/bitcoinconsensus.h +-libbitcoinconsensus_la_SOURCES = \ ++include_HEADERS = script/dogecoinconsensus.h ++libdogecoinconsensus_la_SOURCES = \ + crypto/hmac_sha512.cpp \ + crypto/ripemd160.cpp \ + crypto/scrypt.cpp \ +@@ -390,19 +390,19 @@ libbitcoinconsensus_la_SOURCES = \ + hash.cpp \ + primitives/transaction.cpp \ + pubkey.cpp \ +- script/bitcoinconsensus.cpp \ ++ script/dogecoinconsensus.cpp \ + script/interpreter.cpp \ + script/script.cpp \ + uint256.cpp \ + utilstrencodings.cpp + + if GLIBC_BACK_COMPAT +- libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp ++ libdogecoinconsensus_la_SOURCES += compat/glibc_compat.cpp + endif + +-libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS) +-libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS) +-libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL ++libdogecoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS) ++libdogecoinconsensus_la_LIBADD = $(CRYPTO_LIBS) ++libdogecoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL + + endif + # +diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp +deleted file mode 100644 +index b0d5faa..0000000 +--- a/src/script/bitcoinconsensus.cpp ++++ /dev/null +@@ -1,91 +0,0 @@ +-// Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2014 The Bitcoin Core developers +-// Distributed under the MIT software license, see the accompanying +-// file COPYING or http://www.opensource.org/licenses/mit-license.php. +- +-#include "bitcoinconsensus.h" +- +-#include "primitives/transaction.h" +-#include "script/interpreter.h" +-#include "version.h" +- +-namespace { +- +-/** A class that deserializes a single CTransaction one time. */ +-class TxInputStream +-{ +-public: +- TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) : +- m_type(nTypeIn), +- m_version(nVersionIn), +- m_data(txTo), +- m_remaining(txToLen) +- {} +- +- TxInputStream& read(char* pch, size_t nSize) +- { +- if (nSize > m_remaining) +- throw std::ios_base::failure(std::string(__func__) + ": end of data"); +- +- if (pch == NULL) +- throw std::ios_base::failure(std::string(__func__) + ": bad destination buffer"); +- +- if (m_data == NULL) +- throw std::ios_base::failure(std::string(__func__) + ": bad source buffer"); +- +- memcpy(pch, m_data, nSize); +- m_remaining -= nSize; +- m_data += nSize; +- return *this; +- } +- +- template<typename T> +- TxInputStream& operator>>(T& obj) +- { +- ::Unserialize(*this, obj, m_type, m_version); +- return *this; +- } +- +-private: +- const int m_type; +- const int m_version; +- const unsigned char* m_data; +- size_t m_remaining; +-}; +- +-inline int set_error(bitcoinconsensus_error* ret, bitcoinconsensus_error serror) +-{ +- if (ret) +- *ret = serror; +- return 0; +-} +- +-} // anon namespace +- +-int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, +- const unsigned char *txTo , unsigned int txToLen, +- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err) +-{ +- try { +- TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen); +- CTransaction tx; +- stream >> tx; +- if (nIn >= tx.vin.size()) +- return set_error(err, bitcoinconsensus_ERR_TX_INDEX); +- if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen) +- return set_error(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH); +- +- // Regardless of the verification result, the tx did not error. +- set_error(err, bitcoinconsensus_ERR_OK); +- +- return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn), NULL); +- } catch (const std::exception&) { +- return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing +- } +-} +- +-unsigned int bitcoinconsensus_version() +-{ +- // Just use the API version for now +- return BITCOINCONSENSUS_API_VER; +-} +diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h +deleted file mode 100644 +index 0320577..0000000 +--- a/src/script/bitcoinconsensus.h ++++ /dev/null +@@ -1,68 +0,0 @@ +-// Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2014 The Bitcoin Core developers +-// Distributed under the MIT software license, see the accompanying +-// file COPYING or http://www.opensource.org/licenses/mit-license.php. +- +-#ifndef BITCOIN_BITCOINCONSENSUS_H +-#define BITCOIN_BITCOINCONSENSUS_H +- +-#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H) +-#include "config/bitcoin-config.h" +- #if defined(_WIN32) +- #if defined(DLL_EXPORT) +- #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT) +- #define EXPORT_SYMBOL __declspec(dllexport) +- #else +- #define EXPORT_SYMBOL +- #endif +- #endif +- #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY) +- #define EXPORT_SYMBOL __attribute__ ((visibility ("default"))) +- #endif +-#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS) +- #define EXPORT_SYMBOL __declspec(dllimport) +-#endif +- +-#ifndef EXPORT_SYMBOL +- #define EXPORT_SYMBOL +-#endif +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-#define BITCOINCONSENSUS_API_VER 0 +- +-typedef enum bitcoinconsensus_error_t +-{ +- bitcoinconsensus_ERR_OK = 0, +- bitcoinconsensus_ERR_TX_INDEX, +- bitcoinconsensus_ERR_TX_SIZE_MISMATCH, +- bitcoinconsensus_ERR_TX_DESERIALIZE, +-} bitcoinconsensus_error; +- +-/** Script verification flags */ +-enum +-{ +- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, +- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts +- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance +-}; +- +-/// Returns 1 if the input nIn of the serialized transaction pointed to by +-/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under +-/// the additional constraints specified by flags. +-/// If not NULL, err will contain an error/success code for the operation +-EXPORT_SYMBOL int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, +- const unsigned char *txTo , unsigned int txToLen, +- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err); +- +-EXPORT_SYMBOL unsigned int bitcoinconsensus_version(); +- +-#ifdef __cplusplus +-} // extern "C" +-#endif +- +-#undef EXPORT_SYMBOL +- +-#endif // BITCOIN_BITCOINCONSENSUS_H +diff --git a/src/script/dogecoinconsensus.cpp b/src/script/dogecoinconsensus.cpp +new file mode 100644 +index 0000000..177b3dc +--- /dev/null ++++ b/src/script/dogecoinconsensus.cpp +@@ -0,0 +1,91 @@ ++// Copyright (c) 2009-2010 Satoshi Nakamoto ++// Copyright (c) 2009-2014 The Bitcoin Core developers ++// Distributed under the MIT software license, see the accompanying ++// file COPYING or http://www.opensource.org/licenses/mit-license.php. ++ ++#include "dogecoinconsensus.h" ++ ++#include "primitives/transaction.h" ++#include "script/interpreter.h" ++#include "version.h" ++ ++namespace { ++ ++/** A class that deserializes a single CTransaction one time. */ ++class TxInputStream ++{ ++public: ++ TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) : ++ m_type(nTypeIn), ++ m_version(nVersionIn), ++ m_data(txTo), ++ m_remaining(txToLen) ++ {} ++ ++ TxInputStream& read(char* pch, size_t nSize) ++ { ++ if (nSize > m_remaining) ++ throw std::ios_base::failure(std::string(__func__) + ": end of data"); ++ ++ if (pch == NULL) ++ throw std::ios_base::failure(std::string(__func__) + ": bad destination buffer"); ++ ++ if (m_data == NULL) ++ throw std::ios_base::failure(std::string(__func__) + ": bad source buffer"); ++ ++ memcpy(pch, m_data, nSize); ++ m_remaining -= nSize; ++ m_data += nSize; ++ return *this; ++ } ++ ++ template<typename T> ++ TxInputStream& operator>>(T& obj) ++ { ++ ::Unserialize(*this, obj, m_type, m_version); ++ return *this; ++ } ++ ++private: ++ const int m_type; ++ const int m_version; ++ const unsigned char* m_data; ++ size_t m_remaining; ++}; ++ ++inline int set_error(dogecoinconsensus_error* ret, dogecoinconsensus_error serror) ++{ ++ if (ret) ++ *ret = serror; ++ return 0; ++} ++ ++} // anon namespace ++ ++int dogecoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, ++ const unsigned char *txTo , unsigned int txToLen, ++ unsigned int nIn, unsigned int flags, dogecoinconsensus_error* err) ++{ ++ try { ++ TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen); ++ CTransaction tx; ++ stream >> tx; ++ if (nIn >= tx.vin.size()) ++ return set_error(err, dogecoinconsensus_ERR_TX_INDEX); ++ if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen) ++ return set_error(err, dogecoinconsensus_ERR_TX_SIZE_MISMATCH); ++ ++ // Regardless of the verification result, the tx did not error. ++ set_error(err, dogecoinconsensus_ERR_OK); ++ ++ return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn), NULL); ++ } catch (const std::exception&) { ++ return set_error(err, dogecoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing ++ } ++} ++ ++unsigned int dogecoinconsensus_version() ++{ ++ // Just use the API version for now ++ return DOGECOINCONSENSUS_API_VER; ++} +diff --git a/src/script/dogecoinconsensus.h b/src/script/dogecoinconsensus.h +new file mode 100644 +index 0000000..bcfdb3d +--- /dev/null ++++ b/src/script/dogecoinconsensus.h +@@ -0,0 +1,68 @@ ++// Copyright (c) 2009-2010 Satoshi Nakamoto ++// Copyright (c) 2009-2014 The Bitcoin Core developers ++// Distributed under the MIT software license, see the accompanying ++// file COPYING or http://www.opensource.org/licenses/mit-license.php. ++ ++#ifndef BITCOIN_BITCOINCONSENSUS_H ++#define BITCOIN_BITCOINCONSENSUS_H ++ ++#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H) ++#include "config/bitcoin-config.h" ++ #if defined(_WIN32) ++ #if defined(DLL_EXPORT) ++ #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT) ++ #define EXPORT_SYMBOL __declspec(dllexport) ++ #else ++ #define EXPORT_SYMBOL ++ #endif ++ #endif ++ #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY) ++ #define EXPORT_SYMBOL __attribute__ ((visibility ("default"))) ++ #endif ++#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS) ++ #define EXPORT_SYMBOL __declspec(dllimport) ++#endif ++ ++#ifndef EXPORT_SYMBOL ++ #define EXPORT_SYMBOL ++#endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define DOGECOINCONSENSUS_API_VER 0 ++ ++typedef enum dogecoinconsensus_error_t ++{ ++ dogecoinconsensus_ERR_OK = 0, ++ dogecoinconsensus_ERR_TX_INDEX, ++ dogecoinconsensus_ERR_TX_SIZE_MISMATCH, ++ dogecoinconsensus_ERR_TX_DESERIALIZE, ++} dogecoinconsensus_error; ++ ++/** Script verification flags */ ++enum ++{ ++ dogecoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, ++ dogecoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts ++ dogecoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance ++}; ++ ++/// Returns 1 if the input nIn of the serialized transaction pointed to by ++/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under ++/// the additional constraints specified by flags. ++/// If not NULL, err will contain an error/success code for the operation ++EXPORT_SYMBOL int dogecoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, ++ const unsigned char *txTo , unsigned int txToLen, ++ unsigned int nIn, unsigned int flags, dogecoinconsensus_error* err); ++ ++EXPORT_SYMBOL unsigned int dogecoinconsensus_version(); ++ ++#ifdef __cplusplus ++} // extern "C" ++#endif ++ ++#undef EXPORT_SYMBOL ++ ++#endif // BITCOIN_BITCOINCONSENSUS_H +diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp +index c0614cc..5ffa356 100644 +--- a/src/test/script_tests.cpp ++++ b/src/test/script_tests.cpp +@@ -16,7 +16,7 @@ + #include "test/test_bitcoin.h" + + #if defined(HAVE_CONSENSUS_LIB) +-#include "script/bitcoinconsensus.h" ++#include "script/dogecoinconsensus.h" + #endif + + #include <fstream> +@@ -99,7 +99,7 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bo + #if defined(HAVE_CONSENSUS_LIB) + CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + stream << tx2; +- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script(begin_ptr(scriptPubKey), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect,message); ++ BOOST_CHECK_MESSAGE(dogecoinconsensus_verify_script(begin_ptr(scriptPubKey), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect,message); + #endif + } + +-- +1.9.1 + diff --git a/0004-rename-RAND_egd.patch b/0004-rename-RAND_egd.patch new file mode 100644 index 000000000000..e366154ec436 --- /dev/null +++ b/0004-rename-RAND_egd.patch @@ -0,0 +1,17 @@ +--- dogecoin-1.10.4.orig/configure.ac ++++ dogecoin-1.10.4/configure.ac +@@ -679,14 +679,6 @@ + fi + fi + +-AC_CHECK_LIB([crypto],[RAND_egd],[],[ +- AC_ARG_WITH([libressl], +- [AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])], +- [AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])], +- [AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])] +- ) +-]) +- + CFLAGS_TEMP="$CFLAGS" + LIBS_TEMP="$LIBS" + CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS" @@ -5,29 +5,42 @@ pkgname=dogecoin-qt _binname=dogecoin pkgver=1.10.0 -pkgrel=1 +pkgrel=2 pkgdesc="Cryptocurrency" arch=('x86_64' 'i686') url="http://dogecoin.com/" license=('MIT') provides=('dogecoin-qt') -depends=('miniupnpc' 'boost-libs' 'protobuf' 'openssl' 'db') +depends=('miniupnpc' 'boost-libs' 'protobuf' 'openssl-1.0' 'db') makedepends=('boost' 'gcc' 'make' 'git' 'qt4' 'miniupnpc' 'boost-libs' 'protobuf' 'openssl' 'db') source=("https://github.com/dogecoin/dogecoin/archive/v${pkgver}.tar.gz" - "dogecoin.desktop" + "0001-configure.ac_use_PIC.patch" + "0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch" + "0004-rename-RAND_egd.patch" + "dogecoin.desktop" ) install=dogecoin.install -sha256sums=('2c279a7ee425b3706ce635c74a27fd813ac3605a37f6f13e63775ec311f90f7c' +sha256sums=('e392f4142819fdab313ba921af53fdbd2cf6ee8965d237d0cb5cda8a52c97084' + '243ee3a86d91b408fad90f956a891c10958993ef170b4168444e09d78b8c0bac' + '215cab9e24d2c5583370979e4a0a9b46ccc5f4595233bb1a6a2eb4586773efbb' + '38e6a8cc94ab53901919c672ce1cf808c82cd2f32e6e5514fd4ecba94d0d26cc' '04d41773462ad6609658e291d22b15cd8d58b8eb5e4391a80cd1dae75e7df0e6') +prepare() { + cd "${srcdir}/dogecoin-$pkgver/" + patch -p1 <"${srcdir}/0001-configure.ac_use_PIC.patch" + patch -p1 <"${srcdir}/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch" + patch -p1 <"${srcdir}/0004-rename-RAND_egd.patch" +} build() { cd "${srcdir}/dogecoin-$pkgver/" ./autogen.sh # --with-incompatible-bdb is needed, because dogecon-qt wants version 5.1, but Arch is already on 5.3 - ./configure QMAKE_CFLAGS_RELEASE="$CPPFLAGS $CFLAGS" QMAKE_CXXFLAGS_RELEASE="$CPPFLAGS $CXXFLAGS" \ + CFLAGS="-I/usr/include/openssl-1.0 $CFLAGS" CPPFLAGS="-I/usr/include/openssl-1.0 $CPPFLAGS" LDFLAGS=" -L/usr/lib/openssl-1.0 $LDFLAGS" \ + ./configure QMAKE_CFLAGS_RELEASE="$CPPFLAGS $CFLAGS" QMAKE_CXXFLAGS_RELEASE="$CPPFLAGS $CXXFLAGS" \ QMAKE_LFLAGS_RELEASE="$LDFLAGS" --with-incompatible-bdb --prefix=/usr \ --sbindir=/usr/bin --sysconfdir=/etc --libexecdir=/usr/lib @@ -35,8 +48,8 @@ build() { } package() { - install -Dm644 ${_binname}.desktop "${pkgdir}/usr/share/applications/${_binname}.desktop" - cd "$srcdir/dogecoin-$pkgver" + install -Dm644 "${srcdir}/${_binname}.desktop" "${pkgdir}/usr/share/applications/${_binname}.desktop" + cd "${srcdir}/dogecoin-${pkgver}/" mkdir -p -m 755 "${pkgdir}/usr/share/dogecoin-qt/" install -Dm644 share/pixmaps/bitcoin256.xpm "${pkgdir}/usr/share/pixmaps/dogecoin.xpm" make DESTDIR=${pkgdir} install |