summaryrefslogtreecommitdiff
path: root/games/widelands
diff options
context:
space:
mode:
Diffstat (limited to 'games/widelands')
-rw-r--r--games/widelands/README3
-rw-r--r--games/widelands/widelands-0.15-gcc45.patch49
-rw-r--r--games/widelands/widelands-gcc47.patch12
-rw-r--r--games/widelands/widelands.SlackBuild30
-rw-r--r--games/widelands/widelands.info6
5 files changed, 33 insertions, 67 deletions
diff --git a/games/widelands/README b/games/widelands/README
index 3d0abffdb7..366cbb6559 100644
--- a/games/widelands/README
+++ b/games/widelands/README
@@ -1,4 +1 @@
Widelands is a strategy game based on Settlers II.
-
-If you want integration with the GGZ Gaming Zone,
-you will also need ggz-base-libs.
diff --git a/games/widelands/widelands-0.15-gcc45.patch b/games/widelands/widelands-0.15-gcc45.patch
deleted file mode 100644
index efd42a8b95..0000000000
--- a/games/widelands/widelands-0.15-gcc45.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- src/editor/ui_menus/editor_main_menu_random_map.cc.old 2010-05-18 17:17:15.000000000 +0200
-+++ src/editor/ui_menus/editor_main_menu_random_map.cc 2010-05-18 17:18:29.000000000 +0200
-@@ -251,7 +251,7 @@
- posx, posy, width, height,
- g_gr->get_picture(PicMod_UI, "pics/but1.png"),
- &Main_Menu_New_Random_Map::button_clicked, *this, 8,
-- Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
-+ Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
-
- posy += height + spacing + spacing + spacing;
-
-@@ -322,7 +322,7 @@
- if (m_currentworld == m_worlds.size())
- m_currentworld = 0;
- m_world->set_title
-- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
-+ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
- break;
- case 9:
- break;
-@@ -476,7 +476,7 @@
- (strcmp(mapInfo.worldName.c_str(), m_worlds[m_currentworld].c_str()))
- ++m_currentworld;
- m_world->set_title
-- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
-+ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
-
- button_clicked(-1); // Update other values in UI as well
-
---- src/editor/ui_menus/editor_main_menu_new_map.cc.old 2010-05-18 17:38:29.000000000 +0200
-+++ src/editor/ui_menus/editor_main_menu_new_map.cc 2010-05-18 17:38:55.000000000 +0200
-@@ -113,7 +113,7 @@
- posx, posy, width, height,
- g_gr->get_picture(PicMod_UI, "pics/but1.png"),
- &Main_Menu_New_Map::button_clicked, *this, 4,
-- Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
-+ Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
-
- posy += height + spacing + spacing + spacing;
-
-@@ -142,7 +142,7 @@
- if (m_currentworld == m_worlds.size())
- m_currentworld = 0;
- m_world->set_title
-- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name
-+ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name
- ());
- break;
- }
diff --git a/games/widelands/widelands-gcc47.patch b/games/widelands/widelands-gcc47.patch
new file mode 100644
index 0000000000..9ea19c3571
--- /dev/null
+++ b/games/widelands/widelands-gcc47.patch
@@ -0,0 +1,12 @@
+=== modified file 'src/main.cc'
+--- src/main.cc 2012-02-15 21:25:34 +0000
++++ src/main.cc 2012-05-02 07:43:01 +0000
+@@ -28,6 +28,7 @@
+ #include <iostream>
+ #include <stdexcept>
+ #include <typeinfo>
++#include <unistd.h>
+
+ #include <SDL_main.h>
+
+
diff --git a/games/widelands/widelands.SlackBuild b/games/widelands/widelands.SlackBuild
index 9b8e2b187f..c673c5f469 100644
--- a/games/widelands/widelands.SlackBuild
+++ b/games/widelands/widelands.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for widelands
-# Copyright 2008-2010 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008-2012 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=widelands
-VERSION=build15
-BUILD=${BUILD:-2}
+VERSION=build17
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -65,13 +65,19 @@ cd $PRGNAM-$VERSION-src
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-patch -p0 < $CWD/widelands-0.15-gcc45.patch
+# Fix compiling with gcc 4.7
+patch -p0 -i $CWD/widelands-gcc47.patch
-# make locale install dir configurable
-localedir="WLBUILD_INSTALL_LOCALEDIR"
-old="$localedir \"\${CMAKE_INSTALL_PREFIX}/\${WL_INSTALL_DATADIR}/locale\""
-new="$localedir \${WL_INSTALL_LOCALEDIR}"
-sed -i "s|$old|$new|" CMakeLists.txt
+# Don't use static boost libraries
+sed -i "s|Boost_USE_STATIC_LIBS ON|Boost_USE_STATIC_LIBS OFF|" \
+ CMakeLists.txt
+
+# Fix wrong datadir declaration
+old="std::string(INSTALL_PREFIX) + '/' + INSTALL_DATADIR"
+sed -i "s|INSTALL_PREFIX \"/\" INSTALL_DATADIR|INSTALL_DATADIR|" \
+ src/wlapplication.cc
+sed -i "s|$old|std::string(INSTALL_DATADIR)|" \
+ src/wlapplication.cc
mkdir -p build1
cd build1
@@ -79,10 +85,10 @@ cd build1
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release \
- -DWL_INSTALL_LOCALEDIR="/usr/share/locale" \
- -DWL_INSTALL_BINDIR="bin" \
+ -DWL_INSTALL_PREFIX=/usr \
+ -DWL_INSTALL_DATADIR=/usr/share/widelands \
+ -DWL_INSTALL_BINDIR=/usr/bin \
..
make
make install DESTDIR=$PKG
diff --git a/games/widelands/widelands.info b/games/widelands/widelands.info
index b78f68411e..cf253ad05d 100644
--- a/games/widelands/widelands.info
+++ b/games/widelands/widelands.info
@@ -1,8 +1,8 @@
PRGNAM="widelands"
-VERSION="build15"
+VERSION="build17"
HOMEPAGE="http://www.widelands.org"
-DOWNLOAD="http://launchpad.net/widelands/build15/build15/+download/widelands-build15-src.tar.bz2"
-MD5SUM="5b2e2d0913272f66055e424f91360b1d"
+DOWNLOAD="https://launchpad.net/widelands/build17/build-17/+download/widelands-build17-src.tar.bz2"
+MD5SUM="bdc9bc0aa631af1aa7fb450507611a58"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="SDL_gfx lua"