aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2014-11-29 01:46:17 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2014-11-29 01:46:17 +0000
commita5f4d60f4450499dccdd2bcc937f31e1b01d0615 (patch)
tree088e8c50c571bcc24963a918f422ac7764e5b68a /games
parentb44a8957e319a03048c2a3be73161255aeff3d18 (diff)
downloadports-a5f4d60f4450499dccdd2bcc937f31e1b01d0615.tar.gz
ports-a5f4d60f4450499dccdd2bcc937f31e1b01d0615.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/icebreaker/Makefile25
-rw-r--r--games/icebreaker/files/patch-Makefile98
-rw-r--r--games/icebreaker/files/pkg-message.in11
-rw-r--r--games/icebreaker/pkg-plist4
4 files changed, 103 insertions, 35 deletions
diff --git a/games/icebreaker/Makefile b/games/icebreaker/Makefile
index 6feef77cd78c..af26748ee66b 100644
--- a/games/icebreaker/Makefile
+++ b/games/icebreaker/Makefile
@@ -14,7 +14,8 @@ EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Game similar to Jezzball or Barrack
-LICENSE= GPLv2
+LICENSE= GPLv2 # or later
+LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake tar:tgz
USE_SDL= mixer sdl
@@ -24,32 +25,12 @@ PORTDOCS= ChangeLog README README.SDL README.ifyoumakechanges \
OPTIONS_DEFINE= DOCS
-SUB_FILES= pkg-message
-
-post-patch:
- @${REINPLACE_CMD} -e \
- 's|CC=gcc|CC?=gcc|; \
- s|sdl-config|$(SDL_CONFIG)|; \
- s|prefix=/usr/local|prefix=${STAGEDIR}${PREFIX}|; \
- s|datadir=$$(prefix)/share|datadir=${STAGEDIR}${PREFIX}/share|; \
- s|mandir=$$(prefix)/share/man|mandir=${STAGEDIR}${PREFIX}/man|; \
- s|highscoredir=/var/local/lib/games|highscoredir=/var/games|; \
- s|CFLAGS=|CFLAGS+=|; \
- s|OPTIMIZE=-O3|OPTIMIZE=|; \
- s|$$(CC) $$(CFLAGS)|$$(CC) $$(LDFLAGS) $$(CFLAGS)|; \
- s|install -s -g games|install -g games|; \
- s|install -s -m 755|install -m 755|; \
- s|chown -f games:games|chown -f root:games|; \
- s|$$(SRC:.c=.d)|$$(SRC:.c)|' \
- ${WRKSRC}/Makefile
-
post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/icebreaker/files/patch-Makefile b/games/icebreaker/files/patch-Makefile
new file mode 100644
index 000000000000..59095eaf5795
--- /dev/null
+++ b/games/icebreaker/files/patch-Makefile
@@ -0,0 +1,98 @@
+--- Makefile.orig 2003-02-25 19:31:32.000000000 +0300
++++ Makefile 2014-11-29 04:34:05.000000000 +0300
+@@ -1,9 +1,9 @@
+-CC=gcc
++CC?=gcc
+
+-SDLCONFIG=sdl-config
++SDLCONFIG=${SDL_CONFIG}
+
+ ifndef prefix
+- prefix=/usr/local
++ prefix=${PREFIX}
+ #prefix=/usr
+ endif
+
+@@ -12,7 +12,7 @@
+ endif
+
+ ifndef mandir
+- mandir=$(prefix)/share/man
++ mandir=$(prefix)/man
+ endif
+
+ ifndef bindir
+@@ -21,12 +21,12 @@
+
+
+ ifndef highscoredir
+- highscoredir=/var/local/lib/games
++ highscoredir=/var/games
+ #highscoredir=/var/lib/games
+ endif
+
+
+-CFLAGS=-Wall $(OPTIMIZE) $(SDL_CFLAGS) -DDATAPREFIX=\"$(datadir)/icebreaker\" -DHISCOREPREFIX=\"$(highscoredir)\"
++CFLAGS+=-Wall $(SDL_CFLAGS) -DDATAPREFIX=\"$(datadir)/icebreaker\" -DHISCOREPREFIX=\"$(highscoredir)\"
+
+ SRC=icebreaker.c cursor.c grid.c laundry.c line.c penguin.c sound.c \
+ level.c intro.c text.c status.c transition.c hiscore.c dialog.c \
+@@ -40,7 +40,7 @@
+ SDL_CFLAGS := $(shell $(SDLCONFIG) --cflags)
+ SDL_LDFLAGS := $(shell $(SDLCONFIG) --libs)
+ VERSION := $(shell awk '/^\#define VERSION/ { print $$3 }' icebreaker.h)
+-VERDATE := $(shell date -r icebreaker.h +"%d %B %Y")
++VERDATE := $(shell date -r $(shell stat -f %m icebreaker.h) +"%d %B %Y")
+
+ CROSSTOOLSPATH=/usr/local/cross-tools
+ # note that you almost certainly want to set wine to use the tty driver instead
+@@ -177,7 +177,7 @@
+ [ -d win32.build ] && rm -rf win32.build || true
+
+ icebreaker: $(SRC:.c=.o)
+- $(CC) $(CFLAGS) $^ -o icebreaker $(SDL_LIB)
++ $(CC) $(LDFLAGS) $^ -o icebreaker $(SDL_LIB)
+
+ man: icebreaker.6
+
+@@ -190,31 +190,25 @@
+ sed 's?\$$HIGHSCOREDIR?$(highscoredir)/?' > $@
+
+ install-mkdirs:
+- mkdir -p $(datadir)/icebreaker
+- mkdir -p $(bindir)
+- mkdir -p $(highscoredir)
+- mkdir -p $(mandir)/man6
++ mkdir -p ${DESTDIR}$(datadir)/icebreaker
++ mkdir -p ${DESTDIR}$(bindir)
++ mkdir -p ${DESTDIR}$(highscoredir)
++ mkdir -p ${DESTDIR}$(mandir)/man6
+
+ themes-install: install-themes
+
+ install-themes:
+- install -m 644 *.ibt $(datadir)/icebreaker
+- install -m 644 *.wav *.bmp $(datadir)/icebreaker
++ ${BSD_INSTALL_DATA} *.ibt ${DESTDIR}$(datadir)/icebreaker
++ ${BSD_INSTALL_DATA} *.wav *.bmp ${DESTDIR}$(datadir)/icebreaker
+
+ install-bin: icebreaker
+- install -s -g games -m 2755 icebreaker $(bindir) || \
+- install -s -m 755 icebreaker $(bindir)
+- @test -g $(bindir)/icebreaker || \
+- echo -e '*** Note: icebreaker binary not installed set-group-ID "games" -- shared\n*** highscores may be impossible. (Try installing as root.)'
++ ${BSD_INSTALL_PROGRAM} icebreaker ${DESTDIR}$(bindir)
+
+ install-man: icebreaker.6
+- install -m 644 icebreaker.6 $(mandir)/man6
++ ${BSD_INSTALL_MAN} icebreaker.6 ${DESTDIR}$(mandir)/man6
+
+ install-scorefile:
+- touch $(highscoredir)/icebreaker.scores
+- chown -f games:games $(highscoredir)/icebreaker.scores && \
+- chmod 664 $(highscoredir)/icebreaker.scores || \
+- chmod 644 $(highscoredir)/icebreaker.scores
++ touch ${DESTDIR}$(highscoredir)/icebreaker.scores.sample
+
+
+ install: all install-mkdirs install-themes install-bin install-man install-scorefile
diff --git a/games/icebreaker/files/pkg-message.in b/games/icebreaker/files/pkg-message.in
deleted file mode 100644
index 23d2c23763d4..000000000000
--- a/games/icebreaker/files/pkg-message.in
+++ /dev/null
@@ -1,11 +0,0 @@
-===============================================================================
-
-IceBreaker has been installed.
-
-When you have problems with usage, please reinstall IceBreaker
-
-cd /usr/ports/games/icebreaker && make deinstall clean reinstall
-
-Have fun!
-
-===============================================================================
diff --git a/games/icebreaker/pkg-plist b/games/icebreaker/pkg-plist
index 392bd7eedbad..c3c352df56f3 100644
--- a/games/icebreaker/pkg-plist
+++ b/games/icebreaker/pkg-plist
@@ -1,4 +1,4 @@
-bin/icebreaker
+@(,games,2555) bin/icebreaker
man/man6/icebreaker.6.gz
share/applications/icebreaker.desktop
%%DATADIR%%/atom.bmp
@@ -39,4 +39,4 @@ share/applications/icebreaker.desktop
%%DATADIR%%/turtles.ibt
%%DATADIR%%/woodblock.bmp
share/pixmaps/icebreaker.png
-@dirrm %%DATADIR%%
+@sample(,games,664) /var/games/icebreaker.scores.sample