mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
libraries/miniupnpc: Updated for version 2.2.3.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ef8eaae3e8
commit
ac6f4b0290
3 changed files with 95 additions and 13 deletions
66
libraries/miniupnpc/miniupnpc-cmake.patch
Normal file
66
libraries/miniupnpc/miniupnpc-cmake.patch
Normal file
|
@ -0,0 +1,66 @@
|
|||
diff -Naur miniupnpc-2.2.3.old/CMakeLists.txt miniupnpc-2.2.3/CMakeLists.txt
|
||||
--- miniupnpc-2.2.3.old/CMakeLists.txt 2022-01-28 14:14:29.114014705 +0100
|
||||
+++ miniupnpc-2.2.3/CMakeLists.txt 2022-01-28 14:19:49.875995027 +0100
|
||||
@@ -219,24 +219,30 @@
|
||||
# set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} testminixml minixmlvalid testupnpreplyparse testigddescparse testminiwget)
|
||||
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
|
||||
diff -Naur miniupnpc-2.2.3.old/miniupnpc.pc.in miniupnpc-2.2.3/miniupnpc.pc.in
|
||||
--- miniupnpc-2.2.3.old/miniupnpc.pc.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ miniupnpc-2.2.3/miniupnpc.pc.in 2022-01-28 14:16:38.206423709 +0100
|
||||
@@ -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: @CMAKE_PROJECT_DESCRIPTION@
|
||||
+URL: @CMAKE_PROJECT_HOMEPAGE_URL@
|
||||
+Version: @PROJECT_VERSION@
|
||||
+Libs: -L"${libdir}" -lminiupnpc
|
||||
+Cflags: -I"${includedir}"
|
|
@ -25,7 +25,7 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=miniupnpc
|
||||
VERSION=${VERSION:-2.1}
|
||||
VERSION=${VERSION:-2.2.3}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -81,30 +81,46 @@ find -L . \
|
|||
|
||||
# Slackware specific info.
|
||||
patch -p1 < $CWD/slackware-version.patch
|
||||
sed -i 's|share/man|man|' Makefile
|
||||
sed -i "s|lib${PRGNAM}\.a|lib${PRGNAM}\.so|" setup.py
|
||||
|
||||
# Upstream Cmake causes build problems. We're going to use the makefile instead.
|
||||
CFLAGS="$SLKCFLAGS" LIBDIR="lib${LIBDIRSUFFIX}" make
|
||||
make install DESTDIR=$PKG LIBDIR="lib${LIBDIRSUFFIX}"
|
||||
# Use already built shared object for Python module
|
||||
# Unversioned link is not enough to avoid a rebuild
|
||||
sed -i -e 's|build/libminiupnpc.a|build/libminiupnpc.so.%{version}|g' setup.py
|
||||
|
||||
patch -p1 < $CWD/miniupnpc-cmake.patch
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DNO_GETADDRINFO=FALSE \
|
||||
-DUPNPC_BUILD_SAMPLE=TRUE \
|
||||
-DUPNPC_BUILD_SHARED=TRUE \
|
||||
-DUPNPC_BUILD_STATIC=FALSE \
|
||||
-DUPNPC_BUILD_TESTS=TRUE \
|
||||
-DUPNPC_NO_INSTALL=FALSE ..
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
cd ..
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
python setup.py install --root=$PKG
|
||||
|
||||
# For python 3.x support.
|
||||
if [ "${PYTHON3:-no}" == "yes" ]; then
|
||||
if [ "${PYTHON3:-yes}" == "yes" ]; then
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
python3 setup.py build
|
||||
python3 setup.py install --root=$PKG
|
||||
fi
|
||||
|
||||
# Remove static library.
|
||||
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/lib${PRGNAM}.a
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
find $PKG/usr/man -type f -exec chmod 0644 '{}' \;
|
||||
mkdir -p $PKG/usr/man/man3
|
||||
gzip -c9 man3/miniupnpc.3 > $PKG/usr/man/man3/miniupnpc.3.gz
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a Changelog.txt LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="miniupnpc"
|
||||
VERSION="2.1"
|
||||
VERSION="2.2.3"
|
||||
HOMEPAGE="http://miniupnp.free.fr/"
|
||||
DOWNLOAD="http://miniupnp.free.fr/files/miniupnpc-2.1.tar.gz"
|
||||
MD5SUM="80143183f743d402459095711b1ce793"
|
||||
DOWNLOAD="http://miniupnp.free.fr/files/miniupnpc-2.2.3.tar.gz"
|
||||
MD5SUM="4a037c6f22861d58e037fcb0bdc5922e"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
Loading…
Reference in a new issue