Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2023 18:50:34 GMT
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 79994bd07c43 - main - games/stuntrally: update 2.6.2 =?utf-8?Q?=E2=86=92?= 2.7
Message-ID:  <202310021850.392IoY9I028344@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=79994bd07c4339a26d273975b0a89c78da14f0bc

commit 79994bd07c4339a26d273975b0a89c78da14f0bc
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2023-09-29 19:02:21 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2023-10-02 18:49:48 +0000

    games/stuntrally: update 2.6.2 → 2.7
---
 games/stuntrally/Makefile                          | 58 ++++++++++------------
 games/stuntrally/distinfo                          | 10 ++--
 games/stuntrally/files/patch-CMakeLists.txt        | 15 ------
 .../files/patch-cmake_DependenciesConfig.cmake     | 24 +++++++++
 .../files/patch-source_editor_BaseApp__Create.cpp  | 11 ++++
 .../files/patch-source_ogre_BaseApp__Create.cpp    | 32 ++++++++++++
 .../files/patch-source_ogre_common_Terrain.cpp     | 17 +++++++
 ...shiny_Platforms_Ogre_OgreMaterialSerializer.cpp | 11 ++++
 games/stuntrally/pkg-plist                         |  5 +-
 9 files changed, 129 insertions(+), 54 deletions(-)

diff --git a/games/stuntrally/Makefile b/games/stuntrally/Makefile
index 4c36af6e064c..09e86e83510e 100644
--- a/games/stuntrally/Makefile
+++ b/games/stuntrally/Makefile
@@ -1,65 +1,59 @@
 PORTNAME=	stuntrally
-PORTVERSION=	2.6.2
-PORTREVISION=	5
+PORTVERSION=	2.7
 CATEGORIES=	games
 
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	3D racing game based on VDrift and OGRE with track editor
-WWW=		https://stuntrally.tuxfamily.org/
+WWW=		https://stuntrally.tuxfamily.org/ \
+		https://github.com/stuntrally/stuntrally/
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/License.txt
 
-BROKEN=	fails to compile: member access into incomplete type Ogre::
-
-LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
-
+LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
+		libOgreMain.so:graphics/ogre3d \
+		libBulletDynamics.so:devel/bullet \
+		libMyGUIEngine.so:x11-toolkits/mygui \
+		libogg.so:audio/libogg \
+		libvorbisfile.so:audio/libvorbis \
+		libenet.so:net/enet \
+		libtinyxml.so:textproc/tinyxml \
+		libtinyxml2.so:textproc/tinyxml2
+BUILD_DEPENDS=	${LOCALBASE}/include/MYGUI/MyGUI_OgreTexture.h:x11-toolkits/mygui-ogre
+
+USES=		compiler:c++14-lang cmake pkgconfig sdl
+USE_SDL=	sdl2
 USE_GITHUB=	yes
 GH_TUPLE=	stuntrally:tracks:${PORTVERSION}:tracks/data/tracks
-
-USES=		compiler:c++14-lang cmake dos2unix pkgconfig
-DOS2UNIX_FILES=	source/ogre/BaseApp_Create.cpp
 CMAKE_ARGS=	-DSHARE_INSTALL="${DATADIR_REL}" \
 		-DBULLET_ROOT="${LOCALBASE}"
+CMAKE_ON=	SR_FORCE_SYSTEM_DEPENDENCIES
 
 LDFLAGS_i386=	-Wl,-znotext
 
-PORTDOCS=	Readme.txt
+PORTDOCS=	*
 PORTDATA=	*
 
-OPTIONS_DEFINE=	GAME EDITOR MASTER_SERVER DOCS
-OPTIONS_DEFAULT=GAME EDITOR
+OPTIONS_DEFINE=	GAME EDITOR TRANSLATOR MASTER_SERVER DOCS
+OPTIONS_DEFAULT=GAME EDITOR TRANSLATOR
 OPTIONS_SUB=	yes
 
 GAME_DESC=		Build the game binary
 GAME_CMAKE_BOOL=	BUILD_GAME
-GAME_LIB_DEPENDS=	libOgreMain.so:graphics/ogre3d19 \
-			libBulletDynamics.so:devel/bullet \
-			libMyGUIEngine.so:x11-toolkits/mygui \
-			libogg.so:audio/libogg \
-			libvorbisfile.so:audio/libvorbis \
-			libenet.so:net/enet
-GAME_BUILD_DEPENDS=	${LOCALBASE}/include/MYGUI/MyGUI_OgreTexture.h:x11-toolkits/mygui-ogre
-GAME_USE=		SDL=sdl2
-GAME_USES=		openal sdl
+GAME_USES=		openal
 
 EDITOR_DESC=		Build the track editor
 EDITOR_CMAKE_BOOL=	BUILD_EDITOR
-EDITOR_LIB_DEPENDS=	libOgreMain.so:graphics/ogre3d19 \
-			libBulletDynamics.so:devel/bullet \
-			libMyGUIEngine.so:x11-toolkits/mygui \
-			libogg.so:audio/libogg \
-			libvorbisfile.so:audio/libvorbis
-EDITOR_USE=		SDL=sdl2
-EDITOR_USES=		sdl
-EDITOR_BUILD_DEPENDS=	${LOCALBASE}/include/MYGUI/MyGUI_OgreTexture.h:x11-toolkits/mygui-ogre
+EDITOR_USES=		openal
+
+TRANSLATOR_DESC=	Build translation tool
+TRANSLATOR_CMAKE_BOOL=	BUILD_TRANSL_TOOL
 
 MASTER_SERVER_CMAKE_BOOL=	BUILD_MASTER_SERVER
 MASTER_SERVER_DESC=		Build the master server
-MASTER_SERVER_LIB_DEPENDS=	libenet.so:net/enet
 
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/Readme.txt ${STAGEDIR}${DOCSDIR}/
+	${INSTALL_DATA} ${WRKSRC}/Readme.md ${STAGEDIR}${DOCSDIR}/
 
 .include <bsd.port.mk>
diff --git a/games/stuntrally/distinfo b/games/stuntrally/distinfo
index 3f2f7f68a533..31782b9579c0 100644
--- a/games/stuntrally/distinfo
+++ b/games/stuntrally/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1648667237
-SHA256 (stuntrally-stuntrally-2.6.2_GH0.tar.gz) = a63550d5d13d20dca678c2cd8e30332cd41ca5380d14720c15549e6b0387bd55
-SIZE (stuntrally-stuntrally-2.6.2_GH0.tar.gz) = 651633552
-SHA256 (stuntrally-tracks-2.6.2_GH0.tar.gz) = 4fd587cf6cfe72e78530bb051bd423f9d0d0e38ca258e8254a4fdd6e60db5bcc
-SIZE (stuntrally-tracks-2.6.2_GH0.tar.gz) = 357438076
+TIMESTAMP = 1668431328
+SHA256 (stuntrally-stuntrally-2.7_GH0.tar.gz) = 462711306ec33e2dad1a729d7dbf0da2a8bfec2c36d582cc4c192c2e6f2de12c
+SIZE (stuntrally-stuntrally-2.7_GH0.tar.gz) = 770702361
+SHA256 (stuntrally-tracks-2.7_GH0.tar.gz) = fe7ba531fbdb3c5ba9b25f0748c2aac465c6aad33e957f722e2316a3129bd472
+SIZE (stuntrally-tracks-2.7_GH0.tar.gz) = 445486760
diff --git a/games/stuntrally/files/patch-CMakeLists.txt b/games/stuntrally/files/patch-CMakeLists.txt
deleted file mode 100644
index 889cfed15710..000000000000
--- a/games/stuntrally/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
---- CMakeLists.txt.orig	2019-03-16 14:58:09 UTC
-+++ CMakeLists.txt
-@@ -16,12 +16,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
- 	message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files already created:\nrm -rf CMakeCache.txt CMakeFiles")
- endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
- 
--# Add a sensible build type default and warning because empty means no optimization and no debug info.
--if(NOT CMAKE_BUILD_TYPE)
--	message("WARNING: CMAKE_BUILD_TYPE is not defined!\n         Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo. Use ccmake to set a proper value.")
--	set(CMAKE_BUILD_TYPE RelWithDebInfo
--	CACHE STRING "Type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
--endif(NOT CMAKE_BUILD_TYPE)
- 
- 
- # Set default compile flags for GCC
diff --git a/games/stuntrally/files/patch-cmake_DependenciesConfig.cmake b/games/stuntrally/files/patch-cmake_DependenciesConfig.cmake
new file mode 100644
index 000000000000..62c3725f1e37
--- /dev/null
+++ b/games/stuntrally/files/patch-cmake_DependenciesConfig.cmake
@@ -0,0 +1,24 @@
+--- cmake/DependenciesConfig.cmake.orig	2022-11-11 19:35:22 UTC
++++ cmake/DependenciesConfig.cmake
+@@ -79,13 +79,14 @@ add_external_lib(
+         FIND_PACKAGE
+ )
+ 
+-add_external_lib(
+-        tinyxml
+-        tinyxml/2.6.2
+-        REQUIRED
+-        PKG_CONFIG "tinyxml >= 2.6"
+-        FIND_PACKAGE
+-)
++find_path(TINYXML_INCLUDE_DIR tinyxml.h)
++find_library(TINYXML_LIBRARY tinyxml)
++
++add_library(tinyxml::tinyxml INTERFACE IMPORTED GLOBAL)
++target_include_directories(tinyxml::tinyxml INTERFACE ${TINYXML_INCLUDE_DIR})
++target_link_libraries(tinyxml::tinyxml INTERFACE ${TINYXML_LIBRARY})
++
++message(STATUS "Added inteface tinyxml ${TINYXML_INCLUDE_DIR} ${TINYXML_LIBRARY}")
+ 
+ add_external_lib(
+         tinyxml2
diff --git a/games/stuntrally/files/patch-source_editor_BaseApp__Create.cpp b/games/stuntrally/files/patch-source_editor_BaseApp__Create.cpp
new file mode 100644
index 000000000000..b2b3cf1c5bdb
--- /dev/null
+++ b/games/stuntrally/files/patch-source_editor_BaseApp__Create.cpp
@@ -0,0 +1,11 @@
+--- source/editor/BaseApp_Create.cpp.orig	2022-11-11 19:35:22 UTC
++++ source/editor/BaseApp_Create.cpp
+@@ -240,7 +240,7 @@ bool BaseApp::setup()
+ 		#endif
+ 	}
+ 	#ifdef _DEBUG
+-	Ogre::LogManager::getSingleton().setMinLogLevel(LML_TRIVIAL);  // all
++	//Ogre::LogManager::getSingleton().setMinLogLevel(LML_TRIVIAL);  // all
+ 	#endif
+ 
+ 	#ifdef _DEBUG
diff --git a/games/stuntrally/files/patch-source_ogre_BaseApp__Create.cpp b/games/stuntrally/files/patch-source_ogre_BaseApp__Create.cpp
new file mode 100644
index 000000000000..5f17ead24e2b
--- /dev/null
+++ b/games/stuntrally/files/patch-source_ogre_BaseApp__Create.cpp
@@ -0,0 +1,32 @@
+--- source/ogre/BaseApp_Create.cpp.orig	2022-11-11 19:35:22 UTC
++++ source/ogre/BaseApp_Create.cpp
+@@ -177,12 +177,16 @@ BaseApp::~BaseApp()
+ 		mPlatform->shutdown();  delete mPlatform;  mPlatform = 0;  }
+ 
+ 	//  save inputs
+-	mInputCtrl->save(PATHMANAGER::UserConfigDir() + "/input.xml");
+-	delete mInputCtrl;
++	if (mInputCtrl) {
++		mInputCtrl->save(PATHMANAGER::UserConfigDir() + "/input.xml");
++		delete mInputCtrl;
++	}
+ 	for (int i=0; i<4; ++i)
+ 	{
+-		mInputCtrlPlayer[i]->save(PATHMANAGER::UserConfigDir() + "/input_p" + toStr(i) + ".xml");
+-		delete mInputCtrlPlayer[i];
++		if (mInputCtrlPlayer[i]) {
++			mInputCtrlPlayer[i]->save(PATHMANAGER::UserConfigDir() + "/input_p" + toStr(i) + ".xml");
++			delete mInputCtrlPlayer[i];
++		}
+ 	}
+ 
+ 	delete mInputWrapper;
+@@ -326,7 +330,7 @@ bool BaseApp::setup()
+ #endif
+ 
+ 	#ifdef _DEBUG
+-	LogManager::getSingleton().setMinLogLevel(LML_TRIVIAL);  // all
++	//LogManager::getSingleton().setMinLogLevel(LML_TRIVIAL);  // all
+ 	#endif
+ 
+ 	setupResources();
diff --git a/games/stuntrally/files/patch-source_ogre_common_Terrain.cpp b/games/stuntrally/files/patch-source_ogre_common_Terrain.cpp
new file mode 100644
index 000000000000..4854584effda
--- /dev/null
+++ b/games/stuntrally/files/patch-source_ogre_common_Terrain.cpp
@@ -0,0 +1,17 @@
+--- source/ogre/common/Terrain.cpp.orig	2022-11-11 19:35:22 UTC
++++ source/ogre/common/Terrain.cpp
+@@ -202,8 +202,12 @@ if (bTer)
+ 		//  sync load since we want everything in place when we start
+ 		mTerrainGroup->loadAllTerrains(true);
+ 
+-		auto tsm = mTerrainGroup->getTerrainSlots();
+-		terrain = tsm[0]->instance;
++		TerrainGroup::TerrainIterator ti = mTerrainGroup->getTerrainIterator();
++		while (ti.hasMoreElements())
++		{
++			terrain = ti.getNext()->instance;
++			terrain->setVisibilityFlags(RV_Terrain);
++		}
+ 
+ 		mTerrainGroup->freeTemporaryResources();
+ 	}
diff --git a/games/stuntrally/files/patch-source_shiny_Platforms_Ogre_OgreMaterialSerializer.cpp b/games/stuntrally/files/patch-source_shiny_Platforms_Ogre_OgreMaterialSerializer.cpp
new file mode 100644
index 000000000000..2a84476b0a83
--- /dev/null
+++ b/games/stuntrally/files/patch-source_shiny_Platforms_Ogre_OgreMaterialSerializer.cpp
@@ -0,0 +1,11 @@
+--- source/shiny/Platforms/Ogre/OgreMaterialSerializer.cpp.orig	2022-11-11 19:35:22 UTC
++++ source/shiny/Platforms/Ogre/OgreMaterialSerializer.cpp
+@@ -7,7 +7,7 @@
+ #include <OgreLogManager.h>
+ 
+ //#if 0  // for Ogre 1.9 only
+-#if OGRE_VERSION >= MYGUI_DEFINE_VERSION(1, 12, 0)
++#if 1
+ namespace Ogre
+ {
+     template <typename T> class MapIterator;
diff --git a/games/stuntrally/pkg-plist b/games/stuntrally/pkg-plist
index bc7cbb99e7db..114249b33a8e 100644
--- a/games/stuntrally/pkg-plist
+++ b/games/stuntrally/pkg-plist
@@ -1,7 +1,8 @@
 %%EDITOR%%bin/sr-editor
+%%TRANSLATOR%%bin/sr-translator
 %%MASTER_SERVER%%bin/sr-masterserver
 %%GAME%%bin/stuntrally
 %%EDITOR%%share/applications/sr-editor.desktop
 %%GAME%%share/applications/stuntrally.desktop
-%%EDITOR%%share/icons/hicolor/64x64/apps/sr-editor.png
-%%GAME%%share/icons/hicolor/256x256/apps/stuntrally.png
+%%EDITOR%%share/icons/hicolor/512x512/apps/sr-editor.png
+%%GAME%%share/icons/hicolor/512x512/apps/stuntrally.png



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