games/pinball: Added (open source pinball simulator).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Hunter Sezen 2015-09-04 23:10:41 +07:00 committed by Willy Sudiarto Raharjo
parent a230fb8b3a
commit d573a41c06
9 changed files with 388 additions and 0 deletions

2
games/pinball/README Normal file
View file

@ -0,0 +1,2 @@
The Emilia Pinball: project is an open source pinball: simulator
intended for linux machines by Henrik Enqvist.

View file

@ -0,0 +1,30 @@
--- base/Behavior.cpp~ 2003-11-20 10:46:16.000000000 -0600
+++ base/Behavior.cpp 2011-02-09 13:19:13.651559002 -0600
@@ -6,6 +6,7 @@
email : henqvist@excite.com
***************************************************************************/
+#include <cstddef>
#include "Private.h"
#include "Behavior.h"
#include "Group.h"
--- base/BehaviorVisitor.cpp~ 2003-11-20 10:46:16.000000000 -0600
+++ base/BehaviorVisitor.cpp 2011-02-09 13:26:17.561558995 -0600
@@ -6,6 +6,7 @@
email : henqvist@excite.com
***************************************************************************/
+#include <cstddef>
#include "BehaviorVisitor.h"
#include "Behavior.h"
#include "Group.h"
--- base/SignalSender.cpp~ 2003-11-20 10:46:16.000000000 -0600
+++ base/SignalSender.cpp 2011-02-09 13:35:29.151558926 -0600
@@ -7,6 +7,7 @@
***************************************************************************/
+#include <cstddef>
#include "Private.h"
#include "SignalSender.h"
#include "Group.h"

View file

@ -0,0 +1,39 @@
--- pinball-0.3.1/src/Table.cpp~ 2006-08-03 14:59:16.000000000 +0200
+++ pinball-0.3.1/src/Table.cpp 2006-08-03 14:59:16.000000000 +0200
@@ -247,14 +247,9 @@
// Clear old high scores
m_mapHighScores.clear();
- //!rzr+ : fix w32
- string sFileName = m_sTableName + "/" + HIGH_SCORES_FILENAME;
-#ifdef RZR_PATHRELATIVE
- sFileName = string( Config::getInstance()->getExeDir() )
- +"/"+ m_sTableName +".cfg";
-#else
- sFileName = string(EM_HIGHSCORE_DIR) + "/" + sFileName;
-#endif //!rzr-
+ char *home = getenv("HOME");
+ string sFileName = string(home? home:".") + "/.emilia/" + m_sTableName +
+ ".hiscore";
ifstream file(sFileName.c_str());
if (!file) {
@@ -308,14 +303,10 @@
cerr << "No current table name! (the first time is normal...)" << endl;
return false;
}
- //!rzr+ : fix w32
- string sFileName = m_sTableName + "/" + HIGH_SCORES_FILENAME;
-#ifdef RZR_PATHRELATIVE
- sFileName = string( Config::getInstance()->getExeDir() )
- +"/"+ m_sTableName +".cfg";
-#else
- sFileName = string(EM_HIGHSCORE_DIR) + "/" + sFileName;
-#endif //!rzr-
+
+ char *home = getenv("HOME");
+ string sFileName = string(home? home:".") + "/.emilia/" + m_sTableName +
+ ".hiscore";
ofstream file(sFileName.c_str());//, ios_base::out | ios_base::trunc);
if (!file) {

View file

@ -0,0 +1,22 @@
--- src/Makefile.in~ 2010-11-15 10:55:51.000000000 -0600
+++ src/Makefile.in 2010-11-15 11:07:27.427255000 -0600
@@ -505,7 +505,7 @@
uninstall-pinincludeHEADERS uninstall-pinlibLIBRARIES
-dnl libemilia_pin_la_SOURCES = $(libemilia_pin_a_SOURCES)
+#dnl libemilia_pin_la_SOURCES = $(libemilia_pin_a_SOURCES)
# !+rzr : This trick workaround a bad generated rule (under Linux mingw32)
# src/ litool returns: -L/usr/local//lib /usr/lib/libjpeg.so
--- test/Makefile.in~ 2010-11-15 11:11:07.000000000 -0600
+++ test/Makefile.in 2010-11-15 11:12:46.119254852 -0600
@@ -621,7 +621,7 @@
mostlyclean-generic mostlyclean-libtool tags uninstall \
uninstall-am uninstall-info-am uninstall-testlibLTLIBRARIES
-dnl noinst_PROGRAMS = unittest
+#dnl noinst_PROGRAMS = unittest
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,7 @@
--- base/Config.cpp.orig 2009-03-02 10:46:40.000000000 -0600
+++ base/Config.cpp 2009-03-02 10:46:40.000000000 -0600
@@ -426,2 +426,2 @@
- char* ptr=0;
- char* ptrw = 0;
+ const char* ptr=0;
+ const char* ptrw = 0;

View file

@ -0,0 +1,152 @@
--- pinball-0.3.1/Makefile.in~ 2006-08-03 12:18:40.000000000 +0200
+++ pinball-0.3.1/Makefile.in 2006-08-03 12:18:40.000000000 +0200
@@ -107,7 +107,7 @@
install_sh = @install_sh@
AUTOMAKE_OPTIONS = gnu
-SUBDIRS = libltdl addon base data src test
+SUBDIRS = addon base data src test
EXTRA_DIST = bootstrap pinball.spec clean pinball.desktop
--- pinball-0.3.1/src/Makefile.in~ 2006-08-03 12:20:12.000000000 +0200
+++ pinball-0.3.1/src/Makefile.in 2006-08-03 12:20:12.000000000 +0200
@@ -114,9 +114,9 @@
pinlib_LIBRARIES = libemilia_pin.a
-INCLUDES = -I../base -I../addon @INCLTDL@
+INCLUDES = -I../base -I../addon
-pinball_LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a @LIBLTDL@
+pinball_LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a -lltdl
pinball_LDFLAGS = -export-dynamic
pinball_SOURCES = Pinball.cpp
--- pinball-0.3.1/src/Makefile.am~ 2006-08-03 12:20:35.000000000 +0200
+++ pinball-0.3.1/src/Makefile.am 2006-08-03 12:20:35.000000000 +0200
@@ -7,9 +7,9 @@
pinlib_LIBRARIES = libemilia_pin.a
-INCLUDES = -I../base -I../addon @INCLTDL@
+INCLUDES = -I../base -I../addon
-pinball_LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a @LIBLTDL@
+pinball_LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a -lltdl
pinball_LDFLAGS = -export-dynamic
pinball_SOURCES = Pinball.cpp
--- pinball-0.3.1/Makefile.am~ 2006-08-03 12:18:12.000000000 +0200
+++ pinball-0.3.1/Makefile.am 2006-08-03 12:18:12.000000000 +0200
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = gnu
-SUBDIRS = libltdl addon base data src test
+SUBDIRS = addon base data src test
EXTRA_DIST = bootstrap pinball.spec clean pinball.desktop
--- pinball-0.3.1/configure.ac~ 2006-08-03 12:17:50.000000000 +0200
+++ pinball-0.3.1/configure.ac 2006-08-03 12:17:50.000000000 +0200
@@ -14,19 +14,13 @@
CFLAGS="-g -W -Wall -O2"
CXXFLAGS="-g -W -Wall -O2"
-AC_CONFIG_SUBDIRS(libltdl)
-
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_LIBTOOL_DLOPEN
-AC_LIBLTDL_CONVENIENCE
AC_PROG_LIBTOOL
-AC_SUBST(INCLTDL)
-AC_SUBST(LIBLTDL)
-
dnl *******************************************
dnl PATHS AND DIRS ****************************
dnl data dirs, fuck I hate autoconf, spent 4 hours getting this right, had to
--- pinball-0.3.1/test/Makefile.in~ 2006-08-03 12:21:11.000000000 +0200
+++ pinball-0.3.1/test/Makefile.in 2006-08-03 12:21:11.000000000 +0200
@@ -112,8 +112,8 @@
noinst_PROGRAMS = scale simple light texture load explode collision signal billboard font thread menu joy sound trans math misc varray unittest
-INCLUDES = -I../base -I../addon -I../src @INCLTDL@
-LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a @LIBLTDL@
+INCLUDES = -I../base -I../addon -I../src
+LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a -lltdl
testlib_LTLIBRARIES = libModuleTest.la
--- pinball-0.3.1/test/Makefile.am~ 2006-08-03 12:20:53.000000000 +0200
+++ pinball-0.3.1/test/Makefile.am 2006-08-03 12:20:53.000000000 +0200
@@ -6,8 +6,8 @@
noinst_PROGRAMS = scale simple light texture load explode collision signal billboard font thread menu joy sound trans math misc varray unittest
dnl noinst_PROGRAMS = unittest
-INCLUDES = -I../base -I../addon -I../src @INCLTDL@
-LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a @LIBLTDL@
+INCLUDES = -I../base -I../addon -I../src
+LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a -lltdl
testlib_LTLIBRARIES = libModuleTest.la
--- pinball-0.3.1/configure~ 2006-08-03 12:16:59.000000000 +0200
+++ pinball-0.3.1/configure 2006-08-03 12:16:59.000000000 +0200
@@ -431,7 +431,6 @@
PACKAGE_STRING='pinball 0.3.1'
PACKAGE_BUGREPORT='henqvist@users.sourceforge.net'
-ac_subdirs_all="$ac_subdirs_all libltdl"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -469,7 +468,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE subdirs CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL INCLTDL LIBLTDL EM_DATADIR EM_LIBDIR EM_BUILD_ROOT EM_HIGHSCORE_DIR X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS MATHLIB GL_LIBS SDL_CONFIG SDL_CFLAGS SDL_LIBS ALLEGRO_CONFIG ALLEGRO_CFLAGS ALLEGRO_LIBS CPPUNIT_CONFIG CPPUNIT_CFLAGS CPPUNIT_LIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE subdirs CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL EM_DATADIR EM_LIBDIR EM_BUILD_ROOT EM_HIGHSCORE_DIR X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS MATHLIB GL_LIBS SDL_CONFIG SDL_CFLAGS SDL_LIBS ALLEGRO_CONFIG ALLEGRO_CFLAGS ALLEGRO_LIBS CPPUNIT_CONFIG CPPUNIT_CFLAGS CPPUNIT_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1959,7 +1958,6 @@
-subdirs="$subdirs libltdl"
ac_ext=c
@@ -3439,18 +3437,6 @@
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
- case $enable_ltdl_convenience in
- no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5
-echo "$as_me: error: this package needs a convenience libltdl" >&2;}
- { (exit 1); exit 1; }; } ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
- LTDLINCL='-I${top_srcdir}/''libltdl'
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -11788,8 +11774,6 @@
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
-s,@INCLTDL@,$INCLTDL,;t t
-s,@LIBLTDL@,$LIBLTDL,;t t
s,@EM_DATADIR@,$EM_DATADIR,;t t
s,@EM_LIBDIR@,$EM_LIBDIR,;t t
s,@EM_BUILD_ROOT@,$EM_BUILD_ROOT,;t t

View file

@ -0,0 +1,107 @@
#!/bin/sh
# Slackware build script for pinball
# Copyright 2015 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pinball
VERSION=${VERSION:-0.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -Np0 -i $CWD/pinball-0.3.1-cstddef.patch
patch -Np1 -i $CWD/pinball-0.3.1-hiscore.patch
patch -Np0 -i $CWD/pinball-0.3.1-lacomment.patch
patch -Np0 -i $CWD/pinball-0.3.1-strictproto.patch
patch -Np1 -i $CWD/pinball-0.3.1-sys-ltdl.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-sdltest \
--with-x \
--enable-static=no \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING ChangeLog INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
# Remove executable flag from some docs
find $PKG/usr/doc -type f -exec chmod -x {} \;
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="pinball"
VERSION="0.3.1"
HOMEPAGE="http://pinball.sourceforge.net/"
DOWNLOAD="http://sourceforge.net/projects/pinball/files/pinball/pinball-0.3.1/pinball-0.3.1.tar.gz"
MD5SUM="f28e8f49e0db8e9491e4d9f0c13c36c6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Hunter Sezen"
EMAIL="ovariegata@yahoo.com"

19
games/pinball/slack-desc Normal file
View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
pinball: pinball (open source pinball: simulator)
pinball:
pinball: The Emilia Pinball: project is an open source pinball: simulator
pinball: intended for linux machines by Henrik Enqvist.
pinball:
pinball: Homepage: http://pinball:.sourceforge.net/
pinball:
pinball:
pinball:
pinball:
pinball: