mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-02 13:04:42 +01:00
games/einstein: Updated for version 2.1.1.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>.
This commit is contained in:
parent
a9e381f052
commit
6f998956de
9 changed files with 10 additions and 220 deletions
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Slackware build script for einstein
|
||||
#
|
||||
# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
|
||||
# Copyright 2009-2017 Erik W. Hanson, Minneapolis, MN, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -23,7 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=einstein
|
||||
VERSION=2.0
|
||||
VERSION=2.1.1
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -53,9 +53,9 @@ set -eu
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
rm -rf $PRGNAM-puzzle-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-puzzle-$VERSION-src.tar.gz || tar xvf v$VERSION.tar.gz
|
||||
cd $PRGNAM-puzzle-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
|
@ -63,11 +63,6 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Some patches from debian.
|
||||
for PATCH in $CWD/patches/*.diff ; do
|
||||
patch -p0 < $PATCH
|
||||
done
|
||||
|
||||
# Build
|
||||
make PREFIX="/usr" OPTIMIZE="$SLKCFLAGS"
|
||||
|
||||
|
@ -78,7 +73,7 @@ install -D $CWD/einstein.desktop $PKG/usr/share/applications/einstein.desktop
|
|||
install -D $CWD/einstein.png $PKG/usr/share/pixmaps/einstein.png
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README $CWD/patches $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="einstein"
|
||||
VERSION="2.0"
|
||||
HOMEPAGE="http://web.archive.org/web/20120928074117/http://games.flowix.com/en/index.html"
|
||||
DOWNLOAD="http://ftp.fi.debian.org/gentoo/distfiles/einstein-2.0-src.tar.gz"
|
||||
MD5SUM="c1d98e761c10af63f03462ead625f80c"
|
||||
VERSION="2.1.1"
|
||||
HOMEPAGE="https://github.com/lksj/einstein-puzzle"
|
||||
DOWNLOAD="https://github.com/lksj/einstein-puzzle/archive/v2.1.1.tar.gz"
|
||||
MD5SUM="1228a1fb0e90bc40d8b0b1737dcbc3c3"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
diff -ruN ../orig/einstein-2.0.dfsg.2/font.h ./font.h
|
||||
--- ../orig/einstein-2.0.dfsg.2/font.h 2005-08-16 00:33:17.000000000 +0200
|
||||
+++ ./font.h 2007-08-31 10:00:33.000000000 +0200
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
#include <string>
|
||||
-#include <SDL_ttf.h>
|
||||
+#include <SDL/SDL_ttf.h>
|
||||
|
||||
|
||||
class Font
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/iconset.h ./iconset.h
|
||||
--- ../orig/einstein-2.0.dfsg.2/iconset.h 2005-08-14 04:40:58.000000000 +0200
|
||||
+++ ./iconset.h 2007-08-31 09:51:37.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
#define __ICONSET_H__
|
||||
|
||||
|
||||
-#include <SDL.h>
|
||||
+#include <SDL/SDL.h>
|
||||
|
||||
|
||||
class IconSet
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/main.cpp ./main.cpp
|
||||
--- ../orig/einstein-2.0.dfsg.2/main.cpp 2007-08-31 08:42:16.000000000 +0200
|
||||
+++ ./main.cpp 2007-08-31 10:06:07.000000000 +0200
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
-#include <SDL.h>
|
||||
-#include <SDL_main.h>
|
||||
-#include <SDL_ttf.h>
|
||||
+#include <SDL/SDL.h>
|
||||
+#include <SDL/SDL_main.h>
|
||||
+#include <SDL/SDL_ttf.h>
|
||||
#include "main.h"
|
||||
#include "utils.h"
|
||||
#include "storage.h"
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/screen.cpp ./screen.cpp
|
||||
--- ../orig/einstein-2.0.dfsg.2/screen.cpp 2005-09-24 07:17:30.000000000 +0200
|
||||
+++ ./screen.cpp 2007-08-31 09:52:07.000000000 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <SDL.h>
|
||||
+#include <SDL/SDL.h>
|
||||
#include "screen.h"
|
||||
#include "exceptions.h"
|
||||
#include "unicode.h"
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/screen.h ./screen.h
|
||||
--- ../orig/einstein-2.0.dfsg.2/screen.h 2005-09-24 07:08:44.000000000 +0200
|
||||
+++ ./screen.h 2007-08-31 09:52:26.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
#define __SCREEN_H__
|
||||
|
||||
|
||||
-#include "SDL.h"
|
||||
+#include "SDL/SDL.h"
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/sound.cpp ./sound.cpp
|
||||
--- ../orig/einstein-2.0.dfsg.2/sound.cpp 2005-09-24 08:32:07.000000000 +0200
|
||||
+++ ./sound.cpp 2007-08-31 10:07:35.000000000 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "sound.h"
|
||||
|
||||
#include <iostream>
|
||||
-#include <SDL_events.h>
|
||||
+#include <SDL/SDL_events.h>
|
||||
#include "resources.h"
|
||||
|
||||
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/sound.h ./sound.h
|
||||
--- ../orig/einstein-2.0.dfsg.2/sound.h 2005-09-24 08:24:20.000000000 +0200
|
||||
+++ ./sound.h 2007-08-31 10:01:28.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
-#include <SDL_mixer.h>
|
||||
+#include <SDL/SDL_mixer.h>
|
||||
|
||||
|
||||
class Sound
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/utils.h ./utils.h
|
||||
--- ../orig/einstein-2.0.dfsg.2/utils.h 2005-08-14 04:40:58.000000000 +0200
|
||||
+++ ./utils.h 2007-08-31 09:52:39.000000000 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __UTILS_H__
|
||||
#define __UTILS_H__
|
||||
|
||||
-#include <SDL.h>
|
||||
+#include <SDL/SDL.h>
|
||||
#include <string>
|
||||
#ifdef WIN32
|
||||
#include <sys/time.h>
|
||||
diff -ruN ../orig/einstein-2.0.dfsg.2/widgets.h ./widgets.h
|
||||
--- ../orig/einstein-2.0.dfsg.2/widgets.h 2005-09-24 08:11:11.000000000 +0200
|
||||
+++ ./widgets.h 2007-08-31 09:59:58.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <set>
|
||||
-#include <SDL.h>
|
||||
+#include <SDL/SDL.h>
|
||||
#include "font.h"
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- ../orig/einstein-2.0.dfsg.2/main.cpp 2007-08-31 08:42:16.000000000 +0200
|
||||
+++ main.cpp 2007-08-31 10:39:20.000000000 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
#ifdef __APPLE__
|
||||
dirs.push_back(getResourcesPath(selfPath));
|
||||
#else
|
||||
- dirs.push_back(PREFIX L"/share/einstein/res");
|
||||
+ dirs.push_back("/usr" L"/share/einstein/res");
|
||||
dirs.push_back(fromMbcs(getenv("HOME")) + L"/.einstein/res");
|
||||
#endif
|
||||
#endif
|
|
@ -1,11 +0,0 @@
|
|||
--- ../orig/einstein-2.0/puzgen.cpp 2005-08-14 04:40:58.000000000 +0200
|
||||
+++ puzgen.cpp 2007-08-31 08:42:16.000000000 +0200
|
||||
@@ -313,6 +313,8 @@
|
||||
|
||||
void genPuzzle(SolvedPuzzle &puzzle, Rules &rules)
|
||||
{
|
||||
+ srand(time(NULL));
|
||||
+
|
||||
for (int i = 0; i < PUZZLE_SIZE; i++) {
|
||||
for (int j = 0; j < PUZZLE_SIZE; j++)
|
||||
puzzle[i][j] = j + 1;
|
|
@ -1,31 +0,0 @@
|
|||
--- ../orig/einstein-2.0/formatter.cpp 2005-08-14 04:40:58.000000000 +0200
|
||||
+++ formatter.cpp 2007-08-31 08:42:16.000000000 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
if ((c.type == INT_ARG) || (c.type == STRING_ARG) ||
|
||||
(c.type == FLOAT_ARG) || (c.type == DOUBLE_ARG))
|
||||
{
|
||||
- int no = (int)c.data;
|
||||
+ long no = (long)c.data;
|
||||
args[no - 1] = c.type;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@
|
||||
std::wstring Formatter::format(std::vector<ArgValue*> &argValues) const
|
||||
{
|
||||
std::wstring s;
|
||||
- int no;
|
||||
+ long no;
|
||||
|
||||
for (int i = 0; i < commandsCnt; i++) {
|
||||
Command *cmd = &commands[i];
|
||||
@@ -135,8 +135,8 @@
|
||||
|
||||
case STRING_ARG:
|
||||
case INT_ARG:
|
||||
- no = (int)cmd->data - 1;
|
||||
- if (no < (int)argValues.size())
|
||||
+ no = (long)cmd->data - 1;
|
||||
+ if (no < (long)argValues.size())
|
||||
s += argValues[no]->format(cmd);
|
||||
break;
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
Patch by Martin Michlmayr <tbm@cyrius.com> via bug 421127.
|
||||
|
||||
--- ../orig/einstein-2.0.dfsg.2/convert.h 2005-08-14 04:40:58.000000000 +0200
|
||||
+++ convert.h 2007-08-31 11:33:06.000000000 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
+#include <typeinfo>
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "unicode.h"
|
|
@ -1,22 +0,0 @@
|
|||
--- ../orig/einstein-2.0.dfsg.2/descr.cpp 2007-08-31 11:02:45.000000000 +0200
|
||||
+++ descr.cpp 2007-08-31 13:48:19.000000000 +0200
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "convert.h"
|
||||
#include "utils.h"
|
||||
#include "tokenizer.h"
|
||||
+#include "storage.h"
|
||||
|
||||
|
||||
#define WIDTH 600
|
||||
@@ -259,7 +260,10 @@
|
||||
{
|
||||
if (0 < line.length()) {
|
||||
page->add(new Label(&font, offsetX, offsetY + curPosY,
|
||||
- 255,255,255, line, false));
|
||||
+ getStorage()->get(L"text_red", 0),
|
||||
+ getStorage()->get(L"text_green", 0),
|
||||
+ getStorage()->get(L"text_blue", 100),
|
||||
+ line, false));
|
||||
line.clear();
|
||||
curPosY += 10 + charHeight;
|
||||
lineWidth = 0;
|
|
@ -1,10 +0,0 @@
|
|||
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/einstein-2.0.dfsg.2/unicode.cpp ./unicode.cpp
|
||||
--- ../orig/einstein-2.0.dfsg.2/unicode.cpp 2005-08-14 04:40:58.000000000 +0200
|
||||
+++ ./unicode.cpp 2008-01-26 11:49:10.000000000 +0100
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <wchar.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
Loading…
Reference in a new issue