Line 0
Link Here
|
|
|
1 |
# Created by: Shaun Amott <shaun@FreeBSD.org> |
2 |
# $FreeBSD$ |
3 |
|
4 |
PORTNAME= bitcoingold |
5 |
PORTVERSION= 0.15.0.2 |
6 |
DISTVERSIONPREFIX= v |
7 |
CATEGORIES= net-p2p finance |
8 |
|
9 |
MAINTAINER= milios@ccsys.com |
10 |
COMMENT?= Virtual Peer-to-Peer Currency Client (QT) |
11 |
|
12 |
LICENSE= MIT |
13 |
|
14 |
BROKEN_powerpc64= fails to compile: util.cpp: undefined reference to boost::program_options::to_internal |
15 |
|
16 |
LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \ |
17 |
libsodium.so:security/libsodium \ |
18 |
libevent.so:devel/libevent |
19 |
|
20 |
USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig shebangfix ssl |
21 |
USE_GITHUB= yes |
22 |
GNU_CONFIGURE= yes |
23 |
|
24 |
SLAVE_PORT?= no |
25 |
|
26 |
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no" |
27 |
USES+= desktop-file-utils |
28 |
USE_QT5= core gui network widgets \ |
29 |
buildtools_build linguisttools_build qmake_build |
30 |
|
31 |
BUILD_DEPENDS+= protoc:devel/protobuf |
32 |
LIB_DEPENDS+= libprotobuf.so:devel/protobuf |
33 |
|
34 |
TESTS_USE= QT5=testlib |
35 |
TESTS_PLIST_FILES= bin/test_bitcoingold-qt \ |
36 |
bin/test_bitcoingold |
37 |
.endif |
38 |
|
39 |
OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET ZMQ |
40 |
OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET |
41 |
OPTIONS_SUB= yes |
42 |
|
43 |
HARDENING_DESC= Attempt to harden binaries (PIE for ASLR, NX Stack) |
44 |
QRCODES_DESC= Display QR Codes |
45 |
TESTS_DESC= Build test binary and unit tests |
46 |
WALLET_DESC= Wallet Management Support |
47 |
ZMQ_DESC= Block and transaction broadcasting with ZeroMQ |
48 |
|
49 |
DBUS_CONFIGURE_WITH= dbus |
50 |
DBUS_USE= QT5=dbus |
51 |
|
52 |
DEBUG_CONFIGURE_ENABLE= debug |
53 |
DEBUG_INSTALL_TARGET_OFF= install-strip |
54 |
|
55 |
HARDENING_CONFIGURE_ENABLE= hardening |
56 |
|
57 |
TESTS_CONFIGURE_ENABLE= tests bench |
58 |
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "yes" |
59 |
TESTS_PLIST_FILES= bin/test_bitcoingold |
60 |
.endif |
61 |
TESTS_PLIST_FILES+= bin/bench_bitcoingold |
62 |
|
63 |
UPNP_CONFIGURE_WITH= miniupnpc |
64 |
UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc |
65 |
UPNP_CPPFLAGS= -I${LOCALBASE}/include |
66 |
UPNP_LIBS= -L${LOCALBASE}/lib |
67 |
|
68 |
QRCODES_CONFIGURE_WITH= qrencode |
69 |
QRCODES_LIB_DEPENDS= libqrencode.so:graphics/libqrencode |
70 |
|
71 |
WALLET_CONFIGURE_ENABLE= wallet |
72 |
WALLET_CXXFLAGS= -I${BDB_INCLUDE_DIR} |
73 |
WALLET_LIBS= -L${BDB_LIB_DIR} |
74 |
WALLET_USES= bdb:48 |
75 |
|
76 |
ZMQ_CONFIGURE_ENABLE= zmq |
77 |
ZMQ_BUILD_DEPENDS= libzmq4>0:net/libzmq4 |
78 |
ZMQ_RUN_DEPENDS= libzmq4>0:net/libzmq4 |
79 |
|
80 |
GH_ACCOUNT= BTCGPU |
81 |
GH_PROJECT= BTCGPU |
82 |
|
83 |
CPPFLAGS+= -I${LOCALBASE}/include |
84 |
|
85 |
CONFIGURE_ARGS?= --without-libs \ |
86 |
--with-gui=qt5 \ |
87 |
--without-daemon \ |
88 |
--without-utils |
89 |
|
90 |
CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib -lsodium" \ |
91 |
CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \ |
92 |
SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl" \ |
93 |
OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}" |
94 |
MAKE_ENV+= V=1 |
95 |
|
96 |
PLIST_FILES?= bin/bitcoingold-qt man/man1/bitcoingold-qt.1.gz \ |
97 |
share/applications/bitcoingold-qt.desktop share/pixmaps/bitcoingold128.png |
98 |
|
99 |
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no" |
100 |
|
101 |
post-install: |
102 |
${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},;s/Exec=bitcoin-qt/Exec=bitcoingold-qt/;s/Icon=bitcoin128/Icon=bitcoingold128/' \ |
103 |
${WRKSRC}/contrib/debian/bitcoin-qt.desktop |
104 |
${MV} ${STAGEDIR}${PREFIX}/bin/bitcoin-qt ${STAGEDIR}${PREFIX}/bin/bitcoingold-qt |
105 |
${MV} ${STAGEDIR}${PREFIX}/man/man1/bitcoin-qt.1 ${STAGEDIR}${PREFIX}/man/man1/bitcoingold-qt.1 |
106 |
${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \ |
107 |
${STAGEDIR}${PREFIX}/share/applications/bitcoingold-qt.desktop |
108 |
${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png \ |
109 |
${STAGEDIR}${PREFIX}/share/pixmaps/bitcoingold128.png |
110 |
|
111 |
.endif |
112 |
|
113 |
post-install-TESTS-on: |
114 |
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no" |
115 |
${MV} ${STAGEDIR}${PREFIX}/bin/test_bitcoin-qt ${STAGEDIR}${PREFIX}/bin/test_bitcoingold-qt |
116 |
.endif |
117 |
${MV} ${STAGEDIR}${PREFIX}/bin/test_bitcoin ${STAGEDIR}${PREFIX}/bin/test_bitcoingold |
118 |
${MV} ${STAGEDIR}${PREFIX}/bin/bench_bitcoin ${STAGEDIR}${PREFIX}/bin/bench_bitcoingold |
119 |
|
120 |
regression-test: build |
121 |
# To use this sucessfully, remove --without-daemon and --without-utils |
122 |
# from CONFIGURE_ARGS above. |
123 |
|
124 |
@cd ${WRKSRC} && ${GMAKE} check |
125 |
|
126 |
.include <bsd.port.mk> |