diff options
author | B. Watson <yalhcru@gmail.com> | 2013-06-30 19:19:21 -0300 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2013-07-02 16:06:52 -0500 |
commit | 7a921cdbff97bd9c82c7c084903cf81abed5fe0b (patch) | |
tree | d831629a28052714d6891e9dc880c2721d80768a | |
parent | 9e23e234410e183871b6cac69f57ac93e0654cee (diff) |
games/oblige: Updated for version 4.28b
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r-- | games/oblige/Makefile.unixy | 205 | ||||
-rw-r--r-- | games/oblige/README | 4 | ||||
-rw-r--r-- | games/oblige/compile_fixes.diff | 23 | ||||
-rw-r--r-- | games/oblige/lua_compile_fixes.diff | 53 | ||||
-rw-r--r-- | games/oblige/oblige.SlackBuild | 26 | ||||
-rw-r--r-- | games/oblige/oblige.info | 8 |
6 files changed, 226 insertions, 93 deletions
diff --git a/games/oblige/Makefile.unixy b/games/oblige/Makefile.unixy new file mode 100644 index 000000000000..60fe07223669 --- /dev/null +++ b/games/oblige/Makefile.unixy @@ -0,0 +1,205 @@ +#----------------------------------------------------------------
+# OBLIGE
+#----------------------------------------------------------------
+#
+# GNU Makefile for Unix/Linux with system-wide install
+#
+# Using this makefile (make, make install) will place the
+# executable, script and data files in standard Unixy places.
+# The script and data files can be overridden by files in the
+# $HOME/.oblige directory.
+#
+# NOTE: a system-wide FLTK library is assumed
+#
+
+PROGRAM=oblige
+
+# prefix choices: /usr /usr/local /opt
+INSTALL_PREFIX=/usr/local
+
+SCRIPT_DIR=$(INSTALL_PREFIX)/share/oblige
+
+CXX=g++
+
+LIB_LOC=lib_linux
+OBJ_DIR=obj_linux
+
+OPTIMISE=-O2
+
+# operating system choices: UNIX WIN32
+OS=UNIX
+
+
+#--- Internal stuff from here -----------------------------------
+
+# assumes system-wide FLTK installation
+FLTK_CONFIG=fltk-config
+FLTK_FLAGS=$(shell $(FLTK_CONFIG) --cflags)
+FLTK_LIBS=$(shell $(FLTK_CONFIG) --use-images --ldflags)
+
+CXXFLAGS=$(OPTIMISE) -Wall -D$(OS) -Ilua_src -Iglbsp_src $(FLTK_FLAGS)
+LDFLAGS=-L/usr/X11R6/lib
+LIBS=-lm -lz $(FLTK_LIBS)
+
+CXXFLAGS += -DFHS_INSTALL
+
+
+#----- OBLIGE Objects ----------------------------------------------
+
+OBJS= $(OBJ_DIR)/main.o \
+ $(OBJ_DIR)/m_cookie.o \
+ $(OBJ_DIR)/m_lua.o \
+ $(OBJ_DIR)/m_spots.o \
+ $(OBJ_DIR)/lib_argv.o \
+ $(OBJ_DIR)/lib_file.o \
+ $(OBJ_DIR)/lib_signal.o \
+ $(OBJ_DIR)/lib_util.o \
+ $(OBJ_DIR)/lib_grp.o \
+ $(OBJ_DIR)/lib_pak.o \
+ $(OBJ_DIR)/lib_wad.o \
+ $(OBJ_DIR)/lib_zip.o \
+ $(OBJ_DIR)/sys_assert.o \
+ $(OBJ_DIR)/sys_debug.o \
+ $(OBJ_DIR)/img_bolt.o \
+ $(OBJ_DIR)/img_pill.o \
+ $(OBJ_DIR)/img_carve.o \
+ $(OBJ_DIR)/img_relief.o \
+ $(OBJ_DIR)/img_font1.o \
+ \
+ $(OBJ_DIR)/csg_bsp.o \
+ $(OBJ_DIR)/csg_clip.o \
+ $(OBJ_DIR)/csg_main.o \
+ $(OBJ_DIR)/csg_doom.o \
+ $(OBJ_DIR)/csg_nukem.o \
+ $(OBJ_DIR)/csg_quake.o \
+ $(OBJ_DIR)/dm_extra.o \
+ $(OBJ_DIR)/g_doom.o \
+ $(OBJ_DIR)/g_nukem.o \
+ $(OBJ_DIR)/g_quake.o \
+ $(OBJ_DIR)/g_quake2.o \
+ $(OBJ_DIR)/g_wolf.o \
+ $(OBJ_DIR)/q_common.o \
+ $(OBJ_DIR)/q_light.o \
+ $(OBJ_DIR)/q_tjuncs.o \
+ $(OBJ_DIR)/q_vis.o \
+ $(OBJ_DIR)/vis_buffer.o \
+ \
+ $(OBJ_DIR)/twister.o \
+ $(OBJ_DIR)/tx_forge.o \
+ $(OBJ_DIR)/tx_skies.o \
+ $(OBJ_DIR)/ui_about.o \
+ $(OBJ_DIR)/ui_build.o \
+ $(OBJ_DIR)/ui_chooser.o \
+ $(OBJ_DIR)/ui_console.o \
+ $(OBJ_DIR)/ui_dialog.o \
+ $(OBJ_DIR)/ui_game.o \
+ $(OBJ_DIR)/ui_hyper.o \
+ $(OBJ_DIR)/ui_level.o \
+ $(OBJ_DIR)/ui_map.o \
+ $(OBJ_DIR)/ui_module.o \
+ $(OBJ_DIR)/ui_rchoice.o \
+ $(OBJ_DIR)/ui_play.o \
+ $(OBJ_DIR)/ui_window.o
+
+$(OBJ_DIR)/%.o: gui/%.cc
+ $(CXX) $(CXXFLAGS) -o $@ -c $<
+
+
+#----- LUA Objects --------------------------------------------------
+
+LUA_OBJS=\
+ $(OBJ_DIR)/lua/lapi.o \
+ $(OBJ_DIR)/lua/lcode.o \
+ $(OBJ_DIR)/lua/ldebug.o \
+ $(OBJ_DIR)/lua/ldo.o \
+ $(OBJ_DIR)/lua/ldump.o \
+ $(OBJ_DIR)/lua/lfunc.o \
+ $(OBJ_DIR)/lua/lgc.o \
+ $(OBJ_DIR)/lua/llex.o \
+ $(OBJ_DIR)/lua/lmem.o \
+ $(OBJ_DIR)/lua/lobject.o \
+ $(OBJ_DIR)/lua/lopcodes.o \
+ $(OBJ_DIR)/lua/lparser.o \
+ $(OBJ_DIR)/lua/lstate.o \
+ $(OBJ_DIR)/lua/lstring.o \
+ $(OBJ_DIR)/lua/ltable.o \
+ $(OBJ_DIR)/lua/ltm.o \
+ $(OBJ_DIR)/lua/lundump.o \
+ $(OBJ_DIR)/lua/lvm.o \
+ $(OBJ_DIR)/lua/lzio.o \
+ \
+ $(OBJ_DIR)/lua/lauxlib.o \
+ $(OBJ_DIR)/lua/lbaselib.o \
+ $(OBJ_DIR)/lua/ldblib.o \
+ $(OBJ_DIR)/lua/liolib.o \
+ $(OBJ_DIR)/lua/lmathlib.o \
+ $(OBJ_DIR)/lua/loslib.o \
+ $(OBJ_DIR)/lua/ltablib.o \
+ $(OBJ_DIR)/lua/lstrlib.o \
+ $(OBJ_DIR)/lua/loadlib.o \
+ $(OBJ_DIR)/lua/linit.o
+
+LUA_CXXFLAGS=$(OPTIMISE) -Wall -DLUA_ANSI
+
+$(OBJ_DIR)/lua/%.o: lua_src/%.cc
+ $(CXX) $(LUA_CXXFLAGS) -o $@ -c $<
+
+
+#----- glBSP Objects ------------------------------------------------
+
+GLBSP_OBJS= \
+ $(OBJ_DIR)/glbsp/analyze.o \
+ $(OBJ_DIR)/glbsp/blockmap.o \
+ $(OBJ_DIR)/glbsp/glbsp.o \
+ $(OBJ_DIR)/glbsp/level.o \
+ $(OBJ_DIR)/glbsp/node.o \
+ $(OBJ_DIR)/glbsp/reject.o \
+ $(OBJ_DIR)/glbsp/seg.o \
+ $(OBJ_DIR)/glbsp/system.o \
+ $(OBJ_DIR)/glbsp/util.o \
+ $(OBJ_DIR)/glbsp/wad.o
+
+GLBSP_CXXFLAGS=$(OPTIMISE) -Wall -DINLINE_G=inline
+
+$(OBJ_DIR)/glbsp/%.o: glbsp_src/%.cc
+ $(CXX) $(GLBSP_CXXFLAGS) -o $@ -c $<
+
+
+#----- Targets ----------------------------------------------------
+
+all: $(PROGRAM)
+
+clean:
+ rm -f $(PROGRAM) $(OBJ_DIR)/*.o ERRS
+ rm -f $(OBJ_DIR)/lua/*.o
+ rm -f $(OBJ_DIR)/glbsp/*.o
+
+$(PROGRAM): $(OBJS) $(LUA_OBJS) $(GLBSP_OBJS)
+ $(CXX) $^ -o $@ $(LDFLAGS) $(LIBS)
+
+stripped: $(PROGRAM)
+ strip --strip-unneeded $(PROGRAM)
+
+install: stripped
+ install -o root -m 755 $(PROGRAM) $(INSTALL_PREFIX)/bin/
+ install -d $(SCRIPT_DIR)/scripts
+ install -d $(SCRIPT_DIR)/data
+ install -d $(SCRIPT_DIR)/games
+ install -d $(SCRIPT_DIR)/engines
+ install -d $(SCRIPT_DIR)/modules
+ install -d $(SCRIPT_DIR)/prefabs
+ install -o root -m 755 scripts/*.lua $(SCRIPT_DIR)/scripts
+ install -o root -m 755 data/*.* $(SCRIPT_DIR)/data
+ install -o root -m 755 games/*.lua $(SCRIPT_DIR)/games
+ install -o root -m 755 engines/*.lua $(SCRIPT_DIR)/engines
+ install -o root -m 755 modules/*.lua $(SCRIPT_DIR)/modules
+ install -o root -m 755 prefabs/*.lua $(SCRIPT_DIR)/prefabs
+
+uninstall:
+ rm -v $(INSTALL_PREFIX)/bin/$(PROGRAM)
+ rm -Rv $(SCRIPT_DIR)
+
+.PHONY: all clean stripped install uninstall
+
+#--- editor settings ------------
+# vi:ts=8:sw=8:noexpandtab
diff --git a/games/oblige/README b/games/oblige/README index bedc35fbe76e..279e36e197fb 100644 --- a/games/oblige/README +++ b/games/oblige/README @@ -3,8 +3,8 @@ DOOM, DOOM II, Heretic, and Quake. The goal is to produce high quality levels which are fun to play. 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). +play the levels you generate. Currently there are builds on SBo for zdoom, +gzdoom, prboom, chocolate-doom, odamex, skulltag, and maybe a few more. Also required: the data file(s) for whichever game(s) you're playing (registered versions, not shareware): diff --git a/games/oblige/compile_fixes.diff b/games/oblige/compile_fixes.diff deleted file mode 100644 index 6d706af6ab05..000000000000 --- a/games/oblige/compile_fixes.diff +++ /dev/null @@ -1,23 +0,0 @@ -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));
-
-diff -Naur oblige_357_src/gui/headers.h oblige_357_src.patched/gui/headers.h ---- oblige_357_src/gui/headers.h 2009-07-17 05:25:11.000000000 -0400 -+++ oblige_357_src.patched/gui/headers.h 2012-09-20 01:45:29.000000000 -0400 -@@ -29,6 +29,7 @@ -
- /* C library */
-
-+#include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
diff --git a/games/oblige/lua_compile_fixes.diff b/games/oblige/lua_compile_fixes.diff deleted file mode 100644 index a86af989756b..000000000000 --- a/games/oblige/lua_compile_fixes.diff +++ /dev/null @@ -1,53 +0,0 @@ -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)
diff --git a/games/oblige/oblige.SlackBuild b/games/oblige/oblige.SlackBuild index bcabcb2443a8..2a82c966a91c 100644 --- a/games/oblige/oblige.SlackBuild +++ b/games/oblige/oblige.SlackBuild @@ -7,8 +7,8 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. PRGNAM=oblige -VERSION=${VERSION:-3.57} -BUILD=${BUILD:-2} +VERSION=${VERSION:-4.28b} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -41,13 +41,14 @@ fi set -e SRCVER=$( echo $VERSION | sed 's/\.//g' ) +SRCNAM="Oblige" # grrrr! 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 +rm -rf ${SRCNAM}-${VERSION}-source +unzip $CWD/$PRGNAM-$SRCVER-source.zip +cd ${SRCNAM}-${VERSION}-source chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -55,19 +56,22 @@ find . \ \( -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 +# Makefile.unixy originally came from the oblige author, I've hacked +# it up to make it work with oblige 4.x and SBo's fltk13. +cp $CWD/Makefile.unixy Makefile -cd gui -make -f Makefile.unixy OPTIMISE="$SLKCFLAGS" -make -f Makefile.unixy install INSTALL_PREFIX=$PKG/usr +# Fix a missing include +sed -i '1i#include <unistd.h>' gui/lib_util.cc + +make INSTALL_PREFIX=/usr OPTIMISE="$SLKCFLAGS" FLTK_CONFIG=fltk13-config +make 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 +cp *.txt doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/oblige/oblige.info b/games/oblige/oblige.info index 2d2d9b839f5d..1d027e64d8f6 100644 --- a/games/oblige/oblige.info +++ b/games/oblige/oblige.info @@ -1,10 +1,10 @@ PRGNAM="oblige" -VERSION="3.57" +VERSION="4.28b" HOMEPAGE="http://oblige.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/oblige/oblige-357-src.zip" -MD5SUM="e07ab38282ebcb8cd9e531c2a6d14a55" +DOWNLOAD="http://downloads.sourceforge.net/project/oblige/Oblige/4.28/oblige-428b-source.zip" +MD5SUM="ae89031dcff12958bb866505c266c49f" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="glbsp lua" +REQUIRES="fltk13" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" |