View | Details | Raw Unified | Return to bug 192795
Collapse All | Expand All

(-)games/criticalmass/Makefile (-17 / +31 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/games/criticalmass/Makefile 363399 2014-07-29 21:43:17Z adamw $
2
# $FreeBSD: head/games/criticalmass/Makefile 363399 2014-07-29 21:43:17Z adamw $
3
3
4
PORTNAME=	criticalmass
4
PORTNAME=	criticalmass
5
PORTVERSION=	1.0.0
5
PORTVERSION=	1.0.2
6
PORTREVISION=	11
7
PORTEPOCH=	1
6
PORTEPOCH=	1
8
CATEGORIES=	games
7
CATEGORIES=	games
9
MASTER_SITES=	SF/${PORTNAME}/Critical%20Mass/${PORTVERSION}
8
MASTER_SITES=	SF/${PORTNAME}/Critical%20Mass/${PORTVERSION}
Lines 12-47 Link Here
12
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	ports@FreeBSD.org
13
COMMENT=	SDL/OpenGL space shoot'em up game
12
COMMENT=	SDL/OpenGL space shoot'em up game
14
13
15
LIB_DEPENDS=	libpng15.so:${PORTSDIR}/graphics/png
14
LICENSE=	GPLv2 # (or later)
16
15
17
CONFLICTS=	shaaft-[0-9]*
16
LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
17
		libpng15.so:${PORTSDIR}/graphics/png
18
18
19
USES=	tar:bzip2
19
USES=		dos2unix tar:bzip2
20
USE_SDL=	image mixer sdl
20
DOS2UNIX_FILES=	tinyxml/*.cpp tinyxml/*.h
21
USE_GL=		gl
22
USE_XORG=	x11
21
USE_XORG=	x11
22
USE_GL=		gl
23
USE_SDL=	image mixer sdl
24
USE_GCC=	any
23
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
24
CFLAGS=		-I${LOCALBASE}/include/libpng15
25
CONFIGURE_ARGS=	--disable-optimize
26
CONFIGURE_ARGS=	--disable-optimize
26
27
27
MAN6=		critter.6
28
CPPFLAGS+=	$$(libpng-config --I_opts) $$(curl-config --cflags) \
29
		-I${LOCALBASE}/include
30
LDFLAGS+=	$$(libpng-config --L_opts) $$(curl-config --libs) \
31
		-L${LOCALBASE}/lib
32
33
CONFLICTS=	shaaft-[0-9]*
34
28
PLIST_FILES=	bin/Packer \
35
PLIST_FILES=	bin/Packer \
29
		bin/critter \
36
		bin/critter \
37
		man/man6/critter.6.gz \
30
		share/Critical_Mass/lg-criti.xm \
38
		share/Critical_Mass/lg-criti.xm \
31
		share/Critical_Mass/resource.dat
39
		share/Critical_Mass/resource.dat
32
PLIST_DIRS=	share/Critical_Mass
40
PLIST_DIRS=	share/Critical_Mass
33
41
34
NO_STAGE=	yes
42
DESKTOP_ENTRIES="CriticallMass" "" "" "critter" "" ""
35
.include <bsd.port.pre.mk>
36
43
37
post-patch:
44
post-patch:
38
	@${GREP} -lR "SDL/SDL" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
45
	@${GREP} -lR "SDL/SDL" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
39
		's|SDL/SDL|SDL|g'
46
		's|SDL/SDL|SDL|g'
40
	@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG:T}|g ; \
47
	@${REINPLACE_CMD} -e \
41
		 s|^CXXFLAGS|#CXXFLAGS|g ; \
48
		's| curl|| ; \
42
		 s|/usr/X11R6|${LOCALBASE}|g ; \
49
		 s|^CXXFLAGS|#CXXFLAGS| ; \
43
		 s|-lSDL | |g ; \
50
		 s|-lSDL | | ; \
44
		 s|-lpng12|-lpng|g' ${WRKSRC}/configure
51
		 s|sdl-config|${SDL_CONFIG:T}| ; \
52
		 s|-L/usr/local/lib -L/usr/X11R6/lib|| ; \
53
		 s|-I/usr/X11R6/include|| ; \
54
		 s|-lpng12|-lpng|' ${WRKSRC}/configure
55
	@${REINPLACE_CMD} -e \
56
		'/^SUBDIRS/s| curl||' ${WRKSRC}/Makefile.in
57
	@${REINPLACE_CMD} -e \
58
		's|../curl/lib/libcurl.a||' ${WRKSRC}/game/Makefile.in
45
	@${REINPLACE_CMD} -e 's|and def|\&\& def|g' ${WRKSRC}/utils/OSName.hpp
59
	@${REINPLACE_CMD} -e 's|and def|\&\& def|g' ${WRKSRC}/utils/OSName.hpp
46
60
47
.include <bsd.port.post.mk>
61
.include <bsd.port.mk>
(-)games/criticalmass/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (CriticalMass-1.0.0.tar.bz2) = 94cedac39f9279faa63f6ce4098f2a778a8c8f9013ba8dd7d5b85766739e0858
1
SHA256 (CriticalMass-1.0.2.tar.bz2) = 846db2d30d39e559612328594084a7aef980169948b2cfaee9fddec8ffdef724
2
SIZE (CriticalMass-1.0.0.tar.bz2) = 5092549
2
SIZE (CriticalMass-1.0.2.tar.bz2) = 5122126
(-)games/criticalmass/files/patch-tinyxml__tinyxml.cpp (+21 lines)
Line 0 Link Here
1
--- tinyxml/tinyxml.cpp.orig
2
+++ tinyxml/tinyxml.cpp
3
@@ -22,6 +22,9 @@
4
 */
5
 
6
 #include "tinyxml.h"
7
+#include <cstdlib>
8
+#include <cstring>
9
+#include <climits>
10
 
11
 
12
 TiXmlNode::TiXmlNode( NodeType _type )
13
@@ -377,7 +380,7 @@
14
 {
15
 	const std::string* s = Attribute( name );
16
 	if ( s )
17
-		*i = atoi( s->c_str() );
18
+		*i = ( int )strtol( s->c_str(), ( char ** )NULL, 10 );
19
 	else
20
 		*i = 0;
21
 	return s;
(-)games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp (+12 lines)
Line 0 Link Here
1
--- tinyxml/tinyxmlparser.cpp.orig
2
+++ tinyxml/tinyxmlparser.cpp
3
@@ -23,7 +23,8 @@
4
 
5
 
6
 #include "tinyxml.h"
7
-#include <ctype.h>
8
+#include <cctype>
9
+#include <cstring>
10
 
11
 const char* TiXmlBase::SkipWhiteSpace( const char* p )
12
 {
(-)games/criticalmass/files/patch-utils_WalkDirectory.hpp (-10 lines)
Lines 1-10 Link Here
1
--- utils/WalkDirectory.hpp.orig	Sun Dec 19 15:18:06 2004
2
+++ utils/WalkDirectory.hpp	Sun Mar  6 08:49:51 2005
3
@@ -16,6 +16,7 @@
4
 #define _WalkDirectory_hpp_
5
 
6
 #include <iostream>
7
+#include <string>
8
 using namespace std;
9
 
10
 #ifdef VCPP
(-)games/criticalmass/files/patch-utils__ResourceManager.cpp (+10 lines)
Line 0 Link Here
1
--- utils/ResourceManager.cpp.orig
2
+++ utils/ResourceManager.cpp
3
@@ -12,6 +12,7 @@
4
 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5
 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
6
 //
7
+#include <cstring>
8
 #include <iomanip>
9
 #include <sys/types.h>
10
 #include <sys/stat.h>
(-)games/criticalmass/files/patch-utils__Value.hpp (+23 lines)
Line 0 Link Here
1
--- utils/Value.hpp.orig
2
+++ utils/Value.hpp
3
@@ -15,7 +15,8 @@
4
 #ifndef _Value_hpp_
5
 #define _Value_hpp_
6
 
7
-#include <stdio.h>
8
+#include <cstdio>
9
+#include <cstdlib>
10
 #include <string>
11
 
12
 #include <Trace.hpp>
13
@@ -38,8 +39,8 @@
14
     Value( string s):
15
       _valType(String), 
16
       _valString(s),
17
-      _valInt( atoi(s.c_str())),
18
-      _valFloat( (float)atof( s.c_str())),
19
+      _valInt( (int)strtol( s.c_str(), (char **)NULL, 10)),
20
+      _valFloat( (float)strtod( s.c_str(), (char **)NULL)),
21
       _valBool( stringToBool(s))
22
     { 
23
         XTRACE();
(-)games/criticalmass/files/patch-utils__zStream.cpp (+11 lines)
Line 0 Link Here
1
--- utils/zStream.cpp.orig
2
+++ utils/zStream.cpp
3
@@ -12,6 +12,8 @@
4
 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5
 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
6
 //
7
+#include <cstdlib>
8
+
9
 #include <Trace.hpp>
10
 #include <Endian.hpp>
11
 #include <zStream.hpp>
(-)games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp (+11 lines)
Line 0 Link Here
1
--- utils/zStreamBufferImplZLib.cpp.orig
2
+++ utils/zStreamBufferImplZLib.cpp
3
@@ -12,6 +12,8 @@
4
 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5
 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
6
 //
7
+#include <cstdlib>
8
+
9
 #include <Trace.hpp>
10
 #include <zStreamBufferImplZLib.hpp>
11
 
(-)games/criticalmass/files/patch-utilsgl_gl++.hpp (-10 lines)
Lines 1-10 Link Here
1
--- utilsgl/gl++.hpp.orig	Sat Dec 18 11:41:34 2004
2
+++ utilsgl/gl++.hpp	Tue Mar 22 14:24:11 2005
3
@@ -23,6 +23,7 @@
4
 #endif
5
 
6
 #include <GL/gl.h>
7
+#include <GL/glext.h>
8
 
9
 #ifndef GLintptrARB
10
 # if defined(_WIN64)
(-)games/criticalmass/files/patch-utilssdl_PNG.cpp (-9 / +10 lines)
Lines 1-19 Link Here
1
--- utilssdl/PNG.cpp.orig	2004-12-18 03:41:42.000000000 +0100
1
--- utilssdl/PNG.cpp.orig	2004-12-18 03:41:42.000000000 +0100
2
+++ utilssdl/PNG.cpp	2012-05-08 07:00:15.000000000 +0200
2
+++ utilssdl/PNG.cpp	2012-05-08 07:00:15.000000000 +0200
3
@@ -13,6 +13,7 @@
3
@@ -45,7 +45,7 @@
4
 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
4
 {
5
 //
5
     png_size_t check;
6
 #include <PNG.hpp>
7
+#include "pngpriv.h"
8
 
6
 
9
 //Save SDL surface as png
7
-    check = fwrite( data, 1, length, (FILE *)(png->io_ptr));
10
 bool PNG::Save( SDL_Surface *img, const string &filename)
8
+    check = fwrite( data, 1, length, (FILE *)(png_get_io_ptr(png)));
11
@@ -72,7 +73,7 @@
9
     if( check != length)
10
     {
11
 	png_error( png, "Write Error");
12
@@ -72,7 +72,7 @@
12
 	return false;
13
 	return false;
13
     }
14
     }
14
 
15
 
15
-    if( setjmp(_png->jmpbuf))
16
-    if( setjmp(_png->jmpbuf))
16
+    if( setjmp(_png->longjmp_buffer))
17
+    if( setjmp(png_jmpbuf(_png)))
17
     {
18
     {
18
 	fclose( fp);
19
 	fclose( fp);
19
 	png_destroy_write_struct(&_png, (png_infopp)NULL);
20
 	png_destroy_write_struct(&_png, (png_infopp)NULL);
(-)games/criticalmass/pkg-descr (-1 / +1 lines)
Lines 1-3 Link Here
1
An SDL/OpenGL space shoot'em up game
1
An SDL/OpenGL space shoot'em up game
2
2
3
WWW:	http://criticalmass.sourceforge.net/
3
WWW: http://criticalmass.sourceforge.net/

Return to bug 192795