Author: thammers
Date: Sat Nov 13 11:50:43 2010
New Revision: 24682
URL: https://svn.nixos.org/websvn/nix/?rev=24682&sc=1

Log:
wesnoth 1.8.5 (patch by Karn Kallio)

Added:
   nixpkgs/trunk/pkgs/games/wesnoth/add-acl-prefix-to-libext.patch
Modified:
   nixpkgs/trunk/pkgs/games/wesnoth/default.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/games/wesnoth/add-acl-prefix-to-libext.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/games/wesnoth/add-acl-prefix-to-libext.patch     Sat Nov 
13 11:50:43 2010        (r24682)
@@ -0,0 +1,28 @@
+diff -Naur wesnoth-upstream-1.8.5/m4/boost.m4 wesnoth-1.8.5/m4/boost.m4
+
+Libtools seems to set a variable called acl_libext while the Boost
+library check code uses a variable called libext.  This patch makes
+the Boost check use the variable acl_libext actually set by libtools.
+
+--- wesnoth-upstream-1.8.5/m4/boost.m4 2010-10-02 20:35:59.577619372 -0430
++++ wesnoth-1.8.5/m4/boost.m4  2010-10-02 20:39:10.383653233 -0430
+@@ -252,8 +252,8 @@
+   test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt"
+   $boost_guess_use_mt && boost_mt=-mt
+   # Look for the abs path the static archive.
+-  # $libext is computed by Libtool but let's make sure it's non empty.
+-  test -z "$libext" &&
++  # $acl_libext is computed by Libtool but let's make sure it's non empty.
++  test -z "$acl_libext" &&
+     AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?])
+   boost_save_ac_objext=$ac_objext
+   # Generate the test file.
+@@ -309,7 +309,7 @@
+       # Are we looking for a static library?
+       case $boost_ldpath:$boost_rtopt_ in #(
+         *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
+-          Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext"
++          Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$acl_libext"
+           test -e "$Boost_lib_LIBS" || continue;; #(
+         *) # No: use -lboost_foo to find the shared library.
+           Boost_lib_LIBS="-l$boost_lib";;

Modified: nixpkgs/trunk/pkgs/games/wesnoth/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/games/wesnoth/default.nix        Sat Nov 13 07:47:04 
2010        (r24681)
+++ nixpkgs/trunk/pkgs/games/wesnoth/default.nix        Sat Nov 13 11:50:43 
2010        (r24682)
@@ -1,22 +1,53 @@
-{ stdenv, fetchurl, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf, pango
-, gettext, zlib, boost, freetype, libpng, pkgconfig }:
+{ stdenv, fetchurl, automake, autoconf, SDL, SDL_image, SDL_mixer, SDL_net, 
SDL_ttf, pango
+, gettext, zlib, boost, freetype, libpng, pkgconfig, lua, dbus, fontconfig, 
libtool
+, fribidi, asciidoc }:
 
 stdenv.mkDerivation rec {
   pname = "wesnoth";
-  version = "1.6.5";
+  version = "1.8.5";
 
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/sourceforge/${pname}/${name}.tar.bz2";
-    sha256 = "1mrhgwp8iw27ifpavnf4y69zf9fqfy7j4sfwkfzsay226sp4gw3y";
+    sha256 = "1yjmqvwzz446vvkjg923ypwnmhb0fbgqj0ax0k7s102la37bv8zc";
   };
 
-  buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf pango gettext zlib 
boost freetype libpng pkgconfig ];
+  buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf pango gettext zlib 
boost fribidi
+                  automake autoconf freetype libpng pkgconfig lua dbus 
fontconfig libtool ];
 
-  configureFlags = "--with-preferences-dir=.${name} 
--program-suffix=-${version} --with-datadir-name=${name} 
--with-boost=${boost}/include --disable-python";
+  # The patch and the preInstall sed substitution fix errors which I 
+  # believe arise from autotools version mismatches.  Rather than
+  # hunt for the correct automake and autoconf versions these changes
+  # make the build work with the versions current in Nixpkgs.
+  patches = ./add-acl-prefix-to-libext.patch;
+
+  preInstall = ''
+    sed -i -e s,@MKINSTALLDIRS@,`pwd`/config/mkinstalldirs, po/*/Makefile
+  '';
+
+  configurePhase = ''
+    ./autogen.sh --prefix=$out --with-boost=${boost} \
+                 --with-preferences-dir=.${name} --program-suffix=-${version} \
+                 --with-datadir-name=${name}
+  '';
 
-  meta = {
+  # Make the package build with the gcc currently available in Nixpkgs.
+  NIX_CFLAGS_COMPILE = "-Wno-ignored-qualifiers";
+
+  meta = with stdenv.lib; {
     description = "The Battle for Wesnoth, a free, turn-based strategy game 
with a fantasy theme";
+    longDescription = ''
+      The Battle for Wesnoth is a Free, turn-based tactical strategy
+      game with a high fantasy theme, featuring both single-player, and
+      online/hotseat multiplayer combat. Fight a desperate battle to
+      reclaim the throne of Wesnoth, or take hand in any number of other
+      adventures.
+    '';
+    
+    homepage = http://www.wesnoth.org/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.kkallio ];
+    platforms = platforms.linux;
   };
 }

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Sat Nov 13 07:47:04 
2010        (r24681)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Sat Nov 13 11:50:43 
2010        (r24682)
@@ -5081,6 +5081,7 @@
 
   wesnoth = callPackage ../games/wesnoth {
     inherit (gtkLibs) pango;
+    lua = lua5;
   };
 
   wirelesstools = callPackage ../os-specific/linux/wireless-tools { };
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to