1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

- Update to 1.0.2

- Add LICENSE
- Stagify

PR:		192795
Submitted by:	tkato432@yahoo.com
This commit is contained in:
Dmitry Marakasov 2014-08-22 16:45:38 +00:00
parent 871d2355f2
commit cc32519043
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=365675
12 changed files with 136 additions and 52 deletions

View File

@ -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
LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
libpng15.so:${PORTSDIR}/graphics/png
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
CONFIGURE_ARGS= --disable-optimize
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]*
USES= tar:bzip2
USE_SDL= image mixer sdl
USE_GL= gl
USE_XORG= x11
GNU_CONFIGURE= yes
CFLAGS= -I${LOCALBASE}/include/libpng15
CONFIGURE_ARGS= --disable-optimize
MAN6= critter.6
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>

View File

@ -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

View File

@ -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;

View File

@ -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 )
{

View File

@ -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

View File

@ -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>

View File

@ -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();

View File

@ -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>

View File

@ -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>

View File

@ -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)

View File

@ -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);

View File

@ -1,3 +1,3 @@
An SDL/OpenGL space shoot'em up game
WWW: http://criticalmass.sourceforge.net/
WWW: http://criticalmass.sourceforge.net/