Skip to content

Commit

Permalink
net-p2p/namecoin: Update to 24.0
Browse files Browse the repository at this point in the history
A few minor changes made to submitted patch:
* Switch PORTVERSION to DISTVERSION
* Use USES= localbase for UPNP option
* Disable autodetection of sqlite when WALLET option is selected
* Fix plist for net-p2p/namecoin-utils

Changelog: https://github.com/namecoin/namecoin-core/releases/tag/nc24.0

PR:		270753
  • Loading branch information
Chad Jacob Milios authored and Daniel Engberg committed Jun 6, 2023
1 parent 8696f40 commit f7ca7eb
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 30 deletions.
2 changes: 1 addition & 1 deletion GIDs
Expand Up @@ -717,7 +717,7 @@ postgrest:*:772:
# free: 773
# free: 774
# free: 775
# free: 776
namecoin:*:776:
openxpki:*:777:
litecoin:*:778:
bitcoin:*:779:
Expand Down
2 changes: 1 addition & 1 deletion UIDs
Expand Up @@ -722,7 +722,7 @@ postgrest:*:772:772::0:0:PostgREST Daemon:/nonexistent:/usr/sbin/nologin
# free: 773
# free: 774
# free: 775
# free: 776
namecoin:*:776:776::0:0:namecoin Daemon:/var/db/namecoin:/usr/sbin/nologin
openxpki:*:777:777::0:0:OpenXPKI Owner:/nonexistent:/usr/sbin/nologin
litecoin:*:778:778::0:0:litecoin Daemon:/var/db/litecoin:/usr/sbin/nologin
bitcoin:*:779:779::0:0:bitcoin Daemon:/var/db/bitcoin:/usr/sbin/nologin
Expand Down
13 changes: 8 additions & 5 deletions net-p2p/namecoin-daemon/Makefile
@@ -1,26 +1,29 @@
MASTERDIR= ${.CURDIR}/../namecoin

PORTREVISION= 4
PKGNAMESUFFIX= -daemon

COMMENT= Decentralized, open DNS and more (Daemon)
SLAVE_PORT= yes

CONFLICTS_INSTALL= namecoin-stable namecoin-stable-daemon namecoin-stable-utils \
namecoin-beta namecoin-beta-daemon namecoin-beta-utils

OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET ZMQ
OPTIONS_DEFAULT= HARDENING UPNP WALLET

USERS= namecoin
GROUPS= namecoin

CONFIGURE_ARGS= --with-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--without-utils \
--disable-man

PLIST_FILES= bin/namecoind
PLIST_FILES= bin/namecoind \
"@sample %%ETCDIR%%.conf.sample"

USE_RC_SUBR= namecoind

post-install:
${INSTALL_DATA} ${FILESDIR}/namecoin.conf ${STAGEDIR}${PREFIX}/etc/namecoin.conf.sample

.include "${MASTERDIR}/Makefile"
6 changes: 1 addition & 5 deletions net-p2p/namecoin-utils/Makefile
@@ -1,14 +1,10 @@
MASTERDIR= ${.CURDIR}/../namecoin

PORTREVISION= 4
PKGNAMESUFFIX= -utils

COMMENT= Decentralized, open DNS and more (CLI and Utilities)
SLAVE_PORT= yes

CONFLICTS_INSTALL= namecoin-stable namecoin-stable-daemon namecoin-stable-utils \
namecoin-beta namecoin-beta-daemon namecoin-beta-utils

OPTIONS_DEFINE= DEBUG HARDENING TESTS
OPTIONS_DEFAULT= HARDENING TESTS

Expand All @@ -20,6 +16,6 @@ CONFIGURE_ARGS= --without-daemon \
--disable-wallet \
--disable-man

PLIST_FILES= bin/namecoin-cli bin/namecoin-tx
PLIST_FILES= bin/namecoin-cli bin/namecoin-tx bin/namecoin-util

.include "${MASTERDIR}/Makefile"
12 changes: 5 additions & 7 deletions net-p2p/namecoin/Makefile
@@ -1,7 +1,6 @@
PORTNAME= namecoin
PORTVERSION= 0.21.0.1
DISTVERSION= 24.0
DISTVERSIONPREFIX= nc
PORTREVISION= 8
PORTEPOCH= 1
CATEGORIES= net-p2p dns

Expand All @@ -14,7 +13,7 @@ LICENSE= MIT
LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \
libevent.so:devel/libevent

USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig ssl
USES= autoreconf compiler:c++17-lang gmake libtool pkgconfig ssl
GNU_CONFIGURE= yes

USE_GITHUB= yes
Expand Down Expand Up @@ -65,19 +64,18 @@ TESTS_PLIST_FILES+= bin/bench_namecoin

UPNP_CONFIGURE_WITH= miniupnpc
UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc
UPNP_CPPFLAGS= -I${LOCALBASE}/include
UPNP_LIBS= -L${LOCALBASE}/lib
UPNP_USES= localbase

QRCODES_CONFIGURE_WITH= qrencode
QRCODES_LIB_DEPENDS= libqrencode.so:graphics/libqrencode

WALLET_CONFIGURE_OFF= --disable-wallet
WALLET_CONFIGURE_ON= --enable-wallet \
--with-sqlite=no \
--with-incompatible-bdb \
BDB_CFLAGS=-I${BDB_INCLUDE_DIR} \
BDB_LIBS="-L${BDB_LIB_DIR} \
-Wl,-rpath=${BDB_LIB_DIR} \
-l${BDB_LIB_CXX_NAME}"
-Wl,-rpath=${BDB_LIB_DIR} -l${BDB_LIB_CXX_NAME}"
WALLET_USES= bdb:5+

ZMQ_CONFIGURE_ENABLE= zmq
Expand Down
6 changes: 3 additions & 3 deletions net-p2p/namecoin/distinfo
@@ -1,5 +1,5 @@
TIMESTAMP = 1618840122
SHA256 (namecoin-namecoin-core-nc0.21.0.1_GH0.tar.gz) = 56cb87f7c92eba5ba25dd1c5febca75f5d32aef2102382de88b6f0d8c81ba569
SIZE (namecoin-namecoin-core-nc0.21.0.1_GH0.tar.gz) = 6771191
TIMESTAMP = 1677164952
SHA256 (namecoin-namecoin-core-nc24.0_GH0.tar.gz) = 27fe1323ac09fad48ea2a3b8ed872f427d4711a129b565c0794c1d39a7d41033
SIZE (namecoin-namecoin-core-nc24.0_GH0.tar.gz) = 10728123
SHA256 (indolering-namecoin-graphics-a13a73b_GH0.tar.gz) = 82f308a3527d96a202099feb96a754d036bbdaa875156ad002ba2747d75000c7
SIZE (indolering-namecoin-graphics-a13a73b_GH0.tar.gz) = 7364908
20 changes: 20 additions & 0 deletions net-p2p/namecoin/files/namecoin.conf
@@ -0,0 +1,20 @@
# FreeBSD namecoind configuration file

# This file is used by namecoind
# The GUI and CLI will default to generating and using ~/.namecoin/namecoin.conf
#
# namecoin has hundreds of config options and there isn't a single mode of
# operation (mining, client, testnet etc) that can be easily covered by a
# sample file.

# Bind to given address and always listen on it. Use [host]:port notation for IPv6
#bind=<addr>

# Specify your own public IP address.
#externalip=<ip>

# Listen for incoming connections on non-default port.
#port=<port>

# Connect via a SOCKS5 proxy
#proxy=127.0.0.1:9050
14 changes: 6 additions & 8 deletions net-p2p/namecoin/files/namecoind.in
Expand Up @@ -11,7 +11,7 @@
# namecoind_user (str) Set to "namecoin" by default.
# namecoind_group (str) Set to "namecoin" by default.
# namecoind_conf (str) Set to "%%PREFIX%%/etc/namecoind.conf" by default.
# namecoind_data (str) Set to "/var/lib/namecoind" by default.
# namecoind_data_dir (str) Set to "/var/db/namecoin" by default.
# namecoindlimits_enable (bool) Set to "NO" by default.
# Set it to "YES" to enable namecoindlimits
# namecoindlimits_args Set to "-e -U ${namecoind_user}" by default
Expand All @@ -31,9 +31,8 @@ status_cmd="namecoind_status"
stop_cmd="namecoind_stop"
stop_postcmd="namecoind_wait"
command="%%PREFIX%%/bin/namecoind"
cli_command="%%PREFIX%%/bin/namecoin-cli"
daemon_command="/usr/sbin/daemon"
#pidfile="/var/run/${name}.pid"
pidfile="/var/run/${name}.pid"
extra_commands="configtest"


Expand All @@ -44,13 +43,12 @@ load_rc_config ${name}

: ${namecoind_user:="namecoin"}
: ${namecoind_group:="namecoin"}
: ${namecoind_data_dir:="/var/db/namecoind"}
: ${namecoind_data_dir:="/var/db/namecoin"}
: ${namecoind_config_file:="%%PREFIX%%/etc/namecoin.conf"}
: ${namecoindlimits_args:="-e -U ${namecoind_user}"}

# set up dependant variables
procname="${command}"
pidfile="${namecoind_data_dir}/namecoind.pid"
required_files="${namecoind_config_file}"


Expand Down Expand Up @@ -118,10 +116,10 @@ namecoind_start()
{
echo "Starting namecoind:"
cd "${namecoind_data_dir}" || return 1
${daemon_command} -u "${namecoind_user}" -p "${pidfile}" \
${daemon_command} -u "${namecoind_user}" -p "${pidfile}" -f \
${command} \
-conf="${namecoind_config_file}" \
-datadir="${namecoind_data_dir}" 2> /tmp/namecoind.stderr > /tmp/namecoind.stdout
-datadir="${namecoind_data_dir}"
}

namecoind_stop()
Expand All @@ -133,7 +131,7 @@ namecoind_stop()
echo "Namecoind is not running"
return 1
else
${cli_command} -conf="${namecoind_config_file}" -datadir="${namecoind_data_dir}" stop
kill ${pid}
fi
}

Expand Down
10 changes: 10 additions & 0 deletions net-p2p/namecoin/files/patch-src_rpc_names.cpp
@@ -0,0 +1,10 @@
--- src/rpc/names.cpp.orig 2023-02-23 16:44:43.398660000 +0000
+++ src/rpc/names.cpp 2023-02-23 16:44:58.322833000 +0000
@@ -20,6 +20,7 @@
#include <rpc/server_util.h>
#include <script/names.h>
#include <txmempool.h>
+#include <util/system.h>
#include <util/strencodings.h>
#include <validation.h>
#ifdef ENABLE_WALLET

0 comments on commit f7ca7eb

Please sign in to comment.