Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2017 00:00:54 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r448708 - in head/emulators/rpcs3: . files
Message-ID:  <201708250000.v7P00sJb057108@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Aug 25 00:00:54 2017
New Revision: 448708
URL: https://svnweb.freebsd.org/changeset/ports/448708

Log:
  emulators/rpcs3: update to 0.0.3.208
  
  Changes:	https://github.com/RPCS3/rpcs3/compare/fff62df6...00339cb9

Added:
  head/emulators/rpcs3/files/extra-patch-no-thread_local   (contents, props changed)
Modified:
  head/emulators/rpcs3/Makefile   (contents, props changed)
  head/emulators/rpcs3/distinfo   (contents, props changed)

Modified: head/emulators/rpcs3/Makefile
==============================================================================
--- head/emulators/rpcs3/Makefile	Thu Aug 24 22:26:30 2017	(r448707)
+++ head/emulators/rpcs3/Makefile	Fri Aug 25 00:00:54 2017	(r448708)
@@ -2,8 +2,8 @@
 
 PORTNAME=	rpcs3
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.0.3-191
-DISTVERSIONSUFFIX=	-gfff62df6
+DISTVERSION=	0.0.3-208
+DISTVERSIONSUFFIX=	-g00339cb9
 CATEGORIES=	emulators
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -35,6 +35,8 @@ USES=		cmake compiler:c++14-lang iconv:wchar_t localba
 		openal:soft pkgconfig
 USE_GL=		gl glew
 USE_QT5=	qmake_build buildtools_build core gui widgets
+EXTRA_PATCHES+=	${EXTRA_PATCHES_${OPSYS}_${OSREL}}
+EXTRA_PATCHES_FreeBSD_10.3=	${PATCHDIR}/extra-patch-no-thread_local
 CMAKE_ARGS+=	-DUSE_SYSTEM_LIBPNG=on -DUSE_SYSTEM_FFMPEG=on
 CXXFLAGS+=	-D_GLIBCXX_USE_C99 # XXX ports/193528
 CXXFLAGS+=	-Wno-macro-redefined # __STDC_*_MACROS sys/cdefs.h vs. llvm-config
@@ -44,7 +46,7 @@ PLIST_FILES=	bin/${PORTNAME} \
 		share/icons/hicolor/48x48/apps/${PORTNAME}.png \
 		share/icons/hicolor/scalable/apps/${PORTNAME}.svg \
 
-OPTIONS_DEFINE=	ALSA EVDEV GDB LLVM
+OPTIONS_DEFINE=	ALSA EVDEV GDB LLVM PULSEAUDIO
 OPTIONS_DEFAULT=ALSA LLVM
 
 ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
@@ -61,6 +63,9 @@ GDB_CMAKE_BOOL=		WITH_GDB
 LLVM_DESC=		LLVM-based PPU recompiler
 LLVM_BUILD_DEPENDS=	llvm40>0:devel/llvm40
 LLVM_CMAKE_BOOL_OFF=	WITHOUT_LLVM
+
+PULSEAUDIO_LIB_DEPENDS=	libpulse-simple.so:audio/pulseaudio
+PULSEAUDIO_CMAKE_BOOL=	USE_PULSE
 
 post-patch:
 	@${REINPLACE_CMD} -e 's/"unknown"/"${GH_TAGNAME}"/' \

Modified: head/emulators/rpcs3/distinfo
==============================================================================
--- head/emulators/rpcs3/distinfo	Thu Aug 24 22:26:30 2017	(r448707)
+++ head/emulators/rpcs3/distinfo	Fri Aug 25 00:00:54 2017	(r448708)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1503234872
-SHA256 (RPCS3-rpcs3-v0.0.3-191-gfff62df6_GH0.tar.gz) = e83adcd0bbf105a9e18e0229a7dfd8232706d003920b531d17a2e0b50505aa33
-SIZE (RPCS3-rpcs3-v0.0.3-191-gfff62df6_GH0.tar.gz) = 11346984
+TIMESTAMP = 1503598818
+SHA256 (RPCS3-rpcs3-v0.0.3-208-g00339cb9_GH0.tar.gz) = 3ff276f33e0908e3a5cbea9c27853f80e7fe007b01e7275642a38f57ae990975
+SIZE (RPCS3-rpcs3-v0.0.3-208-g00339cb9_GH0.tar.gz) = 11352605
 SHA256 (RPCS3-hidapi-hidapi-0.8.0-rc1-25-gca39ce8_GH0.tar.gz) = e50e4f4e9035e891e16867e995f44aac87ce734a9dde169f02fc9719b2ce3642
 SIZE (RPCS3-hidapi-hidapi-0.8.0-rc1-25-gca39ce8_GH0.tar.gz) = 105623
 SHA256 (RPCS3-pugixml-f205aaf_GH0.tar.gz) = 3b2a7e21625d8cbeb3aa1841b8816f6cab0752e89008b9fc67a325c800f153b5

Added: head/emulators/rpcs3/files/extra-patch-no-thread_local
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/rpcs3/files/extra-patch-no-thread_local	Fri Aug 25 00:00:54 2017	(r448708)
@@ -0,0 +1,95 @@
+FreeBSD 10.3 lacks __cxa_thread_atexit, so revert
+https://github.com/RPCS3/rpcs3/commit/c1450ad61627
+
+--- Utilities/Log.cpp.orig	2017-08-24 18:20:18 UTC
++++ Utilities/Log.cpp
+@@ -246,7 +246,7 @@ void logs::message::broadcast(const char* fmt, const f
+ 	}
+ 
+ 	// Get text
+-	thread_local std::string text; text.clear();
++	std::string text;
+ 	fmt::raw_append(text, fmt, sup, args);
+ 	std::string prefix = g_tls_log_prefix();
+ 
+@@ -266,7 +266,7 @@ void logs::message::broadcast(const char* fmt, const f
+ 			}
+ 
+ 			// Store message additionally
+-			g_messages.emplace_back(stored_message{*this, stamp, std::move(prefix), text});
++			g_messages.emplace_back(stored_message{*this, stamp, std::move(prefix), std::move(text)});
+ 		}
+ 	}
+ 	
+@@ -348,7 +348,7 @@ logs::file_listener::file_listener(const std::string& 
+ 
+ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::string& prefix, const std::string& _text)
+ {
+-	thread_local std::string text;
++	std::string text; text.reserve(prefix.size() + _text.size() + 200);
+ 
+ 	// Used character: U+00B7 (Middle Dot)
+ 	switch (msg.sev)
+--- Utilities/types.h.orig	2017-08-24 18:20:18 UTC
++++ Utilities/types.h
+@@ -32,6 +32,7 @@
+ #define SAFE_BUFFERS
+ #define NEVER_INLINE __attribute__((noinline))
+ #define FORCE_INLINE __attribute__((always_inline)) inline
++#define thread_local __thread
+ #endif
+ 
+ #define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size")
+--- rpcs3/Emu/System.cpp.orig	2017-08-24 18:20:18 UTC
++++ rpcs3/Emu/System.cpp
+@@ -797,20 +797,26 @@ void Emulator::Stop()
+ 
+ s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_info* sup2, u64 arg2)
+ {
+-	static thread_local std::unordered_map<std::string, std::size_t> g_tls_error_stats;
+-	static thread_local std::string g_tls_error_str;
++	static thread_local std::unordered_map<std::string, std::size_t>* g_tls_error_stats{};
++	static thread_local std::string* g_tls_error_str{};
+ 
+-	if (g_tls_error_stats.empty())
++	if (!g_tls_error_stats)
+ 	{
++		g_tls_error_stats = new std::unordered_map<std::string, std::size_t>;
++		g_tls_error_str   = new std::string;
++
+ 		thread_ctrl::atexit([]
+ 		{
+-			for (auto&& pair : g_tls_error_stats)
++			for (auto&& pair : *g_tls_error_stats)
+ 			{
+ 				if (pair.second > 3)
+ 				{
+ 					LOG_ERROR(GENERAL, "Stat: %s [x%u]", pair.first, pair.second);
+ 				}
+ 			}
++
++			delete g_tls_error_stats;
++			delete g_tls_error_str;
+ 		});
+ 	}
+ 
+@@ -840,15 +846,15 @@ s32 error_code::error_report(const fmt_type_info* sup,
+ 	}
+ 
+ 	// Format log message (use preallocated buffer)
+-	g_tls_error_str.clear();
+-	fmt::append(g_tls_error_str, "'%s' failed with 0x%08x%s%s%s%s", func, arg, sup ? " : " : "", std::make_pair(sup, arg), sup2 ? ", " : "", std::make_pair(sup2, arg2));
++	g_tls_error_str->clear();
++	fmt::append(*g_tls_error_str, "'%s' failed with 0x%08x%s%s%s%s", func, arg, sup ? " : " : "", std::make_pair(sup, arg), sup2 ? ", " : "", std::make_pair(sup2, arg2));
+ 
+ 	// Update stats and check log threshold
+-	const auto stat = ++g_tls_error_stats[g_tls_error_str];
++	const auto stat = ++(*g_tls_error_stats)[*g_tls_error_str];
+ 
+ 	if (stat <= 3)
+ 	{
+-		channel->format(level, "%s [%u]", g_tls_error_str, stat);
++		channel->format(level, "%s [%u]", *g_tls_error_str, stat);
+ 	}
+ 
+ 	return static_cast<s32>(arg);



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