Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2025 17:32:49 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: 15f93866a01c - main - games/endless-sky: update 0.10.4 =?utf-8?Q?=E2=86=92?= 0.10.10
Message-ID:  <202501181732.50IHWnDJ060033@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=15f93866a01c86585af58df4759fac10f7e37c56

commit 15f93866a01c86585af58df4759fac10f7e37c56
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2024-03-29 17:50:10 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2025-01-18 17:32:22 +0000

    games/endless-sky: update 0.10.4 → 0.10.10
    
    - Fix test build depends
    
    PR:             277487
    Tested by:      alster@vinterdalen.se
    Reported by:    alster@vinterdalen.se
---
 games/endless-sky/Makefile                         | 14 +++--
 games/endless-sky/distinfo                         |  6 +--
 games/endless-sky/files/patch-source_Audio.cpp     | 63 ----------------------
 .../patch-tests_unit_src_test__weightedList.cpp    | 11 ++++
 4 files changed, 25 insertions(+), 69 deletions(-)

diff --git a/games/endless-sky/Makefile b/games/endless-sky/Makefile
index cb34395669b4..29ac088b20f7 100644
--- a/games/endless-sky/Makefile
+++ b/games/endless-sky/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	endless-sky
-PORTVERSION=	0.10.4
+PORTVERSION=	0.10.10
 DISTVERSIONPREFIX=	v
 CATEGORIES=	games
 
@@ -21,18 +21,26 @@ USE_GITHUB=	yes
 USES=		cmake compiler:c++11-lang gl jpeg openal sdl
 USE_SDL=	sdl2
 USE_GL=		gl glew
-CMAKE_OFF=	ES_USE_VCPKG
+CMAKE_OFF=	ES_USE_VCPKG CMAKE_CXX_SCAN_FOR_MODULES
 CMAKE_ARGS=	-DCMAKE_INSTALL_DOCDIR="${DOCSDIR}"
+# https://github.com/endless-sky/endless-sky/issues/10714#issuecomment-2448722018
+TEST_ENV=	ASAN_OPTIONS=detect_container_overflow=0
 
 LDFLAGS_i386=	-Wl,-znotext
 
 PORTDATA=	*
 PORTDOCS=	*
 
-OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFINE=	DOCS TEST
+
+TEST_CMAKE_BOOL=	BUILD_TESTING
+TEST_BUILD_DEPENDS=	catch2>=0:devel/catch2
 
 post-build:
 	@${REINPLACE_CMD} -e 's|/usr/local/|${PREFIX}/|; s|share/games|share|' \
 		${WRKSRC}/source/Files.cpp
 
+do-test-TEST-on:
+	@cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${LOCALBASE}/bin/ctest -V
+
 .include <bsd.port.mk>
diff --git a/games/endless-sky/distinfo b/games/endless-sky/distinfo
index e71e8b0d24f5..ae550bf55eac 100644
--- a/games/endless-sky/distinfo
+++ b/games/endless-sky/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1698072980
-SHA256 (endless-sky-endless-sky-v0.10.4_GH0.tar.gz) = baeaa462315587788d81c58847d600f66f1ced063cdfb4cf108d6a26fe75e175
-SIZE (endless-sky-endless-sky-v0.10.4_GH0.tar.gz) = 255144369
+TIMESTAMP = 1730149437
+SHA256 (endless-sky-endless-sky-v0.10.10_GH0.tar.gz) = 2d3cce20335f151f401a617624a4914a08911f4a424aae84bdf6eb8984f3c085
+SIZE (endless-sky-endless-sky-v0.10.10_GH0.tar.gz) = 271561866
diff --git a/games/endless-sky/files/patch-source_Audio.cpp b/games/endless-sky/files/patch-source_Audio.cpp
deleted file mode 100644
index e89a03aaa292..000000000000
--- a/games/endless-sky/files/patch-source_Audio.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
---- source/Audio.cpp.orig	2023-10-21 20:01:54 UTC
-+++ source/Audio.cpp
-@@ -82,7 +82,7 @@ namespace {
- 	// This queue keeps track of sounds that have been requested to play. Each
- 	// added sound is "deferred" until the next audio position update to make
- 	// sure that all sounds from a given frame start at the same time.
--	map<const Sound *, QueueEntry> queue;
-+	map<const Sound *, QueueEntry> queue_;
- 	map<const Sound *, QueueEntry> deferred;
- 	thread::id mainThreadID;
- 
-@@ -249,7 +249,7 @@ void Audio::Update(const Point &listenerPosition)
- 	listener = listenerPosition;
- 
- 	for(const auto &it : deferred)
--		queue[it.first].Add(it.second);
-+		queue_[it.first].Add(it.second);
- 	deferred.clear();
- }
- 
-@@ -273,7 +273,7 @@ void Audio::Play(const Sound *sound, const Point &posi
- 	// Place sounds from the main thread directly into the queue. They are from
- 	// the UI, and the Engine may not be running right now to call Update().
- 	if(this_thread::get_id() == mainThreadID)
--		queue[sound].Add(position - listener);
-+		queue_[sound].Add(position - listener);
- 	else
- 	{
- 		unique_lock<mutex> lock(audioMutex);
-@@ -317,12 +317,12 @@ void Audio::Step()
- 	{
- 		if(source.GetSound()->IsLooping())
- 		{
--			auto it = queue.find(source.GetSound());
--			if(it != queue.end())
-+			auto it = queue_.find(source.GetSound());
-+			if(it != queue_.end())
- 			{
- 				source.Move(it->second);
- 				newSources.push_back(source);
--				queue.erase(it);
-+				queue_.erase(it);
- 			}
- 			else
- 			{
-@@ -367,7 +367,7 @@ void Audio::Step()
- 
- 	// Now, what is left in the queue is sounds that want to play, and that do
- 	// not correspond to an existing source.
--	for(const auto &it : queue)
-+	for(const auto &it : queue_)
- 	{
- 		// Use a recycled source if possible. Otherwise, create a new one.
- 		unsigned source = 0;
-@@ -396,7 +396,7 @@ void Audio::Step()
- 		sources.back().Move(it.second);
- 		alSourcePlay(source);
- 	}
--	queue.clear();
-+	queue_.clear();
- 
- 	// Queue up new buffers for the music, if necessary.
- 	int buffersDone = 0;
diff --git a/games/endless-sky/files/patch-tests_unit_src_test__weightedList.cpp b/games/endless-sky/files/patch-tests_unit_src_test__weightedList.cpp
new file mode 100644
index 000000000000..76d617098781
--- /dev/null
+++ b/games/endless-sky/files/patch-tests_unit_src_test__weightedList.cpp
@@ -0,0 +1,11 @@
+--- tests/unit/src/test_weightedList.cpp.orig	2024-10-26 19:04:44 UTC
++++ tests/unit/src/test_weightedList.cpp
+@@ -348,7 +348,7 @@ SCENARIO( "Obtaining a random value", "[WeightedList][
+ 			REQUIRE( list.empty() );
+ 			THEN( "an informative runtime exception is thrown" ) {
+ 				CHECK_THROWS_AS( list.Get(), std::runtime_error );
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ 				CHECK_THROWS_WITH( list.Get(), Catch::Matchers::ContainsSubstring("empty weighted list") );
+ #endif
+ 			}



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