1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

net-p2p/litecoin: Update to 0.10.2.2

While here, clean up and add a litecoin-utils port

PR:		201154
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
This commit is contained in:
Steve Wills 2015-08-05 13:21:53 +00:00
parent d69c2fb4f3
commit 1c9720f21c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=393586
10 changed files with 155 additions and 143 deletions

View File

@ -48,6 +48,7 @@
SUBDIR += linuxdcpp
SUBDIR += litecoin
SUBDIR += litecoin-daemon
SUBDIR += litecoin-utils
SUBDIR += lopster
SUBDIR += microdc2
SUBDIR += minder

View File

@ -1,9 +1,27 @@
# $FreeBSD$
PKGNAMESUFFIX= -daemon
COMMENT= Virtual Peer-to-Peer Currency Software
MASTERDIR= ${.CURDIR}/../litecoin
DESCR= ${MASTERDIR}/pkg-descr
PKGNAMESUFFIX= -daemon
COMMENT= Virtual Peer-to-Peer Currency (Daemon)
SLAVE_PORT= yes
OPTIONS_EXCLUDE= X11 DBUS QRCODES
USES+= cpe
CPE_VENDOR= bitcoin
CPE_PRODUCT= bitcoind
CPE_VERSION= ${PORTVERSION:R}
OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET
OPTIONS_DEFAULT= HARDENING WALLET
CONFIGURE_ARGS= --with-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--without-utils \
--disable-reduce-exports
PLIST_FILES= bin/litecoind
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,23 @@
# $FreeBSD$
MASTERDIR= ${.CURDIR}/../litecoin
PKGNAMESUFFIX= -utils
COMMENT= Virtual Peer-to-Peer Currency (CLI and Utilities)
SLAVE_PORT= yes
OPTIONS_DEFINE= DEBUG HARDENING TESTS
OPTIONS_DEFAULT= HARDENING TESTS
CONFIGURE_ARGS= --without-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--with-utils \
--disable-wallet \
--disable-reduce-exports
PLIST_FILES= bin/litecoin-cli bin/litecoin-tx
.include "${MASTERDIR}/Makefile"

View File

@ -2,110 +2,110 @@
# $FreeBSD$
PORTNAME= litecoin
PORTVERSION= 0.8.6.2
PORTVERSION= 0.10.2.2
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= net-p2p finance
MASTER_SITES= LOCAL/swills
MAINTAINER= swills@FreeBSD.org
COMMENT= Virtual Peer-to-Peer Currency Software
COMMENT?= Virtual Peer-to-Peer Currency Client (QT)
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libboost_date_time.so:${PORTSDIR}/devel/boost-libs
USES+= autoreconf gmake libtool pkgconfig shebangfix
SHEBANG_FILES= src/test/*.py
USE_GITHUB= yes
USE_OPENSSL= yes
GNU_CONFIGURE= yes
SLAVE_PORT?= no
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
USES+= cpe desktop-file-utils
USE_QT4= corelib gui moc_build linguisttools_build network qmake_build \
rcc_build uic_build
CPE_VENDOR= bitcoin
CPE_PRODUCT= bitcoin-qt
CPE_VERSION= ${PORTVERSION:R}
BUILD_DEPENDS+= protoc:${PORTSDIR}/devel/protobuf
LIB_DEPENDS+= libprotobuf.so:${PORTSDIR}/devel/protobuf
DBUS_USE= QT4=dbus
TESTS_USE= QT4=testlib
TESTS_PLIST_FILES= %%QT_BINDIR%%/test_litecoin-qt
.endif
OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET
OPTIONS_DEFAULT?= HARDENING QRCODES WALLET
OPTIONS_SUB= yes
HARDENING_DESC= Attempt to harden binaries (PIE for ASLR, NX Stack)
QRCODES_DESC= Display QR Codes
TESTS_DESC= Build test binary and unit tests
WALLET_DESC= Wallet Management Support
DBUS_CONFIGURE_WITH= qtdbus
DEBUG_CONFIGURE_ENABLE= debug
DEBUG_INSTALL_TARGET_OFF= install-strip
HARDENING_CONFIGURE_ENABLE= hardening
TESTS_CONFIGURE_ENABLE= tests
TESTS_PLIST_FILES+= bin/test_litecoin
UPNP_CONFIGURE_WITH= miniupnpc
UPNP_LIB_DEPENDS= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
UPNP_CPPFLAGS= -I${LOCALBASE}/include
UPNP_LIBS= -L${LOCALBASE}/lib
QRCODES_CONFIGURE_WITH= qrencode
QRCODES_LIB_DEPENDS= libqrencode.so:${PORTSDIR}/graphics/libqrencode
WALLET_CONFIGURE_ENABLE= wallet
WALLET_CXXFLAGS= -I${BDB_INCLUDE_DIR}
WALLET_LIBS= -L${BDB_LIB_DIR}
WALLET_USE= BDB=48
GH_ACCOUNT= litecoin-project
USE_OPENSSL= yes
USE_BDB= yes
WANT_BDB_VER= 48
CONFIGURE_ARGS?= --without-libs \
--disable-reduce-exports \
--with-gui \
--without-daemon \
--without-utils
USES= gmake
CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl"
OPTIONS_DEFINE= X11 UPNP QRCODES DBUS
OPTIONS_DEFAULT= X11 QRCODES
PLIST_FILES?= bin/litecoin-qt share/applications/litecoin-qt.desktop \
share/pixmaps/litecoin128.png
UPNP_DESC= Build with UPNP support
QRCODES_DESC= Build with QR code display
DBUS_DESC= Build with DBUS support
CXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
CXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR}
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MUPNP}
LIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
QMAKE_USE_UPNP= 1
.else
QMAKE_USE_UPNP= -
.endif
.if ${PORT_OPTIONS:MX11}
USE_QT4= network gui qmake_build linguist_build uic_build moc_build rcc_build
BINARY= litecoin-qt
.else
BINARY= litecoind
MAKEFILE= makefile.unix
ALL_TARGET= ${BINARY}
MAKE_ARGS+= -C ${WRKSRC}/src USE_UPNP=${QMAKE_USE_UPNP}
.endif
PLIST_FILES= bin/${BINARY}
.if ${PORT_OPTIONS:MX11} && ${PORT_OPTIONS:MQRCODES}
LIB_DEPENDS+= libqrencode.so:${PORTSDIR}/graphics/libqrencode
QMAKE_USE_QRCODE=1
.else
QMAKE_USE_QRCODE=0
.endif
.if ${PORT_OPTIONS:MDBUS}
USE_QT4+= dbus
QMAKE_USE_DBUS= 1
.else
QMAKE_USE_DBUS= 0
.endif
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MX11}
PLIST_FILES+= share/applications/litecoin-qt.desktop share/pixmaps/litecoin64.png
.endif
do-configure:
.if ${PORT_OPTIONS:MX11}
cd ${BUILD_WRKSRC} && \
${QMAKE} ${QMAKE_ARGS} \
QMAKE_LIBDIR+=${BDB_LIB_DIR} \
QMAKE_LRELEASE=${LRELEASE} \
USE_UPNP=${QMAKE_USE_UPNP} \
USE_QRCODE=${QMAKE_USE_QRCODE} \
USE_DBUS=${QMAKE_USE_DBUS} \
bitcoin-qt.pro
.endif
do-install:
.if ${PORT_OPTIONS:MX11}
${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/
${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \
-e 's,bitcoin,litecoin,g' \
-e 's,Bitcoin,Litecoin,g' \
-e 's,128,64,g' ${WRKSRC}/contrib/debian/bitcoin-qt.desktop
${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications/litecoin-qt.desktop
${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin64.png ${STAGEDIR}${PREFIX}/share/pixmaps/litecoin64.png
.else
${INSTALL_PROGRAM} ${WRKSRC}/src/${BINARY} ${STAGEDIR}${PREFIX}/bin/
.endif
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/makefile.unix
@${REINPLACE_CMD} -e 's|bitcoin128|litecoin128|' \
${WRKSRC}/contrib/debian/bitcoin-qt.desktop
post-install:
@${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \
${WRKSRC}/contrib/debian/bitcoin-qt.desktop
${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \
${STAGEDIR}${PREFIX}/share/applications/litecoin-qt.desktop
${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png \
${STAGEDIR}${PREFIX}/share/pixmaps/litecoin128.png
regression-test:
.if !${PORT_OPTIONS:MX11}
@${MAKE_CMD} -C ${WRKSRC}/src -f makefile.unix USE_UPNP=${QMAKE_USE_UPNP} test_litecoin
(cd ${WRKSRC}/src ; ./test_litecoin)
.endif
.include <bsd.port.post.mk>
regression-test: build
# To use this sucessfully, remove --without-daemon and --without-utils
# from CONFIGURE_ARGS above.
@cd ${WRKSRC} && ${GMAKE} check
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (litecoin-project-litecoin-v0.8.6.2_GH0.tar.gz) = 724d4729f869337a334a95f72acceca815531dcce906c92a76e7686a75235c97
SIZE (litecoin-project-litecoin-v0.8.6.2_GH0.tar.gz) = 4806593
SHA256 (litecoin-project-litecoin-v0.10.2.2_GH0.tar.gz) = 952c84b181323db17a8fa23217f59b576ad3ebad92c158b3a7c29d458a1130dc
SIZE (litecoin-project-litecoin-v0.10.2.2_GH0.tar.gz) = 4700783

View File

@ -1,11 +0,0 @@
--- ./bitcoin-qt.pro.orig 2014-01-10 01:38:53.000000000 +0000
+++ ./bitcoin-qt.pro 2014-02-09 05:45:03.127008564 +0000
@@ -431,7 +431,7 @@
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
# -lgdi32 has to happen after -lcrypto (see #681)
win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
-LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
+LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX -lboost_chrono$$BOOST_THREAD_LIB_SUFFIX
win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX

View File

@ -1,30 +0,0 @@
--- ./src/makefile.unix.orig 2014-01-10 01:38:53.000000000 +0000
+++ ./src/makefile.unix 2014-02-09 05:45:03.135007077 +0000
@@ -15,6 +15,11 @@
DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64
+BOOST_INCLUDE_PATH=/usr/local/include
+BDB_INCLUDE_PATH=/usr/local/include/db48
+BOOST_LIB_PATH=/usr/local/lib
+BDB_LIB_PATH=/usr/local/lib/db48
+
DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
@@ -38,6 +43,7 @@
-l boost_filesystem$(BOOST_LIB_SUFFIX) \
-l boost_program_options$(BOOST_LIB_SUFFIX) \
-l boost_thread$(BOOST_LIB_SUFFIX) \
+ -l boost_chrono$(BOOST_LIB_SUFFIX) \
-l db_cxx$(BDB_LIB_SUFFIX) \
-l ssl \
-l crypto
@@ -61,7 +67,6 @@
LIBS+= \
-Wl,-B$(LMODE2) \
-l z \
- -l dl \
-l pthread

View File

@ -1,13 +1,13 @@
--- ./src/scrypt.cpp.orig 2014-01-10 01:38:53.000000000 +0000
+++ ./src/scrypt.cpp 2014-02-09 05:45:03.131006405 +0000
@@ -33,6 +33,7 @@
--- src/crypto/scrypt.cpp.orig 2015-08-04 13:27:49 UTC
+++ src/crypto/scrypt.cpp
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
+#include <sys/endian.h>
#include <openssl/sha.h>
+#include <boost/lexical_cast.hpp>
#if defined(USE_SSE2) && !defined(USE_SSE2_ALWAYS)
#ifdef _MSC_VER
@@ -44,22 +45,6 @@
#endif
#endif

View File

@ -1,6 +1,6 @@
--- ./src/scrypt.h.orig 2014-01-10 01:38:53.000000000 +0000
+++ ./src/scrypt.h 2014-02-09 05:45:03.133009188 +0000
@@ -27,19 +27,4 @@
--- src/crypto/scrypt.h.orig 2015-06-15 08:51:30 UTC
+++ src/crypto/scrypt.h
@@ -27,19 +27,4 @@ void
PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);

View File

@ -0,0 +1,11 @@
--- src/leveldb/helpers/memenv/memenv.cc.orig 2015-07-10 17:23:55 UTC
+++ src/leveldb/helpers/memenv/memenv.cc
@@ -2,6 +2,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.
+#define __STDC_LIMIT_MACROS
+
#include "helpers/memenv/memenv.h"
#include "leveldb/env.h"