Initial import of trojka-1.0

trojka is a game of skill

PR: 19911
Submitted by: Edwin Mons <edwinme@ik.nu>
Reviewed by: sobomax
This commit is contained in:
Kevin Lo 2000-07-18 09:45:05 +00:00
parent a3c7da85f7
commit 802185c16a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=30783
11 changed files with 132 additions and 0 deletions

View File

@ -146,6 +146,7 @@
SUBDIR += tinymux
SUBDIR += tkmoo
SUBDIR += tksol
SUBDIR += trojka
SUBDIR += tvp
SUBDIR += omega
SUBDIR += uox3

21
games/trojka/Makefile Normal file
View File

@ -0,0 +1,21 @@
# New ports collection makefile for: trojka
# Date created: 22 march 2000
# Whom: Edwin Mons
#
# $FreeBSD$
#
PORTNAME= trojka
PORTVERSION= 1.0
CATEGORIES= games
MASTER_SITES= ftp://ftp.funet.fi/pub/unix/games/
DISTNAME= ${PORTNAME}
MAINTAINER= e@ik.nu
MAN6= trojka.6
post-install:
${SED} "s|%%PREFIX%%|${PREFIX}|" ${PKGMESSAGE}
.include <bsd.port.mk>

1
games/trojka/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (trojka.tar.gz) = e5d09a395df937b4e09a089013648a77

View File

@ -0,0 +1,36 @@
--- Makefile.orig Sat Oct 21 05:17:43 1995
+++ Makefile Tue Jul 18 11:39:08 2000
@@ -6,14 +6,25 @@
#
-
+SCOREDIR=$(PREFIX)/share/trojka
+SCOREFILE=$(SCOREDIR)/trojka.scores
+CFLAGS+= -DSCOREFILE=\"$(SCOREFILE)\"
OBJS= trojka.o screen.o scan.o hiscore.o system.o
+all: freebsd trojka.6.out
+
make:
@echo please specify: hpux, xenix68, linux or sunos
install:
- cp trojka /usr/games
+ install -c -d -m 0755 $(SCOREDIR)
+ install -c -m 2755 -g games -s trojka $(PREFIX)/bin
+ install -c -m 0644 COPYRIGHT README $(SCOREDIR)
+ install -c -m 0664 -g games /dev/null $(SCOREFILE)
+ install -c -m 0444 trojka.6.out $(PREFIX)/man/man6/trojka.6
+
+trojka.6.out: trojka.6
+ sed "s|%%PREFIX%%|$(PREFIX)|" trojka.6 > trojka.6.out
clean:
rm -f $(PROGS) *.o core a.out trojka.scores
@@ -53,3 +64,5 @@
linux:
make trojka "CFLAGS=-DLINUX"
+
+freebsd: trojka

View File

@ -0,0 +1,30 @@
--- system.c.orig Sat Oct 21 05:16:20 1995
+++ system.c Mon Jul 17 21:09:48 2000
@@ -23,6 +23,9 @@
#include <stdio.h>
#include <time.h>
#include <fcntl.h>
+#ifdef __FreeBSD__
+#include <sys/ioctl.h>
+#endif
#include "trojka.h"
@@ -42,7 +45,7 @@
char getkey() /* get key from keyboard */
{
-#if SUNOS | HPUX | LINUX
+#if SUNOS | HPUX | LINUX | __FreeBSD__
long count;
char ch;
@@ -119,7 +122,7 @@
int delay(millisecs)
int millisecs;
{
-#if SUNOS | LINUX
+#if SUNOS | LINUX | __FreeBSD__
usleep(millisecs * 1200); /* usleep does microsecs; need millisecs */
#endif
#ifdef HPUX

View File

@ -0,0 +1,12 @@
--- sys_custom.h.orig Mon Jul 17 21:02:18 2000
+++ sys_custom.h Mon Jul 17 21:02:41 2000
@@ -7,7 +7,9 @@
#ifndef _sys_custom_
#define _sys_custom_
+#ifndef SCOREFILE
#define SCOREFILE "/usr/games/lib/trojka.scores"
+#endif
#define UMASK 0666 /* creation mask for hiscorefile */

View File

@ -0,0 +1,11 @@
--- trojka.6.orig Mon Jul 17 21:03:06 2000
+++ trojka.6 Mon Jul 17 21:03:36 2000
@@ -40,7 +40,7 @@
.SH FILES
.nf
-/usr/local/games/lib/trojka.scores The Trojka hiscore file
+%%PREFIX%%/share/trojka/trojka.scores The Trojka hiscore file
.SH HISTORY
First version written in 1989 for MS-Dog. Not long thereafter (in 1990)

1
games/trojka/pkg-comment Normal file
View File

@ -0,0 +1 @@
A game of skill

7
games/trojka/pkg-descr Normal file
View File

@ -0,0 +1,7 @@
Trojka is a game of skill. The aim of the game is to control and place
falling blocks so that you get three patterns or colors in a row,
horizontally or diagonally. These patterns then disappear, the above
blocks collapse and you get points.
- Edwin Mons
e@ik.nu

7
games/trojka/pkg-message Normal file
View File

@ -0,0 +1,7 @@
============================================================
You now have suid binary (2755):
%%PREFIX%%/bin/trojka
Scores will not be writed if you don't set suid.
============================================================

5
games/trojka/pkg-plist Normal file
View File

@ -0,0 +1,5 @@
bin/trojka
share/trojka/COPYRIGHT
share/trojka/README
share/trojka/trojka.scores
@dirrm share/trojka