svn commit: r373626 - in branches/2014Q4/games/icebreaker: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Sat Nov 29 15:15:57 UTC 2014
Author: amdmi3
Date: Sat Nov 29 15:15:55 2014
New Revision: 373626
URL: https://svnweb.freebsd.org/changeset/ports/373626
QAT: https://qat.redports.org/buildarchive/r373626/
Log:
MFH: r373594
- Fix binary referencing STAGEDIR
- Clarify LICENSE
- Add LICENSE_FILE
- Remove useless pkg-message
- Change huge REINPLACE to more maintainable patch
- Use BSD_INSTALL_* for correct perms and stripping
- Use @sample for highscore and set binary permissions in plist
- Drop @dirrm* from plist
Approved by: ports-secteam (rea)
Added:
branches/2014Q4/games/icebreaker/files/patch-Makefile
- copied unchanged from r373594, head/games/icebreaker/files/patch-Makefile
Deleted:
branches/2014Q4/games/icebreaker/files/pkg-message.in
Modified:
branches/2014Q4/games/icebreaker/Makefile
branches/2014Q4/games/icebreaker/pkg-plist
Directory Properties:
branches/2014Q4/ (props changed)
Modified: branches/2014Q4/games/icebreaker/Makefile
==============================================================================
--- branches/2014Q4/games/icebreaker/Makefile Sat Nov 29 15:14:43 2014 (r373625)
+++ branches/2014Q4/games/icebreaker/Makefile Sat Nov 29 15:15:55 2014 (r373626)
@@ -14,7 +14,8 @@ EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}
MAINTAINER= games at 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 RE
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>
Copied: branches/2014Q4/games/icebreaker/files/patch-Makefile (from r373594, head/games/icebreaker/files/patch-Makefile)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2014Q4/games/icebreaker/files/patch-Makefile Sat Nov 29 15:15:55 2014 (r373626, copy of r373594, head/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
Modified: branches/2014Q4/games/icebreaker/pkg-plist
==============================================================================
--- branches/2014Q4/games/icebreaker/pkg-plist Sat Nov 29 15:14:43 2014 (r373625)
+++ branches/2014Q4/games/icebreaker/pkg-plist Sat Nov 29 15:15:55 2014 (r373626)
@@ -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
- at dirrm %%DATADIR%%
+ at sample(,games,664) /var/games/icebreaker.scores.sample
More information about the svn-ports-all
mailing list