aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-08-20 04:54:13 +0800
committertobik <tobik@FreeBSD.org>2018-08-20 04:54:13 +0800
commit9d17f4afc70ade40f8ac013d2803c7ceb376562c (patch)
tree8d84406dbdc111a6c2f68a13847724c5b6cd9854 /games
parentd253532ff7e0a6bdc1bcee809f5f6ccfadc83480 (diff)
downloadfreebsd-ports-gnome-9d17f4afc70ade40f8ac013d2803c7ceb376562c.tar.gz
freebsd-ports-gnome-9d17f4afc70ade40f8ac013d2803c7ceb376562c.tar.zst
freebsd-ports-gnome-9d17f4afc70ade40f8ac013d2803c7ceb376562c.zip
games/criticalmass: Update to latest release
This makes it easier to fix the build with Clang/libc++.
Diffstat (limited to 'games')
-rw-r--r--games/criticalmass/Makefile41
-rw-r--r--games/criticalmass/distinfo5
-rw-r--r--games/criticalmass/files/patch-configure60
-rw-r--r--games/criticalmass/files/patch-game__main.cpp10
-rw-r--r--games/criticalmass/files/patch-game_main.cpp21
-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-tools_Packer.cpp11
-rw-r--r--games/criticalmass/files/patch-utils_Point.hpp18
-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-utilssdl_PNG.cpp8
14 files changed, 127 insertions, 135 deletions
diff --git a/games/criticalmass/Makefile b/games/criticalmass/Makefile
index 6c71b31dfa23..cc95c5a13c11 100644
--- a/games/criticalmass/Makefile
+++ b/games/criticalmass/Makefile
@@ -2,12 +2,11 @@
# $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
@@ -15,50 +14,30 @@ 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 <bsd.port.mk>
diff --git a/games/criticalmass/distinfo b/games/criticalmass/distinfo
index ffdbc545d5dc..da5324a2b63b 100644
--- a/games/criticalmass/distinfo
+++ b/games/criticalmass/distinfo
@@ -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
diff --git a/games/criticalmass/files/patch-configure b/games/criticalmass/files/patch-configure
new file mode 100644
index 000000000000..736f1c9032d6
--- /dev/null
+++ b/games/criticalmass/files/patch-configure
@@ -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; }
diff --git a/games/criticalmass/files/patch-game__main.cpp b/games/criticalmass/files/patch-game__main.cpp
deleted file mode 100644
index 4ec7f7f7e7b0..000000000000
--- a/games/criticalmass/files/patch-game__main.cpp
+++ /dev/null
@@ -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 <sys/stat.h>
- #include <sys/types.h>
-+#include <zlib.h>
-
- void migrateConfig( void)
- {
diff --git a/games/criticalmass/files/patch-game_main.cpp b/games/criticalmass/files/patch-game_main.cpp
new file mode 100644
index 000000000000..6b2a83c9f3b0
--- /dev/null
+++ b/games/criticalmass/files/patch-game_main.cpp
@@ -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;
+ }
+
diff --git a/games/criticalmass/files/patch-tinyxml__tinyxml.cpp b/games/criticalmass/files/patch-tinyxml__tinyxml.cpp
deleted file mode 100644
index 312d6850fa36..000000000000
--- a/games/criticalmass/files/patch-tinyxml__tinyxml.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
---- 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
deleted file mode 100644
index 754eadf80081..000000000000
--- a/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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-tools_Packer.cpp b/games/criticalmass/files/patch-tools_Packer.cpp
new file mode 100644
index 000000000000..38261a20267f
--- /dev/null
+++ b/games/criticalmass/files/patch-tools_Packer.cpp
@@ -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);
+ }
diff --git a/games/criticalmass/files/patch-utils_Point.hpp b/games/criticalmass/files/patch-utils_Point.hpp
new file mode 100644
index 000000000000..e27326de92c7
--- /dev/null
+++ b/games/criticalmass/files/patch-utils_Point.hpp
@@ -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
diff --git a/games/criticalmass/files/patch-utils__ResourceManager.cpp b/games/criticalmass/files/patch-utils__ResourceManager.cpp
deleted file mode 100644
index 9d5978bed999..000000000000
--- a/games/criticalmass/files/patch-utils__ResourceManager.cpp
+++ /dev/null
@@ -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 <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
deleted file mode 100644
index 0066c6bffaaa..000000000000
--- a/games/criticalmass/files/patch-utils__Value.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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
deleted file mode 100644
index 41eda1453c5a..000000000000
--- a/games/criticalmass/files/patch-utils__zStream.cpp
+++ /dev/null
@@ -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 <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
deleted file mode 100644
index 4e6af8d88eb1..000000000000
--- a/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp
+++ /dev/null
@@ -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 <cstdlib>
-+
- #include <Trace.hpp>
- #include <zStreamBufferImplZLib.hpp>
-
diff --git a/games/criticalmass/files/patch-utilssdl_PNG.cpp b/games/criticalmass/files/patch-utilssdl_PNG.cpp
index b98197f86e95..6683f0c4a1dc 100644
--- a/games/criticalmass/files/patch-utilssdl_PNG.cpp
+++ b/games/criticalmass/files/patch-utilssdl_PNG.cpp
@@ -1,6 +1,6 @@
---- 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;
@@ -9,7 +9,7 @@
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;
}