On Sat, November 5, 2022 17:49, Rafael Sadowski wrote:
> Since we have waitid(2) in base and boost we can update net/bitcoin to
> the latest version. All tests and bench passed and the daemon runs fine
> on amd64.
>
> OK, feedback?
Hi,
It picks up miniupnpc if installed. --with-miniupnpc=no or updated
LDEP/WANTLIB are needed.
Other than this OK kirby@
>
> Rafael
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/bitcoin/Makefile,v
> retrieving revision 1.34
> diff -u -p -u -p -r1.34 Makefile
> --- Makefile 24 May 2022 18:51:25 -0000 1.34
> +++ Makefile 5 Nov 2022 14:49:16 -0000
> @@ -4,9 +4,7 @@ COMMENT = P2P payment system
>
> GH_ACCOUNT = bitcoin
> GH_PROJECT = bitcoin
> -GH_TAGNAME = v0.21.2
> -
> -REVISION = 0
> +GH_TAGNAME = v23.0
>
> SHARED_LIBS += bitcoinconsensus 4.0 # 0.0
> SHARED_LIBS += secp256k1 0.1 # 0.0
> @@ -21,19 +19,19 @@ MAINTAINER = Rafael Sadowski <rsadowski
> # MIT
> PERMIT_PACKAGE = Yes
>
> -WANTLIB += ${COMPILER_LIBCXX} boost_filesystem boost_system boost_thread-mt
> -WANTLIB += c db_cxx event_core event_extra event_pthreads m sodium
> -WANTLIB += sqlite3 z zmq
> +WANTLIB += ${COMPILER_LIBCXX} c db_cxx event_core event_extra
> +WANTLIB += event_pthreads m sodium sqlite3 z zmq
> +
> +BUILD_DEPENDS = devel/boost
>
> LIB_DEPENDS = databases/db/v4 \
> databases/sqlite3 \
> - devel/boost \
> devel/libevent2 \
> net/zeromq
>
> USE_GMAKE = Yes
>
> -# C++11
> +# C++17
> # Undefined reference to boost and db4 with GCC
> COMPILER = base-clang ports-clang
>
> @@ -42,12 +40,13 @@ AUTOCONF_VERSION = 2.69
> AUTOMAKE_VERSION = 1.14
> AUTORECONF = ./autogen.sh
> CONFIGURE_ARGS += --with-incompatible-bdb \
> + --with-sqlite=yes \
> --disable-bip70
>
> CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include/db4
> -I${LOCALBASE}/include"
> \
> LDFLAGS="-L${LOCALBASE}/lib/db4"
>
> -CXXFLAGS += -std=c++11
> +CXXFLAGS += -std=c++17
>
> MAKE_FLAGS = CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}"
> CXXFLAGS="${CXXFLAGS}"
>
> @@ -82,8 +81,6 @@ SUBST_VARS += VARBASE
>
> post-install:
> cd ${WRKBUILD}/src/secp256k1 && \
> - ${MAKE_PROGRAM} ${MAKE_FLAGS} install
> - cd ${WRKBUILD}/src/univalue && \
> ${MAKE_PROGRAM} ${MAKE_FLAGS} install
> ${INSTALL_DATA_DIR} ${PREFIX}/share/bitcoin
> ${INSTALL_SCRIPT} ${WRKDIST}/share/rpcauth/rpcauth.py \
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/net/bitcoin/distinfo,v
> retrieving revision 1.15
> diff -u -p -u -p -r1.15 distinfo
> --- distinfo 11 Oct 2021 04:59:08 -0000 1.15
> +++ distinfo 5 Nov 2022 14:49:16 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (bitcoin-0.21.2.tar.gz) = QUb3UfxWkb3PkRy9uNMtjSXCl9KdWBcyJ64a5kOO254=
> -SIZE (bitcoin-0.21.2.tar.gz) = 7762621
> +SHA256 (bitcoin-23.0.tar.gz) = JnSL9J1ta0AU0P7cysRr8rzKQunTSzrP2eNGfEFazAU=
> +SIZE (bitcoin-23.0.tar.gz) = 10978750
> Index: patches/patch-build-aux_m4_bitcoin_find_bdb48_m4
> ===================================================================
> RCS file:
> /cvs/ports/net/bitcoin/patches/patch-build-aux_m4_bitcoin_find_bdb48_m4,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 patch-build-aux_m4_bitcoin_find_bdb48_m4
> --- patches/patch-build-aux_m4_bitcoin_find_bdb48_m4 11 Mar 2022 19:45:47
> -0000 1.2
> +++ patches/patch-build-aux_m4_bitcoin_find_bdb48_m4 5 Nov 2022 14:49:16
> -0000
> @@ -3,7 +3,7 @@ Build with BerkeleyDB >= 4.6
> Index: build-aux/m4/bitcoin_find_bdb48.m4
> --- build-aux/m4/bitcoin_find_bdb48.m4.orig
> +++ build-aux/m4/bitcoin_find_bdb48.m4
> -@@ -22,7 +22,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
> +@@ -24,7 +24,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include <${searchpath}db_cxx.h>
> ]],[[
> @@ -12,7 +12,7 @@ Index: build-aux/m4/bitcoin_find_bdb48.m
> #error "failed to find bdb 4.8+"
> #endif
> ]])],[
> -@@ -35,7 +35,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
> +@@ -37,7 +37,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include <${searchpath}db_cxx.h>
> ]],[[
> Index: patches/patch-configure_ac
> ===================================================================
> RCS file: /cvs/ports/net/bitcoin/patches/patch-configure_ac,v
> retrieving revision 1.7
> diff -u -p -u -p -r1.7 patch-configure_ac
> --- patches/patch-configure_ac 11 Mar 2022 19:45:47 -0000 1.7
> +++ patches/patch-configure_ac 5 Nov 2022 14:49:16 -0000
> @@ -3,11 +3,11 @@ We already uses PIE as default. Unbreak
> Index: configure.ac
> --- configure.ac.orig
> +++ configure.ac
> -@@ -840,7 +840,6 @@ if test x$use_hardening != xno; then
> - AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS
> -Wl,-z,relro"],, [[$LDFLAG_WERROR]])
> - AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS
> -Wl,-z,now"],, [[$LDFLAG_WERROR]])
> - AX_CHECK_LINK_FLAG([[-Wl,-z,separate-code]],
> [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"],,
> [[$LDFLAG_WERROR]])
> -- AX_CHECK_LINK_FLAG([[-fPIE -pie]], [PIE_FLAGS="-fPIE";
> HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],, [[$CXXFLAG_WERROR]])
> +@@ -945,7 +945,6 @@ if test "$use_hardening" != "no"; then
> + AX_CHECK_LINK_FLAG([-Wl,-z,relro], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS
> -Wl,-z,relro"], [], [$LDFLAG_WERROR])
> + AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS
> -Wl,-z,now"], [], [$LDFLAG_WERROR])
> + AX_CHECK_LINK_FLAG([-Wl,-z,separate-code],
> [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [],
> [$LDFLAG_WERROR])
> +- AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE";
> HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR])
>
> case $host in
> *mingw*)
> Index: patches/patch-src_wallet_bdb_cpp
> ===================================================================
> RCS file: /cvs/ports/net/bitcoin/patches/patch-src_wallet_bdb_cpp,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 patch-src_wallet_bdb_cpp
> --- patches/patch-src_wallet_bdb_cpp 11 Mar 2022 19:45:47 -0000 1.2
> +++ patches/patch-src_wallet_bdb_cpp 5 Nov 2022 14:49:16 -0000
> @@ -1,7 +1,7 @@
> Index: src/wallet/bdb.cpp
> --- src/wallet/bdb.cpp.orig
> +++ src/wallet/bdb.cpp
> -@@ -158,7 +158,9 @@ bool BerkeleyEnvironment::Open(bilingual_str& err)
> +@@ -157,7 +157,9 @@ bool BerkeleyEnvironment::Open(bilingual_str& err)
> dbenv->set_errfile(fsbridge::fopen(pathErrorFile, "a")); /// debug
> dbenv->set_flags(DB_AUTO_COMMIT, 1);
> dbenv->set_flags(DB_TXN_WRITE_NOSYNC, 1);
> @@ -11,7 +11,7 @@ Index: src/wallet/bdb.cpp
> int ret = dbenv->open(strPath.c_str(),
> DB_CREATE |
> DB_INIT_LOCK |
> -@@ -201,7 +203,9 @@ BerkeleyEnvironment::BerkeleyEnvironment()
> +@@ -200,7 +202,9 @@ BerkeleyEnvironment::BerkeleyEnvironment()
> dbenv->set_lk_max_locks(10000);
> dbenv->set_lk_max_objects(10000);
> dbenv->set_flags(DB_AUTO_COMMIT, 1);
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/net/bitcoin/pkg/PLIST,v
> retrieving revision 1.8
> diff -u -p -u -p -r1.8 PLIST
> --- pkg/PLIST 11 Mar 2022 19:45:47 -0000 1.8
> +++ pkg/PLIST 5 Nov 2022 14:49:16 -0000
> @@ -11,6 +11,7 @@
> @bin bin/bench_bitcoin
> @bin bin/bitcoin-cli
> @bin bin/bitcoin-tx
> +@bin bin/bitcoin-util
> @bin bin/bitcoin-wallet
> @bin bin/bitcoind
> @comment @bin bin/test_bitcoin
> @@ -21,23 +22,21 @@ include/secp256k1_extrakeys.h
> include/secp256k1_preallocated.h
> include/secp256k1_recovery.h
> include/secp256k1_schnorrsig.h
> -include/univalue.h
> @static-lib lib/libbitcoinconsensus.a
> lib/libbitcoinconsensus.la
> @lib lib/libbitcoinconsensus.so.${LIBbitcoinconsensus_VERSION}
> @static-lib lib/libsecp256k1.a
> lib/libsecp256k1.la
> @lib lib/libsecp256k1.so.${LIBsecp256k1_VERSION}
> -@static-lib lib/libunivalue.a
> -lib/libunivalue.la
> -@lib lib/libunivalue.so.${LIBunivalue_VERSION}
> lib/pkgconfig/libbitcoinconsensus.pc
> lib/pkgconfig/libsecp256k1.pc
> -lib/pkgconfig/libunivalue.pc
> @man man/man1/bitcoin-cli.1
> @man man/man1/bitcoin-tx.1
> +@man man/man1/bitcoin-util.1
> @man man/man1/bitcoin-wallet.1
> @man man/man1/bitcoind.1
> +share/bash-completion/
> +share/bash-completion/completions/
> share/bash-completion/completions/bitcoin/
> share/bash-completion/completions/bitcoin/bitcoin-cli.bash-completion
> share/bash-completion/completions/bitcoin/bitcoin-tx.bash-completion
>
>