Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2015 00:13:20 +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: r387452 - head/emulators/ppsspp/files
Message-ID:  <201505260013.t4Q0DKZE059662@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue May 26 00:13:19 2015
New Revision: 387452
URL: https://svnweb.freebsd.org/changeset/ports/387452

Log:
  emulators/ppsspp: dogfood for-review quality back to the port
  
  Mainly to keep my sanity if a regression pops up.
  
  GitHub:		hrydgard/native#271 (merged), hrydgard/ppsspp#7772

Modified:
  head/emulators/ppsspp/files/patch-CMakeLists.txt
  head/emulators/ppsspp/files/patch-Common_StdMutex.h
  head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp
  head/emulators/ppsspp/files/patch-Qt_Platform_linux.pri
  head/emulators/ppsspp/files/patch-Qt_Settings.pri
  head/emulators/ppsspp/files/patch-UI_NativeApp.cpp
  head/emulators/ppsspp/files/patch-native_ext_cityhash_city.cpp
  head/emulators/ppsspp/files/patch-native_ext_stb__vorbis_stb__vorbis.c
  head/emulators/ppsspp/files/patch-native_file_file__util.cpp
  head/emulators/ppsspp/files/patch-native_net_http__server.cpp

Modified: head/emulators/ppsspp/files/patch-CMakeLists.txt
==============================================================================
--- head/emulators/ppsspp/files/patch-CMakeLists.txt	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-CMakeLists.txt	Tue May 26 00:13:19 2015	(r387452)
@@ -1,15 +1,19 @@
 --- CMakeLists.txt.orig	2015-02-26 20:05:06 UTC
 +++ CMakeLists.txt
-@@ -21,6 +21,8 @@ if(CMAKE_SYSTEM_PROCESSOR)
+@@ -21,7 +21,11 @@ if(CMAKE_SYSTEM_PROCESSOR)
  		if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7")
  			set(ARMV7 ON)
  		endif()
+-	elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
 +	elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64")
 +		set(X86 ON)
- 	elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
++	elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR
++		${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64" OR
++		${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
  		set(X86 ON)
  	elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips")
-@@ -250,7 +252,7 @@ if(NOT MSVC)
+ 		set(MIPS ON)
+@@ -250,7 +254,7 @@ if(NOT MSVC)
  		if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
  			add_definitions(-Wno-psabi)
  		endif()

Modified: head/emulators/ppsspp/files/patch-Common_StdMutex.h
==============================================================================
--- head/emulators/ppsspp/files/patch-Common_StdMutex.h	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-Common_StdMutex.h	Tue May 26 00:13:19 2015	(r387452)
@@ -1,17 +1,12 @@
 --- Common/StdMutex.h.orig	2015-02-26 20:05:06 UTC
 +++ Common/StdMutex.h
-@@ -4,12 +4,10 @@
- #define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
+@@ -5,7 +5,8 @@
  #define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
  
--// Note: __MAC_10_7 is defined on 10.7+.
+ // Note: __MAC_10_7 is defined on 10.7+.
 -#if (GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ || defined(__APPLE__)) \
--/* GCC 4.4 provides <mutex>, except on these platforms: */ \
--    && !defined(ANDROID) && !defined(__SYMBIAN32__) && !defined(MACGNUSTD)
-+#if __cplusplus >= 201103L
++#if (__cplusplus >= 201103L || defined(__APPLE__) \
++    || (GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__)) \
+ /* GCC 4.4 provides <mutex>, except on these platforms: */ \
+     && !defined(ANDROID) && !defined(__SYMBIAN32__) && !defined(MACGNUSTD)
  #include <mutex>
- #else
-+#warning "partial <mutex> implementation"
- 
- // partial <mutex> implementation for win32/pthread
- #include <algorithm>

Modified: head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp
==============================================================================
--- head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp	Tue May 26 00:13:19 2015	(r387452)
@@ -1,38 +1,58 @@
 --- Core/HLE/sceRtc.cpp.orig	2015-02-26 20:05:06 UTC
 +++ Core/HLE/sceRtc.cpp
-@@ -459,7 +459,7 @@ static int sceRtcConvertLocalTimeToUTC(u
+@@ -459,12 +459,10 @@ static int sceRtcConvertLocalTimeToUTC(u
  	{
  		u64 srcTick = Memory::Read_U64(tickLocalPtr);
  		// TODO : Let the user select his timezone / daylight saving instead of taking system param ?
 -#if defined(__GLIBC__) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
-+#if 1 // #else block uses undeclared `timezone'
++#ifndef _MSC_VER
  		time_t timezone = 0;
  		tm *time = localtime(&timezone);
  		srcTick -= time->tm_gmtoff*1000000ULL;
-@@ -482,7 +482,7 @@ static int sceRtcConvertUtcToLocalTime(u
+-#else
+-		srcTick -= -timezone * 1000000ULL;
+ #endif
+ 		Memory::Write_U64(srcTick, tickUTCPtr);
+ 	}
+@@ -482,12 +480,10 @@ static int sceRtcConvertUtcToLocalTime(u
  	{
  		u64 srcTick = Memory::Read_U64(tickUTCPtr);
  		// TODO : Let the user select his timezone / daylight saving instead of taking system param ?
 -#if defined(__GLIBC__) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
-+#if 1 // #else block uses undeclared `timezone'
++#ifndef _MSC_VER
  		time_t timezone = 0;
  		tm *time = localtime(&timezone);
  		srcTick += time->tm_gmtoff*1000000ULL;
-@@ -1015,7 +1015,7 @@ static int sceRtcFormatRFC2822LocalTime(
+-#else
+-		srcTick += -timezone * 1000000ULL;
+ #endif
+ 		Memory::Write_U64(srcTick, tickLocalPtr);
+ 	}
+@@ -1015,12 +1011,10 @@ static int sceRtcFormatRFC2822LocalTime(
  	}
  
  	int tz_seconds;
 -#if defined(__GLIBC__) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
-+#if 1 // #else block uses undeclared `timezone'
++#ifndef _MSC_VER
  		time_t timezone = 0;
  		tm *time = localtime(&timezone);
  		tz_seconds = time->tm_gmtoff;
-@@ -1050,7 +1050,7 @@ static int sceRtcFormatRFC3339LocalTime(
+-#else
+-		tz_seconds = -timezone;
+ #endif
+ 
+ 	DEBUG_LOG(SCERTC, "sceRtcFormatRFC2822LocalTime(%08x, %08x)", outPtr, srcTickPtr);
+@@ -1050,12 +1044,10 @@ static int sceRtcFormatRFC3339LocalTime(
  	}
  
  	int tz_seconds;
 -#if defined(__GLIBC__) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
-+#if 1 // #else block uses undeclared `timezone'
++#ifndef _MSC_VER
  		time_t timezone = 0;
  		tm *time = localtime(&timezone);
  		tz_seconds = time->tm_gmtoff;
+-#else
+-		tz_seconds = -timezone;
+ #endif
+ 
+ 	DEBUG_LOG(SCERTC, "sceRtcFormatRFC3339LocalTime(%08x, %08x)", outPtr, srcTickPtr);

Modified: head/emulators/ppsspp/files/patch-Qt_Platform_linux.pri
==============================================================================
--- head/emulators/ppsspp/files/patch-Qt_Platform_linux.pri	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-Qt_Platform_linux.pri	Tue May 26 00:13:19 2015	(r387452)
@@ -5,8 +5,8 @@
  
  	# Executable
 -	LIBS += -ldl -lrt
-+	LIBS += $$QMAKE_LIBS_DYNLOAD
-+	linux-*|hpux-*|solaris-*: LIBS += -lrt
++	LIBS += $$QMAKE_LIBS_DYNLOAD # dlopen
++	linux-*|hpux-*|solaris-*: LIBS += -lrt # clock_gettime
  
  	# Packaging
  	icon16.files = $$P/assets/unix-icons/hicolor/16x16/apps/ppsspp.png

Modified: head/emulators/ppsspp/files/patch-Qt_Settings.pri
==============================================================================
--- head/emulators/ppsspp/files/patch-Qt_Settings.pri	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-Qt_Settings.pri	Tue May 26 00:13:19 2015	(r387452)
@@ -6,7 +6,7 @@
  P = $$_PRO_FILE_PWD_/..
 -INCLUDEPATH += $$P/ext/zlib $$P/Common
 +INCLUDEPATH += $$P/Common
-+contains(QT_CONFIG, no-zlib): INCLUDEPATH += $$P/ext/zlib
++win32|contains(QT_CONFIG, no-zlib): INCLUDEPATH += $$P/ext/zlib
  
  # Work out arch name
  include(Platform/ArchDetection.pri)

Modified: head/emulators/ppsspp/files/patch-UI_NativeApp.cpp
==============================================================================
--- head/emulators/ppsspp/files/patch-UI_NativeApp.cpp	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-UI_NativeApp.cpp	Tue May 26 00:13:19 2015	(r387452)
@@ -1,12 +1,11 @@
 --- UI/NativeApp.cpp.orig	2015-02-26 20:05:06 UTC
 +++ UI/NativeApp.cpp
-@@ -291,7 +291,8 @@ void NativeInit(int argc, const char *ar
+@@ -295,7 +295,7 @@ void NativeInit(int argc, const char *ar
  #elif defined(BLACKBERRY) || defined(IOS)
  	// Packed assets are included in app
  	VFSRegister("", new DirectoryAssetReader(external_directory));
 -#elif defined(__APPLE__) || (defined(__linux__) && !defined(ANDROID))
-+#elif defined(__APPLE__) || (defined(__linux__) && !defined(ANDROID)) || \
-+      defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#elif !defined(MOBILE_DEVICE) && !defined(_WIN32)
  	VFSRegister("", new DirectoryAssetReader((File::GetExeDirectory() + "assets/").c_str()));
  	VFSRegister("", new DirectoryAssetReader((File::GetExeDirectory()).c_str()));
  	VFSRegister("", new DirectoryAssetReader("/usr/share/ppsspp/assets/"));

Modified: head/emulators/ppsspp/files/patch-native_ext_cityhash_city.cpp
==============================================================================
--- head/emulators/ppsspp/files/patch-native_ext_cityhash_city.cpp	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-native_ext_cityhash_city.cpp	Tue May 26 00:13:19 2015	(r387452)
@@ -1,6 +1,6 @@
 --- native/ext/cityhash/city.cpp.orig	2015-02-23 23:22:58 UTC
 +++ native/ext/cityhash/city.cpp
-@@ -68,7 +68,7 @@ static uint32 UNALIGNED_LOAD32(const cha
+@@ -68,12 +68,12 @@ static uint32 UNALIGNED_LOAD32(const cha
  #define bswap_32(x) BSWAP_32(x)
  #define bswap_64(x) BSWAP_64(x)
  
@@ -9,3 +9,9 @@
  #include <sys/endian.h>
  #define bswap_32(x) bswap32(x)
  #define bswap_64(x) bswap64(x)
+ 
+-#elif defined(__OpenBSD__)
++#elif defined(__Bitrig__) || defined(__OpenBSD__)
+ #include <sys/types.h>
+ #define bswap_32(x) swap32(x)
+ #define bswap_64(x) swap64(x)

Modified: head/emulators/ppsspp/files/patch-native_ext_stb__vorbis_stb__vorbis.c
==============================================================================
--- head/emulators/ppsspp/files/patch-native_ext_stb__vorbis_stb__vorbis.c	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-native_ext_stb__vorbis_stb__vorbis.c	Tue May 26 00:13:19 2015	(r387452)
@@ -5,7 +5,7 @@
  #pragma warning (disable:4244)
  #include <malloc.h>
 -#elif !defined(__SYMBIAN32__)
-+#elif !defined(__SYMBIAN32__) && !defined(__DragonFly__) && \
++#elif !defined(__SYMBIAN32__) && !defined(__Bitrig__) && !defined(__DragonFly__) && \
 +      !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
  #include <alloca.h>
  #endif

Modified: head/emulators/ppsspp/files/patch-native_file_file__util.cpp
==============================================================================
--- head/emulators/ppsspp/files/patch-native_file_file__util.cpp	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-native_file_file__util.cpp	Tue May 26 00:13:19 2015	(r387452)
@@ -5,7 +5,7 @@
  #include "util/text/utf8.h"
  
 -#if defined(__FreeBSD__) || defined(__APPLE__)
-+#if !defined(__linux__) && !defined(__SYMBIAN32__)
++#if !defined(__linux__) && !defined(_WIN32) && !defined(__QNX__)
  #define stat64 stat
  #endif
  

Modified: head/emulators/ppsspp/files/patch-native_net_http__server.cpp
==============================================================================
--- head/emulators/ppsspp/files/patch-native_net_http__server.cpp	Tue May 26 00:12:10 2015	(r387451)
+++ head/emulators/ppsspp/files/patch-native_net_http__server.cpp	Tue May 26 00:13:19 2015	(r387452)
@@ -1,10 +1,10 @@
 --- native/net/http_server.cpp.orig	2015-02-23 23:22:58 UTC
 +++ native/net/http_server.cpp
-@@ -12,6 +12,7 @@
+@@ -11,6 +11,7 @@
+ #include <sys/socket.h>       /*  socket definitions        */
  #include <sys/types.h>        /*  socket types              */
  #include <sys/wait.h>         /*  for waitpid()             */
- #include <arpa/inet.h>        /*  inet (3) funtions         */
 +#include <netinet/in.h>       /*  struct sockaddr_in        */
+ #include <arpa/inet.h>        /*  inet (3) funtions         */
  #include <unistd.h>           /*  misc. UNIX functions      */
  
- #endif



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