mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
Add support to build with miniupnpc on Android
Necessary to workaroud issues: https://github.com/RetroShare/RetroShare/issues/1649 https://github.com/mrjimenez/pupnp/issues/119
This commit is contained in:
parent
ce3e2a2c9d
commit
a169250e1c
@ -49,6 +49,9 @@ define_default_value XAPIAN_SOURCE_SHA256 13f08a0b649c7afa804fa0e85678d693fd6069
|
||||
define_default_value RAPIDJSON_SOURCE_VERSION "1.1.0"
|
||||
define_default_value RAPIDJSON_SOURCE_SHA256 bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
|
||||
|
||||
define_default_value MINIUPNPC_SOURCE_VERSION "2.1.20190625"
|
||||
define_default_value MINIUPNPC_SOURCE_SHA256 8723f5d7fd7970de23635547700878cd29a5c2bb708b5e5475b2d1d2510317fb
|
||||
|
||||
|
||||
## $1 filename, $2 sha256 hash
|
||||
function check_sha256()
|
||||
@ -482,6 +485,33 @@ build_xapian()
|
||||
make install
|
||||
}
|
||||
|
||||
build_miniupnpc()
|
||||
{
|
||||
echo "build_miniupnpc()
|
||||
################################################################################
|
||||
################################################################################
|
||||
################################################################################
|
||||
"
|
||||
S_dir="miniupnpc-${MINIUPNPC_SOURCE_VERSION}"
|
||||
B_dir="miniupnpc-${MINIUPNPC_SOURCE_VERSION}-build"
|
||||
D_file="$S_dir.tar.gz"
|
||||
verified_download $D_file $MINIUPNPC_SOURCE_SHA256 \
|
||||
http://miniupnp.free.fr/files/${D_file}
|
||||
rm -rf $S_dir $B_dir
|
||||
tar -xf $D_file
|
||||
mkdir $B_dir
|
||||
cd $B_dir
|
||||
cmake \
|
||||
-DUPNPC_BUILD_STATIC=TRUE \
|
||||
-DUPNPC_BUILD_SHARED=FALSE \
|
||||
-DUPNPC_BUILD_TESTS=FALSE \
|
||||
-DUPNPC_BUILD_SAMPLE=FALSE \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" -B. -S../$S_dir
|
||||
make -j${HOST_NUM_CPU}
|
||||
make install
|
||||
}
|
||||
|
||||
build_toolchain
|
||||
[ "${INSTALL_QT_ANDROID}X" != "trueX" ] || install_qt_android
|
||||
build_bzlib
|
||||
@ -493,6 +523,7 @@ build_rapidjson
|
||||
build_restbed
|
||||
build_udp-discovery-cpp
|
||||
build_xapian
|
||||
build_miniupnpc
|
||||
delete_copied_includes
|
||||
|
||||
echo NATIVE_LIBS_TOOLCHAIN_PATH=${NATIVE_LIBS_TOOLCHAIN_PATH}
|
||||
|
@ -648,7 +648,7 @@ SOURCES += util/folderiterator.cc \
|
||||
|
||||
equals(RS_UPNP_LIB, miniupnpc) {
|
||||
HEADERS += rs_upnp/upnputil.h rs_upnp/upnphandler_miniupnp.h
|
||||
SOURCES += rs_upnp/upnputil.c rs_upnp/upnphandler_miniupnp.cc
|
||||
SOURCES += rs_upnp/upnputil.cc rs_upnp/upnphandler_miniupnp.cc
|
||||
}
|
||||
|
||||
contains(RS_UPNP_LIB, upnp) {
|
||||
|
Loading…
Reference in New Issue
Block a user