pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/amule



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Nov 19 20:01:41 UTC 2020

Modified Files:
        pkgsrc/net/amule: Makefile PLIST distinfo options.mk
Added Files:
        pkgsrc/net/amule/patches: patch-src_ClientCreditsList.cpp
            patch-src_UPnPBase.cpp patch-src_UPnPBase.h
Removed Files:
        pkgsrc/net/amule/patches: patch-src_ObservableQueue.h

Log Message:
amule: Update to 2.3.2, fix build using FreeBSD Ports patches

Version 2.3.2 - The "don't close tabs" version.
----------
2016-09-16

        circulosmeos:
                * amuleweb cookies read behind a "lowercase" proxy (http/2 compliant)

        Dan64:
                * Read AICH root hashes from binary eMuleCollection files

        gnazio:
                * Fixed configure of libpng when sh != bash

        GonoszTopi:
                * Allow any kind of file links in collections
                * Make UPnP log go to the appropriate category (#1681)
                * Use the C++ compiler to check for features we're about to use
                  in C++ source files (#1572)
                * Adapt configure to handle subversion repository clones in
                  mercurial and git
                * Fix bfd detection for systems missing -liberty
                * Add support for 'canceled.met' to the fileview tool
                * Implemented the missing 'show shared' command in amulecmd
                * Fix check for a valid locale config entry being done *after*
                  the locale has been set
                * Fix Crypto++ detection routine happily using build library
                  for host when cross-compiling
                * Fix bug #1711: Kad Info tab should display my own user ID
                * Fix wrong sized images in the priscilla skin
                * Fix bug #1423: Add the possibility to not create sparse files
                * Fix bug #1743: crash when importing part files
                * Review assertions in the eD2k and Kademlia code and remove
                  those that could be triggered by a malformed incoming packet
                * Fix a possible uninitialized variable access and a definite
                  memory leak in the UPnP code

        iz0bbz:
                * Fix WinSock library version detection with MinGW-w64
                * Fix compilation with MinGW-w64

        kam:
                * WebServer serves .json, .manifest and .appacache files

        Mr Hyde:
                * Fix "Disable computer's timed standby mode" for MacOS 10.9 Mavericks
                * Compilation fix on Linux Slackware 64bit and MacOS 10.9.4
                * Fix configure on Mac

        sc0w:
                * Add ability to use middle-click to close search tabs

        Stu Redman:
                * Display hashing progress in progress bars
                * Assertion from background thread now prints a message and not just closes the app
                * Backtrace (crash or assertion) is written to logfile
                * Fix: disabling protocol obfuscation broke Kad and triggered assertions
                * Fixed "Prompt on exit" preference
                * Fixed country flags for Turkish localization
                * Fixed loading of zipped IP filter (#1674)
                * Fixed showing of shared files to other clients
                * Fixed assertions in CFormat("%p") on 64 bit OS with wx 2.9
                * Boost Asio can now be used as networking layer instead of wxWidgets
                * Fixed memory leak when AICH hashing already known files
                * New download links for server list and nodes.dat (with gav616 and xosevp)
                * Projects for Visual Studio 2013 (which is now the preferred Win32 compiler)
                * Fixed build with wx 3.0 (including STL build)

        tgragnato:
                * Fixed ASIO compilation with libcxx

        Tianming Xie:
                * Fix for debian bug #795061: There is no rule to generate Scanner.h


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 pkgsrc/net/amule/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/net/amule/PLIST
cvs rdiff -u -r1.21 -r1.22 pkgsrc/net/amule/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/amule/options.mk
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/net/amule/patches/patch-src_ClientCreditsList.cpp \
    pkgsrc/net/amule/patches/patch-src_UPnPBase.cpp \
    pkgsrc/net/amule/patches/patch-src_UPnPBase.h
cvs rdiff -u -r1.1 -r0 pkgsrc/net/amule/patches/patch-src_ObservableQueue.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/amule/Makefile
diff -u pkgsrc/net/amule/Makefile:1.91 pkgsrc/net/amule/Makefile:1.92
--- pkgsrc/net/amule/Makefile:1.91      Mon Aug 31 18:10:31 2020
+++ pkgsrc/net/amule/Makefile   Thu Nov 19 20:01:40 2020
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.91 2020/08/31 18:10:31 wiz Exp $
+# $NetBSD: Makefile,v 1.92 2020/11/19 20:01:40 nia Exp $
 
-DISTNAME=      aMule-2.3.1
+DISTNAME=      aMule-2.3.2
 PKGNAME=       ${DISTNAME:tl}
-PKGREVISION=   25
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=amule/}
 EXTRACT_SUFX=  .tar.bz2
@@ -14,7 +13,7 @@ LICENSE=      gnu-gpl-v2
 
 CONFLICTS=             xmule-[0-9]*
 
-USE_LANGUAGES=         c c++03
+USE_LANGUAGES=         c c++
 USE_PKGLOCALEDIR=      yes
 USE_TOOLS+=            gmake intltool msgfmt pkg-config perl:run
 GNU_CONFIGURE=         yes
@@ -23,6 +22,8 @@ CONFIGURE_ARGS+=      --with-crypto-prefix=${
 CONFIGURE_ARGS+=       --with-language=all
 CONFIGURE_ARGS+=       --enable-xas
 
+CXXFLAGS+=             -Wno-undef
+
 .include "options.mk"
 
 REPLACE_PERL=          src/libs/ec/file_generator.pl           \

Index: pkgsrc/net/amule/PLIST
diff -u pkgsrc/net/amule/PLIST:1.14 pkgsrc/net/amule/PLIST:1.15
--- pkgsrc/net/amule/PLIST:1.14 Mon Jan  1 22:29:45 2018
+++ pkgsrc/net/amule/PLIST      Thu Nov 19 20:01:40 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.14 2018/01/01 22:29:45 rillig Exp $
+@comment $NetBSD: PLIST,v 1.15 2020/11/19 20:01:40 nia Exp $
 ${PLIST.alc}bin/alc
 ${PLIST.alcc}bin/alcc
 ${PLIST.amule}bin/amule
@@ -77,6 +77,16 @@ ${PLIST.cas}man/man1/cas.1
 ${PLIST.ed2k}man/man1/ed2k.1
 ${PLIST.wxcas}man/man1/wxcas.1
 man/man1/xas.1
+${PLIST.alc}man/ro/man1/alc.1
+${PLIST.alcc}man/ro/man1/alcc.1
+${PLIST.amule}man/ro/man1/amule.1
+${PLIST.cmd}man/ro/man1/amulecmd.1
+${PLIST.daemon}man/ro/man1/amuled.1
+${PLIST.gui}man/ro/man1/amulegui.1
+${PLIST.cas}man/ro/man1/cas.1
+${PLIST.ed2k}man/ro/man1/ed2k.1
+${PLIST.wxcas}man/ro/man1/wxcas.1
+man/ro/man1/xas.1
 ${PLIST.alc}man/ru/man1/alc.1
 ${PLIST.alcc}man/ru/man1/alcc.1
 ${PLIST.amule}man/ru/man1/amule.1
@@ -97,6 +107,16 @@ ${PLIST.cas}man/tr/man1/cas.1
 ${PLIST.ed2k}man/tr/man1/ed2k.1
 ${PLIST.wxcas}man/tr/man1/wxcas.1
 man/tr/man1/xas.1
+${PLIST.alc}man/zh_TW/man1/alc.1
+${PLIST.alcc}man/zh_TW/man1/alcc.1
+${PLIST.amule}man/zh_TW/man1/amule.1
+${PLIST.cmd}man/zh_TW/man1/amulecmd.1
+${PLIST.daemon}man/zh_TW/man1/amuled.1
+${PLIST.gui}man/zh_TW/man1/amulegui.1
+${PLIST.cas}man/zh_TW/man1/cas.1
+${PLIST.ed2k}man/zh_TW/man1/ed2k.1
+${PLIST.wxcas}man/zh_TW/man1/wxcas.1
+man/zh_TW/man1/xas.1
 ${PLIST.skins}share/amule/skins/Mac_Gray.zip
 ${PLIST.skins}share/amule/skins/gnome.zip
 ${PLIST.skins}share/amule/skins/kde4.zip
@@ -213,6 +233,7 @@ share/locale/nn/LC_MESSAGES/amule.mo
 share/locale/pl/LC_MESSAGES/amule.mo
 share/locale/pt_BR/LC_MESSAGES/amule.mo
 share/locale/pt_PT/LC_MESSAGES/amule.mo
+share/locale/ro/LC_MESSAGES/amule.mo
 share/locale/ru/LC_MESSAGES/amule.mo
 share/locale/sl/LC_MESSAGES/amule.mo
 share/locale/sq/LC_MESSAGES/amule.mo

Index: pkgsrc/net/amule/distinfo
diff -u pkgsrc/net/amule/distinfo:1.21 pkgsrc/net/amule/distinfo:1.22
--- pkgsrc/net/amule/distinfo:1.21      Wed Nov  4 00:34:52 2015
+++ pkgsrc/net/amule/distinfo   Thu Nov 19 20:01:40 2020
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.21 2015/11/04 00:34:52 agc Exp $
+$NetBSD: distinfo,v 1.22 2020/11/19 20:01:40 nia Exp $
 
-SHA1 (aMule-2.3.1.tar.bz2) = 25bcef92b06cb34849afaf052e2cd66b4a8454c2
-RMD160 (aMule-2.3.1.tar.bz2) = 7bc5ceea196f9ba0aa0687a694cc82354a0210fc
-SHA512 (aMule-2.3.1.tar.bz2) = 3310aa6e92dde0e27df032da701bc28533c703277ddeec3766fb0e945725ed340b2d3fe54016172621a47559b6c13fb2893cba0d2469a1038ab35c3ee2d5a3c3
-Size (aMule-2.3.1.tar.bz2) = 4565232 bytes
+SHA1 (aMule-2.3.2.tar.bz2) = 65bb4197a5c2d9c95dc18bb458fa33d221035244
+RMD160 (aMule-2.3.2.tar.bz2) = 71ed96bff4e81bdd8fa97045f8589531609b1232
+SHA512 (aMule-2.3.2.tar.bz2) = 55567aa82c48c741bc9af92e9118a68a76b33b696639802f1bf627c02c1fa1f76af9e3b611bec443e68ff42eac3d508cb8522c97b83366c0a9258075f7a3fd31
+Size (aMule-2.3.2.tar.bz2) = 4950017 bytes
 SHA1 (patch-aa) = af77036649caac372890c45840d24a404ab1a7d6
+SHA1 (patch-src_ClientCreditsList.cpp) = 03bf1956dd848fcc117d5043703840a51880ee9d
 SHA1 (patch-src_OScopeCtrl.cpp) = d9ee907eeb49c3f54972b4d1cabdd64c6d4b88d5
-SHA1 (patch-src_ObservableQueue.h) = 7d6b402662a3b9b67f0324d1b6d3119623d8ea77
+SHA1 (patch-src_UPnPBase.cpp) = 6f8baa3af408632fcc0f0ff7d8e6f33a2d7ddb3d
+SHA1 (patch-src_UPnPBase.h) = 554eaa417df23918985b9a0fd16d5f77844f145a

Index: pkgsrc/net/amule/options.mk
diff -u pkgsrc/net/amule/options.mk:1.1 pkgsrc/net/amule/options.mk:1.2
--- pkgsrc/net/amule/options.mk:1.1     Sat Jun  6 13:08:27 2009
+++ pkgsrc/net/amule/options.mk Thu Nov 19 20:01:40 2020
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2009/06/06 13:08:27 obache Exp $
+# $NetBSD: options.mk,v 1.2 2020/11/19 20:01:40 nia Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.amule
 PKG_SUPPORTED_OPTIONS= amule-monolithic
@@ -9,7 +9,7 @@ PKG_SUGGESTED_OPTIONS=  amule-monolithic 
 
 .include "../../mk/bsd.options.mk"
 
-PLIST_VARS+=   share skins alc alcc amule ed2k daemon gui cmd web cas wxcas
+PLIST_VARS+=   skins alc alcc amule ed2k daemon gui cmd web cas wxcas
 
 ###
 ### monolithic aMule app
@@ -17,7 +17,6 @@ PLIST_VARS+=  share skins alc alcc amule 
 .if !empty(PKG_OPTIONS:Mamule-monolithic)
 CONFIGURE_ARGS+=       --enable-monolithic
 PLIST.amule=           yes
-PLIST.share=           yes
 PLIST.skins=           yes
 .else
 CONFIGURE_ARGS+=       --disable-monolithic
@@ -60,7 +59,6 @@ CONFIGURE_ARGS+=      --disable-amulecmd
 .if !empty(PKG_OPTIONS:Mamule-webserver)
 CONFIGURE_ARGS+=       --enable-webserver
 PLIST.web=             yes
-PLIST.share=           yes
 .else
 CONFIGURE_ARGS+=       --disable-webserver
 .endif

Added files:

Index: pkgsrc/net/amule/patches/patch-src_ClientCreditsList.cpp
diff -u /dev/null pkgsrc/net/amule/patches/patch-src_ClientCreditsList.cpp:1.1
--- /dev/null   Thu Nov 19 20:01:41 2020
+++ pkgsrc/net/amule/patches/patch-src_ClientCreditsList.cpp    Thu Nov 19 20:01:41 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_ClientCreditsList.cpp,v 1.1 2020/11/19 20:01:41 nia Exp $
+
+From 27c13f3e622b8a3eaaa05bb62b0149604bdcc9e8 Mon Sep 17 00:00:00 2001
+From: Tommy Jerry Mairo <tommy.mairo%gmail.com@localhost>
+Date: Wed, 21 Mar 2018 19:56:28 +0100
+Subject: [PATCH] Bugfix: API mismatch with crypto++ 6.0.0
+
+--- src/ClientCreditsList.cpp.orig     2016-09-16 07:55:06.000000000 +0000
++++ src/ClientCreditsList.cpp
+@@ -312,7 +312,7 @@ void CClientCreditsList::InitalizeCrypti
+               // calculate and store public key
+               CryptoPP::RSASSA_PKCS1v15_SHA_Verifier pubkey(*static_cast<CryptoPP::RSASSA_PKCS1v15_SHA_Signer *>(m_pSignkey));
+               CryptoPP::ArraySink asink(m_abyMyPublicKey, 80);
+-              pubkey.DEREncode(asink);
++              pubkey.GetMaterial().Save(asink);
+               m_nMyPublicKeyLen = asink.TotalPutLength();
+               asink.MessageEnd();
+       } catch (const CryptoPP::Exception& e) {
Index: pkgsrc/net/amule/patches/patch-src_UPnPBase.cpp
diff -u /dev/null pkgsrc/net/amule/patches/patch-src_UPnPBase.cpp:1.1
--- /dev/null   Thu Nov 19 20:01:41 2020
+++ pkgsrc/net/amule/patches/patch-src_UPnPBase.cpp     Thu Nov 19 20:01:41 2020
@@ -0,0 +1,339 @@
+$NetBSD: patch-src_UPnPBase.cpp,v 1.1 2020/11/19 20:01:41 nia Exp $
+
+Fix build with upnp 1.8.x.
+
+From FreeBSD Ports.
+
+--- src/UPnPBase.cpp.orig      2016-09-16 07:55:07.000000000 +0000
++++ src/UPnPBase.cpp
+@@ -823,14 +823,18 @@ m_WanService(NULL)
+       s_CtrlPoint = this;
+       // Null string at first
+       std::ostringstream msg;
+-
++      
++      // Declare those here to avoid 
++      // "jump to label ‘error’ [-fpermissive] crosses initialization
++      // of ‘char* ipAddress’"
++      unsigned short port;
++      char *ipAddress;
++      
+       // Start UPnP
+       int ret;
+-      char *ipAddress = NULL;
+-      unsigned short port = 0;
+-      ret = UpnpInit(ipAddress, udpPort);
++      ret = UpnpInit2(0, udpPort);
+       if (ret != UPNP_E_SUCCESS) {
+-              msg << "error(UpnpInit): Error code ";
++              msg << "error(UpnpInit2): Error code ";
+               goto error;
+       }
+       port = UpnpGetServerPort();
+@@ -1127,7 +1131,11 @@ bool CUPnPControlPoint::PrivateDeletePor
+ 
+ 
+ // This function is static
++#if UPNP_VERSION >= 10800
++int CUPnPControlPoint::Callback(Upnp_EventType_e EventType, const void *Event, void * /*Cookie*/)
++#else
+ int CUPnPControlPoint::Callback(Upnp_EventType EventType, void *Event, void * /*Cookie*/)
++#endif
+ {
+       std::ostringstream msg;
+       std::ostringstream msg2;
+@@ -1149,24 +1157,47 @@ int CUPnPControlPoint::Callback(Upnp_Eve
+               msg2<< "UPNP_DISCOVERY_SEARCH_RESULT: ";
+               // UPnP Discovery
+ upnpDiscovery:
++#if UPNP_VERSION >= 10800
++               UpnpDiscovery *d_event = (UpnpDiscovery *)Event;
++#else
+               struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event;
++#endif
+               IXML_Document *doc = NULL;
++#if UPNP_VERSION >= 10800
++              int errCode = UpnpDiscovery_get_ErrCode(d_event);
++              if (errCode != UPNP_E_SUCCESS) {
++                      msg << UpnpGetErrorMessage(errCode) << ".";
++#else
+               int ret;
+               if (d_event->ErrCode != UPNP_E_SUCCESS) {
+                       msg << UpnpGetErrorMessage(d_event->ErrCode) << ".";
++#endif
+                       AddDebugLogLineC(logUPnP, msg);
+               }
+               // Get the XML tree device description in doc
++#if UPNP_VERSION >= 10800
++              const char *location = UpnpDiscovery_get_Location_cstr(d_event);
++              int ret = UpnpDownloadXmlDoc(location, &doc);
++#else
+               ret = UpnpDownloadXmlDoc(d_event->Location, &doc);
++#endif
+               if (ret != UPNP_E_SUCCESS) {
+                       msg << "Error retrieving device description from " <<
++#if UPNP_VERSION >= 10800
++                              location << ": " <<
++#else
+                               d_event->Location << ": " <<
++#endif
+                               UpnpGetErrorMessage(ret) <<
+                               "(" << ret << ").";
+                       AddDebugLogLineC(logUPnP, msg);
+               } else {
+                       msg2 << "Retrieving device description from " <<
++#if UPNP_VERSION >= 10800
++                              location << ".";
++#else
+                               d_event->Location << ".";
++#endif
+                       AddDebugLogLineN(logUPnP, msg2);
+               }
+               if (doc) {
+@@ -1194,8 +1225,14 @@ upnpDiscovery:
+                                       AddDebugLogLineC(logUPnP, msg);
+                               }
+                               // Add the root device to our list
++#if UPNP_VERSION >= 10800
++                              int expires = UpnpDiscovery_get_Expires(d_event);
++                              upnpCP->AddRootDevice(rootDevice, urlBase,
++                                      location, expires);
++#else
+                               upnpCP->AddRootDevice(rootDevice, urlBase,
+                                       d_event->Location, d_event->Expires);
++#endif
+                       }
+                       // Free the XML doc tree
+                       IXML::Document::Free(doc);
+@@ -1216,28 +1253,60 @@ upnpDiscovery:
+       case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: {
+               //fprintf(stderr, "Callback: UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE\n");
+               // UPnP Device Removed
++#if UPNP_VERSION >= 10800
++              UpnpDiscovery *dab_event = (UpnpDiscovery *)Event;
++              int errCode = UpnpDiscovery_get_ErrCode(dab_event);
++              if (errCode != UPNP_E_SUCCESS) {
++#else
+               struct Upnp_Discovery *dab_event = (struct Upnp_Discovery *)Event;
+               if (dab_event->ErrCode != UPNP_E_SUCCESS) {
++#endif
+                       msg << "error(UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE): " <<
++#if UPNP_VERSION >= 10800
++                              UpnpGetErrorMessage(errCode) <<
++#else
+                               UpnpGetErrorMessage(dab_event->ErrCode) <<
++#endif
+                               ".";
+                       AddDebugLogLineC(logUPnP, msg);
+               }
++#if UPNP_VERSION >= 10800
++              std::string devType = UpnpDiscovery_get_DeviceType_cstr(dab_event);
++#else
+               std::string devType = dab_event->DeviceType;
++#endif
+               // Check for an InternetGatewayDevice and removes it from the list
+               std::transform(devType.begin(), devType.end(), devType.begin(), tolower);
+               if (stdStringIsEqualCI(devType, UPnP::Device::IGW)) {
++#if UPNP_VERSION >= 10800
++                      const char *deviceID =
++                              UpnpDiscovery_get_DeviceID_cstr(dab_event);
++                      upnpCP->RemoveRootDevice(deviceID);
++#else
+                       upnpCP->RemoveRootDevice(dab_event->DeviceId);
++#endif
+               }
+               break;
+       }
+       case UPNP_EVENT_RECEIVED: {
+               //fprintf(stderr, "Callback: UPNP_EVENT_RECEIVED\n");
+               // Event reveived
++#if UPNP_VERSION >= 10800
++              UpnpEvent *e_event = (UpnpEvent *)Event;
++              int eventKey = UpnpEvent_get_EventKey(e_event);
++              IXML_Document *changedVariables =
++                      UpnpEvent_get_ChangedVariables(e_event);
++              const std::string sid = UpnpEvent_get_SID_cstr(e_event);
++#else
+               struct Upnp_Event *e_event = (struct Upnp_Event *)Event;
+               const std::string Sid = e_event->Sid;
++#endif
+               // Parses the event
++#if UPNP_VERSION >= 10800
++              upnpCP->OnEventReceived(sid, eventKey, changedVariables);
++#else
+               upnpCP->OnEventReceived(Sid, e_event->EventKey, e_event->ChangedVariables);
++#endif
+               break;
+       }
+       case UPNP_EVENT_SUBSCRIBE_COMPLETE:
+@@ -1252,19 +1321,39 @@ upnpDiscovery:
+               //fprintf(stderr, "Callback: UPNP_EVENT_RENEWAL_COMPLETE\n");
+               msg << "error(UPNP_EVENT_RENEWAL_COMPLETE): ";
+ upnpEventRenewalComplete:
++#if UPNP_VERSION >= 10800
++              UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event;
++              int errCode = UpnpEventSubscribe_get_ErrCode(es_event);
++              if (errCode != UPNP_E_SUCCESS) {
++#else
+               struct Upnp_Event_Subscribe *es_event =
+                       (struct Upnp_Event_Subscribe *)Event;
+               if (es_event->ErrCode != UPNP_E_SUCCESS) {
++#endif
+                       msg << "Error in Event Subscribe Callback";
++#if UPNP_VERSION >= 10800
++                      UPnP::ProcessErrorMessage(msg.str(), errCode, NULL, NULL);
++#else
+                       UPnP::ProcessErrorMessage(
+                               msg.str(), es_event->ErrCode, NULL, NULL);
++#endif
++                      msg << "Error in Event Subscribe Callback";
+               } else {
+ #if 0
++#if UPNP_VERSION >= 10800
++                      const UpnpString *publisherUrl =
++                              UpnpEventSubscribe_get_PublisherUrl(es_event);
++                      const char *sid = UpnpEvent_get_SID_cstr(es_event);
++                      int timeOut = UpnpEvent_get_TimeOut(es_event);
++                      TvCtrlPointHandleSubscribeUpdate(
++                              publisherUrl, sid, timeOut);
++#else
+                       TvCtrlPointHandleSubscribeUpdate(
+                               GET_UPNP_STRING(es_event->PublisherUrl),
+                               es_event->Sid,
+                               es_event->TimeOut );
+ #endif
++#endif
+               }
+ 
+               break;
+@@ -1280,29 +1369,56 @@ upnpEventRenewalComplete:
+               msg << "error(UPNP_EVENT_SUBSCRIPTION_EXPIRED): ";
+               msg2 << "UPNP_EVENT_SUBSCRIPTION_EXPIRED: ";
+ upnpEventSubscriptionExpired:
++#if UPNP_VERSION >= 10800
++              UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event;
++#else
+               struct Upnp_Event_Subscribe *es_event =
+                       (struct Upnp_Event_Subscribe *)Event;
++#endif
+               Upnp_SID newSID;
+               memset(newSID, 0, sizeof(Upnp_SID));
+               int TimeOut = 1801;
++#if UPNP_VERSION >= 10800
++              const char *publisherUrl =
++                      UpnpEventSubscribe_get_PublisherUrl_cstr(es_event);
++#endif
+               int ret = UpnpSubscribe(
+                       upnpCP->m_UPnPClientHandle,
++#if UPNP_VERSION >= 10800
++                      publisherUrl,
++#else
+                       GET_UPNP_STRING(es_event->PublisherUrl),
++#endif
+                       &TimeOut,
+                       newSID);
+               if (ret != UPNP_E_SUCCESS) {
+                       msg << "Error Subscribing to EventURL";
++#if UPNP_VERSION >= 10800
++                      int errCode = UpnpEventSubscribe_get_ErrCode(es_event);
++#endif
+                       UPnP::ProcessErrorMessage(
++#if UPNP_VERSION >= 10800
++                              msg.str(), errCode, NULL, NULL);
++#else
+                               msg.str(), es_event->ErrCode, NULL, NULL);
++#endif
+               } else {
+                       ServiceMap::iterator it =
++#if UPNP_VERSION >= 10800
++                              upnpCP->m_ServiceMap.find(publisherUrl);
++#else
+                               upnpCP->m_ServiceMap.find(GET_UPNP_STRING(es_event->PublisherUrl));
++#endif
+                       if (it != upnpCP->m_ServiceMap.end()) {
+                               CUPnPService &service = *(it->second);
+                               service.SetTimeout(TimeOut);
+                               service.SetSID(newSID);
+                               msg2 << "Re-subscribed to EventURL '" <<
++#if UPNP_VERSION >= 10800
++                              publisherUrl <<
++#else
+                                       GET_UPNP_STRING(es_event->PublisherUrl) <<
++#endif
+                                       "' with SID == '" <<
+                                       newSID << "'.";
+                               AddDebugLogLineC(logUPnP, msg2);
+@@ -1321,17 +1437,34 @@ upnpEventSubscriptionExpired:
+       case UPNP_CONTROL_ACTION_COMPLETE: {
+               //fprintf(stderr, "Callback: UPNP_CONTROL_ACTION_COMPLETE\n");
+               // This is here if we choose to do this asynchronously
++#if UPNP_VERSION >= 10800
++              UpnpActionComplete *a_event = (UpnpActionComplete *)Event;
++              int errCode = UpnpActionComplete_get_ErrCode(a_event);
++              IXML_Document *actionResult =
++                      UpnpActionComplete_get_ActionResult(a_event);
++              if (errCode != UPNP_E_SUCCESS) {
++#else
+               struct Upnp_Action_Complete *a_event =
+                       (struct Upnp_Action_Complete *)Event;
+               if (a_event->ErrCode != UPNP_E_SUCCESS) {
++#endif
+                       UPnP::ProcessErrorMessage(
+                               "UpnpSendActionAsync",
++#if UPNP_VERSION >= 10800
++                              errCode, NULL,
++                              actionResult);
++#else
+                               a_event->ErrCode, NULL,
+                               a_event->ActionResult);
++#endif
+               } else {
+                       // Check the response document
+                       UPnP::ProcessActionResponse(
++#if UPNP_VERSION >= 10800
++                              actionResult,
++#else
+                               a_event->ActionResult,
++#endif
+                               "<UpnpSendActionAsync>");
+               }
+               /* No need for any processing here, just print out results.
+@@ -1342,22 +1475,38 @@ upnpEventSubscriptionExpired:
+       case UPNP_CONTROL_GET_VAR_COMPLETE: {
+               //fprintf(stderr, "Callback: UPNP_CONTROL_GET_VAR_COMPLETE\n");
+               msg << "error(UPNP_CONTROL_GET_VAR_COMPLETE): ";
++#if UPNP_VERSION >= 10800
++              UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)Event;
++              int errCode = UpnpStateVarComplete_get_ErrCode(sv_event);
++              if (errCode != UPNP_E_SUCCESS) {
++#else
+               struct Upnp_State_Var_Complete *sv_event =
+                       (struct Upnp_State_Var_Complete *)Event;
+               if (sv_event->ErrCode != UPNP_E_SUCCESS) {
++#endif
+                       msg << "m_UpnpGetServiceVarStatusAsync";
+                       UPnP::ProcessErrorMessage(
++#if UPNP_VERSION >= 10800
++                              msg.str(), errCode, NULL, NULL);
++#else
+                               msg.str(), sv_event->ErrCode, NULL, NULL);
++#endif
+               } else {
+ #if 0
+                       // Warning: The use of UpnpGetServiceVarStatus and
+                       // UpnpGetServiceVarStatusAsync is deprecated by the
+                       // UPnP forum.
++#if UPNP_VERSION >= 10800
++                      const char *ctrlUrl =
++                              UpnpStateVarComplete_get_CtrlUrl(sv_event);
++                      const char *stateVarName =
++#else
+                       TvCtrlPointHandleGetVar(
+                               sv_event->CtrlUrl,
+                               sv_event->StateVarName,
+                               sv_event->CurrentVal );
+ #endif
++#endif
+               }
+               break;
+       }
Index: pkgsrc/net/amule/patches/patch-src_UPnPBase.h
diff -u /dev/null pkgsrc/net/amule/patches/patch-src_UPnPBase.h:1.1
--- /dev/null   Thu Nov 19 20:01:41 2020
+++ pkgsrc/net/amule/patches/patch-src_UPnPBase.h       Thu Nov 19 20:01:41 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_UPnPBase.h,v 1.1 2020/11/19 20:01:41 nia Exp $
+
+Fix build with upnp 1.8.x.
+
+From FreeBSD Ports.
+
+--- src/UPnPBase.h.orig        2016-09-16 07:55:07.000000000 +0000
++++ src/UPnPBase.h
+@@ -489,9 +489,15 @@ public:
+ 
+       // Callback function
+       static int Callback(
++#if UPNP_VERSION >= 10800
++              Upnp_EventType_e EventType,
++              const void *Event,
++              void *Cookie);
++#else
+               Upnp_EventType EventType,
+               void* Event,
+               void* Cookie);
++#endif
+ 
+ private:
+       void OnEventReceived(



Home | Main Index | Thread Index | Old Index