Import games/postal, the non-stop killing isometric shooter game.
ok kirby@, who provided the above COMMENT. postal is the official game engine for Postal 1 from Running With Scissors released as open source. It requires the original game assets to run. Postal 1 is an isometric shooting game.
This commit is contained in:
parent
42ef8cd0eb
commit
ebcf5fb0d4
35
games/postal/Makefile
Normal file
35
games/postal/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2017/12/22 10:23:26 bcallah Exp $
|
||||
|
||||
V = 20171127
|
||||
COMMENT = Postal 1, the non-stop killing isometric shooter game
|
||||
DISTNAME = postal-1-open-source-${V}
|
||||
PKGNAME = postal-${V}
|
||||
CATEGORIES = games x11
|
||||
|
||||
HOMEPAGE = http://runningwithscissors.com/
|
||||
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
|
||||
|
||||
# GPLv2+
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} SDL2 c m
|
||||
|
||||
MASTER_SITES = https://devio.us/~bcallah/source/
|
||||
|
||||
# base-gcc not good enough (tested on armv7)
|
||||
COMPILER = base-clang ports-gcc ports-clang
|
||||
|
||||
LIB_DEPENDS = devel/sdl2
|
||||
|
||||
USE_GMAKE = Yes
|
||||
MAKE_FILE = makefile
|
||||
MAKE_FLAGS = CC="${CC}" CXX="${CXX}" LINKER="${CXX}" \
|
||||
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
# No upstream install target.
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/postal1 ${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
2
games/postal/distinfo
Normal file
2
games/postal/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (postal-1-open-source-20171127.tar.gz) = W30VHHo09PAe5LRBncbyRbeQzvIcwZZQliYRKAAGFsM=
|
||||
SIZE (postal-1-open-source-20171127.tar.gz) = 2255897
|
23
games/postal/patches/patch-RSPiX_Src_BLUE_unix_UnixSystem_h
Normal file
23
games/postal/patches/patch-RSPiX_Src_BLUE_unix_UnixSystem_h
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-RSPiX_Src_BLUE_unix_UnixSystem_h,v 1.1.1.1 2017/12/22 10:23:26 bcallah Exp $
|
||||
|
||||
Fix formatting.
|
||||
|
||||
Index: RSPiX/Src/BLUE/unix/UnixSystem.h
|
||||
--- RSPiX/Src/BLUE/unix/UnixSystem.h.orig
|
||||
+++ RSPiX/Src/BLUE/unix/UnixSystem.h
|
||||
@@ -244,13 +244,13 @@ inline bool rspObjCmp(const T* p1, const T* p2, size_t
|
||||
|
||||
inline char *ltoa(int32_t l, char *buf, int bufsize)
|
||||
{
|
||||
- snprintf(buf, bufsize, "%ld", l);
|
||||
+ snprintf(buf, bufsize, "%d", l);
|
||||
return(buf);
|
||||
}
|
||||
|
||||
inline char *ltoa(uint32_t l, char *buf, int bufsize)
|
||||
{
|
||||
- snprintf(buf, bufsize, "%ld", l);
|
||||
+ snprintf(buf, bufsize, "%u", l);
|
||||
return(buf);
|
||||
}
|
||||
|
16
games/postal/patches/patch-main_h
Normal file
16
games/postal/patches/patch-main_h
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-main_h,v 1.1.1.1 2017/12/22 10:23:26 bcallah Exp $
|
||||
|
||||
Fix audio defaults.
|
||||
|
||||
Index: main.h
|
||||
--- main.h.orig
|
||||
+++ main.h
|
||||
@@ -53,7 +53,7 @@ extern int wideScreenWidth;
|
||||
#define MAIN_WINDOW_HEIGHT 480
|
||||
|
||||
// This is our default mode.
|
||||
-#define MAIN_AUDIO_RATE 11025
|
||||
+#define MAIN_AUDIO_RATE 22050
|
||||
#define MAIN_AUDIO_BITS 16
|
||||
#define MAIN_AUDIO_CHANNELS 1
|
||||
#define MAIN_AUDIO_BUFTIME 100
|
70
games/postal/patches/patch-makefile
Normal file
70
games/postal/patches/patch-makefile
Normal file
@ -0,0 +1,70 @@
|
||||
$OpenBSD: patch-makefile,v 1.1.1.1 2017/12/22 10:23:26 bcallah Exp $
|
||||
|
||||
Don't hardcode optimization flags.
|
||||
Proper includes.
|
||||
|
||||
Index: makefile
|
||||
--- makefile.orig
|
||||
+++ makefile
|
||||
@@ -35,8 +35,8 @@ else ifeq ($(macosx_x86),1)
|
||||
target := macosx_x86
|
||||
CLIENTEXE := $(BINDIR)/postal1-x86
|
||||
else
|
||||
- target := linux_x86_64
|
||||
- CLIENTEXE := $(BINDIR)/postal1-x86_64
|
||||
+ target := openbsd
|
||||
+ CLIENTEXE := $(BINDIR)/postal1
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------- ... bleh.
|
||||
@@ -48,9 +48,9 @@ ifeq ($(strip $(target)),linux_x86)
|
||||
CXX := g++
|
||||
LINKER := g++ -m32
|
||||
endif
|
||||
-ifeq ($(strip $(target)),linux_x86_64)
|
||||
+ifeq ($(strip $(target)),openbsd)
|
||||
macosx := false
|
||||
- CPUARCH := x86_64
|
||||
+ CPUARCH ?= x86_64
|
||||
CC ?= gcc
|
||||
CXX ?= g++
|
||||
LINKER ?= g++
|
||||
@@ -279,7 +279,8 @@ CFLAGS += -DLOCALE=US -DTARGET=POSTAL_2015
|
||||
|
||||
# includes ...
|
||||
CFLAGS += -I$(SRCDIR)
|
||||
-CFLAGS += -I$(SRCDIR)/SDL2/include
|
||||
+CFLAGS += -I${LOCALBASE}/include
|
||||
+CFLAGS += -I${LOCALBASE}/include/SDL2
|
||||
CFLAGS += -I$(SRCDIR)/RSPiX
|
||||
CFLAGS += -I$(SRCDIR)/RSPiX/Inc
|
||||
CFLAGS += -I$(SRCDIR)/RSPiX/Src
|
||||
@@ -307,17 +308,7 @@ ifeq ($(strip $(macosx)),true)
|
||||
LIBS += SDL2/libs/macosx/libSDL2-2.0.0.dylib
|
||||
STEAMLDFLAGS += steamworks/sdk/redistributable_bin/osx32/libsteam_api.dylib
|
||||
else
|
||||
- ifeq ($(CPUARCH),arm)
|
||||
- LIBS += -lSDL2
|
||||
- else
|
||||
- ifeq ($(CPUARCH),x86_64)
|
||||
- LIBS += -lSDL2
|
||||
- else
|
||||
- LIBS += SDL2/libs/linux-x86/libSDL2-2.0.so.0
|
||||
- LDFLAGS += -Wl,-rpath,\$$ORIGIN
|
||||
- STEAMLDFLAGS += steamworks/sdk/redistributable_bin/linux32/libsteam_api.so
|
||||
- endif
|
||||
- endif
|
||||
+ LIBS += -lSDL2
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(steamworks)),true)
|
||||
@@ -339,8 +330,7 @@ debugon:
|
||||
$(eval CFLAGS += -DDEBUG -D_DEBUG -O0 -g)
|
||||
|
||||
debugoff:
|
||||
- $(eval OPTFLAG := -O3)
|
||||
- $(eval CFLAGS += -DNDEBUG -D_NDEBUG -O2)
|
||||
+ $(eval CFLAGS += -DNDEBUG -D_NDEBUG)
|
||||
|
||||
$(BINDIR)/%.o: $(SRCDIR)/%.s
|
||||
$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
|
5
games/postal/pkg/DESCR
Normal file
5
games/postal/pkg/DESCR
Normal file
@ -0,0 +1,5 @@
|
||||
postal is the official game engine for Postal 1 from Running With
|
||||
Scissors released as open source. It requires the original game assets
|
||||
to run.
|
||||
|
||||
Postal 1 is an isometric shooting game.
|
2
games/postal/pkg/PLIST
Normal file
2
games/postal/pkg/PLIST
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2017/12/22 10:23:26 bcallah Exp $
|
||||
@bin bin/postal1
|
28
games/postal/pkg/README
Normal file
28
games/postal/pkg/README
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: README,v 1.1.1.1 2017/12/22 10:23:26 bcallah Exp $
|
||||
|
||||
+-----------------------------------------------------------------------
|
||||
| Running ${FULLPKGNAME} on OpenBSD
|
||||
+-----------------------------------------------------------------------
|
||||
|
||||
Postal
|
||||
======
|
||||
Postal requires the original game files from Postal 1 to work properly.
|
||||
These can come from an original CD or from GOG.com.
|
||||
|
||||
If using the GOG.com version, you must extract the files from
|
||||
setup_postal_1.0_-_28.11.2016_(9399).exe using the innoextract package.
|
||||
The files will be in a directory named app. You must keep this
|
||||
directory, though it can be renamed and moved to a location of your
|
||||
choosing, and you can delete everything else that is extracted from the
|
||||
exe, such as the tmp directory.
|
||||
|
||||
After extracting and optionally renaming and moving the game files
|
||||
directory, you will need to cd into the game files directory. Using the
|
||||
dos2unix package, you must strip the MS-DOS newlines from the POSTAL.INI
|
||||
and res/levels/postal\ plus\ realms.ini files. You should do this before
|
||||
running the postal1 binary for the first time.
|
||||
|
||||
Your working directory must be the game files directory when launching
|
||||
the postal1 binary.
|
||||
|
||||
To go to the next level, press F1 after completing your objective.
|
Loading…
x
Reference in New Issue
Block a user