aboutsummaryrefslogtreecommitdiff
path: root/games/criticalmass
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2014-08-22 16:45:38 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2014-08-22 16:45:38 +0000
commitcc32519043bb628974d82d8db6bac61555a72e86 (patch)
treef0090d6886173f713b1e3a7713c316a09d8e1310 /games/criticalmass
parent871d2355f2eaab0534d09d2f4989300dd06277df (diff)
downloadports-cc32519043bb628974d82d8db6bac61555a72e86.tar.gz
ports-cc32519043bb628974d82d8db6bac61555a72e86.zip
- Update to 1.0.2
- Add LICENSE - Stagify PR: 192795 Submitted by: tkato432@yahoo.com
Notes
Notes: svn path=/head/; revision=365675
Diffstat (limited to 'games/criticalmass')
-rw-r--r--games/criticalmass/Makefile49
-rw-r--r--games/criticalmass/distinfo4
-rw-r--r--games/criticalmass/files/patch-tinyxml__tinyxml.cpp21
-rw-r--r--games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp12
-rw-r--r--games/criticalmass/files/patch-utils_WalkDirectory.hpp10
-rw-r--r--games/criticalmass/files/patch-utils__ResourceManager.cpp10
-rw-r--r--games/criticalmass/files/patch-utils__Value.hpp23
-rw-r--r--games/criticalmass/files/patch-utils__zStream.cpp11
-rw-r--r--games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp11
-rw-r--r--games/criticalmass/files/patch-utilsgl_gl++.hpp10
-rw-r--r--games/criticalmass/files/patch-utilssdl_PNG.cpp19
-rw-r--r--games/criticalmass/pkg-descr2
12 files changed, 133 insertions, 49 deletions
diff --git a/games/criticalmass/Makefile b/games/criticalmass/Makefile
index 1dbe3de95f6a..a3f157b410e8 100644
--- a/games/criticalmass/Makefile
+++ b/games/criticalmass/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= criticalmass
-PORTVERSION= 1.0.0
-PORTREVISION= 11
+PORTVERSION= 1.0.2
PORTEPOCH= 1
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/Critical%20Mass/${PORTVERSION}
@@ -12,36 +11,52 @@ DISTNAME= CriticalMass-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= SDL/OpenGL space shoot'em up game
-LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png
+LICENSE= GPLv2 # (or later)
+LICENSE_FILE= ${WRKSRC}/COPYING
-CONFLICTS= shaaft-[0-9]*
+LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
+ libpng15.so:${PORTSDIR}/graphics/png
-USES= tar:bzip2
-USE_SDL= image mixer sdl
-USE_GL= gl
+USES= dos2unix tar:bzip2
+DOS2UNIX_FILES= tinyxml/*.cpp tinyxml/*.h
USE_XORG= x11
+USE_GL= gl
+USE_SDL= image mixer sdl
+USE_GCC= any
GNU_CONFIGURE= yes
-CFLAGS= -I${LOCALBASE}/include/libpng15
CONFIGURE_ARGS= --disable-optimize
-MAN6= critter.6
+CPPFLAGS+= $$(libpng-config --I_opts) $$(curl-config --cflags) \
+ -I${LOCALBASE}/include
+LDFLAGS+= $$(libpng-config --L_opts) $$(curl-config --libs) \
+ -L${LOCALBASE}/lib
+
+CONFLICTS= shaaft-[0-9]*
+
PLIST_FILES= bin/Packer \
bin/critter \
+ man/man6/critter.6.gz \
share/Critical_Mass/lg-criti.xm \
share/Critical_Mass/resource.dat
PLIST_DIRS= share/Critical_Mass
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+DESKTOP_ENTRIES="CriticallMass" "" "" "critter" "" ""
post-patch:
@${GREP} -lR "SDL/SDL" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|SDL/SDL|SDL|g'
- @${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG:T}|g ; \
- s|^CXXFLAGS|#CXXFLAGS|g ; \
- s|/usr/X11R6|${LOCALBASE}|g ; \
- s|-lSDL | |g ; \
- s|-lpng12|-lpng|g' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e \
+ 's| curl|| ; \
+ s|^CXXFLAGS|#CXXFLAGS| ; \
+ s|-lSDL | | ; \
+ s|sdl-config|${SDL_CONFIG:T}| ; \
+ s|-L/usr/local/lib -L/usr/X11R6/lib|| ; \
+ s|-I/usr/X11R6/include|| ; \
+ s|-lpng12|-lpng|' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e \
+ '/^SUBDIRS/s| curl||' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e \
+ 's|../curl/lib/libcurl.a||' ${WRKSRC}/game/Makefile.in
@${REINPLACE_CMD} -e 's|and def|\&\& def|g' ${WRKSRC}/utils/OSName.hpp
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/criticalmass/distinfo b/games/criticalmass/distinfo
index 869b3676b0cb..ffdbc545d5dc 100644
--- a/games/criticalmass/distinfo
+++ b/games/criticalmass/distinfo
@@ -1,2 +1,2 @@
-SHA256 (CriticalMass-1.0.0.tar.bz2) = 94cedac39f9279faa63f6ce4098f2a778a8c8f9013ba8dd7d5b85766739e0858
-SIZE (CriticalMass-1.0.0.tar.bz2) = 5092549
+SHA256 (CriticalMass-1.0.2.tar.bz2) = 846db2d30d39e559612328594084a7aef980169948b2cfaee9fddec8ffdef724
+SIZE (CriticalMass-1.0.2.tar.bz2) = 5122126
diff --git a/games/criticalmass/files/patch-tinyxml__tinyxml.cpp b/games/criticalmass/files/patch-tinyxml__tinyxml.cpp
new file mode 100644
index 000000000000..312d6850fa36
--- /dev/null
+++ b/games/criticalmass/files/patch-tinyxml__tinyxml.cpp
@@ -0,0 +1,21 @@
+--- tinyxml/tinyxml.cpp.orig
++++ tinyxml/tinyxml.cpp
+@@ -22,6 +22,9 @@
+ */
+
+ #include "tinyxml.h"
++#include <cstdlib>
++#include <cstring>
++#include <climits>
+
+
+ TiXmlNode::TiXmlNode( NodeType _type )
+@@ -377,7 +380,7 @@
+ {
+ const std::string* s = Attribute( name );
+ if ( s )
+- *i = atoi( s->c_str() );
++ *i = ( int )strtol( s->c_str(), ( char ** )NULL, 10 );
+ else
+ *i = 0;
+ return s;
diff --git a/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp b/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp
new file mode 100644
index 000000000000..754eadf80081
--- /dev/null
+++ b/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp
@@ -0,0 +1,12 @@
+--- tinyxml/tinyxmlparser.cpp.orig
++++ tinyxml/tinyxmlparser.cpp
+@@ -23,7 +23,8 @@
+
+
+ #include "tinyxml.h"
+-#include <ctype.h>
++#include <cctype>
++#include <cstring>
+
+ const char* TiXmlBase::SkipWhiteSpace( const char* p )
+ {
diff --git a/games/criticalmass/files/patch-utils_WalkDirectory.hpp b/games/criticalmass/files/patch-utils_WalkDirectory.hpp
deleted file mode 100644
index 679cdfa0f098..000000000000
--- a/games/criticalmass/files/patch-utils_WalkDirectory.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- utils/WalkDirectory.hpp.orig Sun Dec 19 15:18:06 2004
-+++ utils/WalkDirectory.hpp Sun Mar 6 08:49:51 2005
-@@ -16,6 +16,7 @@
- #define _WalkDirectory_hpp_
-
- #include <iostream>
-+#include <string>
- using namespace std;
-
- #ifdef VCPP
diff --git a/games/criticalmass/files/patch-utils__ResourceManager.cpp b/games/criticalmass/files/patch-utils__ResourceManager.cpp
new file mode 100644
index 000000000000..9d5978bed999
--- /dev/null
+++ b/games/criticalmass/files/patch-utils__ResourceManager.cpp
@@ -0,0 +1,10 @@
+--- utils/ResourceManager.cpp.orig
++++ utils/ResourceManager.cpp
+@@ -12,6 +12,7 @@
+ // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
+ //
++#include <cstring>
+ #include <iomanip>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/games/criticalmass/files/patch-utils__Value.hpp b/games/criticalmass/files/patch-utils__Value.hpp
new file mode 100644
index 000000000000..0066c6bffaaa
--- /dev/null
+++ b/games/criticalmass/files/patch-utils__Value.hpp
@@ -0,0 +1,23 @@
+--- utils/Value.hpp.orig
++++ utils/Value.hpp
+@@ -15,7 +15,8 @@
+ #ifndef _Value_hpp_
+ #define _Value_hpp_
+
+-#include <stdio.h>
++#include <cstdio>
++#include <cstdlib>
+ #include <string>
+
+ #include <Trace.hpp>
+@@ -38,8 +39,8 @@
+ Value( string s):
+ _valType(String),
+ _valString(s),
+- _valInt( atoi(s.c_str())),
+- _valFloat( (float)atof( s.c_str())),
++ _valInt( (int)strtol( s.c_str(), (char **)NULL, 10)),
++ _valFloat( (float)strtod( s.c_str(), (char **)NULL)),
+ _valBool( stringToBool(s))
+ {
+ XTRACE();
diff --git a/games/criticalmass/files/patch-utils__zStream.cpp b/games/criticalmass/files/patch-utils__zStream.cpp
new file mode 100644
index 000000000000..41eda1453c5a
--- /dev/null
+++ b/games/criticalmass/files/patch-utils__zStream.cpp
@@ -0,0 +1,11 @@
+--- utils/zStream.cpp.orig
++++ utils/zStream.cpp
+@@ -12,6 +12,8 @@
+ // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
+ //
++#include <cstdlib>
++
+ #include <Trace.hpp>
+ #include <Endian.hpp>
+ #include <zStream.hpp>
diff --git a/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp b/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp
new file mode 100644
index 000000000000..4e6af8d88eb1
--- /dev/null
+++ b/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp
@@ -0,0 +1,11 @@
+--- utils/zStreamBufferImplZLib.cpp.orig
++++ utils/zStreamBufferImplZLib.cpp
+@@ -12,6 +12,8 @@
+ // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
+ //
++#include <cstdlib>
++
+ #include <Trace.hpp>
+ #include <zStreamBufferImplZLib.hpp>
+
diff --git a/games/criticalmass/files/patch-utilsgl_gl++.hpp b/games/criticalmass/files/patch-utilsgl_gl++.hpp
deleted file mode 100644
index 3a4c4d17829f..000000000000
--- a/games/criticalmass/files/patch-utilsgl_gl++.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- utilsgl/gl++.hpp.orig Sat Dec 18 11:41:34 2004
-+++ utilsgl/gl++.hpp Tue Mar 22 14:24:11 2005
-@@ -23,6 +23,7 @@
- #endif
-
- #include <GL/gl.h>
-+#include <GL/glext.h>
-
- #ifndef GLintptrARB
- # if defined(_WIN64)
diff --git a/games/criticalmass/files/patch-utilssdl_PNG.cpp b/games/criticalmass/files/patch-utilssdl_PNG.cpp
index 60965df5faf4..b98197f86e95 100644
--- a/games/criticalmass/files/patch-utilssdl_PNG.cpp
+++ b/games/criticalmass/files/patch-utilssdl_PNG.cpp
@@ -1,19 +1,20 @@
--- utilssdl/PNG.cpp.orig 2004-12-18 03:41:42.000000000 +0100
+++ utilssdl/PNG.cpp 2012-05-08 07:00:15.000000000 +0200
-@@ -13,6 +13,7 @@
- // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
- //
- #include <PNG.hpp>
-+#include "pngpriv.h"
+@@ -45,7 +45,7 @@
+ {
+ png_size_t check;
- //Save SDL surface as png
- bool PNG::Save( SDL_Surface *img, const string &filename)
-@@ -72,7 +73,7 @@
+- check = fwrite( data, 1, length, (FILE *)(png->io_ptr));
++ check = fwrite( data, 1, length, (FILE *)(png_get_io_ptr(png)));
+ if( check != length)
+ {
+ png_error( png, "Write Error");
+@@ -72,7 +72,7 @@
return false;
}
- if( setjmp(_png->jmpbuf))
-+ if( setjmp(_png->longjmp_buffer))
++ if( setjmp(png_jmpbuf(_png)))
{
fclose( fp);
png_destroy_write_struct(&_png, (png_infopp)NULL);
diff --git a/games/criticalmass/pkg-descr b/games/criticalmass/pkg-descr
index 9dfed9e14f01..0501a06a3a70 100644
--- a/games/criticalmass/pkg-descr
+++ b/games/criticalmass/pkg-descr
@@ -1,3 +1,3 @@
An SDL/OpenGL space shoot'em up game
-WWW: http://criticalmass.sourceforge.net/
+WWW: http://criticalmass.sourceforge.net/