From 3195e5bf2f3b7701055506d61e1b41f9e8464107 Mon Sep 17 00:00:00 2001 From: "Jason E. Hale" Date: Mon, 23 Jun 2014 23:00:51 +0000 Subject: - Support staging - Add LICENSE - Rename generic patches Approved by: portmgr (blanket approval) --- games/trojka/Makefile | 10 +++++----- games/trojka/files/patch-Makefile | 36 +++++++++++++++++++++++++++++++++++ games/trojka/files/patch-aa | 36 ----------------------------------- games/trojka/files/patch-ab | 30 ----------------------------- games/trojka/files/patch-ac | 12 ------------ games/trojka/files/patch-ad | 11 ----------- games/trojka/files/patch-sys_custom.h | 12 ++++++++++++ games/trojka/files/patch-system.c | 30 +++++++++++++++++++++++++++++ games/trojka/files/patch-trojka.6 | 11 +++++++++++ games/trojka/files/pkg-message.in | 2 +- games/trojka/pkg-plist | 8 +++++++- 11 files changed, 102 insertions(+), 96 deletions(-) create mode 100644 games/trojka/files/patch-Makefile delete mode 100644 games/trojka/files/patch-aa delete mode 100644 games/trojka/files/patch-ab delete mode 100644 games/trojka/files/patch-ac delete mode 100644 games/trojka/files/patch-ad create mode 100644 games/trojka/files/patch-sys_custom.h create mode 100644 games/trojka/files/patch-system.c create mode 100644 games/trojka/files/patch-trojka.6 (limited to 'games/trojka') diff --git a/games/trojka/Makefile b/games/trojka/Makefile index 82601c41e5b0..195a58b4b9a7 100644 --- a/games/trojka/Makefile +++ b/games/trojka/Makefile @@ -10,11 +10,11 @@ DISTNAME= ${PORTNAME} MAINTAINER= e@ik.nu COMMENT= Game of skill -MAN6= trojka.6 -SUB_FILES= pkg-message +LICENSE= TROJKA +LICENSE_NAME= Trojka Copyright +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept +LICENSE_FILE= ${WRKSRC}/COPYRIGHT -NO_STAGE= yes -post-install: - @${CAT} ${PKGMESSAGE} +SUB_FILES= pkg-message .include diff --git a/games/trojka/files/patch-Makefile b/games/trojka/files/patch-Makefile new file mode 100644 index 000000000000..7f0360b996cc --- /dev/null +++ b/games/trojka/files/patch-Makefile @@ -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 $(DESTDIR)$(SCOREDIR) ++ install -c -s trojka $(DESTDIR)$(PREFIX)/bin ++ install -c -m 0644 README $(DESTDIR)$(SCOREDIR) ++ install -c -m 0664 /dev/null $(DESTDIR)$(SCOREFILE) ++ install -c -m 0444 trojka.6.out $(DESTDIR)$(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 diff --git a/games/trojka/files/patch-aa b/games/trojka/files/patch-aa deleted file mode 100644 index d814e16729af..000000000000 --- a/games/trojka/files/patch-aa +++ /dev/null @@ -1,36 +0,0 @@ ---- 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 diff --git a/games/trojka/files/patch-ab b/games/trojka/files/patch-ab deleted file mode 100644 index e4940565d031..000000000000 --- a/games/trojka/files/patch-ab +++ /dev/null @@ -1,30 +0,0 @@ ---- system.c.orig Sat Oct 21 05:16:20 1995 -+++ system.c Mon Jul 17 21:09:48 2000 -@@ -23,6 +23,9 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#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 diff --git a/games/trojka/files/patch-ac b/games/trojka/files/patch-ac deleted file mode 100644 index b11771664e50..000000000000 --- a/games/trojka/files/patch-ac +++ /dev/null @@ -1,12 +0,0 @@ ---- 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 */ - diff --git a/games/trojka/files/patch-ad b/games/trojka/files/patch-ad deleted file mode 100644 index c581ceb7cc6f..000000000000 --- a/games/trojka/files/patch-ad +++ /dev/null @@ -1,11 +0,0 @@ ---- 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) diff --git a/games/trojka/files/patch-sys_custom.h b/games/trojka/files/patch-sys_custom.h new file mode 100644 index 000000000000..b11771664e50 --- /dev/null +++ b/games/trojka/files/patch-sys_custom.h @@ -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 */ + diff --git a/games/trojka/files/patch-system.c b/games/trojka/files/patch-system.c new file mode 100644 index 000000000000..e4940565d031 --- /dev/null +++ b/games/trojka/files/patch-system.c @@ -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 + #include + #include ++#ifdef __FreeBSD__ ++#include ++#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 diff --git a/games/trojka/files/patch-trojka.6 b/games/trojka/files/patch-trojka.6 new file mode 100644 index 000000000000..c581ceb7cc6f --- /dev/null +++ b/games/trojka/files/patch-trojka.6 @@ -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) diff --git a/games/trojka/files/pkg-message.in b/games/trojka/files/pkg-message.in index 6f3b8e6278c6..ae85aabc78a7 100644 --- a/games/trojka/files/pkg-message.in +++ b/games/trojka/files/pkg-message.in @@ -3,5 +3,5 @@ You now have suid binary (2755): %%PREFIX%%/bin/trojka -Scores will not be writed if you don't set suid. +Scores will not be saved if you don't set suid. ============================================================ diff --git a/games/trojka/pkg-plist b/games/trojka/pkg-plist index 17a4fda4e4d1..6c55a9ccb2af 100644 --- a/games/trojka/pkg-plist +++ b/games/trojka/pkg-plist @@ -1,5 +1,11 @@ +@mode 2755 +@group games bin/trojka -%%DATADIR%%/COPYRIGHT +@group +@mode +man/man6/trojka.6.gz %%DATADIR%%/README +@group games %%DATADIR%%/trojka.scores +@group @dirrm %%DATADIR%% -- cgit