games/oblige: Added (random level generator for various games)

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
B. Watson 2010-12-26 20:12:17 -02:00 committed by Niels Horn
parent 8a023d8ee8
commit 8681eef4c2
9 changed files with 200 additions and 0 deletions

18
games/oblige/README Normal file
View file

@ -0,0 +1,18 @@
OBLIGE is a random level generator for various classic games, including
DOOM, DOOM II, Heretic, and Quake. The goal is to produce high quality
levels which are fun to play.
This requires lua, fltk, and glbsp.
A Doom (or Heretic, or Quake) engine is required if you actually want to
play the levels you generate (currently, prboom and zdoom are available
at SBo).
Also required: the data file(s) for whichever game(s) you're playing
(registered versions, not shareware):
Game: File:
Doom doom.wad
Doom II doom2.wad
Heretic heretic.wad
Quake pak0.pak and pak1.pak

View file

@ -0,0 +1,12 @@
diff -Naur oblige_357_src/gui/q_bsp.cc oblige_357_src.patched//gui/q_bsp.cc
--- oblige_357_src/gui/q_bsp.cc 2010-03-07 05:24:42.000000000 -0500
+++ oblige_357_src.patched//gui/q_bsp.cc 2010-12-17 18:24:48.000000000 -0500
@@ -107,7 +107,7 @@
// convert each newline into CR/LF pair
while (*str)
{
- char *next = strchr(str, '\n');
+ char *next = (char *)strchr(str, '\n');
Append(str, next ? (next - str) : strlen(str));

4
games/oblige/doinst.sh Normal file
View file

@ -0,0 +1,4 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

View file

@ -0,0 +1,53 @@
diff -Naur oblige_351_src.orig/gui/Makefile.unixy oblige_351_src/gui/Makefile.unixy
--- oblige_351_src.orig/gui/Makefile.unixy 2010-01-21 07:34:30.000000000 -0500
+++ oblige_351_src/gui/Makefile.unixy 2010-02-28 15:58:31.000000000 -0500
@@ -40,10 +40,10 @@
FLTK_LIBS=-lfltk_images -lfltk -lX11 -lXext -lpng -ljpeg
LUA_FLAGS=-I$(LUA_DIR)/src
-LUA_LIBS=$(LUA_DIR)/src/liblua.a
+LUA_LIBS=-llua
GLBSP_FLAGS=-I$(GLBSP_DIR)/src
-GLBSP_LIBS=$(GLBSP_DIR)/libglbsp.a
+GLBSP_LIBS=-lglbsp
CXXFLAGS=$(OPTIMISE) -Wall -DFHS_INSTALL -D$(OS) \
$(FLTK_FLAGS) $(LUA_FLAGS) $(GLBSP_FLAGS)
diff -Naur oblige_351_src.orig/gui/hdr_lua.h oblige_351_src/gui/hdr_lua.h
--- oblige_351_src.orig/gui/hdr_lua.h 2009-07-17 05:25:10.000000000 -0400
+++ oblige_351_src/gui/hdr_lua.h 2010-02-28 15:58:02.000000000 -0500
@@ -23,9 +23,7 @@
/* LUA Scripting Language */
-#include "lua.h"
-#include "lauxlib.h"
-#include "lualib.h"
+#include "lua.hpp"
#endif // __OB_HDR_LUA__
diff -Naur oblige_351_src.orig/vis_viewer/Makefile oblige_351_src/vis_viewer/Makefile
--- oblige_351_src.orig/vis_viewer/Makefile 2009-10-01 05:01:34.000000000 -0400
+++ oblige_351_src/vis_viewer/Makefile 2010-02-28 15:59:43.000000000 -0500
@@ -23,15 +23,15 @@
#--- Internal stuff from here -----------------------------------
FLTK_FLAGS=-I$(FLTK_DIR)
-FLTK_LIBS=$(FLTK_DIR)/lib/libfltk_images.a \
- $(FLTK_DIR)/lib/libfltk.a \
+FLTK_LIBS=-lfltk_images \
+ -lfltk \
-lX11 -lXext -lpng -ljpeg
LUA_FLAGS=-I$(LUA_DIR)/src
-LUA_LIBS=$(LUA_DIR)/src/liblua.a
+LUA_LIBS=-llua
GLBSP_FLAGS=-I$(GLBSP_DIR)/src
-GLBSP_LIBS=$(GLBSP_DIR)/libglbsp.a
+GLBSP_LIBS=-lglbsp
CXXFLAGS=$(OPTIMISE) -Wall -D$(OS) \
$(FLTK_FLAGS) $(LUA_FLAGS) $(GLBSP_FLAGS)

View file

@ -0,0 +1,76 @@
#!/bin/sh
# Slackware build script for oblige
# Written by B. Watson (yalhcru@gmail.com)
PRGNAM=oblige
VERSION=${VERSION:-3.57}
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
SRCVER=$( echo $VERSION | sed 's/\.//g' )
rm -rf $PKG
mkdir -p $TMP $PKG/usr/bin $PKG/usr/share/$PRGNAM $OUTPUT
cd $TMP
rm -rf ${PRGNAM}_${SRCVER}_src
unzip $CWD/$PRGNAM-$SRCVER-src.zip
cd ${PRGNAM}_${SRCVER}_src
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
patch -p1 < $CWD/compile_fixes.diff
patch -p1 < $CWD/lua_compile_fixes.diff
cd gui
make -f Makefile.unixy OPTIMISE="$SLKCFLAGS"
make -f Makefile.unixy install INSTALL_PREFIX=$PKG/usr
mkdir -p $PKG/usr/share/pixmaps $PKG/usr/share/applications
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp ../*.txt ../doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Oblige
GenericName=Doom Level Generator
Icon=oblige
Exec=oblige %f
Terminal=false
Categories=Game;ActionGame;Utility;

10
games/oblige/oblige.info Normal file
View file

@ -0,0 +1,10 @@
PRGNAM="oblige"
VERSION="3.57"
HOMEPAGE="http://oblige.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/oblige/oblige-357-src.zip"
MD5SUM="e07ab38282ebcb8cd9e531c2a6d14a55"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"
APPROVED="Niels Horn"

BIN
games/oblige/oblige.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

19
games/oblige/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 ':'.
|-----handy-ruler------------------------------------------------------|
oblige: oblige (random level generator for various classic games)
oblige:
oblige: OBLIGE is a random level generator for various classic games,
oblige: including DOOM, DOOM II, Heretic, and Quake. The goal is to produce
oblige: high quality levels which are fun to play.
oblige:
oblige:
oblige:
oblige:
oblige:
oblige: