1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

emulators/ppsspp: update to 1.1.0

- Integrate r397030 and r397702 into master port
- Switch slave port back to use patches from master

Changes:	http://ppsspp.org/#news
This commit is contained in:
Jan Beich 2015-10-06 03:20:26 +00:00
parent b9090f2d43
commit fc27b37532
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=398680
44 changed files with 28 additions and 811 deletions

View File

@ -4,34 +4,12 @@ DISTVERSION= 1.0.1-2768
DISTVERSIONSUFFIX= -gd8b43dd
PORTREVISION= 0
PKGNAMESUFFIX= -devel
# XXX Get from Debian once #697821 lands
MASTER_SITES= https://bazaar.launchpad.net/~sergio-br2/${PORTNAME}/debian-sdl/download/1/${PORTNAME}.1-20140802045408-dd26dik367ztj5xg-8/:manpage
DISTFILES= ${PORTNAME}.1:manpage
EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//}
GH_TAGNAME= e22d7a5:lang a0b878f:ext_armips
CONFLICTS_INSTALL?= ${PORTNAME}-[0-9]*
LIB_DEPENDS= libzip.so:${PORTSDIR}/archivers/libzip \
libsnappy.so:${PORTSDIR}/archivers/snappy
USE_GL= glew
EXCLUDE= glew snappy libzip zlib
EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,}
MASTERDIR= ${.CURDIR}/../ppsspp
PATCHDIR= ${.CURDIR}/files
DISTINFO_FILE= ${.CURDIR}/distinfo
post-patch: slave-post-patch
slave-post-patch:
@${REINPLACE_CMD} -e 's,/usr,${LOCALBASE},' \
${WRKSRC}/Qt/*.pr*
post-install: slave-post-install
slave-post-install:
${INSTALL_MAN} ${_DISTDIR}/${PORTNAME}.1 \
${STAGEDIR}${MAN1PREFIX}/man/man1
.include "${MASTERDIR}/Makefile"

View File

@ -1,16 +0,0 @@
--- CMakeLists.txt.orig 2015-02-26 20:05:06 UTC
+++ CMakeLists.txt
@@ -525,9 +527,10 @@ target_link_libraries(libzip ${ZLIB_LIBR
include_directories(native/ext/libzip)
set(LIBZIP_LIBRARY libzip)
-# FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17
-find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h")
-find_library(PNG_LIBRARY NAMES png17 libpng17)
+find_package(PkgConfig)
+pkg_check_modules(PNG libpng>=1.6)
+set(PNG_LIBRARY ${PNG_LIBRARIES})
+set(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS})
find_package(PackageHandleStandardArgs)
find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
if (PNG_FOUND)

View File

@ -1,38 +0,0 @@
--- Common/MemoryUtil.cpp.orig 2015-02-26 20:05:06 UTC
+++ Common/MemoryUtil.cpp
@@ -49,6 +49,13 @@ static SYSTEM_INFO sys_info;
#define round_page(x) ((((uintptr_t)(x)) + PAGE_MASK) & ~(PAGE_MASK))
#endif
+#if defined(__FreeBSD__)
+/* setrlimit(2) */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+
#ifdef __SYMBIAN32__
#include <e32std.h>
#define CODECHUNK_SIZE 1024*1024*20
@@ -142,6 +149,21 @@ void* AllocateExecutableMemory(size_t si
map_hint = (char*)round_page(&hint_location) - 0x20000000; // 0.5gb lower than our approximate location
else
map_hint = (char*)0x20000000; // 0.5GB mark in memory
+
+#if defined(__FreeBSD__)
+ // XXX Fix maximum data segment size (data + BSS + heap) to 256 MB.
+ // This allows avoiding calling mmap(2) with MAP_FIXED.
+ // On FreeBSD, without lowering this limit, calling mmap(2)
+ // without MAP_FIXED will result in getting an address just
+ // beyond maximum data segment size which will be far beyond
+ // the desired 2 GB.
+ struct rlimit limit;
+ limit.rlim_cur = 0x10000000; // 256 MB
+ limit.rlim_max = 0x10000000;
+ if(setrlimit(RLIMIT_DATA, &limit) != 0) {
+ PanicAlert("Failed to lower maximum data segment size");
+ }
+#endif
}
else if (exec && (uintptr_t) map_hint > 0xFFFFFFFFULL)
{

View File

@ -1,11 +0,0 @@
--- Core/Screenshot.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/Screenshot.cpp
@@ -18,7 +18,7 @@
#ifdef USING_QT_UI
#include <QtGui/QImage>
#else
-#include <libpng17/png.h>
+#include "png.h"
#include "ext/jpge/jpge.h"
#endif

View File

@ -1,37 +0,0 @@
--- ext/xbrz/xbrz.cpp.orig 2015-05-28 17:02:46 UTC
+++ ext/xbrz/xbrz.cpp
@@ -648,23 +648,21 @@ void scalePixel(const Kernel_3x3& ker,
auto eq = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_) < cfg.equalColorTolerance_; };
auto dist = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_); };
- const bool doLineBlend = [&]() -> bool
- {
+ bool doLineBlend;
+
if (getBottomR(blend) >= BLEND_DOMINANT)
- return true;
+ doLineBlend = true;
//make sure there is no second blending in an adjacent rotation for this pixel: handles insular pixels, mario eyes
- if (getTopR(blend) != BLEND_NONE && !eq(e, g)) //but support double-blending for 90° corners
- return false;
- if (getBottomL(blend) != BLEND_NONE && !eq(e, c))
- return false;
-
+ else if (getTopR(blend) != BLEND_NONE && !eq(e, g)) //but support double-blending for 90° corners
+ doLineBlend = false;
+ else if (getBottomL(blend) != BLEND_NONE && !eq(e, c))
+ doLineBlend = false;
//no full blending for L-shapes; blend corner only (handles "mario mushroom eyes")
- if (!eq(e, i) && eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c))
- return false;
-
- return true;
- }();
+ else if (!eq(e, i) && eq(g, h) && eq(h, i) && eq(i, f) && eq(f, c))
+ doLineBlend = false;
+ else
+ doLineBlend = true;
const uint32_t px = dist(e, f) <= dist(e, h) ? f : h; //choose most similar color

View File

@ -2,37 +2,35 @@
PORTNAME= ppsspp
DISTVERSIONPREFIX= v
DISTVERSION?= 1.0.1
PORTREVISION?= 5
DISTVERSION?= 1.1.0
PORTREVISION?= 0
CATEGORIES= emulators
.ifndef PKGNAMESUFFIX
PATCH_SITES= https://projects.archlinux.org/svntogit/community.git/plain/trunk/
PATCHFILES= ${PORTNAME}-ffmpeg.patch?id=f2b9251:-p1
.endif
# XXX Get from Debian once #697821 lands
MASTER_SITES= https://bazaar.launchpad.net/~sergio-br2/${PORTNAME}/debian-sdl/download/1/${PORTNAME}.1-20140802045408-dd26dik367ztj5xg-8/:manpage
DISTFILES= ${PORTNAME}.1:manpage
EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//}
MAINTAINER= jbeich@FreeBSD.org
COMMENT= PSP emulator in C++ with dynarec JIT for x86, ARM, MIPS
LICENSE= GPLv2 # or any later version
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
LIB_DEPENDS= libzip.so:${PORTSDIR}/archivers/libzip \
libsnappy.so:${PORTSDIR}/archivers/snappy \
libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils
USE_GITHUB= yes
GH_ACCOUNT= hrydgard:DEFAULT,lang Kingcom:ext_armips
GH_PROJECT= ${PORTNAME}-lang:lang armips:ext_armips
GH_TAGNAME?= 52c757e:lang 52ce9c1:native a0b878f:ext_armips
.ifndef PKGNAMESUFFIX
GH_ACCOUNT+= hrydgard:native
GH_PROJECT+= native:native
.endif
GH_TAGNAME?= 38e1efe:lang a0b878f:ext_armips
CONFLICTS_INSTALL?= ${PORTNAME}-devel-[0-9]*
USES= compiler:c++11-lib localbase pkgconfig
USE_GL+= glu
EXCLUDE= glew snappy libzip zlib
EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,}
USE_GL= glew glu
USE_SDL= sdl2 # joystick
CMAKE_ARGS= -DUSE_SYSTEM_FFMPEG=on
QMAKE_SOURCE_PATH= ${WRKSRC}/Qt/PPSSPPQt.pro
@ -70,6 +68,8 @@ post-extract:
post-patch:
@${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,' \
${WRKSRC}/UI/NativeApp.cpp
@${REINPLACE_CMD} -e 's,/usr,${LOCALBASE},' \
${WRKSRC}/Qt/*.pr*
@${REINPLACE_CMD} \
-e 's/"unknown"/"${GH_TAGNAME}"/' \
-e 's/^\(VERSION =\).*/\1 ${GH_TAGNAME}/' \
@ -91,10 +91,8 @@ do-install-SDL-off:
${STAGEDIR}${PREFIX}/bin
post-install:
.ifndef PKGNAMESUFFIX
${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.1 \
${INSTALL_MAN} ${_DISTDIR}/${PORTNAME}.1 \
${STAGEDIR}${MAN1PREFIX}/man/man1
.endif
(cd ${WRKSRC}/assets/unix-icons && ${COPYTREE_SHARE} \
"hicolor" ${STAGEDIR}${PREFIX}/share/icons)
${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps

View File

@ -1,10 +1,8 @@
SHA256 (hrydgard-ppsspp-v1.0.1_GH0.tar.gz) = e2d656671301a13e13f94c0a3021eaacacc9428fa9df60307b16ed5b4498812c
SIZE (hrydgard-ppsspp-v1.0.1_GH0.tar.gz) = 14199883
SHA256 (hrydgard-ppsspp-lang-52c757e_GH0.tar.gz) = 9f9c97e1d506645f68dfb7fbd6c380be0bb66d23f56a33251bb50ac95b498e8a
SIZE (hrydgard-ppsspp-lang-52c757e_GH0.tar.gz) = 193165
SHA256 (hrydgard-native-52ce9c1_GH0.tar.gz) = 2d3fbcc0685046326f21158892c235a1dcd4770d1cfedd29da0e06daa9c2ce5e
SIZE (hrydgard-native-52ce9c1_GH0.tar.gz) = 1393991
SHA256 (ppsspp.1) = 8e335555393a6400c97d5f6d23798af801f88b909181bb5af676dfdcb4f8f8be
SIZE (ppsspp.1) = 1507
SHA256 (hrydgard-ppsspp-v1.1.0_GH0.tar.gz) = b65d95e66d37bdcb2e9ab4d176014f2088951f4be7e0d13fc1de6786ab4ef736
SIZE (hrydgard-ppsspp-v1.1.0_GH0.tar.gz) = 14767366
SHA256 (hrydgard-ppsspp-lang-38e1efe_GH0.tar.gz) = 5585ff0b46d7ff7633b23d0069a20d27107003454c77f06762f4e6701725cd1c
SIZE (hrydgard-ppsspp-lang-38e1efe_GH0.tar.gz) = 214388
SHA256 (Kingcom-armips-a0b878f_GH0.tar.gz) = 64623bbddda609f9692904e6b6823b1d2d4dd0149349f2be9edcc600bf12bafa
SIZE (Kingcom-armips-a0b878f_GH0.tar.gz) = 136535
SHA256 (ppsspp-ffmpeg.patch?id=f2b9251) = 4d60b99f9e6fe1bb81b2b1b648845f9e76289ba824fcb5e53f2117d0319e086d
SIZE (ppsspp-ffmpeg.patch?id=f2b9251) = 6304

View File

@ -1,25 +1,5 @@
--- CMakeLists.txt.orig 2015-02-26 20:05:06 UTC
+++ CMakeLists.txt
@@ -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 "^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 +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()
- add_definitions(-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1)
+ add_definitions(-D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1)
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
@@ -525,9 +527,10 @@ target_link_libraries(libzip ${ZLIB_LIBR
include_directories(native/ext/libzip)
set(LIBZIP_LIBRARY libzip)

View File

@ -1,18 +0,0 @@
From ef8fc4b53d92fbfcd8ef1abbd6f2f5fe2c4a11e5 Mon Sep 17 00:00:00 2001
From: Stanislav Malyshev <stas@php.net>
Date: Tue, 17 Mar 2015 21:59:56 -0700
Subject: Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
diff --git a/ext/zip/lib/zip_dirent.c b/ext/zip/lib/zip_dirent.c
index b9dac5c..0090801 100644
--- native/ext/libzip/zip_dirent.c
+++ native/ext/libzip/zip_dirent.c
@@ -101,7 +101,7 @@ _zip_cdir_new(int nentry, struct zip_error *error)
return NULL;
}
- if ((cd->entry=(struct zip_dirent *)malloc(sizeof(*(cd->entry))*nentry))
+ if ( nentry > ((size_t)-1)/sizeof(*(cd->entry)) || (cd->entry=(struct zip_dirent *)malloc(sizeof(*(cd->entry))*(size_t)nentry))
== NULL) {
_zip_error_set(error, ZIP_ER_MEMORY, 0);
free(cd);

View File

@ -1,21 +0,0 @@
--- Common/CPUDetect.cpp.orig 2015-02-26 20:05:06 UTC
+++ Common/CPUDetect.cpp
@@ -62,17 +62,7 @@ static unsigned long long _xgetbv(unsign
#define _XCR_XFEATURE_ENABLED_MASK 0
#endif
-#if defined __FreeBSD__
-#include <sys/types.h>
-#include <machine/cpufunc.h>
-
-void do_cpuidex(u32 regs[4], u32 cpuid_leaf, u32 ecxval) {
- __cpuidex((int *)regs, cpuid_leaf, ecxval);
-}
-void do_cpuid(u32 regs[4], u32 cpuid_leaf) {
- __cpuid((int *)regs, cpuid_leaf);
-}
-#elif !defined(MIPS)
+#if !defined(MIPS)
void do_cpuidex(u32 regs[4], u32 cpuid_leaf, u32 ecxval) {
#if defined(__i386__) && defined(__PIC__)

View File

@ -1,40 +0,0 @@
--- Common/FileUtil.cpp.orig 2015-02-26 20:05:06 UTC
+++ Common/FileUtil.cpp
@@ -35,6 +35,11 @@
#include <stdlib.h>
#endif
+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <sys/sysctl.h> // KERN_PROC_PATHNAME
+#include <unistd.h> // getpid
+#endif
+
#if defined(__APPLE__)
#include <CoreFoundation/CFString.h>
#include <CoreFoundation/CFURL.h>
@@ -703,7 +708,7 @@ const std::string &GetExeDirectory()
ExePath = program_path;
#endif
-#elif (defined(__APPLE__) && !defined(IOS)) || defined(__linux__)
+#elif (defined(__APPLE__) && !defined(IOS)) || defined(__linux__) || defined(KERN_PROC_PATHNAME)
char program_path[4096];
uint32_t program_path_size = sizeof(program_path) - 1;
@@ -711,6 +716,16 @@ const std::string &GetExeDirectory()
if (readlink("/proc/self/exe", program_path, 4095) > 0)
#elif defined(__APPLE__) && !defined(IOS)
if (_NSGetExecutablePath(program_path, &program_path_size) == 0)
+#elif defined(KERN_PROC_PATHNAME)
+ int mib[4] = {
+ CTL_KERN,
+ KERN_PROC,
+ KERN_PROC_PATHNAME,
+ getpid()
+ };
+ size_t sz = program_path_size;
+
+ if (sysctl(mib, 4, program_path, &sz, NULL, 0) == 0)
#else
#error Unmatched ifdef.
#endif

View File

@ -1,11 +0,0 @@
--- Common/MemArena.cpp.orig 2015-02-26 20:05:06 UTC
+++ Common/MemArena.cpp
@@ -189,7 +189,7 @@ void *MemArena::CreateView(s64 offset, s
// Do not sync memory to underlying file. Linux has this by default.
#ifdef BLACKBERRY
MAP_NOSYNCFILE |
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__) || defined(__FreeBSD__)
MAP_NOSYNC |
#endif
((base == 0) ? 0 : MAP_FIXED), fd, offset);

View File

@ -36,12 +36,3 @@
}
else if (exec && (uintptr_t) map_hint > 0xFFFFFFFFULL)
{
@@ -160,7 +182,7 @@ void* AllocateExecutableMemory(size_t si
// printf("Mapped executable memory at %p (size %ld)\n", ptr,
// (unsigned long)size);
-#if defined(__FreeBSD__)
+#if !defined(_WIN32) && !defined(__SYMBIAN32__)
if (ptr == MAP_FAILED)
{
ptr = NULL;

View File

@ -1,12 +0,0 @@
--- Common/StdMutex.h.orig 2015-02-26 20:05:06 UTC
+++ Common/StdMutex.h
@@ -5,7 +5,8 @@
#define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
// Note: __MAC_10_7 is defined on 10.7+.
-#if (GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ || defined(__APPLE__)) \
+#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>

View File

@ -1,18 +0,0 @@
--- Common/Swap.h.orig 2015-02-26 20:05:06 UTC
+++ Common/Swap.h
@@ -71,6 +71,15 @@ inline unsigned long long bswap64(unsign
inline unsigned int bswap32(unsigned int x) { return __loadwordbytereverse(0, &x); }
inline unsigned short bswap16(unsigned short x) { return __loadshortbytereverse(0, &x); }
#endif
+#elif defined(__DragonFly__) || defined(__FreeBSD__) || \
+ defined(__NetBSD__) || defined(__OpenBSD__)
+#include <sys/endian.h>
+# ifdef __OpenBSD__
+#define bswap16 swap16
+#define bswap32 swap32
+#define bswap64 swap64
+#define
+# endif
#else
// TODO: speedup
inline unsigned short bswap16(unsigned short x) { return (x << 8) | (x >> 8); }

View File

@ -1,12 +0,0 @@
--- Core/FileSystems/tlzrc.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/FileSystems/tlzrc.cpp
@@ -22,9 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if !defined(__SYMBIAN32__) && !defined(__MAC_10_6)
-#include <malloc.h>
-#endif
#include "Common.h"

View File

@ -1,11 +0,0 @@
--- Core/HLE/ReplaceTables.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/HLE/ReplaceTables.cpp
@@ -1007,6 +1007,8 @@ static int Hook_photokano_download_frame
#define JITFUNC(f) (&MIPSComp::Jit::f)
#elif defined(MIPS)
#define JITFUNC(f) (&MIPSComp::Jit::f)
+#else
+#define JITFUNC(f) (&MIPSComp::FakeJit::f)
#endif
// Can either replace with C functions or functions emitted in Asm/ArmAsm.

View File

@ -1,58 +0,0 @@
--- Core/HLE/sceRtc.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/HLE/sceRtc.cpp
@@ -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 !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux)
time_t timezone = 0;
tm *time = localtime(&timezone);
srcTick -= time->tm_gmtoff*1000000ULL;
-#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 !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux)
time_t timezone = 0;
tm *time = localtime(&timezone);
srcTick += time->tm_gmtoff*1000000ULL;
-#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 !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux)
time_t timezone = 0;
tm *time = localtime(&timezone);
tz_seconds = time->tm_gmtoff;
-#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 !defined(_MSC_VER) && !defined(_AIX) && !defined(__sgi) && !defined(__hpux)
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);

View File

@ -1,26 +0,0 @@
--- Core/Loaders.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/Loaders.cpp
@@ -15,6 +15,9 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
+// XXX ports/193528
+#define _GLIBCXX_USE_C99 1
+
#include <algorithm>
#include <cstdio>
@@ -310,12 +313,7 @@ HTTPFileLoader::HTTPFileLoader(const std
size_pos = header.find_first_not_of(' ', size_pos);
}
if (size_pos != header.npos) {
- // TODO: Find a way to get this to work right on Symbian?
-#ifndef __SYMBIAN32__
- filesize_ = atoll(&header[size_pos]);
-#else
- filesize_ = atoi(&header[size_pos]);
-#endif
+ filesize_ = std::atoll(&header[size_pos]);
}
}
if (startsWithNoCase(header, "Accept-Ranges:")) {

View File

@ -1,23 +0,0 @@
--- Core/MIPS/JitCommon/JitCommon.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/MIPS/JitCommon/JitCommon.cpp
@@ -27,8 +27,10 @@
namespace MIPSComp {
#if defined(ARM)
ArmJit *jit;
-#else
+#elif defined(_M_IX86) || defined(_M_X64) || defined(MIPS)
Jit *jit;
+#else
+ FakeJit *jit;
#endif
void JitAt() {
jit->Compile(currentMIPS->pc);
@@ -76,7 +78,7 @@ std::vector<std::string> DisassembleArm2
return lines;
}
-#ifndef ARM
+#if defined(_M_IX86) || defined(_M_X64)
const char *ppsspp_resolver(struct ud*,
uint64_t addr,

View File

@ -1,11 +0,0 @@
--- Core/MIPS/fake/FakeJit.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/MIPS/fake/FakeJit.cpp
@@ -138,7 +138,7 @@ void FakeJit::RunLoopUntil(u64 globaltic
((void (*)())enterCode)();
}
-const u8 *FakeJit::DoFakeJit(u32 em_address, FakeJitBlock *b)
+const u8 *FakeJit::DoJit(u32 em_address, JitBlock *b)
{
return b->normalEntry;
}

View File

@ -1,11 +0,0 @@
--- Core/MemMap.cpp.orig 2015-02-26 20:05:06 UTC
+++ Core/MemMap.cpp
@@ -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

View File

@ -1,28 +0,0 @@
--- 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

View File

@ -1,13 +0,0 @@
--- GPU/GLES/TextureScaler.cpp.orig 2015-02-26 20:05:06 UTC
+++ GPU/GLES/TextureScaler.cpp
@@ -34,8 +34,8 @@
#include <stdlib.h>
#include <math.h>
-#if _M_SSE >= 0x402
-#include <nmmintrin.h>
+#if _M_SSE >= 0x401
+#include <smmintrin.h>
#endif
// Report the time and throughput for each larger scaling operation in the log

View File

@ -1,11 +0,0 @@
--- Qt/PPSSPP.pro.orig 2015-02-26 20:05:06 UTC
+++ Qt/PPSSPP.pro
@@ -91,7 +91,7 @@ mobile_platform {
INCLUDEPATH += $$P/Qt $$P/Qt/Debugger
# Creating translations should be done by Qt, really
- LREL_TOOL = lrelease
+ isEmpty(LREL_TOOL): LREL_TOOL = lrelease
# Grab all possible directories (win32/unix)
win32: PATHS = $$split($$(PATH), ;)
else: PATHS = $$split($$(PATH), :)

View File

@ -1,12 +0,0 @@
--- Qt/Platform/linux.pri.orig 2015-02-26 20:05:06 UTC
+++ Qt/Platform/linux.pri
@@ -6,7 +6,8 @@
}
# Executable
- LIBS += -ldl -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

View File

@ -1,12 +0,0 @@
--- Qt/Settings.pri.orig 2015-02-26 20:05:06 UTC
+++ Qt/Settings.pri
@@ -12,7 +12,8 @@ RCC_DIR = $$CONFIG_DIR/.rcc/$$TARGET
QMAKE_CLEAN += -r $$OBJECTS_DIR $$MOC_DIR $$UI_DIR $$RCC_DIR
P = $$_PRO_FILE_PWD_/..
-INCLUDEPATH += $$P/ext/zlib $$P/Common
+INCLUDEPATH += $$P/Common
+win32|contains(QT_CONFIG, no-zlib): INCLUDEPATH += $$P/ext/zlib
# Work out arch name
include(Platform/ArchDetection.pri)

View File

@ -1,27 +0,0 @@
--- 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<UIScreen>(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());

View File

@ -1,18 +0,0 @@
--- 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<std::string> targetDis = DisassembleArm2(block->normalEntry, block->codeSize);
-#else
+#elif defined(_M_IX86) || defined(_M_X64)
std::vector<std::string> 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();

View File

@ -1,11 +0,0 @@
--- UI/NativeApp.cpp.orig 2015-02-26 20:05:06 UTC
+++ UI/NativeApp.cpp
@@ -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));
-#elif defined(__APPLE__) || (defined(__linux__) && !defined(ANDROID))
+#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/"));

View File

@ -1,8 +1,8 @@
--- ext/xbrz/xbrz.cpp.orig 2015-02-26 20:05:06 UTC
--- ext/xbrz/xbrz.cpp.orig 2015-05-28 17:02:46 UTC
+++ ext/xbrz/xbrz.cpp
@@ -616,23 +616,21 @@ void scalePixel(const Kernel_3x3& ker,
auto eq = [&](uint32_t col1, uint32_t col2) { return ColorDistance::dist(col1, col2, cfg.luminanceWeight_) < cfg.equalColorTolerance_; };
auto dist = [&](uint32_t col1, uint32_t col2) { return ColorDistance::dist(col1, col2, cfg.luminanceWeight_); };
@@ -648,23 +648,21 @@ void scalePixel(const Kernel_3x3& ker,
auto eq = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_) < cfg.equalColorTolerance_; };
auto dist = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_); };
- const bool doLineBlend = [&]() -> bool
- {
@ -23,12 +23,12 @@
+ else if (getBottomL(blend) != BLEND_NONE && !eq(e, c))
+ doLineBlend = false;
//no full blending for L-shapes; blend corner only (handles "mario mushroom eyes")
- if (eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c) && !eq(e, i))
- if (!eq(e, i) && eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c))
- return false;
-
- return true;
- }();
+ else if (eq(g, h) && eq(h, i) && eq(i, f) && eq(f, c) && !eq(e, i))
+ else if (!eq(e, i) && eq(g, h) && eq(h, i) && eq(i, f) && eq(f, c))
+ doLineBlend = false;
+ else
+ doLineBlend = true;

View File

@ -1,19 +0,0 @@
commit e81fa01
Author: sergiobenrocha2 <sergiobenrocha2@gmail.com>
Date: Wed Sep 16 19:07:25 2015 -0300
fix build when git is installed but there is no .git folder.
diff --git git-version.cmake git-version.cmake
index a507a93..ff276d7 100644
--- git-version.cmake
+++ git-version.cmake
@@ -3,7 +3,7 @@ set(GIT_VERSION "unknown")
set(GIT_VERSION_UPDATE "1")
find_package(Git)
-if(GIT_FOUND)
+if(GIT_FOUND AND EXISTS ".git")
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
WORKING_DIRECTORY ${SOURCE_DIR}
RESULT_VARIABLE exit_code

View File

@ -1,77 +0,0 @@
--- 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
}

View File

@ -1,11 +0,0 @@
--- native/base/basictypes.h.orig 2015-02-23 23:22:58 UTC
+++ native/base/basictypes.h
@@ -87,7 +87,7 @@ inline uint64 swap64(uint64 _data) {retu
inline uint16 swap16(uint16 _data) {return bswap_16(_data);}
inline uint32 swap32(uint32 _data) {return bswap_32(_data);}
inline uint64 swap64(uint64 _data) {return bswap_64(_data);}
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__) || defined(__FreeBSD__)
#include <sys/endian.h>
inline uint16 swap16(uint16 _data) {return bswap16(_data);}
inline uint32 swap32(uint32 _data) {return bswap32(_data);}

View File

@ -1,17 +0,0 @@
--- native/ext/cityhash/city.cpp.orig 2015-02-23 23:22:58 UTC
+++ native/ext/cityhash/city.cpp
@@ -68,12 +68,12 @@ static uint32 UNALIGNED_LOAD32(const cha
#define bswap_32(x) BSWAP_32(x)
#define bswap_64(x) BSWAP_64(x)
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__) || defined(__FreeBSD__)
#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)

View File

@ -1,12 +0,0 @@
--- native/ext/stb_vorbis/stb_vorbis.c.orig 2015-02-23 23:22:58 UTC
+++ native/ext/stb_vorbis/stb_vorbis.c
@@ -15,7 +15,8 @@
#pragma warning (disable:4996)
#pragma warning (disable:4244)
#include <malloc.h>
-#elif !defined(__SYMBIAN32__)
+#elif !defined(__SYMBIAN32__) && !defined(__Bitrig__) && !defined(__DragonFly__) && \
+ !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
#include <alloca.h>
#endif

View File

@ -1,11 +0,0 @@
--- native/file/file_util.cpp.orig 2015-02-23 23:22:58 UTC
+++ native/file/file_util.cpp
@@ -25,7 +25,7 @@
#include "file/file_util.h"
#include "util/text/utf8.h"
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if !defined(__linux__) && !defined(_WIN32) && !defined(__QNX__)
#define stat64 stat
#endif

View File

@ -1,11 +0,0 @@
--- native/image/png_load.cpp.orig 2015-02-23 23:22:58 UTC
+++ native/image/png_load.cpp
@@ -5,7 +5,7 @@
#ifdef USING_QT_UI
#include <QtGui/QImage>
#else
-#include "libpng17/png.h"
+#include "png.h"
#endif
#include "png_load.h"

View File

@ -1,14 +0,0 @@
--- native/net/http_client.h.orig 2015-02-23 23:22:58 UTC
+++ native/net/http_client.h
@@ -11,11 +11,8 @@
#define NOMINMAX
#include <winsock2.h>
#else
-#if defined(__FreeBSD__) || defined(__SYMBIAN32__)
#include <netinet/in.h>
-#else
#include <arpa/inet.h>
-#endif
#include <sys/socket.h>
#include <netdb.h>
#endif

View File

@ -1,26 +0,0 @@
--- native/net/http_headers.cpp.orig 2015-02-23 23:22:58 UTC
+++ native/net/http_headers.cpp
@@ -1,11 +1,5 @@
#include "net/http_headers.h"
-#ifdef _WIN32
-
-#include <winsock2.h> // for timeval
-
-#endif
-
#include <stdio.h>
#include <stdlib.h>
@@ -132,11 +126,6 @@ int RequestHeader::ParseHttpHeader(const
}
void RequestHeader::ParseHeaders(int fd) {
- // Get the request, with a timeout.
- struct ::timeval tv;
- tv.tv_sec = 5;
- tv.tv_usec = 0;
-
int line_count = 0;
// Loop through request headers.
while (true) {

View File

@ -1,10 +0,0 @@
--- native/net/http_server.cpp.orig 2015-02-23 23:22:58 UTC
+++ native/net/http_server.cpp
@@ -11,6 +11,7 @@
#include <sys/socket.h> /* socket definitions */
#include <sys/types.h> /* socket types */
#include <sys/wait.h> /* for waitpid() */
+#include <netinet/in.h> /* struct sockaddr_in */
#include <arpa/inet.h> /* inet (3) funtions */
#include <unistd.h> /* misc. UNIX functions */

View File

@ -1,14 +0,0 @@
--- native/net/resolve.cpp.orig 2015-02-23 23:22:58 UTC
+++ native/net/resolve.cpp
@@ -14,11 +14,8 @@
#undef min
#undef max
#else
-#if defined(__FreeBSD__)
#include <netinet/in.h>
-#else
#include <arpa/inet.h>
-#endif
#include <netdb.h>
#include <sys/socket.h>
#include <unistd.h>