aboutsummaryrefslogtreecommitdiff
path: root/games/scare
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2005-02-06 19:47:34 +0000
committerPeter Pentchev <roam@FreeBSD.org>2005-02-06 19:47:34 +0000
commita5a2a0c909e1c7e4d67c3a41b96159bc9ed8ee73 (patch)
tree91e768bb6e8f80b6be23c2f932891cab905b83d3 /games/scare
parent2b65b90e340df002d3a3806ee8fe9d6692f58c53 (diff)
downloadports-a5a2a0c909e1c7e4d67c3a41b96159bc9ed8ee73.tar.gz
ports-a5a2a0c909e1c7e4d67c3a41b96159bc9ed8ee73.zip
Notes
Diffstat (limited to 'games/scare')
-rw-r--r--games/scare/Makefile41
-rw-r--r--games/scare/distinfo2
-rw-r--r--games/scare/files/no-xglk.patch14
-rw-r--r--games/scare/files/patch-Makefile47
-rw-r--r--games/scare/files/patch-os_glk.c40
-rw-r--r--games/scare/files/xglk.patch20
-rw-r--r--games/scare/pkg-descr3
7 files changed, 167 insertions, 0 deletions
diff --git a/games/scare/Makefile b/games/scare/Makefile
new file mode 100644
index 000000000000..12ccce36d9d1
--- /dev/null
+++ b/games/scare/Makefile
@@ -0,0 +1,41 @@
+# New ports collection makefile for: scare
+# Date created: 6 February 2005
+# Whom: Peter Pentchev <roam@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= scare
+PORTVERSION= 1.3.3
+CATEGORIES= games
+MASTER_SITES= ftp://ftp.ifarchive.org/if-archive/programming/adrift/ \
+ http://www.geocities.com/legion_if/
+
+MAINTAINER= roam@FreeBSD.org
+COMMENT= ADRIFT-compatible interactive games interpreter
+
+USE_ZIP= yes
+
+BINFILES= scare
+
+.if defined(WITH_XGLK)
+PKGNAMESUFFIX= -glk
+
+BUILD_DEPENDS= ${X11BASE}/lib/libxglk.a:${PORTSDIR}/games/xglk
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+ALL_TARGET= all glkscare
+
+EXTRA_PATCHES= ${FILESDIR}/xglk.patch
+
+BINFILES+= glkscare
+.else
+EXTRA_PATCHES= ${FILESDIR}/no-xglk.patch
+.endif
+
+PLIST_FILES= ${BINFILES:S,^,bin/,}
+
+do-install:
+ ${INSTALL_PROGRAM} ${BINFILES:S,^,${WRKSRC}/,} ${PREFIX}/bin/
+
+.include <bsd.port.mk>
diff --git a/games/scare/distinfo b/games/scare/distinfo
new file mode 100644
index 000000000000..deb0d17c2c41
--- /dev/null
+++ b/games/scare/distinfo
@@ -0,0 +1,2 @@
+MD5 (scare-1.3.3.zip) = 432b809d4ecd217e2dbfd43c09703d15
+SIZE (scare-1.3.3.zip) = 629739
diff --git a/games/scare/files/no-xglk.patch b/games/scare/files/no-xglk.patch
new file mode 100644
index 000000000000..13a6928f0fd8
--- /dev/null
+++ b/games/scare/files/no-xglk.patch
@@ -0,0 +1,14 @@
+--- Makefile Fri Feb 4 22:09:46 2005
++++ Makefile.noglk Fri Feb 4 22:09:33 2005
+@@ -68,8 +68,9 @@
+ # If your make can't handle sinclude or -include, and you're not building
+ # for Glk, comment out the include line.
+ GLKPATH = $(GLKDIR)/$(GLK)
+-sinclude $(GLKPATH)/Make.$(GLK)
+-GLKLIBS = -L$(GLKPATH) $(GLKLIB) $(LINKLIBS)
++#sinclude $(GLKPATH)/Make.$(GLK)
++#GLKLIBS = -L$(GLKPATH) $(GLKLIB) $(LINKLIBS)
++GLKLIBS =
+
+ # Always use the Bourne shell.
+ SHELL = /bin/sh
diff --git a/games/scare/files/patch-Makefile b/games/scare/files/patch-Makefile
new file mode 100644
index 000000000000..863daadcf155
--- /dev/null
+++ b/games/scare/files/patch-Makefile
@@ -0,0 +1,47 @@
+--- Makefile.orig Sun Feb 6 21:18:36 2005
++++ Makefile Sun Feb 6 21:22:41 2005
+@@ -26,16 +26,17 @@
+ #
+
+ # GCC compiler and linker flags.
+-CC = gcc
+-DEBUG =
+-CEXTRA =
+-CFLAGS = -O3 -D__NO_STRING_INLINES -fPIC -ansi -D_STRICT_ANSI_ -Wall -W \
++CC ?= gcc
++DEBUG ?=
++CEXTRA ?=
++CFLAGS ?= -O3 -D__NO_STRING_INLINES -fPIC -ansi -D_STRICT_ANSI_ -Wall -W \
+ -pedantic -Wshadow -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
+- $(DEBUG) $(CEXTRA)
+-LDLIBS =
+-LDEXTRA =
+-LDFLAGS = $(DEBUG) $(LDEXTRA)
++ $(DEBUG)
++CFLAGS+= ${CEXTRA}
++LDLIBS ?=
++LDEXTRA ?=
++LDFLAGS ?= $(DEBUG) $(LDEXTRA)
+
+ # Generic compiler and linker flags.
+ #CC = cc
+@@ -77,12 +78,12 @@
+ SHELL = /bin/sh
+
+ # Miscellaneous tools, overridable by the command line.
+-ZIP = zip
+-UNZIP = unzip
+-RM = rm
+-LN = ln
+-TAR = tar
+-TEST = test
++ZIP ?= zip
++UNZIP ?= unzip
++RM ?= rm
++LN ?= ln
++TAR ?= tar
++TEST ?= test
+
+ # SCARE objects and headers.
+ OBJECTS = sctafpar.o sctaffil.o scprops.o scvars.o scexpr.o scprintf.o \
diff --git a/games/scare/files/patch-os_glk.c b/games/scare/files/patch-os_glk.c
new file mode 100644
index 000000000000..4f4781a1bd9d
--- /dev/null
+++ b/games/scare/files/patch-os_glk.c
@@ -0,0 +1,40 @@
+--- os_glk.c.orig Sat Feb 5 19:58:33 2005
++++ os_glk.c Sat Feb 5 20:17:22 2005
+@@ -899,6 +899,8 @@
+ && glk_gestalt (gestalt_Graphics, 0))
+ {
+ sc_char *buffer;
++ char fname[80];
++ int fd;
+
+ /*
+ * Try to extract data with dd. Assuming that works, back-
+@@ -906,15 +908,23 @@
+ * delay ten seconds and then delete the temporary file
+ * containing the image. Not exactly finessed.
+ */
++ strcpy(fname, "/tmp/scare-XXXXXX.jpg");
++ fd = mkstemps(fname, 4);
++ if (fd < 0)
++ return;
++ close(fd);
+ assert (gsclinux_game_file != NULL);
+ buffer = gsc_malloc (strlen (gsclinux_game_file) + 128);
+- sprintf (buffer, "dd if=%s ibs=1c skip=%ld count=%ld obs=100k"
+- " of=/tmp/scare.jpg 2>/dev/null",
+- gsclinux_game_file, offset, length);
++ sprintf (buffer, "dd if=%s ibs=1 skip=%ld count=%ld obs=100k"
++ " of=%s 2>/dev/null",
++ gsclinux_game_file, offset, length,
++ fname);
++ system (buffer);
++ sprintf (buffer, "xv %s >/dev/null 2>&1 &", fname);
++ system (buffer);
++ sprintf (buffer, "( sleep 10; rm %s ) >/dev/null 2>&1 &", fname);
+ system (buffer);
+ free (buffer);
+- system ("xv /tmp/scare.jpg >/dev/null 2>&1 &");
+- system ("( sleep 10; rm /tmp/scare.jpg ) >/dev/null 2>&1 &");
+ }
+ }
+ #else
diff --git a/games/scare/files/xglk.patch b/games/scare/files/xglk.patch
new file mode 100644
index 000000000000..454621c2deb4
--- /dev/null
+++ b/games/scare/files/xglk.patch
@@ -0,0 +1,20 @@
+--- Makefile.orig Fri Apr 30 08:05:12 2004
++++ Makefile Fri Feb 4 22:18:07 2005
+@@ -68,7 +68,7 @@
+ # If your make can't handle sinclude or -include, and you're not building
+ # for Glk, comment out the include line.
+ GLKPATH = $(GLKDIR)/$(GLK)
+-sinclude $(GLKPATH)/Make.$(GLK)
++.include "$(X11BASE)/share/xglk/Make.$(GLK)"
+ GLKLIBS = -L$(GLKPATH) $(GLKLIB) $(LINKLIBS)
+
+ # Always use the Bourne shell.
+@@ -121,7 +121,7 @@
+ $(LDLIBS) $(GLKLIBS)
+
+ os_glk.o: os_glk.c $(HEADERS)
+- $(CC) $(GLKARCH) $(CFLAGS) -c -o $@ $<
++ $(CC) $(GLKARCH) $(CFLAGS) -DLINUX_GRAPHICS -I${X11BASE}/include/xglk -c -o $@ $<
+
+ # Option to build an IFP plugin version of SCARE.
+ scare_plugin.c: scare.hdr
diff --git a/games/scare/pkg-descr b/games/scare/pkg-descr
new file mode 100644
index 000000000000..3623fd1dd586
--- /dev/null
+++ b/games/scare/pkg-descr
@@ -0,0 +1,3 @@
+An ADRIFT-compatible interactive games interpreter.
+
+WWW: http://www.geocities.com/legion_if/scare.html