transmission: Use external libminiupnpc instead of internal.
authorRosen Penev <redacted>
Sun, 28 Jan 2018 20:22:42 +0000 (12:22 -0800)
committerRosen Penev <redacted>
Sun, 28 Jan 2018 21:13:40 +0000 (13:13 -0800)
The original patch that forced internal usage hid an actual issue in the build system. Replace patch with upstream one.

Also reorganized the Makefile a bit and removed some cruft.

Signed-off-by: Rosen Penev <redacted>
net/transmission/Makefile
net/transmission/patches/010-add-mbedtls-support.patch [moved from net/transmission/patches/040-fix-for-mbedtls.patch with 100% similarity]
net/transmission/patches/020-fix-external-miniupnpc.patch [new file with mode: 0644]
net/transmission/patches/020-use-internal-miniupnp.patch [deleted file]

index cc462776e8d62025e36e5dfe444e9f440bf52835..7bf83d53d574cd8bd419b1c80ad931fdc5ea5dcf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=2.93
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/transmission/transmission-releases/raw/master
@@ -37,7 +37,7 @@ endef
 
 define Package/transmission-daemon/Default
   $(call Package/transmission/template)
-  DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib
+  DEPENDS:=+libcurl +libevent2 +libminiupnpc +libpthread +librt +zlib
   USERID:=transmission=224:transmission=224
 endef
 
@@ -57,7 +57,7 @@ endef
 
 define Package/transmission-cli/Default
   $(call Package/transmission/template)
-  DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib
+  DEPENDS:=+libcurl +libevent2 +libminiupnpc +libpthread +librt +zlib
 endef
 
 define Package/transmission-cli-openssl
@@ -76,7 +76,7 @@ endef
 
 define Package/transmission-remote/Default
   $(call Package/transmission/template)
-  DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib
+  DEPENDS:=+libcurl +libevent2 +libminiupnpc +libpthread +librt +zlib
 endef
 
 define Package/transmission-remote-openssl
@@ -131,9 +131,6 @@ endef
 Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
 
 
-CONFIGURE_VARS += \
-       LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
-
 CONFIGURE_ARGS += \
        --enable-daemon \
        --enable-cli \
@@ -154,16 +151,6 @@ ifeq ($(BUILD_VARIANT),mbedtls)
        MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
 endif
 
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
-
-TARGET_CFLAGS += -std=gnu99
-
-define Build/Configure
-       ( cd $(PKG_BUILD_DIR); ./autogen.sh $(CONFIGURE_ARGS))
-       $(call Build/Configure/Default,$CONFIGURE_ARGS)
-endef
-
 define Package/transmission-daemon-openssl/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
diff --git a/net/transmission/patches/020-fix-external-miniupnpc.patch b/net/transmission/patches/020-fix-external-miniupnpc.patch
new file mode 100644 (file)
index 0000000..64a2fca
--- /dev/null
@@ -0,0 +1,35 @@
+From 94fa0bba88740b9ab58c5805ddb24b05b2635f34 Mon Sep 17 00:00:00 2001
+From: Mike Gelfand <mikedld@mikedld.com>
+Date: Fri, 26 Jan 2018 08:31:16 +0300
+Subject: [PATCH] Fix FTCBFS due to AC_RUN_IFELSE (patch by Helmut Grohne)
+
+Fixes: #475
+---
+ configure.ac | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cb026df..335f4a7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -390,14 +390,12 @@ dnl Let's hope it's 1.7 or higher, since it provides
+ dnl MINIUPNPC_API_VERSION and we won't have to figure
+ dnl it out on our own
+ if test "x$upnp_version" = "xunknown" ; then
+-  AC_RUN_IFELSE(
++  AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM(
+       [#include <stdlib.h>
+        #include <miniupnpc/miniupnpc.h>],
+-      [#ifdef MINIUPNPC_API_VERSION
+-       return EXIT_SUCCESS;
+-       #else
+-       return EXIT_FAILURE;
++      [#ifndef MINIUPNPC_API_VERSION
++       #error MINIUPNPC_API_VERSION undefined
+        #endif]
+     )],
+     [upnp_version=">= 1.7"]
+-- 
+2.7.4
+
diff --git a/net/transmission/patches/020-use-internal-miniupnp.patch b/net/transmission/patches/020-use-internal-miniupnp.patch
deleted file mode 100644 (file)
index 745bfac..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index aff673b..7e109af 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -378,7 +378,7 @@ dnl See if ANY version of miniupnpc is installed
- AC_LINK_IFELSE(
-   [AC_LANG_PROGRAM([#include <miniupnpc/miniupnpc.h>],
-                    [struct UPNPDev dev;])],
--  [upnp_version="unknown"],
-+  [upnp_version="none"],
-   [upnp_version="none"]
- )
git clone https://git.99rst.org/PROJECT