Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #319

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions external/miniupnpc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
deb_dist/
build/
.*.swp
*.o
*.a
*.so
*.dll
*.dll.def
*.exe
*.lib
*.dylib
Makefile.bak
miniupnpcstrings.h
rc_version.h
pythonmodule
pythonmodule3
upnpc-shared
upnpc-static
minihttptestserver
minixmlvalid
testminiwget
validateminiwget
validateminixml
java/miniupnpc_*.jar
_jnaerator.*
out.errors.txt
jnaerator-*.jar
miniupnpc.h.bak
testupnpreplyparse
validateupnpreplyparse
testportlistingparse
validateportlistingparse
listdevices
testigddescparse
validateigddescparse
dist/
miniupnpc.egg-info/
init
miniupnpc.pc
testaddr_is_reserved
validateaddr_is_reserved
wingenminiupnpcstrings
79 changes: 61 additions & 18 deletions external/miniupnpc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project (miniupnpc C)
project (miniupnpc
VERSION 2.2.4
DESCRIPTION "UPnP IGD client lightweight library"
HOMEPAGE_URL https://miniupnp.tuxfamily.org/
LANGUAGES C)

set (MINIUPNPC_VERSION 2.2.3)
set (MINIUPNPC_API_VERSION 17)

option (UPNPC_BUILD_STATIC "Build static library" TRUE)
Expand All @@ -29,15 +32,15 @@ if (NOT WIN32)
target_compile_definitions(miniupnpc-private INTERFACE
MINIUPNPC_SET_SOCKET_TIMEOUT
_BSD_SOURCE _DEFAULT_SOURCE)
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
if (NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES ".*BSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# add_definitions (-D_POSIX_C_SOURCE=200112L)
target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600)
endif ()
else ()
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
endif ()

if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if (APPLE)
target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
endif ()

Expand All @@ -49,7 +52,7 @@ endif ()

# Suppress noise warnings
if (MSVC)
target_compile_definitions(miniupnpc-private INTERFACE _CRT_SECURE_NO_WARNINGS)
target_compile_definitions(miniupnpc-private INTERFACE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS)
endif()

configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h)
Expand Down Expand Up @@ -99,7 +102,7 @@ if (UPNPC_BUILD_STATIC)
add_library (miniupnpc::miniupnpc ALIAS libminiupnpc-static)
endif()
set_target_properties (libminiupnpc-static PROPERTIES EXPORT_NAME miniupnpc)
if (WIN32)
if (WIN32 AND NOT MINGW)
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "libminiupnpc")
else()
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
Expand Down Expand Up @@ -141,7 +144,7 @@ if (UPNPC_BUILD_SHARED)
add_library (miniupnpc::miniupnpc ALIAS libminiupnpc-shared)
set_target_properties (libminiupnpc-shared PROPERTIES EXPORT_NAME miniupnpc)
set_target_properties (libminiupnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
set_target_properties (libminiupnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
set_target_properties (libminiupnpc-shared PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties (libminiupnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private)
target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS)
Expand Down Expand Up @@ -216,27 +219,67 @@ if (UPNPC_BUILD_TESTS)
)
target_link_libraries (testaddr_is_reserved PRIVATE miniupnpc-tests)

add_executable (testportlistingparse src/testportlistingparse.c
src/minixml.c src/portlistingparse.c)
target_include_directories (testportlistingparse PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries (testportlistingparse PRIVATE miniupnpc-tests)

add_executable (minihttptestserver src/minihttptestserver.c)

# set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} testminixml minixmlvalid testupnpreplyparse testigddescparse testminiwget)
include(CTest)
add_test(NAME validateminixml
COMMAND minixmlvalid)
add_test(NAME validateminiwget
COMMAND ${CMAKE_SOURCE_DIR}/testminiwget.sh)
set_property(TEST validateminiwget
PROPERTY ENVIRONMENT
TESTSERVER=${CMAKE_BINARY_DIR}/minihttptestserver
TESTMINIWGET=${CMAKE_BINARY_DIR}/testminiwget)
add_test(NAME validateupnpreplyparse
COMMAND ${CMAKE_SOURCE_DIR}/testupnpreplyparse.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
set_property(TEST validateupnpreplyparse
PROPERTY ENVIRONMENT
TESTUPNPREPLYPARSE=${CMAKE_BINARY_DIR}/testupnpreplyparse)
add_test(NAME validateportlistingparse
COMMAND testportlistingparse)
add_test(NAME validateigddescparse1
COMMAND testigddescparse new_LiveBox_desc.xml new_LiveBox_desc.values
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/testdesc)
add_test(NAME validateigddescparse2
COMMAND testigddescparse linksys_WAG200G_desc.xml linksys_WAG200G_desc.values
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/testdesc)
add_test(NAME validateaddr_is_reserved
COMMAND testaddr_is_reserved)

endif ()

configure_file(miniupnpc.pc.in miniupnpc.pc @ONLY)

if (NOT UPNPC_NO_INSTALL)
install (FILES
miniupnpc.h
miniwget.h
upnpcommands.h
igd_desc_parse.h
upnpreplyparse.h
upnperrors.h
upnpdev.h
miniupnpctypes.h
portlistingparse.h
miniupnpc_declspec.h
include/miniupnpc.h
include/miniwget.h
include/upnpcommands.h
include/igd_desc_parse.h
include/upnpreplyparse.h
include/upnperrors.h
include/upnpdev.h
include/miniupnpctypes.h
include/portlistingparse.h
include/miniupnpc_declspec.h
DESTINATION include/miniupnpc
)

install(FILES miniupnpc-config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/miniupnpc
)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/miniupnpc.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
endif()

# vim: ts=2:sw=2:expandtab
12 changes: 11 additions & 1 deletion external/miniupnpc/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
$Id: Changelog.txt,v 1.249 2021/03/02 23:47:36 nanard Exp $
$Id: Changelog.txt,v 1.254 2022/10/21 21:13:12 nanard Exp $
miniUPnP client Changelog.

VERSION 2.2.4 : released 2022/10/21

2022/02/20:
upnpc: use of @ to replace local lan address

2021/11/09:
python module : Allow to specify the root description url

VERSION 2.2.3 : released 2021/09/28

2021/08/13:
Change directory structure : include/ and src/ directories.

Expand Down
13 changes: 7 additions & 6 deletions external/miniupnpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# http://miniupnp.free.fr/
# https://miniupnp.tuxfamily.org/
# https://github.com/miniupnp/miniupnp
# (c) 2005-2021 Thomas Bernard
# (c) 2005-2022 Thomas Bernard
# to install use :
# $ make DESTDIR=/tmp/dummylocation install
# or
Expand Down Expand Up @@ -162,7 +162,7 @@ PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfig

FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
ifeq (, $(findstring amiga, $(OS)))
FILESTOINSTALL += $(SHAREDLIBRARY) miniupnpc.pc
FILESTOINSTALL += $(SHAREDLIBRARY) $(BUILD)/miniupnpc.pc
endif


Expand Down Expand Up @@ -251,15 +251,15 @@ install: updateversion $(FILESTOINSTALL)
$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
ifeq (, $(findstring amiga, $(OS)))
$(INSTALL) -m 644 $(SHAREDLIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(notdir $(SHAREDLIBRARY))
$(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
$(INSTALL) -m 644 miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
$(INSTALL) -m 644 $(BUILD)/miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
endif
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
ifneq (, $(findstring amiga, $(OS)))
$(INSTALL) -m 755 upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
$(INSTALL) -m 755 $(BUILD)/upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
else
$(INSTALL) -m 755 upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
$(INSTALL) -m 755 $(BUILD)/upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
endif
$(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip
ifeq (, $(findstring amiga, $(OS)))
Expand Down Expand Up @@ -293,6 +293,7 @@ $(BUILD)/miniupnpc.pc: VERSION
echo "" >> $@
echo "Name: miniUPnPc" >> $@
echo "Description: UPnP IGD client lightweight library" >> $@
echo "URL: https://miniupnp.tuxfamily.org/" >> $@
echo "Version: $(VERSION)" >> $@
echo "Libs: -L\$${libdir} -lminiupnpc" >> $@
echo "Cflags: -I\$${includedir}" >> $@
Expand Down
43 changes: 36 additions & 7 deletions external/miniupnpc/Makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This Makefile is made for MinGW
#
# To cross compile on a *nix machine :
# make -f Makefile.mingw DLLWRAP=mingw32-dllwrap CC=mingw32-gcc AR=mingw32-ar
# make -f Makefile.mingw DLLWRAP=mingw32-dllwrap CC=mingw32-gcc AR=mingw32-ar WINDRES=mingw32-windres
#
SRCDIR = src
INCDIR = include
Expand All @@ -21,15 +21,18 @@ RM = del
else
RM = rm -f
endif
#CFLAGS = -Wall -g
#CPPFLAGS = -DDEBUG -D_WIN32_WINNT=0X501
CFLAGS = -Wall -W -Wstrict-prototypes -Os
CPPFLAGS = -DNDEBUG -D_WIN32_WINNT=0X501

CFLAGS ?= -Os
CFLAGS += -Wall
CFLAGS += -W -Wstrict-prototypes

CPPFLAGS += -DNDEBUG -D_WIN32_WINNT=0x501
CPPFLAGS += -Iinclude
CPPFLAGS += -I.
LDLIBS = -lws2_32 -liphlpapi
# -lwsock32

# -liphlpapi is needed for GetBestRoute() and GetIpAddrTable()
LDLIBS = -lws2_32 -liphlpapi

PYTHON=\utils\python25\python
OBJS=miniwget.o minixml.o igd_desc_parse.o minisoap.o \
minissdpc.o \
Expand All @@ -44,10 +47,22 @@ BINARIES=upnpc-static.exe upnpc-shared.exe \
ifneq ($(GITHUB_SHA),)
COMMITREF=$(GITHUB_SHA)
else
ifneq ($(CI_COMMIT_SHORT_SHA),)
COMMITREF=$(CI_COMMIT_SHORT_SHA)
else
COMMITREF=$(shell git rev-parse --short HEAD)
endif
endif
DISTFILE:=$(shell echo "miniupnpc-bin-win32-`cat VERSION`-$(COMMITREF).zip")

LIBDIR ?= lib
# install directories
ifeq ($(strip $(PREFIX)),)
INSTALLPREFIX ?= /usr
else
INSTALLPREFIX ?= $(PREFIX)
endif

.PHONY: all dist clean

all: $(BINARIES)
Expand All @@ -60,6 +75,7 @@ clean:
$(RM) *.exe
$(RM) miniupnpc.dll miniupnpc.lib miniupnpc.dll.def
$(RM) libminiupnpc.a
$(RM) $(DISTFILE)

$(DISTFILE): $(BINARIES)
$(ZIP) $@ *.exe *.dll *.lib *.def *.a LICENSE README Changelog.txt
Expand Down Expand Up @@ -121,6 +137,19 @@ rc_version.h: VERSION
mv $@.tmp $@
endif

miniupnpc.pc: VERSION
$(RM) $@
echo "prefix=$(INSTALLPREFIX)" >> $@
echo "exec_prefix=\$${prefix}" >> $@
echo "libdir=\$${exec_prefix}/$(LIBDIR)" >> $@
echo "includedir=\$${prefix}/include" >> $@
echo "" >> $@
echo "Name: miniUPnPc" >> $@
echo "Description: UPnP IGD client lightweight library" >> $@
echo "Version: $(shell cat VERSION)" >> $@
echo "Libs: -L\$${libdir} -lminiupnpc" >> $@
echo "Cflags: -I\$${includedir}" >> $@

winres.o: miniupnpc.rc rc_version.h
$(WINDRES) -D INTERNAL_NAME=\\\"miniupnpc.dll\\0\\\" -i $< -o $@

Expand Down
2 changes: 1 addition & 1 deletion external/miniupnpc/README
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ send me an email !
For any question, you can use the web forum :
https://miniupnp.tuxfamily.org/forum/

Bugs should be reported on github :
Bugs should be reported on GitHub :
https://github.com/miniupnp/miniupnp/issues

* Linux firewall configuration for UPnP clients *
Expand Down
2 changes: 1 addition & 1 deletion external/miniupnpc/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3
2.2.4
8 changes: 4 additions & 4 deletions external/miniupnpc/include/miniupnpc.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* $Id: miniupnpc.h,v 1.59 2021/09/28 21:39:17 nanard Exp $ */
/* $Id: miniupnpc.h,v 1.61 2022/10/21 21:15:02 nanard Exp $ */
/* vim: tabstop=4 shiftwidth=4 noexpandtab
* Project: miniupnp
* http://miniupnp.free.fr/
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
* Author: Thomas Bernard
* Copyright (c) 2005-2021 Thomas Bernard
* Copyright (c) 2005-2022 Thomas Bernard
* This software is subjects to the conditions detailed
* in the LICENCE file provided within this distribution */
#ifndef MINIUPNPC_H_INCLUDED
Expand All @@ -20,7 +20,7 @@
#define UPNPDISCOVER_MEMORY_ERROR (-102)

/* versions : */
#define MINIUPNPC_VERSION "2.2.3"
#define MINIUPNPC_VERSION "2.2.4"
#define MINIUPNPC_API_VERSION 17

/* Source port:
Expand Down
18 changes: 18 additions & 0 deletions external/miniupnpc/miniupnpc.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# this template is filled-in by CMake `configure_file(... @ONLY)`
# the `@....@` are filled in by CMake configure_file(),
# from variables set in your CMakeLists.txt or by CMake itself
#
# Good tutoral for understanding .pc files:
# https://people.freedesktop.org/~dbn/pkg-config-guide.html

prefix="@CMAKE_INSTALL_PREFIX@"
exec_prefix="${prefix}"
libdir="${prefix}/lib"
includedir="${prefix}/include"

Name: @PROJECT_NAME@
Description: @PROJECT_DESCRIPTION@
URL: @PROJECT_HOMEPAGE_URL@
Version: @PROJECT_VERSION@
Libs: -L"${libdir}" -lminiupnpc
Cflags: -I"${includedir}"
2 changes: 2 additions & 0 deletions external/miniupnpc/msvc/upnpc-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>upnpc-shared</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
Expand All @@ -84,6 +85,7 @@
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>upnpc-shared</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down
Loading