From owner-svn-ports-all@FreeBSD.ORG Wed May 27 22:54:12 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4A7C97D; Wed, 27 May 2015 22:54:12 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 910143EE; Wed, 27 May 2015 22:54:12 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4RMsCE7090153; Wed, 27 May 2015 22:54:12 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4RMs9T3090129; Wed, 27 May 2015 22:54:09 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201505272254.t4RMs9T3090129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 27 May 2015 22:54:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r387684 - in head/emulators/ppsspp: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2015 22:54:12 -0000 Author: jbeich Date: Wed May 27 22:54:08 2015 New Revision: 387684 URL: https://svnweb.freebsd.org/changeset/ports/387684 Log: emulators/ppsspp: dogfood some improvements in-review - Use xdg-open to open links and cheat files - Change OS name in compat reports: BSD -> FreeBSD - Minor FakeJit fixes GitHub: hrydgard/native#272, hrydgard/ppsspp#7772 Added: head/emulators/ppsspp/files/patch-Core_Reporting.cpp (contents, props changed) head/emulators/ppsspp/files/patch-UI_CwCheatScreen.cpp (contents, props changed) head/emulators/ppsspp/files/patch-UI_DevScreens.cpp (contents, props changed) head/emulators/ppsspp/files/patch-native_base_PCMain.cpp (contents, props changed) Modified: head/emulators/ppsspp/Makefile (contents, props changed) head/emulators/ppsspp/files/patch-CMakeLists.txt (contents, props changed) head/emulators/ppsspp/files/patch-Common_FileUtil.cpp (contents, props changed) head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp (contents, props changed) head/emulators/ppsspp/files/patch-Core_MIPS_JitCommon_JitCommon.cpp (contents, props changed) head/emulators/ppsspp/files/patch-Core_MemMap.cpp (contents, props changed) head/emulators/ppsspp/files/patch-UI_NativeApp.cpp (contents, props changed) Modified: head/emulators/ppsspp/Makefile ============================================================================== --- head/emulators/ppsspp/Makefile Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/Makefile Wed May 27 22:54:08 2015 (r387684) @@ -3,6 +3,7 @@ PORTNAME= ppsspp PORTVERSION= 1.0.1 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= emulators .ifndef GITHUB_GROUPS MASTER_SITES= https://codeload.github.com/${GH_ACCOUNT}/${PORTNAME}-lang/tar.gz/52c757e?dummy=/:lang \ @@ -23,6 +24,7 @@ COMMENT= PSP emulator in C++ with dynare LICENSE= GPLv2 # or any later version LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg +RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils USE_GITHUB= yes .ifndef GITHUB_GROUPS Modified: head/emulators/ppsspp/files/patch-CMakeLists.txt ============================================================================== --- head/emulators/ppsspp/files/patch-CMakeLists.txt Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/files/patch-CMakeLists.txt Wed May 27 22:54:08 2015 (r387684) @@ -1,19 +1,17 @@ --- CMakeLists.txt.orig 2015-02-26 20:05:06 UTC +++ CMakeLists.txt -@@ -21,7 +21,11 @@ if(CMAKE_SYSTEM_PROCESSOR) +@@ -21,7 +21,9 @@ 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 "^amd64" OR + ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86") set(X86 ON) elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips") set(MIPS ON) -@@ -250,7 +254,7 @@ if(NOT MSVC) +@@ -250,7 +252,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_FileUtil.cpp ============================================================================== --- head/emulators/ppsspp/files/patch-Common_FileUtil.cpp Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/files/patch-Common_FileUtil.cpp Wed May 27 22:54:08 2015 (r387684) @@ -4,7 +4,7 @@ #include #endif -+#if defined(__DragonFly__) || defined(__FreeBSD__) ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#include // KERN_PROC_PATHNAME +#include // getpid +#endif Modified: head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp ============================================================================== --- head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/files/patch-Core_HLE_sceRtc.cpp Wed May 27 22:54:08 2015 (r387684) @@ -5,7 +5,7 @@ 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__) -+#ifndef _MSC_VER ++#if !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux) time_t timezone = 0; tm *time = localtime(&timezone); srcTick -= time->tm_gmtoff*1000000ULL; @@ -19,7 +19,7 @@ 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__) -+#ifndef _MSC_VER ++#if !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux) time_t timezone = 0; tm *time = localtime(&timezone); srcTick += time->tm_gmtoff*1000000ULL; @@ -33,7 +33,7 @@ int tz_seconds; -#if defined(__GLIBC__) || defined(BLACKBERRY) || defined(__SYMBIAN32__) -+#ifndef _MSC_VER ++#if !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux) time_t timezone = 0; tm *time = localtime(&timezone); tz_seconds = time->tm_gmtoff; @@ -47,7 +47,7 @@ int tz_seconds; -#if defined(__GLIBC__) || defined(BLACKBERRY) || defined(__SYMBIAN32__) -+#ifndef _MSC_VER ++#if !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux) time_t timezone = 0; tm *time = localtime(&timezone); tz_seconds = time->tm_gmtoff; Modified: head/emulators/ppsspp/files/patch-Core_MIPS_JitCommon_JitCommon.cpp ============================================================================== --- head/emulators/ppsspp/files/patch-Core_MIPS_JitCommon_JitCommon.cpp Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/files/patch-Core_MIPS_JitCommon_JitCommon.cpp Wed May 27 22:54:08 2015 (r387684) @@ -12,16 +12,12 @@ #endif void JitAt() { jit->Compile(currentMIPS->pc); -@@ -95,10 +97,12 @@ const char *ppsspp_resolver(struct ud*, - *offset = addr - (uint64_t)MIPSComp::jit->GetBasePtr(); - return "jitcode"; - } -+#if defined(_M_IX86) || defined(_M_X64) || defined(MIPS) - if (MIPSComp::jit->Asm().IsInSpace((u8 *)(intptr_t)addr)) { - *offset = addr - (uint64_t)MIPSComp::jit->Asm().GetBasePtr(); - return "dispatcher"; - } -+#endif - - return NULL; +@@ -76,7 +78,7 @@ std::vector DisassembleArm2 + return lines; } + +-#ifndef ARM ++#if defined(_M_IX86) || defined(_M_X64) + + const char *ppsspp_resolver(struct ud*, + uint64_t addr, Modified: head/emulators/ppsspp/files/patch-Core_MemMap.cpp ============================================================================== --- head/emulators/ppsspp/files/patch-Core_MemMap.cpp Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/files/patch-Core_MemMap.cpp Wed May 27 22:54:08 2015 (r387684) @@ -1,14 +1,11 @@ --- Core/MemMap.cpp.orig 2015-02-26 20:05:06 UTC +++ Core/MemMap.cpp -@@ -194,7 +194,11 @@ static bool Memory_TryBase(u32 flags) { - *view.out_ptr = *views[i - 1].out_ptr; - } else { - *view.out_ptr = (u8*)g_arena.CreateView( -+#ifdef _ARCH_32 - position, view.size, base + (view.virtual_address & MEMVIEW32_MASK)); -+#else -+ position, view.size, base + view.virtual_address); -+#endif - if (!*view.out_ptr) +@@ -185,7 +185,7 @@ static bool Memory_TryBase(u32 flags) { + if (!*view.out_ptr_low) goto bail; } +-#ifdef _M_X64 ++#if defined(_ARCH_64) + *view.out_ptr = (u8*)g_arena.CreateView( + position, view.size, base + view.virtual_address); + #else Added: head/emulators/ppsspp/files/patch-Core_Reporting.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/ppsspp/files/patch-Core_Reporting.cpp Wed May 27 22:54:08 2015 (r387684) @@ -0,0 +1,28 @@ +--- Core/Reporting.cpp.orig 2015-02-26 20:05:06 UTC ++++ Core/Reporting.cpp +@@ -189,8 +189,6 @@ namespace Reporting + return "Mac"; + #elif defined(__SYMBIAN32__) + return "Symbian"; +-#elif defined(__FreeBSD__) +- return "BSD"; + #elif defined(BLACKBERRY) + return "Blackberry"; + #elif defined(LOONGSON) +@@ -199,6 +197,16 @@ namespace Reporting + return "Nokia Maemo"; + #elif defined(__linux__) + return "Linux"; ++#elif defined(__Bitrig__) ++ return "Bitrig"; ++#elif defined(__DragonFly__) ++ return "DragonFly"; ++#elif defined(__FreeBSD__) ++ return "FreeBSD"; ++#elif defined(__NetBSD__) ++ return "NetBSD"; ++#elif defined(__OpenBSD__) ++ return "OpenBSD"; + #else + return "Unknown"; + #endif Added: head/emulators/ppsspp/files/patch-UI_CwCheatScreen.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/ppsspp/files/patch-UI_CwCheatScreen.cpp Wed May 27 22:54:08 2015 (r387684) @@ -0,0 +1,27 @@ +--- UI/CwCheatScreen.cpp.orig 2015-02-26 20:05:06 UTC ++++ UI/CwCheatScreen.cpp +@@ -72,7 +72,7 @@ void CwCheatScreen::CreateViews() { + leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + //leftColumn->Add(new Choice(k->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat); + leftColumn->Add(new Choice(k->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat); +-#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) ++#if !defined(MOBILE_DEVICE) + leftColumn->Add(new Choice(k->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile); + #endif + leftColumn->Add(new Choice(k->T("Enable/Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnEnableAll); +@@ -179,11 +179,11 @@ UI::EventReturn CwCheatScreen::OnEditChe + if (!retval) { + ERROR_LOG(BOOT, "Failed creating notepad process"); + } +-#elif defined(__APPLE__) || defined(__linux__) +-#if defined(__linux__) +- cheatFile = "xdg-open "; +-#elif defined(__APPLE__) ++#elif !defined(MOBILE_DEVICE) ++#if defined(__APPLE__) + cheatFile = "open "; ++#else ++ cheatFile = "xdg-open "; + #endif + cheatFile.append(activeCheatFile); + NOTICE_LOG(BOOT, "Launching %s", cheatFile.c_str()); Added: head/emulators/ppsspp/files/patch-UI_DevScreens.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/ppsspp/files/patch-UI_DevScreens.cpp Wed May 27 22:54:08 2015 (r387684) @@ -0,0 +1,18 @@ +--- UI/DevScreens.cpp.orig 2015-02-26 20:05:06 UTC ++++ UI/DevScreens.cpp +@@ -612,12 +612,14 @@ void JitCompareScreen::UpdateDisasm() { + + #if defined(ARM) + std::vector targetDis = DisassembleArm2(block->normalEntry, block->codeSize); +-#else ++#elif defined(_M_IX86) || defined(_M_X64) + std::vector targetDis = DisassembleX86(block->normalEntry, block->codeSize); + #endif ++#if defined(ARM) || defined(_M_IX86) || defined(_M_X64) + for (size_t i = 0; i < targetDis.size(); i++) { + rightDisasm_->Add(new TextView(targetDis[i])); + } ++#endif + + int numMips = leftDisasm_->GetNumSubviews(); + int numHost = rightDisasm_->GetNumSubviews(); Modified: head/emulators/ppsspp/files/patch-UI_NativeApp.cpp ============================================================================== --- head/emulators/ppsspp/files/patch-UI_NativeApp.cpp Wed May 27 22:09:15 2015 (r387683) +++ head/emulators/ppsspp/files/patch-UI_NativeApp.cpp Wed May 27 22:54:08 2015 (r387684) @@ -1,6 +1,6 @@ --- UI/NativeApp.cpp.orig 2015-02-26 20:05:06 UTC +++ UI/NativeApp.cpp -@@ -295,7 +295,7 @@ void NativeInit(int argc, const char *ar +@@ -291,7 +291,7 @@ void NativeInit(int argc, const char *ar #elif defined(BLACKBERRY) || defined(IOS) // Packed assets are included in app VFSRegister("", new DirectoryAssetReader(external_directory)); Added: head/emulators/ppsspp/files/patch-native_base_PCMain.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/ppsspp/files/patch-native_base_PCMain.cpp Wed May 27 22:54:08 2015 (r387684) @@ -0,0 +1,77 @@ +--- native/base/PCMain.cpp.orig 2015-02-23 23:22:58 UTC ++++ native/base/PCMain.cpp +@@ -243,53 +243,53 @@ void System_SendMessage(const char *comm + } + + void LaunchBrowser(const char *url) { +-#ifdef _WIN32 ++#if defined(MOBILE_DEVICE) ++ ILOG("Would have gone to %s but LaunchBrowser is not implemented on this platform", url); ++#elif defined(_WIN32) + ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); +-#elif __linux__ ++#elif defined(__APPLE__) ++ std::string command = std::string("open ") + url; ++ system(command.c_str()); ++#else + std::string command = std::string("xdg-open ") + url; + int err = system(command.c_str()); + if (err) { + ILOG("Would have gone to %s but xdg-utils seems not to be installed", url) + } +-#elif __APPLE__ +- std::string command = std::string("open ") + url; +- system(command.c_str()); +-#else +- ILOG("Would have gone to %s but LaunchBrowser is not implemented on this platform", url); + #endif + } + + void LaunchMarket(const char *url) { +-#ifdef _WIN32 ++#if defined(MOBILE_DEVICE) ++ ILOG("Would have gone to %s but LaunchMarket is not implemented on this platform", url); ++#elif defined(_WIN32) + ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); +-#elif __linux__ ++#elif defined(__APPLE__) ++ std::string command = std::string("open ") + url; ++ system(command.c_str()); ++#else + std::string command = std::string("xdg-open ") + url; + int err = system(command.c_str()); + if (err) { + ILOG("Would have gone to %s but xdg-utils seems not to be installed", url) + } +-#elif __APPLE__ +- std::string command = std::string("open ") + url; +- system(command.c_str()); +-#else +- ILOG("Would have gone to %s but LaunchMarket is not implemented on this platform", url); + #endif + } + + void LaunchEmail(const char *email_address) { +-#ifdef _WIN32 ++#if defined(MOBILE_DEVICE) ++ ILOG("Would have opened your email client for %s but LaunchEmail is not implemented on this platform", email_address); ++#elif defined(_WIN32) + ShellExecute(NULL, "open", (std::string("mailto:") + email_address).c_str(), NULL, NULL, SW_SHOWNORMAL); +-#elif __linux__ ++#elif defined(__APPLE__) ++ std::string command = std::string("open mailto:") + email_address; ++ system(command.c_str()); ++#else + std::string command = std::string("xdg-email ") + email_address; + int err = system(command.c_str()); + if (err) { + ILOG("Would have gone to %s but xdg-utils seems not to be installed", email_address) + } +-#elif __APPLE__ +- std::string command = std::string("open mailto:") + email_address; +- system(command.c_str()); +-#else +- ILOG("Would have opened your email client for %s but LaunchEmail is not implemented on this platform", email_address); + #endif + } +