aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/litecoin
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2013-05-30 12:23:48 +0800
committerswills <swills@FreeBSD.org>2013-05-30 12:23:48 +0800
commitf25509e813dda1d1be81a1a270496d704208b9a9 (patch)
tree40ba1423138ed5383ca45ef1eec4257b44a39e66 /net-p2p/litecoin
parent8d73511eefa842864905a7c32622a46bba38ba39 (diff)
downloadfreebsd-ports-gnome-f25509e813dda1d1be81a1a270496d704208b9a9.tar.gz
freebsd-ports-gnome-f25509e813dda1d1be81a1a270496d704208b9a9.tar.zst
freebsd-ports-gnome-f25509e813dda1d1be81a1a270496d704208b9a9.zip
Litecoin is a peer-to-peer Internet currency that enables instant payments to
anyone in the world. It is based on the Bitcoin protocol but differs from Bitcoin in that it can be efficiently mined with consumer-grade hardware. Litecoin provides faster transaction confirmations (2.5 minutes on average) and uses memory-hard, scrypt-based mining proof-of-work algorithm to target the regular computers and GPUs most people already have. The Litecoin network is scheduled to produce 84 million currency units. One of the aims of Litecoin was to provide a mining algorithm that could run at the same time, on the same hardware used to mine bitcoins. With the rise of specialized ASICs for Bitcoin, Litecoin continues to satisfy these goals. It is unlikely for ASIC mining to be developed for Litecoin until the currency is widely used. WWW: http://www.litecoin.org/
Diffstat (limited to 'net-p2p/litecoin')
-rw-r--r--net-p2p/litecoin/Makefile101
-rw-r--r--net-p2p/litecoin/distinfo2
-rw-r--r--net-p2p/litecoin/files/patch-qtipserver_cpp13
-rw-r--r--net-p2p/litecoin/files/patch-src-makefile.unix22
-rw-r--r--net-p2p/litecoin/pkg-descr15
5 files changed, 153 insertions, 0 deletions
diff --git a/net-p2p/litecoin/Makefile b/net-p2p/litecoin/Makefile
new file mode 100644
index 000000000000..0f1e53174371
--- /dev/null
+++ b/net-p2p/litecoin/Makefile
@@ -0,0 +1,101 @@
+# Created by: Steve Wills <swills@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= litecoin
+PORTVERSION= 0.6.3c
+CATEGORIES= net-p2p finance
+
+MAINTAINER= swills@FreeBSD.org
+COMMENT= Virtual Peer-to-Peer Currency Software
+
+LIB_DEPENDS= boost_date_time:${PORTSDIR}/devel/boost-libs
+
+USE_GITHUB= yes
+GH_ACCOUNT= litecoin-project
+GH_COMMIT= af9b6da
+GH_TAGNAME= v${PORTVERSION}
+
+USE_OPENSSL= yes
+USE_BDB= yes
+WANT_BDB_VER= 48
+
+USE_GMAKE= yes
+
+OPTIONS_DEFINE= GUI UPNP QRCODES DBUS
+OPTIONS_DEFAULT= GUI QRCODES
+
+GUI_DESC= Build as a QT4 GUI
+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+= miniupnpc:${PORTSDIR}/net/miniupnpc
+QMAKE_USE_UPNP= 1
+.else
+QMAKE_USE_UPNP= -
+.endif
+
+.if ${PORT_OPTIONS:MGUI} && !defined(WITHOUT_X11)
+USE_QT4= qmake_build linguist uic moc rcc
+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:MGUI} && !defined(WITHOUT_X11) && ${PORT_OPTIONS:MQRCODES}
+LIB_DEPENDS+= qrencode:${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>
+
+do-configure:
+.if ${PORT_OPTIONS:MGUI} && !defined(WITHOUT_X11)
+ cd ${BUILD_WRKSRC} && \
+ ${QMAKE} PREFIX=${PREFIX} -spec ${QMAKESPEC} ${QMAKEFLAGS} \
+ QMAKE_LIBDIR+=${BDB_LIB_DIR} \
+ QMAKE_LRELEASE=${LOCALBASE}/bin/lrelease-qt4 \
+ USE_UPNP=${QMAKE_USE_UPNP} \
+ USE_QRCODE=${QMAKE_USE_QRCODE} \
+ USE_DBUS=${QMAKE_USE_DBUS} \
+ litecoin-qt.pro
+.endif
+
+do-install:
+ @${MKDIR} ${PREFIX}/bin
+.if ${PORT_OPTIONS:MGUI} && !defined(WITHOUT_X11)
+ ${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${PREFIX}/bin/
+.else
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${BINARY} ${PREFIX}/bin/
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/src/makefile.unix
+
+regression-test:
+.if !${PORT_OPTIONS:MGUI} || defined(WITHOUT_X11)
+ @${GMAKE} -C ${WRKSRC}/src -f makefile.unix USE_UPNP=${QMAKE_USE_UPNP} test_litecoin
+ (cd ${WRKSRC}/src ; ./test_litecoin)
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net-p2p/litecoin/distinfo b/net-p2p/litecoin/distinfo
new file mode 100644
index 000000000000..7048318f675f
--- /dev/null
+++ b/net-p2p/litecoin/distinfo
@@ -0,0 +1,2 @@
+SHA256 (litecoin-0.6.3c.tar.gz) = a24f145942a91742cee2870b7e43f930edbd81db4e0478e3e91e880d201655b8
+SIZE (litecoin-0.6.3c.tar.gz) = 1480752
diff --git a/net-p2p/litecoin/files/patch-qtipserver_cpp b/net-p2p/litecoin/files/patch-qtipserver_cpp
new file mode 100644
index 000000000000..50e97585c12e
--- /dev/null
+++ b/net-p2p/litecoin/files/patch-qtipserver_cpp
@@ -0,0 +1,13 @@
+--- src/qt/qtipcserver.cpp.orig 2012-07-26 17:55:22.000000000 +1000
++++ src/qt/qtipcserver.cpp 2013-05-28 16:10:27.000000000 +1000
+@@ -55,6 +55,10 @@
+ // problems.
+ return;
+ #endif
++#ifdef __FreeBSD__
++ // TODO: Fix it for FreeBSD too - ipcinit causes a spinlock
++ return;
++#endif
+
+ message_queue* mq;
+ char strBuf[257];
diff --git a/net-p2p/litecoin/files/patch-src-makefile.unix b/net-p2p/litecoin/files/patch-src-makefile.unix
new file mode 100644
index 000000000000..91ec7fc028ba
--- /dev/null
+++ b/net-p2p/litecoin/files/patch-src-makefile.unix
@@ -0,0 +1,22 @@
+--- src/makefile.unix.orig 2012-07-26 07:55:22.000000000 +0000
++++ src/makefile.unix 2013-05-30 03:57:45.000000000 +0000
+@@ -6,6 +6,11 @@
+
+ DEFS=-DUSE_IPV6 -DBOOST_SPIRIT_THREADSAFE
+
++BOOST_INCLUDE_PATH=%%PREFIX%%/include
++BDB_INCLUDE_PATH=%%PREFIX%%/include/db48
++BOOST_LIB_PATH=%%PREFIX%%/lib
++BDB_LIB_PATH=%%PREFIX%%/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))
+
+@@ -44,7 +49,6 @@
+ LIBS+= \
+ -Wl,-B$(LMODE2) \
+ -l z \
+- -l dl \
+ -l pthread
+
+
diff --git a/net-p2p/litecoin/pkg-descr b/net-p2p/litecoin/pkg-descr
new file mode 100644
index 000000000000..3731d1bdb642
--- /dev/null
+++ b/net-p2p/litecoin/pkg-descr
@@ -0,0 +1,15 @@
+Litecoin is a peer-to-peer Internet currency that enables instant payments to
+anyone in the world. It is based on the Bitcoin protocol but differs from
+Bitcoin in that it can be efficiently mined with consumer-grade hardware.
+Litecoin provides faster transaction confirmations (2.5 minutes on average) and
+uses memory-hard, scrypt-based mining proof-of-work algorithm to target the
+regular computers and GPUs most people already have. The Litecoin network is
+scheduled to produce 84 million currency units.
+
+One of the aims of Litecoin was to provide a mining algorithm that could run at
+the same time, on the same hardware used to mine bitcoins. With the rise of
+specialized ASICs for Bitcoin, Litecoin continues to satisfy these goals. It is
+unlikely for ASIC mining to be developed for Litecoin until the currency is
+widely used.
+
+WWW: http://www.litecoin.org/