From 9d3497b4325b20d82703859034495100881292d6 Mon Sep 17 00:00:00 2001 From: fcambus Date: Mon, 6 Apr 2020 11:05:27 +0000 Subject: [PATCH] Import games/nsnake. nsnake is a clone of the classic snake game that we all used to play on our cellphones. You play this game on the terminal, with a textual interface. OK solene@ --- games/nsnake/Makefile | 33 ++++++++++++++++++++++ games/nsnake/distinfo | 2 ++ games/nsnake/patches/patch-Makefile | 39 +++++++++++++++++++++++++ games/nsnake/pkg/DESCR | 3 ++ games/nsnake/pkg/PLIST | 44 +++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+) create mode 100644 games/nsnake/Makefile create mode 100644 games/nsnake/distinfo create mode 100644 games/nsnake/patches/patch-Makefile create mode 100644 games/nsnake/pkg/DESCR create mode 100644 games/nsnake/pkg/PLIST diff --git a/games/nsnake/Makefile b/games/nsnake/Makefile new file mode 100644 index 00000000000..e334a07a800 --- /dev/null +++ b/games/nsnake/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2020/04/06 11:05:27 fcambus Exp $ + +COMMENT = classic snake game on the terminal + +DISTNAME = nsnake-3.0.1 + +CATEGORIES = games + +HOMEPAGE = http://nsnake.sourceforge.net/ + +MAINTAINER = Frederic Cambus + +# GPLv3 +PERMIT_PACKAGE = Yes + +WANTLIB += ${COMPILER_LIBCXX} c curses m + +COMPILER = base-clang ports-gcc base-gcc + +MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=nsnake/GNU-Linux/} + +RUN_DEPENDS = devel/desktop-file-utils \ + x11/gtk+3,-guic + +MAKE_FLAGS = V=1 CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" +MAKE_FLAGS += CC="${CC}" COMMANDER_CFLAGS="${CFLAGS}" +MAKE_FLAGS += MANDIR=${PREFIX}/man/man6 PREFIX=${PREFIX} + +USE_GMAKE = Yes + +NO_TEST = Yes + +.include diff --git a/games/nsnake/distinfo b/games/nsnake/distinfo new file mode 100644 index 00000000000..e335c78c8a3 --- /dev/null +++ b/games/nsnake/distinfo @@ -0,0 +1,2 @@ +SHA256 (nsnake-3.0.1.tar.gz) = 4KOeDhiKaoUCy5/AXeP6g91NYQcsW5OhghNtG8zTm7k= +SIZE (nsnake-3.0.1.tar.gz) = 91472 diff --git a/games/nsnake/patches/patch-Makefile b/games/nsnake/patches/patch-Makefile new file mode 100644 index 00000000000..45c14bebc5e --- /dev/null +++ b/games/nsnake/patches/patch-Makefile @@ -0,0 +1,39 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2020/04/06 11:05:27 fcambus Exp $ + +With OpenBSD install(1), -p and -d switches cannot be used together. + +Index: Makefile +--- Makefile.orig ++++ Makefile +@@ -114,24 +114,24 @@ all: dirs $(EXE) + + install: all + # Installing... +- $(MUTE)install -pdm755 $(DESTDIR)$(BINDIR) ++ $(MUTE)install -dm755 $(DESTDIR)$(BINDIR) + $(MUTE)install -pm755 bin/$(EXE) $(DESTDIR)$(BINDIR) + + -$(MUTE)cat $(MANPAGE) | sed -e "s|DATE|$(DATE)|g" -e "s|VERSION|$(VERSION)|g" >$(MANFILE) +- $(MUTE)install -pdm755 $(DESTDIR)$(MANDIR) ++ $(MUTE)install -dm755 $(DESTDIR)$(MANDIR) + $(MUTE)install -pm644 $(MANFILE) $(DESTDIR)$(MANDIR) + $(MUTE)rm -f $(MANFILE) + +- $(MUTE)install -pdm755 $(DESTDIR)$(LEVELDIR) ++ $(MUTE)install -dm755 $(DESTDIR)$(LEVELDIR) + $(MUTE)install -pm644 levels/* $(DESTDIR)$(LEVELDIR) + +- $(MUTE)install -pdm755 $(DESTDIR)$(PNGDIR)/16x16/apps/ ++ $(MUTE)install -dm755 $(DESTDIR)$(PNGDIR)/16x16/apps/ + $(MUTE)install -pm644 misc/nsnake16.png $(DESTDIR)$(PNGDIR)/16x16/apps/nsnake.png +- $(MUTE)install -pdm755 $(DESTDIR)$(PNGDIR)/32x32/apps/ ++ $(MUTE)install -dm755 $(DESTDIR)$(PNGDIR)/32x32/apps/ + $(MUTE)install -pm644 misc/nsnake32.png $(DESTDIR)$(PNGDIR)/32x32/apps/nsnake.png +- $(MUTE)install -pdm755 $(DESTDIR)$(XPMDIR) ++ $(MUTE)install -dm755 $(DESTDIR)$(XPMDIR) + $(MUTE)install -pm644 misc/nsnake32.xpm $(DESTDIR)$(XPMDIR)/nsnake.xpm +- $(MUTE)install -pdm755 $(DESTDIR)$(DESKTOPDIR) ++ $(MUTE)install -dm755 $(DESTDIR)$(DESKTOPDIR) + $(MUTE)install -pm644 misc/nsnake.desktop $(DESTDIR)$(DESKTOPDIR) + + # $(PACKAGE) successfuly installed! diff --git a/games/nsnake/pkg/DESCR b/games/nsnake/pkg/DESCR new file mode 100644 index 00000000000..76983624687 --- /dev/null +++ b/games/nsnake/pkg/DESCR @@ -0,0 +1,3 @@ +nsnake is a clone of the classic snake game that we all used to play +on our cellphones. You play this game on the terminal, with a textual +interface. diff --git a/games/nsnake/pkg/PLIST b/games/nsnake/pkg/PLIST new file mode 100644 index 00000000000..98050219bb8 --- /dev/null +++ b/games/nsnake/pkg/PLIST @@ -0,0 +1,44 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2020/04/06 11:05:27 fcambus Exp $ +@bin bin/nsnake +@man man/man6/nsnake.6 +share/applications/nsnake.desktop +share/games/ +share/games/nsnake/ +share/games/nsnake/levels/ +share/games/nsnake/levels/3-hearts.nsnake +share/games/nsnake/levels/NSNAKE.nsnake +share/games/nsnake/levels/arena00.nsnake +share/games/nsnake/levels/arena01.nsnake +share/games/nsnake/levels/arena02.nsnake +share/games/nsnake/levels/balls.nsnake +share/games/nsnake/levels/cave00.nsnake +share/games/nsnake/levels/diagonal-split.nsnake +share/games/nsnake/levels/horizontal-madness.nsnake +share/games/nsnake/levels/lenny.nsnake +share/games/nsnake/levels/retro00.nsnake +share/games/nsnake/levels/retro01.nsnake +share/games/nsnake/levels/retro02.nsnake +share/games/nsnake/levels/retro03.nsnake +share/games/nsnake/levels/retro04.nsnake +share/games/nsnake/levels/retro05-2.nsnake +share/games/nsnake/levels/retro05.nsnake +share/games/nsnake/levels/retro06.nsnake +share/games/nsnake/levels/retro07.nsnake +share/games/nsnake/levels/s.nsnake +share/games/nsnake/levels/spiral-large.nsnake +share/games/nsnake/levels/squares00.nsnake +share/games/nsnake/levels/squares01.nsnake +share/games/nsnake/levels/squares02.nsnake +share/games/nsnake/levels/tetris.nsnake +share/games/nsnake/levels/tricky-horizontal.nsnake +share/games/nsnake/levels/tricky-vertical.nsnake +share/games/nsnake/levels/tricky.nsnake +share/games/nsnake/levels/vertical-madness.nsnake +share/games/nsnake/levels/w.nsnake +share/games/nsnake/levels/z.nsnake +share/icons/hicolor/16x16/apps/nsnake.png +share/icons/hicolor/32x32/apps/nsnake.png +share/pixmaps/ +share/pixmaps/nsnake.xpm +@tag update-desktop-database +@tag gtk-update-icon-cache %D/share/icons/hicolor