diff options
author | root <root@rshg054.dnsready.net> | 2011-08-02 04:35:55 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-02 04:35:55 +0000 |
commit | bf35116f9d203dcafce808a6c7b3dd5a0db8afbc (patch) | |
tree | f9551a1d3c67d2113cc5fc5c3f8816bcbaad0540 /extra/wesnoth | |
parent | 1173ff2dba7d0fd3c45f170a5e353a76b7a5da2f (diff) |
Tue Aug 2 04:35:55 UTC 2011
Diffstat (limited to 'extra/wesnoth')
-rw-r--r-- | extra/wesnoth/PKGBUILD | 13 | ||||
-rw-r--r-- | extra/wesnoth/wesnoth-1.8.6-boost-foreach.patch | 70 |
2 files changed, 78 insertions, 5 deletions
diff --git a/extra/wesnoth/PKGBUILD b/extra/wesnoth/PKGBUILD index 67a9f56de..bdac470ae 100644 --- a/extra/wesnoth/PKGBUILD +++ b/extra/wesnoth/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 125126 2011-05-25 17:01:35Z ibiru $ +# $Id: PKGBUILD 132797 2011-07-26 09:16:15Z ibiru $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Jacobo Arvelo <unix4all@ya.com> @@ -6,7 +6,7 @@ pkgname=wesnoth pkgver=1.8.6 -pkgrel=1 +pkgrel=2 pkgdesc="A turn-based strategy game on a fantasy world" arch=('i686' 'x86_64') license=('GPL') @@ -15,13 +15,16 @@ depends=('sdl_ttf' 'sdl_net' 'sdl_mixer' 'sdl_image' 'fribidi' 'boost-libs' 'pan makedepends=('boost') install=wesnoth.install source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2 - wesnoth-libpng-1.4.0.patch) + wesnoth-libpng-1.4.0.patch + wesnoth-1.8.6-boost-foreach.patch) md5sums=('f1c3179869b01b61e253e74aeb241034' - 'ca7412ffc4682ef55ddf82d56b0e2f08') + 'ca7412ffc4682ef55ddf82d56b0e2f08' + 'dc414ab7e1334941548e9db6db9c2460') build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i ../wesnoth-libpng-1.4.0.patch + patch -Np1 -i "${srcdir}/wesnoth-libpng-1.4.0.patch" + patch -Np1 -i "${srcdir}/wesnoth-1.8.6-boost-foreach.patch" ./autogen.sh ./configure --prefix=/usr --localstatedir=/var --enable-tools --enable-editor --enable-server make DESTDIR="${pkgdir}" install-exec diff --git a/extra/wesnoth/wesnoth-1.8.6-boost-foreach.patch b/extra/wesnoth/wesnoth-1.8.6-boost-foreach.patch new file mode 100644 index 000000000..5aee3118c --- /dev/null +++ b/extra/wesnoth/wesnoth-1.8.6-boost-foreach.patch @@ -0,0 +1,70 @@ +--- wesnoth-1.8.6/src/gui/widgets/tree_view_node.cpp~ 2011-07-21 23:05:56.594879049 +0200 ++++ wesnoth-1.8.6/src/gui/widgets/tree_view_node.cpp 2011-07-21 23:28:07.540358742 +0200 +@@ -238,6 +238,17 @@ void ttree_view_node::clear() + + struct ttree_view_node_implementation + { ++ template<class W, class It> ++ static W* find_at_aux(It begin, It end, ++ const tpoint& coordinate, const bool must_be_active) { ++ for (It it = begin; it != end; ++it) { ++ if(W* widget = it->find_at(coordinate, must_be_active)) { ++ return widget; ++ } ++ } ++ return NULL; ++ } ++ + template<class W> + static W* find_at( + typename tconst_duplicator<W, ttree_view_node>::type& +@@ -255,13 +266,9 @@ struct ttree_view_node_implementation + } + + typedef typename tconst_duplicator<W, ttree_view_node>::type thack; +- foreach(thack& node, tree_view_node.children_) { +- if(W* widget = node.find_at(coordinate, must_be_active)) { +- return widget; +- } +- } +- +- return NULL; ++ return find_at_aux<W>(tree_view_node.children_.begin(), ++ tree_view_node.children_.end(), ++ coordinate, must_be_active); + } + }; + +@@ -313,7 +320,9 @@ tpoint ttree_view_node::get_current_size + return size; + } + +- foreach(const ttree_view_node& node, children_) { ++ for (boost::ptr_vector<ttree_view_node>::const_iterator it ++ = children_.begin (); it != children_.end (); ++it) { ++ const ttree_view_node& node = *it; + + if(node.grid_.get_visible() == twidget::INVISIBLE) { + continue; +@@ -344,7 +353,9 @@ tpoint ttree_view_node::get_unfolded_siz + size.x += (get_indention_level() - 1) * tree_view().indention_step_size_; + } + +- foreach(const ttree_view_node& node, children_) { ++ for (boost::ptr_vector<ttree_view_node>::const_iterator it ++ = children_.begin (); it != children_.end (); ++it) { ++ const ttree_view_node& node = *it; + + if(node.grid_.get_visible() == twidget::INVISIBLE) { + continue; +@@ -378,7 +389,9 @@ tpoint ttree_view_node::calculate_best_s + + DBG_GUI_L << LOG_HEADER << " own grid best size " << best_size << ".\n"; + +- foreach(const ttree_view_node& node, children_) { ++ for (boost::ptr_vector<ttree_view_node>::const_iterator it ++ = children_.begin (); it != children_.end (); ++it) { ++ const ttree_view_node& node = *it; + + if(node.grid_.get_visible() == twidget::INVISIBLE) { + continue; |