Skip to content

Commit 10f5022

Browse files
committed
Merge bitcoin/bitcoin#29708: depends: build libnatpmp with CMake
3c1ae3e depends: switch libnatpmp to CMake (Cory Fields) 72ba7b5 depends: libnatpmp f2433bec24ca3d3f22a8a7840728a3ac177f94ba (fanquake) Pull request description: This picks up one of the changes from bitcoin/bitcoin#29232, which is a switch to building libnatpmp with CMake. It includes an update to the most recent version of libnatpmp (miniupnp/libnatpmp@f2433be), which includes (miniupnp/libnatpmp#43). From an initial look I couldn't find any significant difference between the Autotools and CMake produced libs. ACKs for top commit: m3dwards: ACK bitcoin/bitcoin@3c1ae3e hebasto: ACK 3c1ae3e. TheCharlatan: ACK 3c1ae3e Tree-SHA512: 1dd9d9933a5fceb9f8c4e1d68cd5cb4456a10a6dd27a6f6316f14493f9d2efad981ef8be9570c09ca82d45163aebd7f4cb2b2449989ec6084268ddba9a564c83
2 parents 2a07c46 + 3c1ae3e commit 10f5022

File tree

3 files changed

+9
-30
lines changed

3 files changed

+9
-30
lines changed

depends/packages/libnatpmp.mk

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
package=libnatpmp
2-
$(package)_version=07004b97cf691774efebe70404cf22201e4d330d
2+
$(package)_version=f2433bec24ca3d3f22a8a7840728a3ac177f94ba
33
$(package)_download_path=https://github.com/miniupnp/libnatpmp/archive
44
$(package)_file_name=$($(package)_version).tar.gz
5-
$(package)_sha256_hash=9321953ceb39d07c25463e266e50d0ae7b64676bb3a986d932b18881ed94f1fb
6-
$(package)_patches=no_libtool.patch
5+
$(package)_sha256_hash=ef84979950dfb3556705b63c9cd6c95501b75e887fba466234b187f3c9029669
6+
$(package)_build_subdir=build
77

8-
define $(package)_set_vars
9-
$(package)_build_opts=CC="$($(package)_cc)"
10-
$(package)_build_opts_mingw32=CPPFLAGS=-DNATPMP_STATICLIB
11-
$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
12-
endef
13-
14-
define $(package)_preprocess_cmds
15-
patch -p1 < $($(package)_patch_dir)/no_libtool.patch
8+
define $(package)_config_cmds
9+
$($(package)_cmake) -S .. -B .
1610
endef
1711

1812
define $(package)_build_cmds
19-
$(MAKE) libnatpmp.a $($(package)_build_opts)
13+
$(MAKE) natpmp
2014
endef
2115

2216
define $(package)_stage_cmds
23-
mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib &&\
24-
install *.h $($(package)_staging_prefix_dir)/include &&\
17+
mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib && \
18+
install ../natpmp.h ../natpmp_declspec.h $($(package)_staging_prefix_dir)/include && \
2519
install libnatpmp.a $($(package)_staging_prefix_dir)/lib
2620
endef

depends/patches/libnatpmp/no_libtool.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.

doc/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
3535
### Networking
3636
| Dependency | Releases | Version used | Minimum required | Runtime |
3737
| --- | --- | --- | --- | --- |
38-
| [libnatpmp](../depends/packages/libnatpmp.mk) | [link](https://github.com/miniupnp/libnatpmp/) | commit [07004b9...](https://github.com/bitcoin/bitcoin/pull/25917) | | No |
38+
| [libnatpmp](../depends/packages/libnatpmp.mk) | [link](https://github.com/miniupnp/libnatpmp/) | commit [f2433be...](https://github.com/bitcoin/bitcoin/pull/29708) | | No |
3939
| [MiniUPnPc](../depends/packages/miniupnpc.mk) | [link](https://miniupnp.tuxfamily.org/) | [2.2.2](https://github.com/bitcoin/bitcoin/pull/20421) | 2.1 | No |
4040

4141
### Notifications

0 commit comments

Comments
 (0)