View | Details | Raw Unified | Return to bug 201154 | Differences between
and this patch

Collapse All | Expand All

(-)net-p2p/Makefile (+1 lines)
Lines 48-53 Link Here
48
    SUBDIR += linuxdcpp
48
    SUBDIR += linuxdcpp
49
    SUBDIR += litecoin
49
    SUBDIR += litecoin
50
    SUBDIR += litecoin-daemon
50
    SUBDIR += litecoin-daemon
51
    SUBDIR += litecoin-utils
51
    SUBDIR += lopster
52
    SUBDIR += lopster
52
    SUBDIR += microdc2
53
    SUBDIR += microdc2
53
    SUBDIR += minder
54
    SUBDIR += minder
(-)net-p2p/litecoin/Makefile (-77 / +77 lines)
Lines 2-111 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	litecoin
4
PORTNAME=	litecoin
5
PORTVERSION=	0.8.6.2
5
PORTVERSION=	0.10.2.2
6
DISTVERSIONPREFIX=	v
6
DISTVERSIONPREFIX=	v
7
PORTREVISION=	1
8
CATEGORIES=	net-p2p finance
7
CATEGORIES=	net-p2p finance
9
MASTER_SITES=	LOCAL/swills
8
MASTER_SITES=	LOCAL/swills
10
9
11
MAINTAINER=	swills@FreeBSD.org
10
MAINTAINER=	swills@FreeBSD.org
12
COMMENT=	Virtual Peer-to-Peer Currency Software
11
COMMENT?=	Virtual Peer-to-Peer Currency Client (QT)
13
12
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
14
LIB_DEPENDS=	libboost_date_time.so:${PORTSDIR}/devel/boost-libs
16
LIB_DEPENDS=	libboost_date_time.so:${PORTSDIR}/devel/boost-libs
15
17
18
USES+=		autoreconf gmake libtool pkgconfig shebangfix
19
SHEBANG_FILES=	src/test/*.py
16
USE_GITHUB=	yes
20
USE_GITHUB=	yes
17
GH_ACCOUNT=	litecoin-project
18
19
USE_OPENSSL=	yes
21
USE_OPENSSL=	yes
20
USE_BDB=	yes
22
GNU_CONFIGURE=	yes
21
WANT_BDB_VER=	48
22
23
23
USES=		gmake
24
SLAVE_PORT?=	no
24
25
25
OPTIONS_DEFINE=	X11 UPNP QRCODES DBUS
26
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
26
OPTIONS_DEFAULT=	X11 QRCODES
27
USES+=		cpe desktop-file-utils
28
USE_QT4=	corelib gui moc_build linguisttools_build network qmake_build \
29
		rcc_build uic_build
30
CPE_VENDOR=	bitcoin
31
CPE_PRODUCT=	bitcoin-qt
32
CPE_VERSION=	${PORTVERSION:R}
27
33
28
UPNP_DESC=	Build with UPNP support
34
BUILD_DEPENDS+=	protoc:${PORTSDIR}/devel/protobuf
29
QRCODES_DESC=	Build with QR code display
35
LIB_DEPENDS+=	libprotobuf.so:${PORTSDIR}/devel/protobuf
30
DBUS_DESC=	Build with DBUS support
31
36
32
CXXFLAGS+=	-I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
37
DBUS_USE=		QT4=dbus
33
CXXFLAGS+=	-L${LOCALBASE}/lib -L${BDB_LIB_DIR}
34
38
35
.include <bsd.port.options.mk>
39
TESTS_USE=		QT4=testlib
36
40
TESTS_PLIST_FILES=	%%QT_BINDIR%%/test_litecoin-qt
37
.if ${PORT_OPTIONS:MUPNP}
38
LIB_DEPENDS+=	libminiupnpc.so:${PORTSDIR}/net/miniupnpc
39
QMAKE_USE_UPNP=	1
40
.else
41
QMAKE_USE_UPNP=	-
42
.endif
41
.endif
43
42
44
.if ${PORT_OPTIONS:MX11}
43
OPTIONS_DEFINE?=	DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET
45
USE_QT4=	network gui qmake_build linguist_build uic_build moc_build rcc_build
44
OPTIONS_DEFAULT?=	HARDENING QRCODES WALLET
45
OPTIONS_SUB=		yes
46
46
47
BINARY=		litecoin-qt
47
HARDENING_DESC=	Attempt to harden binaries (PIE for ASLR, NX Stack)
48
.else
48
QRCODES_DESC=	Display QR Codes
49
BINARY=		litecoind
49
TESTS_DESC=	Build test binary and unit tests
50
MAKEFILE=	makefile.unix
50
WALLET_DESC=	Wallet Management Support
51
ALL_TARGET=	${BINARY}
52
MAKE_ARGS+=	-C ${WRKSRC}/src USE_UPNP=${QMAKE_USE_UPNP}
53
.endif
54
51
55
PLIST_FILES=	bin/${BINARY}
52
DBUS_CONFIGURE_WITH=	qtdbus
56
53
57
.if ${PORT_OPTIONS:MX11} && ${PORT_OPTIONS:MQRCODES}
54
DEBUG_CONFIGURE_ENABLE=		debug
58
LIB_DEPENDS+=	libqrencode.so:${PORTSDIR}/graphics/libqrencode
55
DEBUG_INSTALL_TARGET_OFF=	install-strip
59
QMAKE_USE_QRCODE=1
60
.else
61
QMAKE_USE_QRCODE=0
62
.endif
63
56
64
.if ${PORT_OPTIONS:MDBUS}
57
HARDENING_CONFIGURE_ENABLE=	hardening
65
USE_QT4+=	dbus
66
QMAKE_USE_DBUS=	1
67
.else
68
QMAKE_USE_DBUS=	0
69
.endif
70
58
71
.include <bsd.port.pre.mk>
59
TESTS_CONFIGURE_ENABLE=	tests
60
TESTS_PLIST_FILES+=	bin/test_litecoin
72
61
73
.if ${PORT_OPTIONS:MX11}
62
UPNP_CONFIGURE_WITH=	miniupnpc
74
PLIST_FILES+=	share/applications/litecoin-qt.desktop share/pixmaps/litecoin64.png
63
UPNP_LIB_DEPENDS=	libminiupnpc.so:${PORTSDIR}/net/miniupnpc
75
.endif
64
UPNP_CPPFLAGS=		-I${LOCALBASE}/include
65
UPNP_LIBS=		-L${LOCALBASE}/lib
76
66
77
do-configure:
67
QRCODES_CONFIGURE_WITH=	qrencode
78
.if ${PORT_OPTIONS:MX11}
68
QRCODES_LIB_DEPENDS=	libqrencode.so:${PORTSDIR}/graphics/libqrencode
79
	cd ${BUILD_WRKSRC} && \
80
		${QMAKE} ${QMAKE_ARGS} \
81
		QMAKE_LIBDIR+=${BDB_LIB_DIR} \
82
		QMAKE_LRELEASE=${LRELEASE} \
83
		USE_UPNP=${QMAKE_USE_UPNP} \
84
		USE_QRCODE=${QMAKE_USE_QRCODE} \
85
		USE_DBUS=${QMAKE_USE_DBUS} \
86
		bitcoin-qt.pro
87
.endif
88
69
89
do-install:
70
WALLET_CONFIGURE_ENABLE=	wallet
90
.if ${PORT_OPTIONS:MX11}
71
WALLET_CXXFLAGS=		-I${BDB_INCLUDE_DIR}
91
	${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/
72
WALLET_LIBS=			-L${BDB_LIB_DIR}
92
	${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \
73
WALLET_USE=			BDB=48
93
		-e 's,bitcoin,litecoin,g' \
94
		-e 's,Bitcoin,Litecoin,g' \
95
		-e 's,128,64,g' ${WRKSRC}/contrib/debian/bitcoin-qt.desktop
96
	${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications/litecoin-qt.desktop
97
	${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin64.png ${STAGEDIR}${PREFIX}/share/pixmaps/litecoin64.png
98
.else
99
	${INSTALL_PROGRAM} ${WRKSRC}/src/${BINARY} ${STAGEDIR}${PREFIX}/bin/
100
.endif
101
74
75
GH_ACCOUNT=	litecoin-project
76
77
CONFIGURE_ARGS?=	--without-libs \
78
			--disable-reduce-exports \
79
			--with-gui \
80
			--without-daemon \
81
			--without-utils
82
83
CONFIGURE_ENV=	CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
84
		SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl"
85
86
PLIST_FILES?=	bin/litecoin-qt share/applications/litecoin-qt.desktop \
87
		share/pixmaps/litecoin128.png
88
89
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
90
102
post-patch:
91
post-patch:
103
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/makefile.unix
92
	@${REINPLACE_CMD} -e 's|bitcoin128|litecoin128|' \
93
		${WRKSRC}/contrib/debian/bitcoin-qt.desktop
104
94
105
regression-test:
95
post-install:
106
.if !${PORT_OPTIONS:MX11}
96
	@${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \
107
	@${MAKE_CMD} -C ${WRKSRC}/src -f makefile.unix USE_UPNP=${QMAKE_USE_UPNP} test_litecoin
97
		${WRKSRC}/contrib/debian/bitcoin-qt.desktop
108
	(cd ${WRKSRC}/src ; ./test_litecoin)
98
	${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \
99
		${STAGEDIR}${PREFIX}/share/applications/litecoin-qt.desktop
100
	${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png \
101
		${STAGEDIR}${PREFIX}/share/pixmaps/litecoin128.png
102
109
.endif
103
.endif
110
104
111
.include <bsd.port.post.mk>
105
regression-test: build
106
	# To use this sucessfully, remove --without-daemon and --without-utils
107
	# from CONFIGURE_ARGS above.
108
109
	@cd ${WRKSRC} && ${GMAKE} check
110
111
.include <bsd.port.mk>
(-)net-p2p/litecoin/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (litecoin-project-litecoin-v0.8.6.2_GH0.tar.gz) = 724d4729f869337a334a95f72acceca815531dcce906c92a76e7686a75235c97
1
SHA256 (litecoin-project-litecoin-v0.10.2.2_GH0.tar.gz) = 952c84b181323db17a8fa23217f59b576ad3ebad92c158b3a7c29d458a1130dc
2
SIZE (litecoin-project-litecoin-v0.8.6.2_GH0.tar.gz) = 4806593
2
SIZE (litecoin-project-litecoin-v0.10.2.2_GH0.tar.gz) = 4700783
(-)net-p2p/litecoin/files/patch-bitcoin-qt.pro (-11 lines)
Lines 1-11 Link Here
1
--- ./bitcoin-qt.pro.orig	2014-01-10 01:38:53.000000000 +0000
2
+++ ./bitcoin-qt.pro	2014-02-09 05:45:03.127008564 +0000
3
@@ -431,7 +431,7 @@
4
 LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
5
 # -lgdi32 has to happen after -lcrypto (see  #681)
6
 win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
7
-LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
8
+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
9
 win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
10
 macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
11
 
(-)net-p2p/litecoin/files/patch-src__makefile.unix (-30 lines)
Lines 1-30 Link Here
1
--- ./src/makefile.unix.orig	2014-01-10 01:38:53.000000000 +0000
2
+++ ./src/makefile.unix	2014-02-09 05:45:03.135007077 +0000
3
@@ -15,6 +15,11 @@
4
 
5
 DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64
6
 
7
+BOOST_INCLUDE_PATH=/usr/local/include
8
+BDB_INCLUDE_PATH=/usr/local/include/db48
9
+BOOST_LIB_PATH=/usr/local/lib
10
+BDB_LIB_PATH=/usr/local/lib/db48
11
+
12
 DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
13
 LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
14
 
15
@@ -38,6 +43,7 @@
16
    -l boost_filesystem$(BOOST_LIB_SUFFIX) \
17
    -l boost_program_options$(BOOST_LIB_SUFFIX) \
18
    -l boost_thread$(BOOST_LIB_SUFFIX) \
19
+   -l boost_chrono$(BOOST_LIB_SUFFIX) \
20
    -l db_cxx$(BDB_LIB_SUFFIX) \
21
    -l ssl \
22
    -l crypto
23
@@ -61,7 +67,6 @@
24
 LIBS+= \
25
  -Wl,-B$(LMODE2) \
26
    -l z \
27
-   -l dl \
28
    -l pthread
29
 
30
 
(-)net-p2p/litecoin/files/patch-src__scrypt.cpp (-33 lines)
Lines 1-33 Link Here
1
--- ./src/scrypt.cpp.orig	2014-01-10 01:38:53.000000000 +0000
2
+++ ./src/scrypt.cpp	2014-02-09 05:45:03.131006405 +0000
3
@@ -33,6 +33,7 @@
4
 #include <stdint.h>
5
 #include <string.h>
6
 #include <openssl/sha.h>
7
+#include <boost/lexical_cast.hpp>
8
 
9
 #if defined(USE_SSE2) && !defined(USE_SSE2_ALWAYS)
10
 #ifdef _MSC_VER
11
@@ -44,22 +45,6 @@
12
 #endif
13
 #endif
14
 
15
-static inline uint32_t be32dec(const void *pp)
16
-{
17
-	const uint8_t *p = (uint8_t const *)pp;
18
-	return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
19
-	    ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
20
-}
21
-
22
-static inline void be32enc(void *pp, uint32_t x)
23
-{
24
-	uint8_t *p = (uint8_t *)pp;
25
-	p[3] = x & 0xff;
26
-	p[2] = (x >> 8) & 0xff;
27
-	p[1] = (x >> 16) & 0xff;
28
-	p[0] = (x >> 24) & 0xff;
29
-}
30
-
31
 typedef struct HMAC_SHA256Context {
32
 	SHA256_CTX ictx;
33
 	SHA256_CTX octx;
(-)net-p2p/litecoin/files/patch-src__scrypt.h (-22 lines)
Lines 1-22 Link Here
1
--- ./src/scrypt.h.orig	2014-01-10 01:38:53.000000000 +0000
2
+++ ./src/scrypt.h	2014-02-09 05:45:03.133009188 +0000
3
@@ -27,19 +27,4 @@
4
 PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
5
     size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);
6
 
7
-static inline uint32_t le32dec(const void *pp)
8
-{
9
-        const uint8_t *p = (uint8_t const *)pp;
10
-        return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
11
-            ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
12
-}
13
-
14
-static inline void le32enc(void *pp, uint32_t x)
15
-{
16
-        uint8_t *p = (uint8_t *)pp;
17
-        p[0] = x & 0xff;
18
-        p[1] = (x >> 8) & 0xff;
19
-        p[2] = (x >> 16) & 0xff;
20
-        p[3] = (x >> 24) & 0xff;
21
-}
22
 #endif
(-)net-p2p/litecoin/files/patch-src_crypto_scrypt.cpp (+33 lines)
Line 0 Link Here
1
--- src/crypto/scrypt.cpp.orig	2015-08-04 13:27:49 UTC
2
+++ src/crypto/scrypt.cpp
3
@@ -32,6 +32,7 @@
4
 #include <stdlib.h>
5
 #include <stdint.h>
6
 #include <string.h>
7
+#include <sys/endian.h>
8
 #include <openssl/sha.h>
9
 
10
 #if defined(USE_SSE2) && !defined(USE_SSE2_ALWAYS)
11
@@ -44,22 +45,6 @@
12
 #endif
13
 #endif
14
 
15
-static inline uint32_t be32dec(const void *pp)
16
-{
17
-	const uint8_t *p = (uint8_t const *)pp;
18
-	return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
19
-	    ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
20
-}
21
-
22
-static inline void be32enc(void *pp, uint32_t x)
23
-{
24
-	uint8_t *p = (uint8_t *)pp;
25
-	p[3] = x & 0xff;
26
-	p[2] = (x >> 8) & 0xff;
27
-	p[1] = (x >> 16) & 0xff;
28
-	p[0] = (x >> 24) & 0xff;
29
-}
30
-
31
 typedef struct HMAC_SHA256Context {
32
 	SHA256_CTX ictx;
33
 	SHA256_CTX octx;
(-)net-p2p/litecoin/files/patch-src_crypto_scrypt.h (+22 lines)
Line 0 Link Here
1
--- src/crypto/scrypt.h.orig	2015-06-15 08:51:30 UTC
2
+++ src/crypto/scrypt.h
3
@@ -27,19 +27,4 @@ void
4
 PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
5
     size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);
6
 
7
-static inline uint32_t le32dec(const void *pp)
8
-{
9
-        const uint8_t *p = (uint8_t const *)pp;
10
-        return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
11
-            ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
12
-}
13
-
14
-static inline void le32enc(void *pp, uint32_t x)
15
-{
16
-        uint8_t *p = (uint8_t *)pp;
17
-        p[0] = x & 0xff;
18
-        p[1] = (x >> 8) & 0xff;
19
-        p[2] = (x >> 16) & 0xff;
20
-        p[3] = (x >> 24) & 0xff;
21
-}
22
 #endif
(-)net-p2p/litecoin/files/patch-src_leveldb_helpers_memenv_memenv.cc (+11 lines)
Line 0 Link Here
1
--- src/leveldb/helpers/memenv/memenv.cc.orig	2015-07-10 17:23:55 UTC
2
+++ src/leveldb/helpers/memenv/memenv.cc
3
@@ -2,6 +2,8 @@
4
 // Use of this source code is governed by a BSD-style license that can be
5
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
6
 
7
+#define __STDC_LIMIT_MACROS
8
+
9
 #include "helpers/memenv/memenv.h"
10
 
11
 #include "leveldb/env.h"
(-)net-p2p/litecoin-daemon/Makefile (-4 / +22 lines)
Lines 1-9 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
MASTERDIR=	${.CURDIR}/../litecoin
3
PKGNAMESUFFIX=	-daemon
4
PKGNAMESUFFIX=	-daemon
4
COMMENT=	Virtual Peer-to-Peer Currency Software
5
5
MASTERDIR=	${.CURDIR}/../litecoin
6
COMMENT=	Virtual Peer-to-Peer Currency (Daemon)
6
DESCR=		${MASTERDIR}/pkg-descr
7
7
SLAVE_PORT=	yes
8
SLAVE_PORT=	yes
8
OPTIONS_EXCLUDE=	X11 DBUS QRCODES
9
10
USES+=		cpe
11
CPE_VENDOR=	bitcoin
12
CPE_PRODUCT=	bitcoind
13
CPE_VERSION=	${PORTVERSION:R}
14
15
OPTIONS_DEFINE=		DEBUG HARDENING TESTS UPNP WALLET
16
OPTIONS_DEFAULT=	HARDENING WALLET
17
18
CONFIGURE_ARGS=	--with-daemon \
19
		--without-gui \
20
		--without-libs \
21
		--without-qrencode \
22
		--without-utils \
23
		--disable-reduce-exports
24
25
PLIST_FILES=	bin/litecoind
26
9
.include "${MASTERDIR}/Makefile"
27
.include "${MASTERDIR}/Makefile"
(-)net-p2p/litecoin-utils/Makefile (+23 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
MASTERDIR=	${.CURDIR}/../litecoin
4
PKGNAMESUFFIX=	-utils
5
6
COMMENT=	Virtual Peer-to-Peer Currency (CLI and Utilities)
7
8
SLAVE_PORT=	yes
9
10
OPTIONS_DEFINE=		DEBUG HARDENING TESTS
11
OPTIONS_DEFAULT=	HARDENING TESTS
12
13
CONFIGURE_ARGS=	--without-daemon \
14
		--without-gui \
15
		--without-libs \
16
		--without-qrencode \
17
		--with-utils \
18
		--disable-wallet \
19
		--disable-reduce-exports
20
21
PLIST_FILES=	bin/litecoin-cli bin/litecoin-tx
22
23
.include "${MASTERDIR}/Makefile"

Return to bug 201154