Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2014 02:47:18 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r340143 - in head/net-p2p: . zetacoin zetacoin/files
Message-ID:  <201401180247.s0I2lIeg021937@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Sat Jan 18 02:47:18 2014
New Revision: 340143
URL: http://svnweb.freebsd.org/changeset/ports/340143
QAT: https://qat.redports.org/buildarchive/r340143/

Log:
  Zetacoin is a free open source peer-to-peer electronic cash system that
  is completely decentralized, without the need for a central server or
  trusted parties. Users hold the crypto keys to their own money and
  transact directly with each other, with the help of a P2P network to
  check for double-spending.
  
  WWW: https://github.com/zetacoin/zetacoin
  
  PR:		ports/184369
  Submitted by:	Daniel Morante <daniel@morante.net>

Added:
  head/net-p2p/zetacoin/
  head/net-p2p/zetacoin/Makefile   (contents, props changed)
  head/net-p2p/zetacoin/distinfo   (contents, props changed)
  head/net-p2p/zetacoin/files/
  head/net-p2p/zetacoin/files/patch-src-makefile_unix   (contents, props changed)
  head/net-p2p/zetacoin/files/patch-src__leveldb__build_detect_platform   (contents, props changed)
  head/net-p2p/zetacoin/files/patch-src__rpcdump.cpp   (contents, props changed)
  head/net-p2p/zetacoin/files/patch-src__serialize.h   (contents, props changed)
  head/net-p2p/zetacoin/files/patch-zetacoin-qt_pro   (contents, props changed)
  head/net-p2p/zetacoin/files/pkg-message.in   (contents, props changed)
  head/net-p2p/zetacoin/files/zetacoin.conf.sample   (contents, props changed)
  head/net-p2p/zetacoin/files/zetacoin.in   (contents, props changed)
  head/net-p2p/zetacoin/pkg-descr   (contents, props changed)
  head/net-p2p/zetacoin/pkg-plist   (contents, props changed)
Modified:
  head/net-p2p/Makefile

Modified: head/net-p2p/Makefile
==============================================================================
--- head/net-p2p/Makefile	Sat Jan 18 02:35:59 2014	(r340142)
+++ head/net-p2p/Makefile	Sat Jan 18 02:47:18 2014	(r340143)
@@ -113,5 +113,6 @@
     SUBDIR += vhcp
     SUBDIR += vuze
     SUBDIR += xnap
+    SUBDIR += zetacoin
 
 .include <bsd.port.subdir.mk>

Added: head/net-p2p/zetacoin/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/Makefile	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,111 @@
+# Created by: Daniel Morante <daniel@morante.net>
+# $FreeBSD$
+
+PORTNAME=	zetacoin
+PORTVERSION=	0.8.99.6
+CATEGORIES=	net-p2p finance
+MASTER_SITES=	GH
+
+MAINTAINER=	daniel@morante.net
+COMMENT=	Peer-to-Peer crypto currency with quick transactions
+
+LICENSE=	MIT
+
+LIB_DEPENDS=	libboost_date_time.so:${PORTSDIR}/devel/boost-libs
+
+OPTIONS_DEFINE=	X11 UPNP QRCODES
+OPTIONS_DEFAULT=	X11 QRCODES
+UPNP_DESC=	Build with UPNP support
+QRCODES_DESC=	Build with QR code display
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	${PORTNAME}
+GH_PROJECT=	${PORTNAME}
+GH_COMMIT=	e804194
+GH_TAGNAME=	e804194
+
+USES=		gmake
+USE_OPENSSL=	yes
+USE_BDB=	yes
+WANT_BDB_VER=	48
+
+CXXFLAGS+=	-I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
+CXXFLAGS+=	-L${LOCALBASE}/lib -L${BDB_LIB_DIR}
+CXXFLAGS+=	-Wno-invalid-offsetof
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MX11}
+PLIST_SUB+=	X11=""
+.else
+USE_RC_SUBR=	${PORTNAME}
+SUB_FILES=	pkg-message
+PLIST_SUB+=	X11="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MX11}
+USE_QT4=	corelib gui qmake_build linguist uic moc rcc
+BINARY=		${PORTNAME}-qt
+PLIST_SUB+=	HEADLESS="@comment "
+.else
+BINARY=		${PORTNAME}d
+MAKE_ARGS+=	-C ${WRKSRC}/src
+PLIST_SUB+=	HEADLESS=""
+.endif
+
+.if ${PORT_OPTIONS:MQRCODES}
+LIB_DEPENDS+=	libqrencode.so:${PORTSDIR}/graphics/libqrencode
+QMAKE_USE_QRCODE=1
+.else
+QMAKE_USE_QRCODE=0
+.endif
+
+PLIST_SUB+=	EXECUTABLE="bin/${BINARY}"
+
+.if ${PORT_OPTIONS:MUPNP}
+LIB_DEPENDS+=	libminiupnpc.so:${PORTSDIR}/net/miniupnpc
+QMAKE_USE_UPNP=	1
+.else
+QMAKE_USE_UPNP=	-
+.endif
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/src/makefile.unix
+.if !${PORT_OPTIONS:MX11}
+	@cd ${WRKSRC}/src && ${CP} -p makefile.unix Makefile
+	@${REINPLACE_CMD} \
+		-e 's|^USE_UPNP.*$$|USE_UPNP=${QMAKE_USE_UPNP}|' \
+		-e 's|-l pthread|${PTHREAD_LIBS}|g' \
+		-e 's:-l dl::' \
+		${WRKSRC}/src/Makefile
+.endif
+
+do-configure:
+.if ${PORT_OPTIONS:MX11}
+	cd ${WRKSRC} && ${SETENV} ${QMAKE_ENV} \
+		${QMAKE} ${QMAKE_ARGS} USE_UPNP=${QMAKE_USE_UPNP} USE_QRCODE=${QMAKE_USE_QRCODE} \
+		QMAKE_LRELEASE=lrelease-qt4 PREFIX=${PREFIX} INCLUDEPATH=${BDB_INCLUDE_DIR} \
+		QMAKE_LIBDIR+=${BDB_LIB_DIR} ${PORTNAME}-qt.pro
+.endif
+
+do-install:
+.if ${PORT_OPTIONS:MX11}
+	${INSTALL_PROGRAM} -s ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/${BINARY}
+	${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \
+		-e 's,bitcoin,zetacoin,g' \
+		-e 's,Bitcoin,Zetacoin,g' \
+		-e 's,128,,g' ${WRKSRC}/contrib/debian/bitcoin-qt.desktop
+	${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications/zetacoin-qt.desktop
+	${INSTALL} ${WRKSRC}/src/qt/res/icons/bitcoin.png ${STAGEDIR}${PREFIX}/share/pixmaps/zetacoin.png
+
+.else
+	${INSTALL_PROGRAM} -s ${WRKSRC}/src/${BINARY} ${STAGEDIR}${PREFIX}/bin/${BINARY}
+	${INSTALL} ${FILESDIR}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
+	@if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
+		${CP} -p ${FILESDIR}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf; \
+	fi
+.endif
+
+.include <bsd.port.post.mk>

Added: head/net-p2p/zetacoin/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/distinfo	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,2 @@
+SHA256 (zetacoin-0.8.99.6.tar.gz) = c1c105330e997b2604cc8ecdef50897b79c4395915d67fdbb773c2d3b63be585
+SIZE (zetacoin-0.8.99.6.tar.gz) = 2184876

Added: head/net-p2p/zetacoin/files/patch-src-makefile_unix
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/patch-src-makefile_unix	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,30 @@
+--- src/makefile.unix.orig	2013-10-13 06:05:19.000000000 -0400
++++ src/makefile.unix	2013-12-27 05:11:28.000000000 -0500
+@@ -15,6 +15,11 @@
+ 
+ DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64
+ 
++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))
+ 
+@@ -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
+ 
+ 

Added: head/net-p2p/zetacoin/files/patch-src__leveldb__build_detect_platform
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/patch-src__leveldb__build_detect_platform	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,20 @@
+--- src/leveldb/build_detect_platform.orig	2014-01-17 19:31:04.000000000 +0000
++++ src/leveldb/build_detect_platform	2014-01-17 19:33:47.000000000 +0000
+@@ -170,7 +170,7 @@
+     true
+ else
+     # If -std=c++0x works, use <cstdatomic>.  Otherwise use port_posix.h.
+-    $CXX $CXXFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null  <<EOF
++    $CXX $CXXFLAGS -std=c++0x -x c++ - -o - > /dev/null 2>/dev/null  <<EOF
+       #include <cstdatomic>
+       int main() {}
+ EOF
+@@ -182,7 +182,7 @@
+     fi
+ 
+     # Test whether tcmalloc is available
+-    $CXX $CXXFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null  <<EOF
++    $CXX $CXXFLAGS -x c++ -ltcmalloc - -o - > /dev/null 2>/dev/null  <<EOF
+       int main() {}
+ EOF
+     if [ "$?" = 0 ]; then

Added: head/net-p2p/zetacoin/files/patch-src__rpcdump.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/patch-src__rpcdump.cpp	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,11 @@
+--- src/rpcdump.cpp.orig	2014-01-16 19:35:10.000000000 +0000
++++ src/rpcdump.cpp	2014-01-16 19:35:24.000000000 +0000
+@@ -27,7 +27,7 @@
+ }
+ 
+ int64 static DecodeDumpTime(const std::string &str) {
+-    static const boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ");
++    static boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ");
+     static const boost::posix_time::ptime epoch = boost::posix_time::from_time_t(0);
+     const std::locale loc(std::locale::classic(), &facet);
+     std::istringstream iss(str);

Added: head/net-p2p/zetacoin/files/patch-src__serialize.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/patch-src__serialize.h	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,22 @@
+--- ./src/serialize.h.orig	2013-09-24 01:50:35.661706153 +0000
++++ ./src/serialize.h	2013-09-24 01:50:52.913703572 +0000
+@@ -895,19 +895,6 @@
+     iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
+     void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
+ 
+-    void insert(iterator it, const_iterator first, const_iterator last)
+-    {
+-        assert(last - first >= 0);
+-        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
+-        {
+-            // special case for inserting at the front when there's room
+-            nReadPos -= (last - first);
+-            memcpy(&vch[nReadPos], &first[0], last - first);
+-        }
+-        else
+-            vch.insert(it, first, last);
+-    }
+-
+     void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
+     {
+         assert(last - first >= 0);

Added: head/net-p2p/zetacoin/files/patch-zetacoin-qt_pro
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/patch-zetacoin-qt_pro	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,11 @@
+--- zetacoin-qt.pro.orig	2013-10-13 06:05:19.000000000 -0400
++++ zetacoin-qt.pro	2013-10-18 18:49:57.000000000 -0400
+@@ -418,7 +418,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_LIB_SUFFIX
+ win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
+ macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
+ 

Added: head/net-p2p/zetacoin/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/pkg-message.in	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,12 @@
+*******************************************************************
+To configure the Zetacoin server please edit: 
+%%PREFIX%%/etc/zetacoin.conf
+
+You must at least set a "rpcpassword" in the configuration file above.
+
+To run the zetacoind server at startup, add the following
+settings to your /etc/rc.conf
+
+zetacoin_enable="YES"
+
+*******************************************************************

Added: head/net-p2p/zetacoin/files/zetacoin.conf.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/zetacoin.conf.sample	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,15 @@
+rpcuser=myname
+#rpcpassword=YOU MUST SET A PASSWORD
+maxconnection=80
+rpcallowip=127.0.0.1
+rpcport=17335
+port=17333
+server=1
+daemon=1
+listen=1
+logtimestamps=1
+addnode=63.247.147.163
+addnode=105.236.111.72
+addnode=188.252.16.110
+addnode=54.212.51.236
+addnode=75.162.220.45

Added: head/net-p2p/zetacoin/files/zetacoin.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/files/zetacoin.in	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: zetacoin
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# zetacoin_enable (bool):	Set to NO by default.
+#				Set it to YES to enable zetacoin.
+# zetacoin_config (path):	Set to %%PREFIX%%/etc/zetacoin.conf
+#				by default.
+# zetacoin_datadir (str):	Default to "/var/db/zetacoin"
+#				Base data directory.
+
+. /etc/rc.subr
+
+name=zetacoin
+rcvar=zetacoin_enable
+
+: ${zetacoin_enable:=NO}
+: ${zetacoin_config=%%PREFIX%%/etc/zetacoin.conf}
+: ${zetacoin_datadir=/var/db/zetacoin}
+
+required_files=${zetacoin_config}
+command=%%PREFIX%%/bin/zetacoind
+zetacoin_chdir=${zetacoin_datadir}
+pidfile="${zetacoin_datadir}/zetacoind.pid"
+stop_cmd=zetacoin_stop
+command_args="-conf=${zetacoin_config} -datadir=${zetacoin_datadir} -noupnp -daemon -pid=${pidfile}"
+start_precmd="${name}_prestart"
+
+zetacoin_create_datadir()
+{
+	echo "Creating data directory"
+	eval mkdir -p ${zetacoin_datadir}
+}
+
+zetacoin_prestart()
+{
+	if [ ! -d "${zetacoin_datadir}/." ]; then
+		zetacoin_create_datadir || return 1
+	fi
+}
+
+zetacoin_requirepidfile()
+{
+	if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then
+		echo "${name} not running? (check $pidfile)."
+		exit 1
+	fi
+}
+
+zetacoin_stop()
+{
+    zetacoin_requirepidfile
+
+    if checkyesno ${rcvar}; then
+		echo "Stopping ${name}."
+		eval ${command} -conf=${zetacoin_config} -datadir=${zetacoin_datadir} stop
+		wait_for_pids ${pidfile}
+    fi
+}
+
+load_rc_config $name
+run_rc_command "$1"

Added: head/net-p2p/zetacoin/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/pkg-descr	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,7 @@
+Zetacoin is a free open source peer-to-peer electronic cash system that
+is completely decentralized, without the need for a central server or
+trusted parties. Users hold the crypto keys to their own money and
+transact directly with each other, with the help of a P2P network to
+check for double-spending.
+
+WWW: https://github.com/zetacoin/zetacoin

Added: head/net-p2p/zetacoin/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/zetacoin/pkg-plist	Sat Jan 18 02:47:18 2014	(r340143)
@@ -0,0 +1,6 @@
+%%EXECUTABLE%%
+%%X11%%share/applications/zetacoin-qt.desktop
+%%X11%%share/pixmaps/zetacoin.png
+%%HEADLESS%%@unexec if cmp -s %D/etc/zetacoin.conf.sample %D/etc/zetacoin.conf; then rm -f %D/etc/zetacoin.conf; fi
+%%HEADLESS%%etc/zetacoin.conf.sample
+%%HEADLESS%%@exec if [ ! -f %D/etc/zetacoin.conf ] ; then cp -p %D/%F %B/zetacoin.conf; fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401180247.s0I2lIeg021937>