Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

4
games/level9/DESCR Normal file
View File

@@ -0,0 +1,4 @@
An interpreter for the text adventures by Level 9. Supports versions
2-4 in many formats, including Spectrum snapshots.
This port uses curses for input/output.

31
games/level9/Makefile Normal file
View File

@@ -0,0 +1,31 @@
# $NetBSD: Makefile,v 1.16 2012/12/12 10:44:09 wiz Exp $
DISTNAME= Level9_4.0_Source
PKGNAME= level9-4.0
PKGREVISION= 1
CATEGORIES= games
MASTER_SITES= http://www.ifarchive.org/if-archive/level9/interpreters/level9/
EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.ifarchive.org/if-archive/level9/interpreters/level9/
COMMENT= Curses port of the Level 9 text adventure interpreter
WRKSRC= ${WRKDIR}/Unix
# uses halfkey (present since 1.6M)
INCOMPAT_CURSES+= NetBSD-1.4[Y-Z]*-* NetBSD-1.5*-* NetBSD-1.6-*
INCOMPAT_CURSES+= NetBSD-1.6.*-* NetBSD-1.6[A-L]*-*
INSTALLATION_DIRS= bin
post-extract:
${CP} ${FILESDIR}/Makefile ${WRKSRC}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/level9 ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/level9
${INSTALL_DATA} ${WRKDIR}/level9.txt \
${DESTDIR}${PREFIX}/share/doc/level9
.include "../../devel/ncurses/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

3
games/level9/PLIST Normal file
View File

@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:56:50 joerg Exp $
bin/level9
share/doc/level9/level9.txt

6
games/level9/distinfo Normal file
View File

@@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.6 2005/11/01 14:39:45 dillo Exp $
SHA1 (Level9_4.0_Source.zip) = 7bbd0a675aa66067745b2d850d07eaa2b08fd452
RMD160 (Level9_4.0_Source.zip) = 224b2b3414da53e8dd7c3a253468b078c09a0e4f
Size (Level9_4.0_Source.zip) = 294428 bytes
SHA1 (patch-aa) = 2fda19e85676e7eadf94d109a1ba0e02a17e9d84

View File

@@ -0,0 +1,10 @@
all: level9
level9: level9.o unix-curses.o
${CC} ${LDFLAGS} -o level9 level9.o unix-curses.o -lncurses
unix-curses.o: unix-curses.c ../level9.h
${CC} -I.. ${CFLAGS} -c unix-curses.c
level9.o: ../level9.c ../level9.h
${CC} -I.. ${CFLAGS} -c ../level9.c

View File

@@ -0,0 +1,75 @@
$NetBSD: patch-aa,v 1.2 2003/10/01 20:21:40 dillo Exp $
--- unix-curses.c.orig Sun Apr 21 21:37:00 2002
+++ unix-curses.c
@@ -10,11 +10,6 @@
*
* A few notes on this port:
*
- * I've modified level9.h to use the LITTLEENDIAN macro -- it assumes this if
- * you're using DOS or Windows, otherwise it uses the byte sex macros. This
- * shouldn't hurt a little-endian machine (Intel), but you must undefine
- * LITTLEENDIAN if you've got a Motorola-type machine.
- *
* If you don't specify a path, level9 Linux will look first in the directory
* $LEVEL9DIR, if defined, and then in the current directory.
*
@@ -39,11 +34,6 @@
#define FILE_DELIM '/'
/*
- * Set this if you are compiling on a little-endian machine (ARM, Intel)
- */
-#define LITTLEENDIAN 1
-
-/*
* Define this as 1 to get the Emacs-type key bindings
* Ctrl-A (go to beginning of line)
* Ctrl-B (back one character)
@@ -741,25 +731,11 @@ int main (int argc, char *argv [])
char gamename [256];
char *envbuf;
L9BOOL gotgame;
+ char bp[1024];
/*
* Check byte sex
*/
-# if LITTLEENDIAN
- L9UINT32 test = 0x12345678;
- char *tcp = (char *) &test;
-# else
- L9UINT32 test = 0x78563412;
- char *tcp = (char *) &test;
-# endif
- if ((tcp [0] != 0x78) || (tcp [1] != 0x56) ||
- (tcp [2] != 0x34) || (tcp [3] != 0x12))
- {
- fprintf (stderr, "%s: compiled with the wrong byte sex!\n"
- " Check the LITTLEENDIAN macro in os/unix-curses.c\n",
- argv [0]);
- exit (1);
- }
if (argc != 2)
{
@@ -786,8 +762,9 @@ int main (int argc, char *argv [])
/*
* Get the terminal characteristics for line width and More prompt
*/
+ tgetent(bp, getenv("TERM"));
Line_width = tgetnum ("co");
- if (Line_width == ERR)
+ if ((Line_width == -1) || (Line_width == ERR))
{
fprintf (stderr, "Couldn't get terminal width---falling back on good old"
" 80 columns\n\n");
@@ -795,7 +772,7 @@ int main (int argc, char *argv [])
}
More_lines = tgetnum ("li");
- if (More_lines == ERR)
+ if ((More_lines == -1) || (More_lines == ERR))
{
fprintf (stderr, "Couldn't get terminal height---guessing\n\n");
More_lines = 24;