megaglest build fails with recent versions of miniupnpc apply patch obtained from megaglest SVN r3958
Maintainer of games/megaglest, Please note that PR ports/177987 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/177987 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
I have been unable to get this patch to work as it currently is with miniupc version 1.8 that I have installed so I will need to do some additional tooling on this. Rusty Nejdl
On 04/26/2013 22:46, Rusty Nejdl wrote: > > > I have been unable to get this patch to work as it currently is with > miniupc version 1.8 that I have installed so I will need to do some > additional tooling on this. That's strange. It works here with up-to-date ports tree and miniupnpc-1.8. Do you see the following output during configure? -- Performing Test MINIUPNPC_VERSION_1_7_OR_HIGHER -- Performing Test MINIUPNPC_VERSION_1_7_OR_HIGHER - Success
On 2013-04-27 04:42, Stefan Ehmann wrote: > On 04/26/2013 22:46, Rusty Nejdl wrote: > >> I have been unable to get this patch to work as it currently is with miniupc version 1.8 that I have installed so I will need to do some additional tooling on this. > > That's strange. It works here with up-to-date ports tree and miniupnpc-1.8. > > Do you see the following output during configure? > -- Performing Test MINIUPNPC_VERSION_1_7_OR_HIGHER > -- Performing Test MINIUPNPC_VERSION_1_7_OR_HIGHER - Success Yeah, it's not doing that for whatever reason: -- Found the miniupnpc headers at /usr/local/include/miniupnpc -- Detecting version of miniupnpc in path: /usr/local/include/miniupnpc -- Performing Test MINIUPNPC_VERSION_1_6_OR_HIGHER -- Performing Test MINIUPNPC_VERSION_1_6_OR_HIGHER - Success -- Found miniupnpc version is v1.6 or higher -- *** Using SHARED miniupnpc found in [/usr/local/include/miniupnpc] MINIUPNP_FOUND [TRUE] MINIUPNP_LIBRARY [/usr/local/lib/libminiupnpc.so] -- **No macros required for miniupnpc version For some reason, it is completely ignoring the patch on my system and I can't figure out why. [tethys]:/usr/ports/games/megaglest> ls -al files/ total 20 drwxr-xr-x 2 root wheel 512 Apr 27 10:12 ./ drwxr-xr-x 4 root wheel 512 Apr 27 10:14 ../ -rw-r--r-- 1 root wheel 333 Nov 24 20:32 patch-PNGReader.cpp -rw-r--r-- 1 root wheel 7127 Apr 27 10:12 patch-megaglest-miniupnpc -rw-r--r-- 1 root wheel 465 Nov 27 09:26 patch-source-shared_lib-CMakeLists.txt -rw-r--r-- 1 root wheel 462 Nov 27 09:26 patch-source-shared_lib-sources-platform-posix-ircclient.cpp -rw-r--r-- 1 root wheel 697 Nov 24 20:32 pkg-message.in [tethys]:/usr/ports/games/megaglest> Rusty
Can I have this PR please be committed to fix this build? Thanks! Rusty Nejdl
Just to be clear: the latest patch in this PR does not apply cleanly because files/patch-megaglest-miniupnpc does not exist in the tree. I assume it's Stefan's original patch which you had committed locally? In the end, is there anything in the final patch that did not make it upstream?
Author: rakuco Date: Tue Jun 11 17:36:22 2013 New Revision: 320617 URL: http://svnweb.freebsd.org/changeset/ports/320617 Log: Apply some upstream patches to fix the build with recent versions of miniupnpc. While here, convert from NOPORTDOCS to the OptionsNG variant. PR: ports/177987 Submitted by: Rusty Nejdl <rnejdl@ringofsaturn.com> (maintainer) Added: head/games/megaglest/files/patch-mk-cmake-modules-FindMiniupnpc.cmake (contents, props changed) head/games/megaglest/files/patch-source-share_lib-sources-platform-posix-socket.cpp (contents, props changed) Modified: head/games/megaglest/Makefile head/games/megaglest/files/patch-source-shared_lib-CMakeLists.txt Modified: head/games/megaglest/Makefile ============================================================================== --- head/games/megaglest/Makefile Tue Jun 11 16:52:13 2013 (r320616) +++ head/games/megaglest/Makefile Tue Jun 11 17:36:22 2013 (r320617) @@ -3,6 +3,7 @@ PORTNAME= megaglest PORTVERSION= 3.7.1 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}_${PORTVERSION}/ DISTNAME= ${PORTNAME}-source-${PORTVERSION} @@ -53,7 +54,7 @@ post-patch: do-install: ${STRIP_CMD} ${WRKSRC}/mk/linux/megaglest @${MKDIR} ${DATADIR} -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} .endif ${INSTALL_PROGRAM} ${WRKSRC}/mk/linux/megaglest ${PREFIX}/bin/${PORTNAME} Added: head/games/megaglest/files/patch-mk-cmake-modules-FindMiniupnpc.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/megaglest/files/patch-mk-cmake-modules-FindMiniupnpc.cmake Tue Jun 11 17:36:22 2013 (r320617) @@ -0,0 +1,114 @@ +--- mk/cmake/Modules/FindMiniupnpc.cmake.orig 2013-05-15 21:42:23.000000000 -0500 ++++ mk/cmake/Modules/FindMiniupnpc.cmake 2013-05-15 21:42:02.000000000 -0500 +@@ -58,20 +58,40 @@ + #include <stdio.h> + int main() + { +- struct UPNPDev *devlist = NULL; +- int upnp_delay = 5000; +- const char *upnp_multicastif = NULL; +- const char *upnp_minissdpdsock = NULL; +- int upnp_sameport = 0; +- int upnp_ipv6 = 0; +- int upnp_error = 0; +- devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error); ++ static struct UPNPUrls urls; ++ static struct IGDdatas data; ++ ++ GetUPNPUrls (&urls, &data, \"myurl\",0); + + return 0; + }" +- MINIUPNPC_VERSION_1_6_OR_HIGHER) +- +- IF (NOT MINIUPNPC_VERSION_1_6_OR_HIGHER) ++ MINIUPNPC_VERSION_1_7_OR_HIGHER) ++ ++ IF (NOT MINIUPNPC_VERSION_1_7_OR_HIGHER) ++ set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR}) ++ set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY}) ++ check_cxx_source_runs(" ++ #include <miniwget.h> ++ #include <miniupnpc.h> ++ #include <upnpcommands.h> ++ #include <stdio.h> ++ int main() ++ { ++ struct UPNPDev *devlist = NULL; ++ int upnp_delay = 5000; ++ const char *upnp_multicastif = NULL; ++ const char *upnp_minissdpdsock = NULL; ++ int upnp_sameport = 0; ++ int upnp_ipv6 = 0; ++ int upnp_error = 0; ++ devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error); ++ ++ return 0; ++ }" ++ MINIUPNPC_VERSION_PRE1_7) ++ ENDIF() ++ ++ IF (NOT MINIUPNPC_VERSION_PRE1_7 AND NOT MINIUPNPC_VERSION_1_7_OR_HIGHER) + set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY}) + check_cxx_source_runs(" +@@ -96,25 +116,27 @@ + + ENDIF() + +- set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY}) +- check_cxx_source_runs(" +- #include <miniwget.h> +- #include <miniupnpc.h> +- #include <upnpcommands.h> +- #include <stdio.h> +- static struct UPNPUrls urls; +- static struct IGDdatas data; +- int main() +- { +- char externalIP[16] = ""; +- UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP); ++ IF (NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7 AND NOT MINIUPNPC_VERSION_1_7_OR_HIGHER) ++ set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR}) ++ set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY}) ++ check_cxx_source_runs(" ++ #include <miniwget.h> ++ #include <miniupnpc.h> ++ #include <upnpcommands.h> ++ #include <stdio.h> ++ static struct UPNPUrls urls; ++ static struct IGDdatas data; ++ int main() ++ { ++ char externalIP[16] = ""; ++ UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP); + +- return 0; +- }" +- MINIUPNPC_VERSION_1_5_OR_HIGHER) ++ return 0; ++ }" ++ MINIUPNPC_VERSION_1_5_OR_HIGHER) ++ ENDIF() + +- IF (NOT MINIUPNPC_VERSION_1_5_OR_HIGHER) ++ IF (NOT MINIUPNPC_VERSION_1_5_OR_HIGHER AND NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7 AND NOT MINIUPNPC_VERSION_1_7_OR_HIGHER) + set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY}) + check_cxx_source_runs(" +@@ -141,8 +163,12 @@ + IF(MINIUPNPC_VERSION_PRE1_6) + message(STATUS "Found miniupnpc version is pre v1.6") + ENDIF() +- IF(NOT MINIUPNPC_VERSION_PRE1_5 AND NOT MINIUPNPC_VERSION_PRE1_6) +- message(STATUS "Found miniupnpc version is v1.6 or higher") ++ IF(MINIUPNPC_VERSION_PRE1_7) ++ message(STATUS "Found miniupnpc version is pre v1.7") ++ ENDIF() ++ ++ IF(NOT MINIUPNPC_VERSION_PRE1_5 AND NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7) ++ message(STATUS "Found miniupnpc version is v1.7 or higher") + ENDIF() + + else () Added: head/games/megaglest/files/patch-source-share_lib-sources-platform-posix-socket.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/megaglest/files/patch-source-share_lib-sources-platform-posix-socket.cpp Tue Jun 11 17:36:22 2013 (r320617) @@ -0,0 +1,25 @@ +--- source/shared_lib/sources/platform/posix/socket.cpp.orig 2013-05-15 21:33:42.000000000 -0500 ++++ source/shared_lib/sources/platform/posix/socket.cpp 2013-05-15 21:37:06.000000000 -0500 +@@ -2478,13 +2478,22 @@ + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("UPnP device found: %s %s\n", dev->descURL, dev->st); + + //printf("UPnP device found: [%s] [%s] lanaddr [%s]\n", dev->descURL, dev->st,lanaddr); ++#ifndef MINIUPNPC_VERSION_PRE1_7 ++ descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0])),0); ++#else + descXML = (char *)miniwget_getaddr(dev->descURL, &descXMLsize, lanaddr, (sizeof(lanaddr) / sizeof(lanaddr[0]))); ++#endif + if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"LAN address: %s\n", lanaddr); + + if (descXML) { + parserootdesc (descXML, descXMLsize, &data); + free (descXML); descXML = 0; ++ ++#ifndef MINIUPNPC_VERSION_PRE1_7 ++ GetUPNPUrls (&urls, &data, dev->descURL,0); ++#else + GetUPNPUrls (&urls, &data, dev->descURL); ++#endif + } + snprintf(buf, 255,"UPnP device found: %s %s LAN address %s", dev->descURL, dev->st, lanaddr); + Modified: head/games/megaglest/files/patch-source-shared_lib-CMakeLists.txt ============================================================================== --- head/games/megaglest/files/patch-source-shared_lib-CMakeLists.txt Tue Jun 11 16:52:13 2013 (r320616) +++ head/games/megaglest/files/patch-source-shared_lib-CMakeLists.txt Tue Jun 11 17:36:22 2013 (r320617) @@ -1,5 +1,14 @@ ---- source/shared_lib/CMakeLists.txt.orig 2012-11-25 00:19:10.000000000 +0000 -+++ source/shared_lib/CMakeLists.txt 2012-11-25 00:12:01.000000000 +0000 +--- source/shared_lib/CMakeLists.txt.orig 2013-05-15 21:40:33.000000000 -0500 ++++ source/shared_lib/CMakeLists.txt 2013-05-15 21:41:00.000000000 -0500 +@@ -116,7 +116,7 @@ + # + # INCLUDE_DIRECTORIES(${LUAJIT_INCLUDE_DIR}) + # IF(UNIX) +-# SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUAJIT_LIBRARIES} "libdl.so") ++# SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUAJIT_LIBRARIES} ${CMAKE_DL_LIBS}) + # ENDIF() + # ELSE() + # MESSAGE(STATUS "**WARNING: LUAJIT NOT found, so Lua performance may suffer.") @@ -124,7 +124,7 @@ FIND_PACKAGE(LUA REQUIRED) INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR}) @@ -9,3 +18,17 @@ ENDIF() # ENDIF() +@@ -297,7 +297,12 @@ + ADD_DEFINITIONS(-DMINIUPNPC_VERSION_PRE1_6) + message(STATUS "Adding macro for miniupnpc version: pre v1.6") + ENDIF() +- IF(NOT MINIUPNPC_VERSION_PRE1_5 AND NOT MINIUPNPC_VERSION_PRE1_6) ++ IF(MINIUPNPC_VERSION_PRE1_7) ++ ADD_DEFINITIONS(-DMINIUPNPC_VERSION_PRE1_7) ++ message(STATUS "Adding macro for miniupnpc version: pre v1.7") ++ ENDIF() ++ ++ IF(NOT MINIUPNPC_VERSION_PRE1_5 AND NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7) + message(STATUS "**No macros required for miniupnpc version") + ENDIF() + _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed. Thanks!