@@ -3,27 +3,28 @@ $(package)_version=2.2.7
3
3
$(package)_download_path =https://miniupnp.tuxfamily.org/files/
4
4
$(package)_file_name =$(package ) -$($(package ) _version) .tar.gz
5
5
$(package)_sha256_hash =b0c3a27056840fd0ec9328a5a9bac3dc5e0ec6d2e8733349cf577b0aa1e70ac1
6
- $(package)_patches =dont_leak_info.patch no_libtool.patch fix_windows_build.patch cmake_get_src_addr.patch
6
+ $(package)_patches =dont_leak_info.patch cmake_get_src_addr.patch
7
+ $(package)_build_subdir =build
7
8
8
9
define $(package)_set_vars
9
- $(package ) _build_opts=CC=" $( $( package ) _cc) "
10
- $(package ) _build_opts_mingw32=-f Makefile.mingw CFLAGS=" $( $( package ) _cflags) "
11
- $(package ) _build_env+=CFLAGS=" $( $( package ) _cflags) $( $( package ) _cppflags) " AR=" $( $( package ) _ar) "
10
+ $(package ) _config_opts = -DUPNPC_BUILD_SAMPLE=OFF -DUPNPC_BUILD_SHARED=OFF
11
+ $(package ) _config_opts += -DUPNPC_BUILD_STATIC=ON -DUPNPC_BUILD_TESTS=OFF
12
+ $(package ) _config_opts_mingw32 += -DMINIUPNPC_TARGET_WINDOWS_VERSION=0x0601
12
13
endef
13
14
14
15
define $(package)_preprocess_cmds
15
16
patch -p1 < $($(package ) _patch_dir) /dont_leak_info.patch && \
16
- patch -p1 < $($(package ) _patch_dir) /no_libtool.patch && \
17
- patch -p1 < $($(package ) _patch_dir) /fix_windows_build.patch && \
18
17
patch -p1 < $($(package ) _patch_dir) /cmake_get_src_addr.patch
19
18
endef
20
19
20
+ define $(package)_config_cmds
21
+ $($(package ) _cmake) -S .. -B .
22
+ endef
23
+
21
24
define $(package)_build_cmds
22
- $( MAKE ) build/libminiupnpc.a $($( package ) _build_opts )
25
+ $(MAKE )
23
26
endef
24
27
25
28
define $(package)_stage_cmds
26
- mkdir -p $($(package ) _staging_prefix_dir) /include/miniupnpc $($(package ) _staging_prefix_dir) /lib &&\
27
- install include/*.h $($(package ) _staging_prefix_dir) /include/miniupnpc &&\
28
- install build/libminiupnpc.a $($(package ) _staging_prefix_dir) /lib
29
+ cmake --install . --prefix $($(package ) _staging_prefix_dir)
29
30
endef
0 commit comments