aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <arrowd@FreeBSD.org>2023-04-08 18:10:52 +0000
committerGleb Popov <arrowd@FreeBSD.org>2023-04-08 18:12:31 +0000
commitf23cd3d99022696882e4ff7c68091037b36aa4f3 (patch)
tree1f29b8a4f98538f9709fe26da1e11585b035a9e8
parent2b7a2e498012740b3bca082f13b0fec981b3e02a (diff)
downloadports-f23cd3d99022696882e4ff7c68091037b36aa4f3.tar.gz
ports-f23cd3d99022696882e4ff7c68091037b36aa4f3.zip
net-p2p/cardano-node: Fix "reload" command of the rc script.
While there enable LTO for this port, as it benefits greatly from this optimization. It was reported to run without issues with LTO. Reported by: Boris Polujin <boris@zfs.ninja>
-rw-r--r--net-p2p/cardano-node/Makefile3
-rwxr-xr-xnet-p2p/cardano-node/files/cardano_node.in4
2 files changed, 6 insertions, 1 deletions
diff --git a/net-p2p/cardano-node/Makefile b/net-p2p/cardano-node/Makefile
index 680990d785b1..881263e8c1f9 100644
--- a/net-p2p/cardano-node/Makefile
+++ b/net-p2p/cardano-node/Makefile
@@ -1,5 +1,6 @@
PORTNAME= cardano-node
PORTVERSION= 1.35.7
+PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= https://input-output-hk.github.io/cardano-haskell-packages/package/:chap
@@ -443,6 +444,8 @@ CABAL_PROJECT= append
CABAL_EXECUTABLES= cardano-node cardano-cli cardano-submit-api cardano-tracer
CABAL_REPOSITORIES= chap
+WITH_LTO= yes
+
post-patch:
${REINPLACE_CMD} -e 's/$$(gitRevFromGit)/"${CARDANO_NODE_HASH}"/' \
-e '/Cardano.Git.RevFromGit/d' \
diff --git a/net-p2p/cardano-node/files/cardano_node.in b/net-p2p/cardano-node/files/cardano_node.in
index df010e544630..1b9a59443e2e 100755
--- a/net-p2p/cardano-node/files/cardano_node.in
+++ b/net-p2p/cardano-node/files/cardano_node.in
@@ -159,6 +159,7 @@ if checkyesno "_jail_enable"; then
_socket_arg="${jail_socket}"
_topology_arg="${jail_topology}"
_config_arg="${jail_config}"
+ _db_arg="/db"
# We need to override ${command} to make check_pidfile work correctly when
# rc.subr calls it as "check_pidfile ${pidfile} ${command}"
command=/usr/sbin/jail
@@ -166,11 +167,12 @@ else
_socket_arg="${_socket}"
_topology_arg="${_topology}"
_config_arg="${_config}"
+ _db_arg="${_db}"
fi
pidfile="/var/run/${name}.pid"
flags="run +RTS ${_rts_flags} -RTS \
- --database-path /db \
+ --database-path ${_db_arg} \
--host-addr ${_host} \
--port ${_port} \
--socket-path ${_socket_arg} \