[Slackbuilds-users] Retroshare do not work Slackware.

Christoph Willing chris.willing at linux.com
Tue Mar 20 05:20:45 UTC 2018


On 20/03/18 00:58, Ozan Türkyılmaz wrote:
> 2018-03-15 0:01 GMT+05:00 Ozan Türkyılmaz <ozan.turkyilmaz at gmail.com
>
> 
> I have prepared a legacy package for libupnp. I got retroshare
> complining with it. It's not possible to use it with libupnp package.
> I work on it if it is possible for not conflicting with libunpnp
> 

A non-conflicting libupnp-legacy can be made by specifying a different
location for include & lib files e.g.
./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX}/libupnp-legacy \
   --includedir=/usr/include/libupnp-legacy \
   ...

Then rename & relocate the .pc file after make install:
  mv $PKG/usr/lib${LIBDIRSUFFIX}/libupnp-legacy/pkgconfig/libupnp.pc
$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/libupnp-legacy.pc

After that, libupnp & libupnp-legacy should not conflict (at least no
files will be overwritten).

The different include & lib locations mean that SlackBuilds using
libupnp-legacy need slight modification to search those new locations. I
have built both retroshare and linphone using libupnp-legacy described
above after making the following alterations:

for network/retroshare:
diff --git a/network/retroshare/patch-libupnp-legacy.diff
b/network/retroshare/patch-libupnp-legacy.diff
new file mode 100644
index 0000000000..ad1266ae6b
--- /dev/null
+++ b/network/retroshare/patch-libupnp-legacy.diff
@@ -0,0 +1,19 @@
+--- libretroshare/src/libretroshare.pro.orig   2017-08-04
05:29:52.000000000 +1000
++++ libretroshare/src/libretroshare.pro        2018-03-20
11:37:57.906638456 +1000
+@@ -183,14 +183,14 @@
+     CONFIG += upnp_libupnp
+
+       # Check if the systems libupnp has been Debian-patched
+-      system(grep -E 'char[[:space:]]+PublisherUrl'
/usr/include/upnp/upnp.h >/dev/null 2>&1) {
++      system(grep -E 'char[[:space:]]+PublisherUrl'
/usr/include/libupnp-legacy/upnp/upnp.h >/dev/null 2>&1) {
+               # Normal libupnp
+       } else {
+               # Patched libupnp or new unreleased version
+               DEFINES *= PATCHED_LIBUPNP
+       }
+
+-      PKGCONFIG *= libssl libupnp
++      PKGCONFIG *= libssl libupnp-legacy
+       PKGCONFIG *= libcrypto zlib
+       LIBS *= -lpthread -ldl
+ }
diff --git a/network/retroshare/retroshare.SlackBuild
b/network/retroshare/retroshare.SlackBuild
index 672e8622ba..1c2440df58 100644
--- a/network/retroshare/retroshare.SlackBuild
+++ b/network/retroshare/retroshare.SlackBuild
@@ -19,7 +19,7 @@

 PRGNAM=retroshare
 VERSION=${VERSION:-0.6.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
 TAG=${TAG:-_SBo}

 SRCNAM=RetroShare
@@ -54,6 +54,8 @@ rm -rf $SRCNAM-$VERSION
 tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
 cd $SRCNAM-$VERSION

+patch -p0 < $CWD/patch-libupnp-legacy.diff
+
 chown -R root:root .
 find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -61,7 +63,7 @@ find -L . \
  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

-qmake PREFIX=/usr LIB_DIR=/usr/lib${LIBDIRSUFFIX} "CONFIG-=debug"
"CONFIG+=release"
+qmake PREFIX=/usr LIB_DIR=/usr/lib${LIBDIRSUFFIX} "CONFIG-=debug"
"CONFIG+=release" "INCLUDEPATH+=/usr/include/libupnp-legacy"
 make
 make INSTALL_ROOT=${PKG} install

diff --git a/network/retroshare/retroshare.info
b/network/retroshare/retroshare.info
index ed8e937fa5..0f697a6237 100644
--- a/network/retroshare/retroshare.info
+++ b/network/retroshare/retroshare.info
@@ -5,6 +5,6 @@
DOWNLOAD="https://github.com/RetroShare/RetroShare/archive/v0.6.3/RetroShare-0.6
 MD5SUM="9cb22e4cc5a11e043601795eb9a175cc"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
-REQUIRES="libmicrohttpd libupnp speex protobuf sqlcipher"
+REQUIRES="libmicrohttpd libupnp-legacy speex protobuf sqlcipher"
 MAINTAINER="Alan Aversa"
 EMAIL="aveNOrsa at email.ariSPAMzona.edu"


and for network/linphone:
diff --git a/network/linphone/linphone.SlackBuild
b/network/linphone/linphone.SlackBuild
index 07eab0096e..9b4e26bedb 100644
--- a/network/linphone/linphone.SlackBuild
+++ b/network/linphone/linphone.SlackBuild
@@ -107,6 +107,8 @@ mv $MOD2SRCDIRNAME $MOD2DIRNAME
 sed -i 's|ms_message("Mediastreamer2 factory " MEDIASTREAMER_VERSION "
(git: " MS2_GIT_VERSION ") initialized.");|ms_message("Mediastreamer2
factory " MEDIASTREAMER_VERSION "  initialized.");|'
$MOD2DIRNAME/src/base/msfactory.c
 touch coreapi/gitversion.h

+patch -p0 < $CWD/patch-libupnp-legacy.diff
+
 chown -R root:root .
 find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff --git a/network/linphone/linphone.info b/network/linphone/linphone.info
index 6fabd351e6..65a8b9f9f2 100644
--- a/network/linphone/linphone.info
+++ b/network/linphone/linphone.info
@@ -9,6 +9,6 @@ MD5SUM="8292dbaa0a5d0a448dcbbee125e947e4 \
         15b8b129a922180855d04d58cdd08d43"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
-REQUIRES="bctoolbox belle-sip bzrtp ffmpeg libsrtp libupnp mbedtls speex"
+REQUIRES="bctoolbox belle-sip bzrtp ffmpeg libsrtp libupnp-legacy
mbedtls speex"
 MAINTAINER="Euan Thoms"
 EMAIL="euan at potensol dot com"
diff --git a/network/linphone/patch-libupnp-legacy.diff
b/network/linphone/patch-libupnp-legacy.diff
new file mode 100644
index 0000000000..881dbe8ec5
--- /dev/null
+++ b/network/linphone/patch-libupnp-legacy.diff
@@ -0,0 +1,65 @@
+--- configure.ac.orig  2017-06-29 19:20:47.000000000 +1000
++++ configure.ac       2018-03-20 10:13:48.325666257 +1000
+@@ -248,7 +248,7 @@
+       [build_tools=check]
+ )
+
+-dnl check for installed version of libupnp
++dnl check for installed version of libupnp-legacy
+ AC_ARG_ENABLE(upnp,
+       [AS_HELP_STRING([--disable-upnp], [Disable uPnP support])],
+       [case "${enableval}" in
+@@ -260,14 +260,14 @@
+ )
+
+ if test "$build_upnp" != "false" ; then
+-      PKG_CHECK_MODULES([LIBUPNP], [libupnp],
+-              [if  pkg-config --atleast-version=1.6 "libupnp < 1.7"; then
++      PKG_CHECK_MODULES([LIBUPNP], [libupnp-legacy],
++              [if  pkg-config --atleast-version=1.6 "libupnp-legacy <
1.7"; then
+                       build_upnp=true
+               else
+-                      AC_MSG_ERROR([libupnp >= 1.6 < 1.5 required.])
++                      AC_MSG_ERROR([libupnp-legacy >= 1.6 < 1.5
required.])
+               fi],
+               [if test "$build_upnp" == "true" ; then
+-                      AC_MSG_ERROR([libupnp not found.])
++                      AC_MSG_ERROR([libupnp-legacy not found.])
+               else
+                       build_upnp=false
+               fi]
+--- mediastreamer2/configure.ac.orig   2017-06-23 18:52:57.000000000 +1000
++++ mediastreamer2/configure.ac        2018-03-20 10:15:18.488139686 +1000
+@@ -704,7 +704,7 @@
+       AC_SUBST(SPANDSP_LIBS)
+ fi
+
+-dnl check for installed version of libupnp
++dnl check for installed version of libupnp-legacy
+ AC_ARG_ENABLE(upnp,
+       [AS_HELP_STRING([--disable-upnp], [Disable uPnP support])],
+       [case "${enableval}" in
+@@ -716,8 +716,8 @@
+ )
+
+ if test "$build_upnp" != "false" ; then
+-      PKG_CHECK_MODULES([LIBUPNP], [libupnp],
+-              [if  pkg-config --atleast-version=1.6 "libupnp < 1.7"; then
++      PKG_CHECK_MODULES([LIBUPNP], [libupnp-legacy],
++              [if  pkg-config --atleast-version=1.6 "libupnp-legacy <
1.7"; then
+                       build_upnp=true
+                       old_CFLAGS="$CFLAGS"
+                       CFLAGS="$CFLAGS $LIBUPNP_CFLAGS -Werror
-Wno-error=unused-variable"
+@@ -730,10 +730,10 @@
+                       AC_DEFINE(USE_PATCHED_UPNP, 1, [Define if upnp
is patched]))
+                       CFLAGS="$old_CFLAGS"
+               else
+-                      AC_MSG_ERROR([libupnp >= 1.6 < 1.5 required.])
++                      AC_MSG_ERROR([libupnp-legacy >= 1.6 < 1.5
required.])
+               fi],
+               [if test "$build_upnp" == "true" ; then
+-                      AC_MSG_ERROR([libupnp not found.])
++                      AC_MSG_ERROR([libupnp-legacy not found.])
+               else
+                       build_upnp=false
+               fi]




More information about the SlackBuilds-users mailing list