Index: finance/dash/Makefile =================================================================== --- finance/dash/Makefile (nonexistent) +++ finance/dash/Makefile (working copy) @@ -0,0 +1,149 @@ +# $FreeBSD$ + +PORTNAME= dash +DISTVERSIONPREFIX= v +DISTVERSION= 0.12.2.1 +CATEGORIES= finance net-p2p + +MAINTAINER= arcade@b1t.name +COMMENT= Virtual Peer-to-Peer Currency Client + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/COPYING + +ONLY_FOR_ARCHS= amd64 i386 ia64 +ONLY_FOR_ARCHS_REASON= does not support big-endian architectures + +LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \ + libevent.so:devel/libevent + +BROKEN_powerpc64= fails to compile: util.cpp: undefined reference to boost::program_options::to_internal + +USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig shebangfix ssl +USE_GITHUB= yes +GH_ACCOUNT= dashpay +GNU_CONFIGURE= yes +SHEBANG_FILES= src/test/*.py + +CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \ + SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl" \ + OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}" +MAKE_ENV+= V=1 + +OPTIONS_DEFINE= HARDENING DEBUG TESTS +OPTIONS_DEFAULT= HARDENING + +FLAVORS= daemon cli qt + +.if ${FLAVOR:Udaemon} == daemon +PKGNAMESUFFIX= -daemon +COMMENT+= (Daemon) + +CONFIGURE_ARGS= --with-daemon \ + --without-gui \ + --without-libs \ + --without-qrencode \ + --without-utils + +OPTIONS_DEFINE+= UPNP WALLET ZMQ +OPTIONS_DEFAULT+= UPNP WALLET + +PLIST_FILES= bin/dashd +USE_RC_SUBR= dashd + +TESTS_PLIST_FILES= bin/test_dash +.endif + +.if ${FLAVOR:U} == cli +PKGNAMESUFFIX= -cli +COMMENT+= (CLI and Utilities) + +CONFIGURE_ARGS= --without-daemon \ + --without-gui \ + --without-libs \ + --without-qrencode \ + --with-utils \ + --disable-wallet + +TESTS_PLIST_FILES= bin/test_dash + +PLIST_FILES= bin/dash-cli bin/dash-tx +.endif + +.if ${FLAVOR:U} == qt +PKGNAMESUFFIX= -qt +COMMENT+= (Qt UI) + +USES+= desktop-file-utils +USE_QT5= core gui network widgets \ + buildtools_build linguisttools_build qmake_build + +CONFIGURE_ARGS= --without-libs \ + --with-gui=qt5 \ + --without-daemon \ + --without-utils + +OPTIONS_DEFINE+= DBUS QRCODES UPNP WALLET ZMQ +OPTIONS_DEFAULT+= DBUS QRCODES UPNP WALLET + +BUILD_DEPENDS+= protoc:devel/protobuf +LIB_DEPENDS+= libprotobuf.so:devel/protobuf + +DBUS_CONFIGURE_WITH= dbus +DBUS_USE= QT5=dbus + +TESTS_USE= QT5=testlib +TESTS_PLIST_FILES= bin/test_dash-qt \ + bin/test_dash + +PLIST_FILES= bin/dash-qt share/applications/dash-qt.desktop \ + share/pixmaps/dash128.png +.endif + +HARDENING_DESC= Attempt to harden binaries (PIE for ASLR, NX Stack) +TESTS_DESC= Build test binary and unit tests +QRCODES_DESC= Display QR Codes +WALLET_DESC= Wallet Management Support +ZMQ_DESC= Block and transaction broadcasting with ZeroMQ + +HARDENING_CONFIGURE_ENABLE= hardening + +DEBUG_CONFIGURE_ENABLE= debug +DEBUG_INSTALL_TARGET_OFF= install-strip + +TESTS_CONFIGURE_ENABLE= tests bench +TESTS_PLIST_FILES+= bin/bench_dash + +UPNP_CONFIGURE_WITH= miniupnpc +UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc +UPNP_CPPFLAGS= -I${LOCALBASE}/include +UPNP_LIBS= -L${LOCALBASE}/lib + +QRCODES_CONFIGURE_WITH= qrencode +QRCODES_LIB_DEPENDS= libqrencode.so:graphics/libqrencode + +WALLET_CONFIGURE_ENABLE= wallet +WALLET_CXXFLAGS= -I${BDB_INCLUDE_DIR} +WALLET_LIBS= -L${BDB_LIB_DIR} +WALLET_USES= bdb:48 + +ZMQ_CONFIGURE_ENABLE= zmq +ZMQ_BUILD_DEPENDS= libzmq4>0:net/libzmq4 +ZMQ_RUN_DEPENDS= libzmq4>0:net/libzmq4 + +.if ${FLAVOR:U} == qt +post-install: + ${INSTALL} ${WRKSRC}/contrib/debian/dash-qt.desktop \ + ${STAGEDIR}${PREFIX}/share/applications + @${REINPLACE_CMD} -i '' -e 's,=/usr,=${PREFIX},' \ + ${STAGEDIR}${PREFIX}/share/applications/dash-qt.desktop + ${INSTALL} ${WRKSRC}/share/pixmaps/dash128.png \ + ${STAGEDIR}${PREFIX}/share/pixmaps/dash128.png +.endif + +### for ALL +regression-test: build + # To use this sucessfully, remove --without-daemon and --without-utils from CONFIGURE_ARGS above. + @cd ${WRKSRC} && ${GMAKE} check + +.include Property changes on: finance/dash/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: finance/dash/distinfo =================================================================== --- finance/dash/distinfo (nonexistent) +++ finance/dash/distinfo (working copy) @@ -0,0 +1,2 @@ +SHA256 (dashpay-dash-v0.12.2.1_GH0.tar.gz) = 29e11f7189155da2595fddc0add5b8757255cd96cc4fe0a885b5f649f159163f +SIZE (dashpay-dash-v0.12.2.1_GH0.tar.gz) = 7243314 Property changes on: finance/dash/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: finance/dash/files/dashd.in =================================================================== --- finance/dash/files/dashd.in (nonexistent) +++ finance/dash/files/dashd.in (working copy) @@ -0,0 +1,172 @@ +#!/bin/sh + +# PROVIDE: dashd +# REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable : +# dashd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable dashd +# dashd_user (str) Set to "dash" by default. +# dashd_group (str) Set to "dash" by default. +# dashd_conf (str) Set to "%%PREFIX%%/etc/dashd.conf" by default. +# dashd_data (str) Set to "/var/lib/dashd" by default. +# dashdlimits_enable (bool) Set to "NO" by default. +# Set it to "YES" to enable dashdlimits +# dashdlimits_args Set to "-e -U ${dashd_user}" by default + + +. /etc/rc.subr + +name="dashd" +rcvar=dashd_enable + +start_precmd="dashd_precmd" +start_cmd="dashd_start" +restart_precmd="dashd_checkconfig" +reload_precmd="dashd_checkconfig" +configtest_cmd="dashd_checkconfig" +status_cmd="dashd_status" +stop_cmd="dashd_stop" +stop_postcmd="dashd_wait" +command="%%PREFIX%%/bin/dashd" +cli_command="%%PREFIX%%/bin/dash-cli" +daemon_command="/usr/sbin/daemon" +#pidfile="/var/run/${name}.pid" +extra_commands="configtest" + + +: ${dashd_enable:="NO"} +: ${dashdlimits_enable:="NO"} + +load_rc_config ${name} + +: ${dashd_user:="dash"} +: ${dashd_group:="dash"} +: ${dashd_data_dir:="/var/db/dashd"} +: ${dashd_config_file:="%%PREFIX%%/etc/dash.conf"} +: ${dashdlimits_args:="-e -U ${dashd_user}"} + +# set up dependant variables +procname="${command}" +pidfile="${dashd_data_dir}/dashd.pid" +required_files="${dashd_config_file}" + + +dashd_checkconfig() +{ + echo "Performing sanity check on dashd configuration:" + if [ ! -d "${dashd_data_dir}" ] + then + echo "Missing data directory: ${dashd_data_dir}" + exit 1 + fi + chown -R "${dashd_user}:${dashd_group}" "${dashd_data_dir}" + + if [ ! -f "${dashd_config_file}" ] + then + echo "Missing configuration file: ${dashd_config_file}" + exit 1 + fi + if [ ! -x "${command}" ] + then + echo "Missing executable: ${command}" + exit 1 + fi + return 0 +} + +dashd_cleanup() +{ + rm -f "${pidfile}" +} + +dashd_precmd() +{ + dashd_checkconfig + + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Dashd is not running" + rm -f "${pidfile}" + fi + + if checkyesno dashdlimits_enable + then + eval $(/usr/bin/limits ${dashdlimits_args}) 2>/dev/null + else + return 0 + fi +} + +dashd_status() +{ + local pid + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Dashd is not running" + return 1 + else + echo "Dashd running, pid: ${pid}" + fi +} + +dashd_start() +{ + echo "Starting dashd:" + cd "${dashd_data_dir}" || return 1 + ${daemon_command} -u "${dashd_user}" -p "${pidfile}" \ + ${command} \ + -conf="${dashd_config_file}" \ + -datadir="${dashd_data_dir}" 2> /tmp/dashd.stderr > /tmp/dashd.stdout +} + +dashd_stop() +{ + echo "Stopping dashd:" + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Dashd is not running" + return 1 + else + ${cli_command} -conf="${dashd_config_file}" -datadir="${dashd_data_dir}" stop + fi +} + +dashd_wait() +{ + local n=60 + echo "Waiting for dashd shutdown:" + while : + do + printf '.' + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + printf '\n' + break + fi + sleep 1 + n=$((${n} - 1)) + if [ ${n} -eq 0 -a -f "${pidfile}" ] + then + printf "\nForce shutdown" + kill -9 $(cat "${pidfile}") + for n in 1 2 3 + do + printf '.' + sleep 1 + done + printf '\n' + break + fi + done + rm -f "${pidfile}" + echo "Shutdown complete" +} + +run_rc_command "$1" Property changes on: finance/dash/files/dashd.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: finance/dash/files/patch-configure.ac =================================================================== --- finance/dash/files/patch-configure.ac (nonexistent) +++ finance/dash/files/patch-configure.ac (working copy) @@ -0,0 +1,12 @@ +--- configure.ac.orig 2017-12-17 15:10:45 UTC ++++ configure.ac +@@ -356,6 +356,9 @@ case $host in + TARGET_OS=linux + LEVELDB_TARGET_FLAGS="-DOS_LINUX" + ;; ++ *freebsd*) ++ LEVELDB_TARGET_FLAGS="-DOS_FREEBSD" ++ ;; + *) + OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'` + LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}" Property changes on: finance/dash/files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: finance/dash/files/patch-src_leveldb_helpers_memenv_memenv.cc =================================================================== --- finance/dash/files/patch-src_leveldb_helpers_memenv_memenv.cc (nonexistent) +++ finance/dash/files/patch-src_leveldb_helpers_memenv_memenv.cc (working copy) @@ -0,0 +1,11 @@ +--- src/leveldb/helpers/memenv/memenv.cc.orig 2017-11-11 07:02:45 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" Property changes on: finance/dash/files/patch-src_leveldb_helpers_memenv_memenv.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: finance/dash/pkg-descr =================================================================== --- finance/dash/pkg-descr (nonexistent) +++ finance/dash/pkg-descr (working copy) @@ -0,0 +1,7 @@ +Dash 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: http://www.dash.org/ Property changes on: finance/dash/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property