Author: pabs Date: 2011-03-11 09:21:36 +0000 (Fri, 11 Mar 2011) New Revision: 11902
Added: packages/trunk/warzone2100/debian/patches/ packages/trunk/warzone2100/debian/patches/0001-Switch-to-using-external-miniupnpc.patch packages/trunk/warzone2100/debian/patches/series Modified: packages/trunk/warzone2100/debian/changelog packages/trunk/warzone2100/debian/control packages/trunk/warzone2100/debian/rules Log: Switch from embedded code copy to the system miniupnpc Modified: packages/trunk/warzone2100/debian/changelog =================================================================== --- packages/trunk/warzone2100/debian/changelog 2011-03-11 04:26:49 UTC (rev 11901) +++ packages/trunk/warzone2100/debian/changelog 2011-03-11 09:21:36 UTC (rev 11902) @@ -1,3 +1,9 @@ +warzone2100 (2.3.7-2) UNRELEASED; urgency=low + + * Switch from embedded code copy to the system miniupnpc + + -- Paul Wise <[email protected]> Fri, 11 Mar 2011 16:36:01 +0800 + warzone2100 (2.3.7-1) unstable; urgency=low * New upstream release Modified: packages/trunk/warzone2100/debian/control =================================================================== --- packages/trunk/warzone2100/debian/control 2011-03-11 04:26:49 UTC (rev 11901) +++ packages/trunk/warzone2100/debian/control 2011-03-11 09:21:36 UTC (rev 11902) @@ -7,6 +7,7 @@ Christoph Egger <[email protected]> Build-Depends: debhelper (>= 7.0.50~), autotools-dev, + dh-autoreconf, bison, flex (>= 2.5.35~) | flex (<< 2.5.34~), flex (>= 2.5.33~), libopenal-dev, @@ -19,6 +20,7 @@ libglc-dev, libpopt-dev, glee-dev, + libminiupnpc-dev, pkg-config, zip, unzip Added: packages/trunk/warzone2100/debian/patches/0001-Switch-to-using-external-miniupnpc.patch =================================================================== --- packages/trunk/warzone2100/debian/patches/0001-Switch-to-using-external-miniupnpc.patch (rev 0) +++ packages/trunk/warzone2100/debian/patches/0001-Switch-to-using-external-miniupnpc.patch 2011-03-11 09:21:36 UTC (rev 11902) @@ -0,0 +1,114 @@ +From: Paul Wise <[email protected]> +Date: Thu, 3 Mar 2011 09:22:38 +0800 +Subject: Switch to using external miniupnpc +--- a/configure.ac ++++ b/configure.ac +@@ -408,6 +408,10 @@ AS_IF([test "$enable_motif" != "no"],[ + ]) + AM_CONDITIONAL([MOTIF_AVAILABLE], test -n "$MOTIF_LIBS") + ++# Look for minupnpc ++AC_CHECK_HEADER(miniupnpc/miniupnpc.h, , AC_MSG_ERROR([miniupnpc header not found.])) ++AC_CHECK_LIB(miniupnpc, UPNP_GetExternalIPAddress, AC_SUBST([MINIUPNPC_LIBS], [-lminiupnpc]), AC_MSG_ERROR([miniupnpc not found.]), [${WIN32_LIBS}]) ++ + # Look for Popt + AC_CHECK_HEADER(popt.h, , AC_MSG_ERROR([Popt header not found.])) + AC_CHECK_LIB(popt, poptGetContext, AC_SUBST([POPT_LIBS], [-lpopt]), AC_MSG_ERROR([Popt not found.]), [${WIN32_LIBS}]) +@@ -493,7 +497,6 @@ AC_CONFIG_FILES([Makefile + lib/ivis_opengl/Makefile + lib/ivis_common/Makefile + lib/netplay/Makefile +- lib/netplay/miniupnpc/Makefile + lib/script/Makefile + lib/sequence/Makefile + lib/sound/Makefile +--- a/lib/netplay/Makefile.am ++++ b/lib/netplay/Makefile.am +@@ -1,5 +1,3 @@ +-SUBDIRS = miniupnpc +- + AM_CPPFLAGS = $(SDL_CFLAGS) $(SDL_NET_CFLAGS) $(WZ_CPPFLAGS) + AM_CFLAGS = $(WZ_CFLAGS) + AM_CXXFLAGS = $(WZ_CXXFLAGS) +@@ -16,7 +14,7 @@ libnetplay_a_SOURCES = \ + netplay.c \ + nettypes.c + +-libnetplay_a_LIBADD = $(top_builddir)/lib/framework/libframework.a $(top_builddir)/lib/netplay/miniupnpc/libminiupnpc.a ++libnetplay_a_LIBADD = $(top_builddir)/lib/framework/libframework.a + + # HACK Don't give make errors when switching between trunk and branches. + # Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file. +--- a/lib/netplay/netplay.c ++++ b/lib/netplay/netplay.c +@@ -37,9 +37,9 @@ + #include "netplay.h" + #include "netlog.h" + +-#include "miniupnpc/miniwget.h" +-#include "miniupnpc/miniupnpc.h" +-#include "miniupnpc/upnpcommands.h" ++#include <miniupnpc/miniwget.h> ++#include <miniupnpc/miniupnpc.h> ++#include <miniupnpc/upnpcommands.h> + #include "lib/exceptionhandler/dumpinfo.h" + + #include "src/multistat.h" +@@ -2126,9 +2126,9 @@ static bool upnp_add_redirect(int port) + int r; + + debug(LOG_NET, "upnp_add_redir(%d)\n", port); +- UPNP_GetExternalIPAddress(urls.controlURL, data.servicetype, externalIP); ++ UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP); + sprintf(port_str, "%d", port); +- r = UPNP_AddPortMapping(urls.controlURL, data.servicetype, ++ r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + port_str, port_str, lanaddr, "Warzone 2100", "TCP", 0); + if (r != UPNPCOMMAND_SUCCESS) + { +@@ -2144,7 +2144,7 @@ static void upnp_rem_redirect(int port) + char port_str[16]; + debug(LOG_NET, "upnp_rem_redir(%d)", port); + sprintf(port_str, "%d", port); +- UPNP_DeletePortMapping(urls.controlURL, data.servicetype, port_str, "TCP", 0); ++ UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port_str, "TCP", 0); + } + + void NETaddRedirects(void) +--- a/po/update-po.sh ++++ b/po/update-po.sh +@@ -11,5 +11,5 @@ EOF + find lib src data -type f | + grep -v '\/.svn\/' | + grep -e '\.c\(pp\|xx\)\?$' -e 'data.*strings.*\.txt$' -e 'data.*sequenceaudio.*\.tx.$' -e '\.slo$' -e '\.rmsg$' | +- grep -v -e '\.lex\.c\(pp\|xx\)\?$' -e '\.tab\.c\(pp\|xx\)\?$' -e 'lib/netplay/miniupnpc/*' -e 'GLee\.c' | ++ grep -v -e '\.lex\.c\(pp\|xx\)\?$' -e '\.tab\.c\(pp\|xx\)\?$' -e 'GLee\.c' | + sort >> po/POTFILES.in +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -8,7 +8,7 @@ + force-linker.cpp: + touch $@ + +-AM_CPPFLAGS = -DYY_NO_INPUT $(SDL_CFLAGS) $(PHYSFS_CFLAGS) $(PNG_CFLAGS) $(OGGVORBIS_CFLAGS) $(OPENAL_CFLAGS) $(OPENGLC_CFLAGS) $(OPENGL_CFLAGS) $(POPT_CFLAGS) $(WZ_CPPFLAGS) $(GLee_CFLAGS) ++AM_CPPFLAGS = -DYY_NO_INPUT $(SDL_CFLAGS) $(PHYSFS_CFLAGS) $(PNG_CFLAGS) $(OGGVORBIS_CFLAGS) $(OPENAL_CFLAGS) $(OPENGLC_CFLAGS) $(OPENGL_CFLAGS) $(POPT_CFLAGS) $(WZ_CPPFLAGS) $(GLee_CFLAGS) $(MINIUPNPC_LIBS) + AM_CFLAGS = $(WZ_CFLAGS) + AM_CXXFLAGS = $(WZ_CXXFLAGS) + AM_LFLAGS = $(FLEX_FLAGS) +@@ -290,7 +290,6 @@ warzone2100_LDADD = \ + $(top_builddir)/lib/sound/libsound.a \ + $(top_builddir)/lib/script/libscript.a \ + $(top_builddir)/lib/netplay/libnetplay.a \ +- $(top_builddir)/lib/netplay/miniupnpc/libminiupnpc.a \ + $(top_builddir)/lib/ivis_opengl/libivis_opengl.a \ + $(top_builddir)/lib/ivis_common/libivis_common.a \ + $(top_builddir)/lib/gamelib/libgamelib.a \ +@@ -298,7 +297,7 @@ warzone2100_LDADD = \ + $(top_builddir)/lib/iniparser/libiniparser.a \ + $(top_builddir)/lib/exceptionhandler/libexceptionhandler.a + +-warzone2100_LDADD += $(LTLIBINTL) $(SDL_LIBS) $(PHYSFS_LIBS) $(PNG_LIBS) $(OGGVORBIS_LIBS) $(THEORA_LIBS) $(OPENAL_LIBS) $(OPENGLC_LIBS) $(OPENGL_LIBS) $(POPT_LIBS) $(MOTIF_LIBS) $(X11_LIBS) $(GLee_LIBS) ++warzone2100_LDADD += $(LTLIBINTL) $(SDL_LIBS) $(PHYSFS_LIBS) $(PNG_LIBS) $(OGGVORBIS_LIBS) $(THEORA_LIBS) $(OPENAL_LIBS) $(OPENGLC_LIBS) $(OPENGL_LIBS) $(POPT_LIBS) $(MOTIF_LIBS) $(X11_LIBS) $(GLee_LIBS) $(MINIUPNPC_LIBS) + + if MINGW32 + warzone2100_LDADD += $(top_builddir)/win32/warzone2100.o $(WIN32_LIBS) Added: packages/trunk/warzone2100/debian/patches/series =================================================================== --- packages/trunk/warzone2100/debian/patches/series (rev 0) +++ packages/trunk/warzone2100/debian/patches/series 2011-03-11 09:21:36 UTC (rev 11902) @@ -0,0 +1 @@ +0001-Switch-to-using-external-miniupnpc.patch Modified: packages/trunk/warzone2100/debian/rules =================================================================== --- packages/trunk/warzone2100/debian/rules 2011-03-11 04:26:49 UTC (rev 11901) +++ packages/trunk/warzone2100/debian/rules 2011-03-11 09:21:36 UTC (rev 11902) @@ -3,11 +3,16 @@ #export DH_VERBOSE=1 %: - dh --parallel --with autotools_dev $@ + dh --parallel --with autotools_dev --with autoreconf $@ +override_dh_autoreconf: + dh_autoreconf ./autogen.sh + override_dh_auto_configure: # Remove GLee embedded code copy so we never use it rm -f lib/ivis_opengl/GLee.c lib/ivis_opengl/GLee.h + # Remove miniupnpc embedded code copy so we never use it + rm -rf lib/netplay/miniupnpc dh_auto_configure -- \ --bindir=\$${prefix}/games \ --datadir=\$${prefix}/share/games \ _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

