Repair Wesnoth build error and advance to version 1.8.6.

svn path=/nixpkgs/trunk/; revision=27666
This commit is contained in:
Karn Kallio 2011-07-08 00:59:01 +00:00
parent e4353b1f65
commit 9fbe9c9541
2 changed files with 7 additions and 37 deletions

View File

@ -1,28 +0,0 @@
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";;

View File

@ -3,32 +3,30 @@
, fribidi, asciidoc }:
stdenv.mkDerivation rec {
pname = "wesnoth";
version = "1.8.5";
name = "wesnoth";
version = "1.8.6";
name = "${pname}-${version}";
pname = "${name}-${version}";
src = fetchurl {
url = "mirror://sourceforge/sourceforge/${pname}/${name}.tar.bz2";
sha256 = "1yjmqvwzz446vvkjg923ypwnmhb0fbgqj0ax0k7s102la37bv8zc";
url = "mirror://sourceforge/sourceforge/${name}/${pname}.tar.bz2";
sha256 = "10c01ys846zsy831gprdy2nx3qlzv65s4jy99lw6misak3x07rjg";
};
buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf pango gettext zlib boost fribidi
automake autoconf freetype libpng pkgconfig lua dbus fontconfig libtool ];
# The patch and the preInstall sed substitution fix errors which I
# 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-preferences-dir=.${name} \
--with-datadir-name=${name}
'';