- Use upstream versioning scheme

- Remove dead MASTER_SITE
- Add mirror
- Fix LICENSE
- Add LICENSE_FILE
- Move highscores to /var/games and fix highscore handling (setgid games)
- Don't install useless docfiles
- Install .desktop file
- Fix build with clang 4.0
- Unbreak data files which were corrupted by unrestricted USES=dos2unix

PR:		216642
Reported by:	jbeich
Approved by:	maintainer timeout (aaron@baugher.biz, 1 month)
This commit is contained in:
Dmitry Marakasov 2017-03-03 10:42:48 +00:00
parent 05b0005dbf
commit 2a25c28ca3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=435341
8 changed files with 55 additions and 29 deletions

View File

@ -2,31 +2,36 @@
# $FreeBSD$
PORTNAME= xlogical
PORTVERSION= 1.0p8
PORTREVISION= 10
DISTVERSION= 1.0-8
CATEGORIES= games
MASTER_SITES= http://changeling.ixionstudios.com/xlogical/downloads/ \
http://freebsd.portsreview.info/downloads/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/p/-/}
MASTER_SITES= https://changeling.ixionstudios.com/xlogical/downloads/ \
http://mirror.amdmi3.ru/distfiles/
MAINTAINER= aaron@baugher.biz
COMMENT= Remake of the classic puzzle game Logical
LICENSE= GPLv2
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSE
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir="${PREFIX}/var"
CONFIGURE_ARGS= --localstatedir="/var/games"
USES= autoreconf dos2unix gmake tar:bzip2
DOS2UNIX_FILES= *.h *.cpp
USE_SDL= sdl image mixer
DESKTOP_ENTRIES="XLogical" \
"" \
"" \
"${PORTNAME}" \
"Game;LogicGame;" \
""
OPTIONS_DEFINE= DOCS
post-extract:
@${CHMOD} 755 ${WRKSRC}/missing
@${RM} ${WRKSRC}/LICENSE
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/[A-Z][A-Z]* ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in AUTHORS ChangeLog NEWS README TODO
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>

View File

@ -1,6 +1,6 @@
--- Makefile.am.orig 2014-06-10 17:24:39.000000000 +0000
+++ Makefile.am
@@ -7,18 +7,15 @@ SCOREFILE = xlogical.scores
@@ -7,18 +7,12 @@ SCOREFILE = xlogical.scores
FILEOWNER = bin
FILEGROUP = games
install-exec-am: $(bin_PROGRAMS)
@ -19,11 +19,8 @@
- chmod 660 $(localstatedir)/xlogical/xlogical.scores
+ $(SHELL) ./mkinstalldirs $(DESTDIR)$(datadir)/xlogical
+ $(BSD_INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datadir)/xlogical
+ chmod 640 $(DESTDIR)$(datadir)/xlogical/xlogical.levels
+ chmod 644 $(DESTDIR)$(datadir)/xlogical/xlogical.properties
+ $(SHELL) ./mkinstalldirs $(DESTDIR)$(localstatedir)/xlogical
+ $(BSD_INSTALL_DATA) $(SCOREFILE) $(DESTDIR)$(localstatedir)/xlogical
+ chmod 660 $(DESTDIR)$(localstatedir)/xlogical/xlogical.scores
+ $(BSD_INSTALL_DATA) $(SCOREFILE) $(DESTDIR)$(localstatedir)/xlogical/$(SCOREFILE).sample
uninstall:
rm -f $(datadir)/xlogical/xlogical.levels
rm -f $(datadir)/xlogical/xlogical.properties

View File

@ -1,6 +1,6 @@
--- images/Makefile.am.orig 2014-06-10 19:57:22.000000000 +0000
+++ images/Makefile.am
@@ -3,10 +3,10 @@
@@ -3,10 +3,9 @@
SHELL=@SHELL@
install-data-am:
@ -11,7 +11,6 @@
+ $(SHELL) ./../mkinstalldirs $(DESTDIR)$(datadir)/xlogical
+ $(SHELL) ./../mkinstalldirs $(DESTDIR)$(datadir)/xlogical/images
+ $(BSD_INSTALL_DATA) *.bmp *.jpg $(DESTDIR)$(datadir)/xlogical/images
+ chmod 644 $(DESTDIR)$(datadir)/xlogical/images/*
uninstall:
rm -f $(datadir)/xlogical/images/*.{bmp,jpg}
rmdir $(datadir)/xlogical/images

View File

@ -1,6 +1,6 @@
--- music/Makefile.am.orig 2014-06-10 17:24:39.000000000 +0000
+++ music/Makefile.am
@@ -3,10 +3,10 @@
@@ -3,10 +3,9 @@
SHELL=@SHELL@
install-data-am:
@ -11,7 +11,6 @@
+ $(SHELL) ./../mkinstalldirs $(DESTDIR)$(datadir)/xlogical
+ $(SHELL) ./../mkinstalldirs $(DESTDIR)$(datadir)/xlogical/music
+ $(BSD_INSTALL_DATA) *.mod $(DESTDIR)$(datadir)/xlogical/music
+ chmod 644 $(DESTDIR)$(datadir)/xlogical/music/*.mod
uninstall:
rm -f $(datadir)/xlogical/music/*.mod
rmdir $(datadir)/xlogical/music

View File

@ -0,0 +1,28 @@
--- sdl_audio.cpp.orig 2001-07-31 20:54:55 UTC
+++ sdl_audio.cpp
@@ -27,6 +27,7 @@
#endif
#include <iostream>
+#include <cassert>
#include <stdlib.h>
#include <SDL.h>
@@ -58,13 +59,13 @@ get_music_info(
char *start, *end;
int len = strlen( aPath );
- for( end=aPath+len; end >= 0; end-=1 )
+ for( end=aPath+len; *end != '.'; end-=1 )
{
- if (*end == '.') break;
+ assert(end > aPath); // make sure we don't go past the string boundary
}
- for( start=end; start >= 0; start-=1 )
+ for( start=end; *start != *PATHSEP; start-=1 )
{
- if (*start == *PATHSEP) break;
+ assert(start > aPath); // make sure we don't go past the string boundary
}
char *buf = new char[len+1];
strncpy( buf, start+1, end-start-1 );

View File

@ -1,6 +1,6 @@
--- sound/Makefile.am.orig 2014-06-10 17:24:39.000000000 +0000
+++ sound/Makefile.am
@@ -3,10 +3,10 @@
@@ -3,10 +3,9 @@
SHELL=@SHELL@
install-data-am:
@ -11,7 +11,6 @@
+ $(SHELL) ./../mkinstalldirs $(DESTDIR)$(datadir)/xlogical
+ $(SHELL) ./../mkinstalldirs $(DESTDIR)$(datadir)/xlogical/sound
+ $(BSD_INSTALL_DATA) *.wav $(DESTDIR)$(datadir)/xlogical/sound
+ chmod 644 $(DESTDIR)$(datadir)/xlogical/sound/*.wav
uninstall:
rm -f $(datadir)/xlogical/sound/*.wav
rmdir $(datadir)/xlogical/sound

View File

@ -1,5 +1,4 @@
XLogical is an action/puzzle game based on the classic
game Logical from Rainbow Arts.
WWW: http://changeling.ixionstudios.com/xlogical/

View File

@ -1,4 +1,4 @@
bin/xlogical
@(,games,2555) bin/xlogical
%%DATADIR%%/sound/block_ball.wav
%%DATADIR%%/sound/teleport.wav
%%DATADIR%%/sound/spinner_click.wav
@ -153,9 +153,9 @@ bin/xlogical
%%DATADIR%%/xlogical.properties
%%DATADIR%%/xlogical.levels
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TODO
var/xlogical/xlogical.scores
@sample(,games,664) /var/games/xlogical/xlogical.scores.sample
@dir(,games,775) /var/games/xlogical