Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2018 20:54:14 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r477600 - in head/games/criticalmass: . files
Message-ID:  <201808192054.w7JKsESx056462@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Aug 19 20:54:13 2018
New Revision: 477600
URL: https://svnweb.freebsd.org/changeset/ports/477600

Log:
  games/criticalmass: Update to latest release
  
  This makes it easier to fix the build with Clang/libc++.

Added:
  head/games/criticalmass/files/patch-configure   (contents, props changed)
  head/games/criticalmass/files/patch-game_main.cpp   (contents, props changed)
  head/games/criticalmass/files/patch-tools_Packer.cpp   (contents, props changed)
  head/games/criticalmass/files/patch-utils_Point.hpp   (contents, props changed)
Deleted:
  head/games/criticalmass/files/patch-game__main.cpp
  head/games/criticalmass/files/patch-tinyxml__tinyxml.cpp
  head/games/criticalmass/files/patch-tinyxml__tinyxmlparser.cpp
  head/games/criticalmass/files/patch-utils__ResourceManager.cpp
  head/games/criticalmass/files/patch-utils__Value.hpp
  head/games/criticalmass/files/patch-utils__zStream.cpp
  head/games/criticalmass/files/patch-utils__zStreamBufferImplZLib.cpp
Modified:
  head/games/criticalmass/Makefile
  head/games/criticalmass/distinfo
  head/games/criticalmass/files/patch-utilssdl_PNG.cpp

Modified: head/games/criticalmass/Makefile
==============================================================================
--- head/games/criticalmass/Makefile	Sun Aug 19 20:51:51 2018	(r477599)
+++ head/games/criticalmass/Makefile	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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>

Modified: head/games/criticalmass/distinfo
==============================================================================
--- head/games/criticalmass/distinfo	Sun Aug 19 20:51:51 2018	(r477599)
+++ head/games/criticalmass/distinfo	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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

Added: head/games/criticalmass/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/criticalmass/files/patch-configure	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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; }

Added: head/games/criticalmass/files/patch-game_main.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/criticalmass/files/patch-game_main.cpp	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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;
+ }
+  

Added: head/games/criticalmass/files/patch-tools_Packer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/criticalmass/files/patch-tools_Packer.cpp	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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);
+ }

Added: head/games/criticalmass/files/patch-utils_Point.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/criticalmass/files/patch-utils_Point.hpp	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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

Modified: head/games/criticalmass/files/patch-utilssdl_PNG.cpp
==============================================================================
--- head/games/criticalmass/files/patch-utilssdl_PNG.cpp	Sun Aug 19 20:51:51 2018	(r477599)
+++ head/games/criticalmass/files/patch-utilssdl_PNG.cpp	Sun Aug 19 20:54:13 2018	(r477600)
@@ -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;
      }
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808192054.w7JKsESx056462>