Index: head/games/criticalmass/Makefile =================================================================== --- head/games/criticalmass/Makefile (revision 477599) +++ head/games/criticalmass/Makefile (revision 477600) @@ -1,64 +1,43 @@ # Created by: nbm # $FreeBSD$ PORTNAME= criticalmass -PORTVERSION= 1.0.2 -PORTREVISION= 9 +PORTVERSION= 1.5.0 PORTEPOCH= 1 CATEGORIES= games -MASTER_SITES= SF/${PORTNAME}/Critical%20Mass/${PORTVERSION} -DISTNAME= CriticalMass-${PORTVERSION} +MASTER_SITES= SF/${PORTNAME}/Critical%20Mass/${PORTVERSION}-RC +DISTNAME= CriticalMass-${PORTVERSION:R} MAINTAINER= ports@FreeBSD.org COMMENT= SDL/OpenGL space shoot'em up game LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= libcurl.so:ftp/curl \ - libpng.so:graphics/png +LIB_DEPENDS= libpng.so:graphics/png \ + libtinyxml.so:textproc/tinyxml -USES= dos2unix tar:bzip2 -DOS2UNIX_FILES= tinyxml/*.cpp tinyxml/*.h +USES= tar:bzip2 USE_XORG= x11 USE_GL= gl USE_SDL= image mixer sdl USE_CXXSTD= gnu++98 -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 +# libtinyxml is linked using cc and thus is not linked with libc++ +# which leads to most configure checks failing here; apply a band-aid +# and use CXX for everything +CC= ${CXX} 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 DESKTOP_ENTRIES="CriticallMass" "" "" "critter" "" "" - -post-patch: - @${GREP} -lR "SDL/SDL" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ - 's|SDL/SDL|SDL|g' - @${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 Index: head/games/criticalmass/distinfo =================================================================== --- head/games/criticalmass/distinfo (revision 477599) +++ head/games/criticalmass/distinfo (revision 477600) @@ -1,2 +1,3 @@ -SHA256 (CriticalMass-1.0.2.tar.bz2) = 846db2d30d39e559612328594084a7aef980169948b2cfaee9fddec8ffdef724 -SIZE (CriticalMass-1.0.2.tar.bz2) = 5122126 +TIMESTAMP = 1534709287 +SHA256 (CriticalMass-1.5.tar.bz2) = 31edda1a1f4b713f4c8132d8e437aa3f01911945f1094a371a9f0687c406d7e4 +SIZE (CriticalMass-1.5.tar.bz2) = 3384150 Index: head/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp =================================================================== --- head/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp (revision 477599) +++ head/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp (nonexistent) @@ -1,11 +0,0 @@ ---- 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 -+ - #include - #include - Property changes on: head/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp =================================================================== --- head/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp (revision 477599) +++ head/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp (nonexistent) @@ -1,12 +0,0 @@ ---- tinyxml/tinyxmlparser.cpp.orig -+++ tinyxml/tinyxmlparser.cpp -@@ -23,7 +23,8 @@ - - - #include "tinyxml.h" --#include -+#include -+#include - - const char* TiXmlBase::SkipWhiteSpace( const char* p ) - { Property changes on: head/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-utils__ResourceManager.cpp =================================================================== --- head/games/criticalmass/files/patch-utils__ResourceManager.cpp (revision 477599) +++ head/games/criticalmass/files/patch-utils__ResourceManager.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- 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 - #include - #include - #include Property changes on: head/games/criticalmass/files/patch-utils__ResourceManager.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-game__main.cpp =================================================================== --- head/games/criticalmass/files/patch-game__main.cpp (revision 477599) +++ head/games/criticalmass/files/patch-game__main.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- game/main.cpp.orig 2005-09-12 04:04:52.000000000 +0200 -+++ game/main.cpp 2012-05-11 17:51:11.000000000 +0200 -@@ -27,6 +27,7 @@ - - #include - #include -+#include - - void migrateConfig( void) - { Property changes on: head/games/criticalmass/files/patch-game__main.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-utils__Value.hpp =================================================================== --- head/games/criticalmass/files/patch-utils__Value.hpp (revision 477599) +++ head/games/criticalmass/files/patch-utils__Value.hpp (nonexistent) @@ -1,23 +0,0 @@ ---- utils/Value.hpp.orig -+++ utils/Value.hpp -@@ -15,7 +15,8 @@ - #ifndef _Value_hpp_ - #define _Value_hpp_ - --#include -+#include -+#include - #include - - #include -@@ -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(); Property changes on: head/games/criticalmass/files/patch-utils__Value.hpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-tinyxml__tinyxml.cpp =================================================================== --- head/games/criticalmass/files/patch-tinyxml__tinyxml.cpp (revision 477599) +++ head/games/criticalmass/files/patch-tinyxml__tinyxml.cpp (nonexistent) @@ -1,21 +0,0 @@ ---- tinyxml/tinyxml.cpp.orig -+++ tinyxml/tinyxml.cpp -@@ -22,6 +22,9 @@ - */ - - #include "tinyxml.h" -+#include -+#include -+#include - - - 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; Property changes on: head/games/criticalmass/files/patch-tinyxml__tinyxml.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-utils__zStream.cpp =================================================================== --- head/games/criticalmass/files/patch-utils__zStream.cpp (revision 477599) +++ head/games/criticalmass/files/patch-utils__zStream.cpp (nonexistent) @@ -1,11 +0,0 @@ ---- 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 -+ - #include - #include - #include Property changes on: head/games/criticalmass/files/patch-utils__zStream.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-configure =================================================================== --- head/games/criticalmass/files/patch-configure (nonexistent) +++ head/games/criticalmass/files/patch-configure (revision 477600) @@ -0,0 +1,60 @@ +--- configure.orig 2018-08-19 20:25:18 UTC ++++ configure +@@ -4064,7 +4064,7 @@ fi + + + CFLAGS="" +-CXXFLAGS="-std=c++0x -DGAME_HAS_HERO_PARTICLE -DUSE_ONLINE_UPDATE" ++CXXFLAGS="-std=c++0x -DGAME_HAS_HERO_PARTICLE" + + if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -W -Wall" +@@ -4255,48 +4255,6 @@ $as_echo "Adding special ingredients for mingw32" >&6; + LIBS="$LIBS -lopengl32 -lpng -lz -ljpeg -lstdc++ -lws2_32 -lwinmm" + CXXFLAGS="$CXXFLAGS -DCURL_STATICLIB" + else +- LIBS="-L/usr/local/lib -L/usr/X11R6/lib $LIBS" +- CXXFLAGS="$CXXFLAGS -I/usr/X11R6/include" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl-gnutls" >&5 +-$as_echo_n "checking for main in -lcurl-gnutls... " >&6; } +-if test "${ac_cv_lib_curl_gnutls_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcurl-gnutls $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- +-int +-main () +-{ +-return main (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_curl_gnutls_main=yes +-else +- ac_cv_lib_curl_gnutls_main=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_gnutls_main" >&5 +-$as_echo "$ac_cv_lib_curl_gnutls_main" >&6; } +-if test "x$ac_cv_lib_curl_gnutls_main" = x""yes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBCURL_GNUTLS 1 +-_ACEOF +- +- LIBS="-lcurl-gnutls $LIBS" +- +-else +- as_fn_error $? "libcurl-gnutls is needed" "$LINENO" 5 +-fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltinyxml" >&5 + $as_echo_n "checking for main in -ltinyxml... " >&6; } Property changes on: head/games/criticalmass/files/patch-configure ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-game_main.cpp =================================================================== --- head/games/criticalmass/files/patch-game_main.cpp (nonexistent) +++ head/games/criticalmass/files/patch-game_main.cpp (revision 477600) @@ -0,0 +1,21 @@ +--- game/main.cpp.orig 2010-10-17 01:09:48 UTC ++++ game/main.cpp +@@ -139,9 +139,7 @@ void checkEndian( void) + void showInfo() + { + LOG_INFO << "----------------------------------" << endl; +- LOG_INFO << GAMETITLE << " " << GAMEVERSION +- << " - "__TIME__" "__DATE__ +- << endl; ++ LOG_INFO << GAMETITLE << " " << GAMEVERSION << endl; + LOG_INFO << "Copyright (C) 2001-2010 by Frank Becker" << endl; + LOG_INFO << "Visit http://criticalmass.sourceforge.net" << endl; + LOG_INFO << "----------------------------------" << endl; +@@ -170,7 +168,6 @@ void showVersions( void) + << (int)msdl->major << "." + << (int)msdl->minor << "." + << (int)msdl->patch << endl; +- LOG_INFO << "zlib Version " << zlibVersion() << endl; + LOG_INFO << "PNG Version " << png_get_header_version(NULL) << endl; + } + Property changes on: head/games/criticalmass/files/patch-game_main.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-tools_Packer.cpp =================================================================== --- head/games/criticalmass/files/patch-tools_Packer.cpp (nonexistent) +++ head/games/criticalmass/files/patch-tools_Packer.cpp (revision 477600) @@ -0,0 +1,11 @@ +--- tools/Packer.cpp.orig 2018-08-19 20:16:16 UTC ++++ tools/Packer.cpp +@@ -33,7 +33,7 @@ const char RPATH_SEPERATOR = '/'; + //OS dependent seperator + const char PATH_SEPERATOR = '/'; + +-bool operator<( DirectoryEntry &de1, DirectoryEntry &de2) ++bool operator<( const DirectoryEntry &de1, const DirectoryEntry &de2) + { + return( de1.resourceName < de2.resourceName); + } Property changes on: head/games/criticalmass/files/patch-tools_Packer.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-utils_Point.hpp =================================================================== --- head/games/criticalmass/files/patch-utils_Point.hpp (nonexistent) +++ head/games/criticalmass/files/patch-utils_Point.hpp (revision 477600) @@ -0,0 +1,18 @@ +--- utils/Point.hpp.orig 2018-08-19 20:15:17 UTC ++++ utils/Point.hpp +@@ -22,15 +22,6 @@ inline bool feq( const float &f1, const float &f2) + return fabs(f1-f2) < EPSILON; + } + +-inline float fmin( const float &f1, const float &f2 ) +-{ +- return f1 < f2 ? f1 : f2; +-} +- +-inline float fmax( const float &f1, const float &f2 ) +-{ +- return f1 > f2 ? f1 : f2; +-} + //----------------------------------------------------------------------- + + struct Point2D Property changes on: head/games/criticalmass/files/patch-utils_Point.hpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/criticalmass/files/patch-utilssdl_PNG.cpp =================================================================== --- head/games/criticalmass/files/patch-utilssdl_PNG.cpp (revision 477599) +++ head/games/criticalmass/files/patch-utilssdl_PNG.cpp (revision 477600) @@ -1,20 +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 -@@ -45,7 +45,7 @@ +--- utilssdl/PNG.cpp.orig 2010-10-17 01:09:50 UTC ++++ utilssdl/PNG.cpp +@@ -56,7 +56,7 @@ void PNG::writeData( png_structp png, png_bytep data, { png_size_t check; - 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 @@ +@@ -83,7 +83,7 @@ bool PNG::init( FILE *fp, int width, int height) return false; } - if( setjmp(_png->jmpbuf)) + if( setjmp(png_jmpbuf(_png))) { fclose( fp); png_destroy_write_struct(&_png, (png_infopp)NULL);