warmux stable port information

Package: warmux
Version: 11.04
Revision: 3
Maintainer: Hanspeter Niederstrasser
Source: http://download.gna.org/%N/%N-%v.tar.bz2
Source-MD5: 668cd4c22afde352c566454e65fc4144
BuildDepends: <<
fink (>= 0.24.12),
fribidi-dev (>= 0.19.2-2),
gettext-tools (>= 0.17),
libcurl4,
libgettext8-dev,
libpng14,
libxml2 (>= 2.7),
pkgconfig,
sdl (>= 1.2.13-1),
sdl-gfx13,
sdl-image,
sdl-mixer,
sdl-net,
sdl-ttf
<<
Depends: <<
fribidi-shlibs (>= 0.19.2-2),
libcurl4-shlibs,
libgettext8-shlibs,
libpng14-shlibs,
libxml2-shlibs (>= 2.7),
sdl-shlibs (>= 1.2.13-1),
sdl-gfx13-shlibs,
sdl-image-shlibs,
sdl-mixer-shlibs,
sdl-net-shlibs,
sdl-ttf-shlibs,
xdg-base
<<
PatchFile: %n.patch
PatchFile-MD5: 9bbe9aa948200e3dfc79c873579c15a0
PatchScript: <<
%{default_script}
### --as-needed added at the 0.8.5 release. Does not exist on OS X
/usr/bin/perl -pi -e 's|-Wl,--as-needed||g;' src/Makefile.in tools/list_games/Makefile.in
<<
SetLDFLAGS: -L%p/lib/system-openssl/lib -lintl
ConfigureParams: --with-datadir-name=%p/share/%N --mandir=%p/share/man --with-localedir-name=%p/share/locale --disable-dependency-tracking --disable-sdltest --enable-fribidi
GCC: 4.0
CompileScript: <<
./configure %c
/usr/bin/make -w
<<
InstallScript: <<
/usr/bin/make -w -j 1 install DESTDIR=%d || true
/usr/bin/make -w -j 1 install DESTDIR=%d
/usr/bin/strip %i/bin/%n
<<
Docfiles: AUTHORS ChangeLog COPYING INSTALL README TODO
Description: Worms clone
DescDetail: <<
War is declared !

Have the mascots of your favorite free softwares battle in the Warmux
arena. Using dynamite, grenades, baseball bat and others bazookas,...
exterminate your opponent in a 2D toon style scenery and a funny
environment.

Each player controls the team of his choice (penguin, gnu, firefox,
wilber,...) and must destroy his adversary using more or less casual
weapons.

Although a minimum of strategy is required to vanquish, Warmux is
pre-eminently a "convivial mass murder" game where, turn by turn,
each member of each team attempts to produce a maximum of damage to
his opponents.
<<
DescPackaging: <<
InstallScript calls the install script twice because the first run always fails. We silence the failure with || true and then re-run it. No dire effects have been noticed from this system.
<<
DescPort: <<
We're not an .app, so use standard config file locations. #if is swallowing the file location chunk. Move it outside in patch.
<<
License: GPL
Homepage: http://www.wormux.org/

warmux stable port .patch

diff -ruN -U 8 warmux-11.04-orig/src/game/config.cpp warmux-11.04/src/game/config.cpp
--- warmux-11.04-orig/src/game/config.cpp 2011-04-18 16:43:40.000000000 -0400
+++ warmux-11.04/src/game/config.cpp 2011-04-30 11:07:29.000000000 -0400
@@ -199,16 +199,17 @@

#else //Neither WIN32, ANDROID or __APPLE__
data_dir = GetEnv(Constants::ENV_DATADIR, INSTALL_DATADIR);
# ifdef ENABLE_NLS
locale_dir = GetEnv(Constants::ENV_LOCALEDIR, INSTALL_LOCALEDIR);
# endif
ttf_filename = GetEnv(Constants::ENV_FONT_PATH, FONT_FILE);
font_dir = GetEnv(Constants::ENV_FONT_PATH, data_dir + PATH_SEPARATOR "font" PATH_SEPARATOR);
+#endif // __APPLE__, WIN32, ANDROID

// To respect XDG Base Directory Specification from FreeDesktop
// http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html

const char * c_config_dir = std::getenv("XDG_CONFIG_HOME");
const char * c_data_dir = std::getenv("XDG_DATA_HOME");

if (c_config_dir == NULL)
@@ -220,17 +221,16 @@

if (c_data_dir == NULL) {
personal_data_dir = GetHome() + "/.local/share";
}
else
personal_data_dir = c_data_dir;

personal_data_dir += "/wormux/";
-#endif

std::string old_dir = GetOldPersonalDir();
if (old_dir != "") {
std::cout << "Moving " << old_dir << " to " << personal_data_dir << std::endl;
if (old_dir != personal_data_dir)
Rename(old_dir, personal_data_dir);
}

warmux _unstable_ port .patch