Index: litecoin/Makefile =================================================================== --- litecoin/Makefile (revisione 509636) +++ litecoin/Makefile (copia di lavoro) @@ -1,9 +1,9 @@ # $FreeBSD$ PORTNAME= litecoin -PORTVERSION= 0.16.3 +PORTVERSION= 0.17.1 DISTVERSIONPREFIX= v -PORTREVISION= 12 +PORTREVISION?= 0 CATEGORIES= net-p2p finance MAINTAINER= hsw@bitmark.com @@ -10,15 +10,12 @@ COMMENT?= Virtual Peer-to-Peer Currency Client (QT) LICENSE= MIT -LICENSE_FILE= ${WRKSRC}/COPYING -NOT_FOR_ARCHS= powerpc powerpc64 sparc64 -NOT_FOR_ARCHS_REASON= fails to configure: "Big Endian not supported" - LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \ libevent.so:devel/libevent -USES+= autoreconf compiler:c++11-lib gmake libtool pkgconfig qt:5 ssl +USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig qt:5 shebangfix ssl + USE_GITHUB= yes GNU_CONFIGURE= yes @@ -32,14 +29,15 @@ BUILD_DEPENDS+= protoc:devel/protobuf LIB_DEPENDS+= libprotobuf.so:devel/protobuf -TESTS_USES= qt:5 TESTS_USE= QT=testlib TESTS_PLIST_FILES= bin/test_litecoin-qt \ bin/test_litecoin .endif -OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET ZMQ -OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET ZMQ +OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP ZMQ +OPTIONS_RADIO?= WALLET +OPTIONS_RADIO_WALLET?= WALLET_BDB48 WALLET_BDBMODERN +OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET_BDBMODERN ZMQ OPTIONS_SUB= yes HARDENING_DESC= Attempt to harden binaries (PIE for ASLR, NX Stack) @@ -46,10 +44,11 @@ QRCODES_DESC= Display QR Codes TESTS_DESC= Build test binary and unit tests WALLET_DESC= Wallet Management Support +WALLET_BDB48_DESC= Wallet using BDB 4.8 +WALLET_BDBMODERN_DESC= Wallet using modern BDB 5.x or 6.x ZMQ_DESC= Block and transaction broadcasting with ZeroMQ DBUS_CONFIGURE_WITH= dbus -DBUS_USES= qt:5 DBUS_USE= QT=dbus DEBUG_CONFIGURE_ENABLE= debug @@ -71,11 +70,6 @@ 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 @@ -89,28 +83,38 @@ CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \ SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl" \ - OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}" V=1 + OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}" MAKE_ENV+= V=1 PLIST_FILES?= bin/litecoin-qt man/man1/litecoin-qt.1.gz \ - share/applications/litecoin-qt.desktop share/pixmaps/litecoin128.png + share/applications/litecoin-qt.desktop share/pixmaps/litecoin.png +.include + +.if ${PORT_OPTIONS:MWALLET_BDB48} +CONFIGURE_ARGS+= --enable-wallet +USES+= bdb:48 +.elif ${PORT_OPTIONS:MWALLET_BDBMODERN} +CONFIGURE_ARGS+= --enable-wallet --with-incompatible-bdb +USES+= bdb:5+ +.else +CONFIGURE_ARGS+= --disable-wallet +.endif + .include +.if ${PORT_OPTIONS:MWALLET_BDB48} || ${PORT_OPTIONS:MWALLET_BDBMODERN} +CPPFLAGS+= -I${BDB_INCLUDE_DIR} +LIBS+= -L${BDB_LIB_DIR} +.endif + .if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no" -post-patch: - @${REINPLACE_CMD} -e 's|bitcoin|litecoin|g' \ - -e 's|Bitcoin|Litecoin|g' \ - ${WRKSRC}/contrib/debian/bitcoin-qt.desktop - post-install: - @${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \ - ${WRKSRC}/contrib/debian/bitcoin-qt.desktop - ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \ - ${STAGEDIR}${PREFIX}/share/applications/litecoin-qt.desktop + ${INSTALL} ${FILESDIR}/litecoin-qt.desktop \ + ${STAGEDIR}${PREFIX}/share/applications/ ${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png \ - ${STAGEDIR}${PREFIX}/share/pixmaps/litecoin128.png + ${STAGEDIR}${PREFIX}/share/pixmaps/litecoin.png .endif Index: litecoin/distinfo =================================================================== --- litecoin/distinfo (revisione 509636) +++ litecoin/distinfo (copia di lavoro) @@ -1,3 +1,3 @@ -TIMESTAMP = 1537577883 -SHA256 (litecoin-project-litecoin-v0.16.3_GH0.tar.gz) = 7788800eb4a433696a464563384cbdf83a47eebb8698325c75314171833227c8 -SIZE (litecoin-project-litecoin-v0.16.3_GH0.tar.gz) = 5776885 +TIMESTAMP = 1562572626 +SHA256 (litecoin-project-litecoin-v0.17.1_GH0.tar.gz) = 6e05514a480990f1ff1e7c81b5443d741f4016c03ab5c1ef44bf4b169af88bee +SIZE (litecoin-project-litecoin-v0.17.1_GH0.tar.gz) = 4717718 Index: litecoin/files/litecoin-qt.desktop =================================================================== --- litecoin/files/litecoin-qt.desktop (nonexistent) +++ litecoin/files/litecoin-qt.desktop (copia di lavoro) @@ -0,0 +1,14 @@ +[Desktop Entry] +Version=1.0 +Name=Litecoin Core +Comment=Connect to the Litecoin P2P Network +Comment[de]=Verbinde mit dem Litecoin peer-to-peer Netzwerk +Comment[fr]=Litecoin, monnaie virtuelle cryptographique pair à pair +Comment[tr]=Litecoin, esten ese kriptografik sanal para birimi +Exec=litecoin-qt %u +Terminal=false +Type=Application +Icon=litecoin +MimeType=x-scheme-handler/litecoin; +Categories=Office;Finance; +StartupWMClass=Litecoin-qt Property changes on: litecoin/files/litecoin-qt.desktop ___________________________________________________________________ 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: litecoin/files/litecoind.in =================================================================== --- litecoin/files/litecoind.in (revisione 509636) +++ litecoin/files/litecoind.in (copia di lavoro) @@ -2,7 +2,7 @@ # $FreeBSD$ # PROVIDE: litecoind -# REQUIRE: DAEMON cleanvar +# REQUIRE: LOGIN cleanvar # KEYWORD: shutdown # @@ -10,53 +10,163 @@ # litecoind_enable (bool): Set to "NO" by default. # Set it to "YES" to enable litecoind # litecoind_user (str) Set to "litecoin" by default. -# Set it to preferred user # litecoind_group (str) Set to "litecoin" by default. -# Set it to preferred group -# litecoind_data_dir (str) Set to "/var/lib/litecoin" by default. -# Set it to preferred data dir -# litecoind_config_file (str) Set to "%%PREFIX%%/etc/litecoind.conf" by default. -# Set it to preferred config file -# litecoind_log_file (str) Set to "/var/log/litecoind.log" by default. -# Set it to preferred log file +# litecoind_conf (str) Set to "%%PREFIX%%/etc/litecoind.conf" by default. +# litecoind_data_dir (str) Set to "/var/db/litecoin" by default. +# litecoindlimits_enable (bool) Set to "NO" by default. +# Set it to "YES" to enable litecoindlimits +# litecoindlimits_args Set to "-e -U ${litecoind_user}" by default + . /etc/rc.subr -name=litecoind -desc="Litecoin Daemon" +name="litecoind" rcvar=litecoind_enable +start_precmd="litecoind_precmd" +start_cmd="litecoind_start" +restart_precmd="litecoind_checkconfig" +reload_precmd="litecoind_checkconfig" +configtest_cmd="litecoind_checkconfig" +status_cmd="litecoind_status" +stop_cmd="litecoind_stop" +stop_postcmd="litecoind_wait" +command="%%PREFIX%%/bin/litecoind" +daemon_command="/usr/sbin/daemon" +#pidfile="/var/run/${name}.pid" +extra_commands="configtest" + + +: ${litecoind_enable:="NO"} +: ${litecoindlimits_enable:="NO"} + load_rc_config ${name} -: ${litecoind_enable:=NO} -: ${litecoind_user:=litecoin} -: ${litecoind_group:=litecoin} -: ${litecoind_data_dir:=/var/db/litecoin} -: ${litecoind_config_file:=%%PREFIX%%/etc/litecoin.conf} -: ${litecoind_log_file:=/var/log/litecoind.log} +: ${litecoind_user:="litecoin"} +: ${litecoind_group:="litecoin"} +: ${litecoind_data_dir:="/var/db/litecoin"} +: ${litecoind_config_file:="%%PREFIX%%/etc/litecoin.conf"} +: ${litecoindlimits_args:="-e -U ${litecoind_user}"} +# set up dependant variables +procname="${command}" +pidfile="${litecoind_data_dir}/litecoind.pid" required_files="${litecoind_config_file}" -litecoind_chdir="${litecoind_data_dir}" -litecoind_env="HOME=${litecoind_data_dir}" -pidfile="/var/run/${name}.pid" -command="%%PREFIX%%/bin/litecoind" -command_args="-daemon -pid=${pidfile} -conf=${litecoind_config_file} -datadir=${litecoind_data_dir} > ${litecoind_log_file} 2>&1" -start_precmd=litecoind_startprecmd -litecoind_startprecmd() +litecoind_checkconfig() { - if [ ! -e ${pidfile} ]; then - install -o ${litecoind_user} -g ${litecoind_group} /dev/null ${pidfile}; - fi + echo "Performing sanity check on litecoind configuration:" + if [ ! -d "${litecoind_data_dir}" ] + then + echo "Missing data directory: ${litecoind_data_dir}" + exit 1 + fi + chown -R "${litecoind_user}:${litecoind_group}" "${litecoind_data_dir}" - if [ ! -e ${litecoind_log_file} ]; then - install -o ${litecoind_user} -g ${litecoind_group} /dev/null ${litecoind_log_file}; - fi + if [ ! -f "${litecoind_config_file}" ] + then + echo "Missing configuration file: ${litecoind_config_file}" + exit 1 + fi + if [ ! -x "${command}" ] + then + echo "Missing executable: ${command}" + exit 1 + fi + return 0 +} - if [ ! -d ${litecoind_data_dir} ]; then - install -d -o ${litecoind_user} -g ${litecoind_group} ${litecoind_data_dir} - fi +litecoind_cleanup() +{ + rm -f "${pidfile}" } +litecoind_precmd() +{ + litecoind_checkconfig + + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Litecoind is not running" + rm -f "${pidfile}" + fi + + if checkyesno litecoindlimits_enable + then + eval $(/usr/bin/limits ${litecoindlimits_args}) 2>/dev/null + else + return 0 + fi +} + +litecoind_status() +{ + local pid + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Litecoind is not running" + return 1 + else + echo "Litecoind running, pid: ${pid}" + fi +} + +litecoind_start() +{ + echo "Starting litecoind:" + cd "${litecoind_data_dir}" || return 1 + ${daemon_command} -u "${litecoind_user}" -p "${pidfile}" -f \ + ${command} \ + -conf="${litecoind_config_file}" \ + -datadir="${litecoind_data_dir}" +} + +litecoind_stop() +{ + echo "Stopping litecoind:" + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Litecoind is not running" + return 1 + else + kill ${pid} + fi +} + +litecoind_wait() +{ + local n=60 + echo "Waiting for litecoind 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" Index: litecoin/files/patch-src_leveldb_helpers_memenv_memenv.cc =================================================================== --- litecoin/files/patch-src_leveldb_helpers_memenv_memenv.cc (revisione 509636) +++ litecoin/files/patch-src_leveldb_helpers_memenv_memenv.cc (nonexistent) @@ -1,11 +0,0 @@ ---- src/leveldb/helpers/memenv/memenv.cc.orig 2015-07-10 17:23:55 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: litecoin/files/patch-src_leveldb_helpers_memenv_memenv.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: litecoin/pkg-help =================================================================== --- litecoin/pkg-help (nonexistent) +++ litecoin/pkg-help (copia di lavoro) @@ -0,0 +1,18 @@ +The wallet is stored in a Berkeley database file (BDB) (usually +~/.litecoin/wallets/wallet.dat). + +Litecoin Core can use either BDB 4.8, 5.x or 6.x to create and access the +wallet file. + +Wallets created using BDB 4.8 are also accessible by BDB 5.x and 6.x. + +Wallets created using BDB 5.x or 6.x are not accessible by BDB 4.8. + +Opening and using a wallet created by 4.8 with a higher major version (5.x +or 6.x) does not change its format, so it will still be accessible to 4.8 +afterwards. But encrypting an unencrypted wallet recreates it, so encrypting +a 4.8 wallet with Litecoin Core linked against BDB 5.x or 6.x will render it +unreadable for Litecoin Core linked against BDB 4.8. + +If you do not plan on copying the wallet file to another machine that uses +BDB 4.8 then it is recommended to use the modern versions of BDB 5.x or 6.x. Property changes on: litecoin/pkg-help ___________________________________________________________________ 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: litecoin-daemon/Makefile =================================================================== --- litecoin-daemon/Makefile (revisione 509636) +++ litecoin-daemon/Makefile (copia di lavoro) @@ -7,17 +7,19 @@ SLAVE_PORT= yes -NOT_FOR_ARCHS= powerpc64 sparc64 +NOT_FOR_ARCHS= powerpc powerpc64 sparc64 NOT_FOR_ARCHS_REASON= configure: error: Big Endian not supported +OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP ZMQ +# WALLET_BDBMODERN is a choice for WALLET, introduced via OPTIONS_RADIO=WALLET +# from ${MASTERDIR}/Makefile +OPTIONS_DEFAULT= HARDENING UPNP WALLET_BDBMODERN ZMQ + USES+= cpe CPE_VENDOR= bitcoin CPE_PRODUCT= bitcoind CPE_VERSION= ${PORTVERSION:R} -OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET ZMQ -OPTIONS_DEFAULT= HARDENING WALLET ZMQ - USERS= litecoin GROUPS= litecoin @@ -25,8 +27,7 @@ --without-gui \ --without-libs \ --without-qrencode \ - --without-utils \ - --disable-reduce-exports + --without-utils PLIST_FILES= bin/litecoind PLIST_FILES+= man/man1/litecoind.1.gz @@ -35,6 +36,6 @@ USE_RC_SUBR= litecoind post-install: - ${INSTALL_DATA} ${WRKSRC}/contrib/debian/examples/bitcoin.conf ${STAGEDIR}${PREFIX}/etc/litecoin.conf.sample + ${INSTALL_DATA} ${WRKSRC}/share/examples/litecoin.conf ${STAGEDIR}${PREFIX}/etc/litecoin.conf.sample .include "${MASTERDIR}/Makefile" Index: litecoin-utils/Makefile =================================================================== --- litecoin-utils/Makefile (revisione 509636) +++ litecoin-utils/Makefile (copia di lavoro) @@ -4,22 +4,24 @@ PKGNAMESUFFIX= -utils COMMENT= Virtual Peer-to-Peer Currency (CLI and Utilities) - SLAVE_PORT= yes -NOT_FOR_ARCHS= powerpc64 sparc64 +NOT_FOR_ARCHS= powerpc powerpc64 sparc64 NOT_FOR_ARCHS_REASON= configure: error: Big Endian not supported OPTIONS_DEFINE= DEBUG HARDENING TESTS +OPTIONS_RADIO= OPTIONS_DEFAULT= HARDENING TESTS +PKGHELP= ${NONEXISTENT} + CONFIGURE_ARGS= --without-daemon \ --without-gui \ --without-libs \ --without-qrencode \ + --without-miniupnpc \ --with-utils \ - --disable-wallet \ - --disable-reduce-exports + --disable-wallet PLIST_FILES= bin/litecoin-cli bin/litecoin-tx \ man/man1/litecoin-cli.1.gz man/man1/litecoin-tx.1.gz