aboutsummaryrefslogtreecommitdiff
path: root/games/viruskiller
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2014-02-27 09:24:15 +0000
committerMartin Wilke <miwi@FreeBSD.org>2014-02-27 09:24:15 +0000
commitf6daf54c013cbfa34e7e2852979444b410d46db6 (patch)
treee70bacc5913dd2038305fff82da6e72d56c0aada /games/viruskiller
parent8369f3b7e6e3499744faf11b3231697e09e60dd4 (diff)
downloadports-f6daf54c013cbfa34e7e2852979444b410d46db6.tar.gz
ports-f6daf54c013cbfa34e7e2852979444b410d46db6.zip
- Fix build
- Fix pathname in desktop entry file PR: 187055
Notes
Notes: svn path=/head/; revision=346300
Diffstat (limited to 'games/viruskiller')
-rw-r--r--games/viruskiller/Makefile49
-rw-r--r--games/viruskiller/files/patch-src__pak.cpp27
-rw-r--r--games/viruskiller/pkg-descr14
-rw-r--r--games/viruskiller/pkg-plist15
4 files changed, 56 insertions, 49 deletions
diff --git a/games/viruskiller/Makefile b/games/viruskiller/Makefile
index bc1521d24b86..f8cc47691a92 100644
--- a/games/viruskiller/Makefile
+++ b/games/viruskiller/Makefile
@@ -3,7 +3,7 @@
PORTNAME= viruskiller
PORTVERSION= 1.03
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= games
MASTER_SITES= FRUGALWARE/games-extra/${PORTNAME}
DISTNAME= ${PORTNAME}-${PORTVERSION}-1
@@ -13,40 +13,29 @@ COMMENT= Arcade game that relies on quick reflexes
LICENSE= GPLv2
-OPTIONS_DEFINE= DOCS
-
-USE_SDL= mixer image ttf net
-USES= gmake
-
-BROKEN= Does not build
-DEPRECATED= Broken for more then 6 month
-EXPIRATION_DATE= 2014-02-27
-
-INSTALLS_ICONS= yes
-
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USES= gmake
+USE_SDL= mixer image ttf net
MAKEFILE= makefile
+INSTALLS_ICONS= yes
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
-.if ${ARCH} == "amd64"
-BROKEN= Does not build with new libz
-.endif
+OPTIONS_DEFINE= DOCS
post-patch:
- # Remove non-free restricted files:
- ${RM} -f ${WRKSRC}/music/* ${WRKSRC}/sound/*
-
-.if ${PORT_OPTIONS:MDOCS}
- @${REINPLACE_CMD} -e "s|^.*install.*DOCS.*||g" \
- -e "s|^.*mkdir.*DOCDIR.*||g" \
- ${WRKSRC}/makefile
-.endif
- @${REINPLACE_CMD} -e "s|^PREFIX.*|PREFIX=${PREFIX}|g" \
- -e "s|^BINDIR.*|BINDIR=${PREFIX}/bin/|g" \
- -e "s|^DATADIR.*|DATADIR=${DATADIR}/|g" \
- -e "s|^DOCDIR.*|DOCDIR=${DOCSDIR}|g" ${WRKSRC}/makefile
+ @${REINPLACE_CMD} -e \
+ '/^DOCS/s|=.*|= doc/README doc/*.*| ; \
+ /^PREFIX/s|=.*|= ${PREFIX}| ; \
+ /^BINDIR/s|=.*|= $$(DESTDIR)$$(PREFIX)/bin/| ; \
+ /^DATADIR/s|=.*|= $$(DESTDIR)$$(PREFIX)/${DATADIR_REL}/| ; \
+ /^DOCDIR/s|=.*|= $$(DESTDIR)$$(PREFIX)/${DOCSDIR_REL}/| ; \
+ /^ICONDIR/s|=.*|= $$(DESTDIR)$$(PREFIX)/share/icons/hicolor/| ; \
+ /^DESKTOPDIR/s|=.*|= $$(DESTDIR)$$(PREFIX)/share/applications/| ; \
+ s|install .* 755|$${BSD_INSTALL_PROGRAM}| ; \
+ s|install .* 644|$${BSD_INSTALL_DATA}| ; \
+ /ICONS/s|cp|$${BSD_INSTALL_DATA}|' ${WRKSRC}/makefile
+ @${REINPLACE_CMD} -e \
+ 's|.png|| ; \
+ s|/usr/games/||' ${WRKSRC}/icons/viruskiller.desktop
.include <bsd.port.mk>
diff --git a/games/viruskiller/files/patch-src__pak.cpp b/games/viruskiller/files/patch-src__pak.cpp
new file mode 100644
index 000000000000..2e2457ebc384
--- /dev/null
+++ b/games/viruskiller/files/patch-src__pak.cpp
@@ -0,0 +1,27 @@
+--- src/pak.cpp.orig
++++ src/pak.cpp
+@@ -124,7 +124,7 @@
+ {
+ printf("Couldn't open %s for reading!\n", filename);
+ closedir(dirp);
+- gzclose(pak);
++ gzclose((gzFile)pak);
+ exit(1);
+ }
+
+@@ -156,13 +156,13 @@
+ {
+ printf("Couldn't open %s for reading!\n", filename);
+ closedir(dirp);
+- gzclose(pak);
++ gzclose((gzFile)pak);
+ exit(1);
+ }
+ else
+ {
+ fSize = gzread(fp, buffer, filesize);
+- gzclose(fp);
++ gzclose((gzFile)fp);
+
+ cSize = (uLongf)((fSize * 1.01) + 12);
+ compress2(output, &cSize, buffer, fSize, 9);
diff --git a/games/viruskiller/pkg-descr b/games/viruskiller/pkg-descr
index 17a7fb242d21..954a243d52f2 100644
--- a/games/viruskiller/pkg-descr
+++ b/games/viruskiller/pkg-descr
@@ -1,9 +1,9 @@
-Your computer has been invaded! Dozens of little viruses are pouring in via
-security holes in Microsoft Internet Explorer, Microsoft Outlook, Microsoft MSN
-Messenger and Microsoft Recycle Bin!! Using your trusty mouse you must shoot the
-buggers before they can destroy your files! Some will steal them from their home
-directories and take them back to their security hole. Others will just eat them
-right there on the spot! See how long you and your computer can survive the
-onslaught!
+Your computer has been invaded! Dozens of little viruses are pouring in
+via security holes in Microsoft Internet Explorer, Microsoft Outlook,
+Microsoft MSN Messenger and Microsoft Recycle Bin!! Using your trusty
+mouse you must shoot the buggers before they can destroy your files!
+Some will steal them from their home directories and take them back to
+their security hole. Others will just eat them right there on the spot!
+See how long you and your computer can survive the onslaught!
WWW: http://www.parallelrealities.co.uk/projects/virusKiller.php
diff --git a/games/viruskiller/pkg-plist b/games/viruskiller/pkg-plist
index 0cd3c3a7b9de..05e7a7cbaec9 100644
--- a/games/viruskiller/pkg-plist
+++ b/games/viruskiller/pkg-plist
@@ -1,6 +1,5 @@
bin/viruskiller
-%%DATADIR%%/viruskiller.pak
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+share/applications/viruskiller.desktop
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/battery.png
%%PORTDOCS%%%%DOCSDIR%%/bomb.png
@@ -13,14 +12,6 @@ bin/viruskiller
share/icons/hicolor/16x16/apps/viruskiller.png
share/icons/hicolor/32x32/apps/viruskiller.png
share/icons/hicolor/64x64/apps/viruskiller.png
-share/applications/viruskiller.desktop
+%%DATADIR%%/viruskiller.pak
+@dirrm %%DATADIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrmtry %%DATADIR%%
-@dirrmtry share/icons/hicolor/64x64/apps
-@dirrmtry share/icons/hicolor/64x64
-@dirrmtry share/icons/hicolor/32x32/apps
-@dirrmtry share/icons/hicolor/32x32
-@dirrmtry share/icons/hicolor/16x16/apps
-@dirrmtry share/icons/hicolor/16x16
-@dirrmtry share/icons/hicolor
-@dirrmtry share/icons