1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-15 07:56:36 +00:00

emulators/ppsspp-devel: add new slave port for git master

A temporary port to facilitate testing and upstreaming.
This commit is contained in:
Jan Beich 2015-05-29 19:33:24 +00:00
parent cc464d1477
commit 3bb42072a0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=387882
9 changed files with 134 additions and 3 deletions

View File

@ -110,6 +110,7 @@
SUBDIR += pearpc
SUBDIR += pipelight
SUBDIR += ppsspp
SUBDIR += ppsspp-devel
SUBDIR += q4wine
SUBDIR += qemu
SUBDIR += qemu-devel

View File

@ -0,0 +1,16 @@
# $FreeBSD$
DISTVERSION= 1.0.1-551
DISTVERSIONSUFFIX= -gee1299b
PORTREVISION= 0
PKGNAMESUFFIX= -devel
GH_TAGNAME= f7a2cb6:lang 9fe3f59:native a0b878f:ext_armips
CONFLICTS_INSTALL?= ${PORTNAME}-[0-9]*
MASTERDIR= ${.CURDIR}/../ppsspp
PATCHDIR= ${.CURDIR}/files
DISTINFO_FILE= ${.CURDIR}/distinfo
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,10 @@
SHA256 (hrydgard-ppsspp-v1.0.1-551-gee1299b_GH0.tar.gz) = 3f30e14b54872fd7963086b43662ad2b1e2846a91167b0ba73da2db9e20f5507
SIZE (hrydgard-ppsspp-v1.0.1-551-gee1299b_GH0.tar.gz) = 13508841
SHA256 (hrydgard-ppsspp-lang-f7a2cb6_GH0.tar.gz) = ea342200e8750402ea3ca1fb928a166c3b59772ffbeef3cf65feb3e43f141f47
SIZE (hrydgard-ppsspp-lang-f7a2cb6_GH0.tar.gz) = 200273
SHA256 (hrydgard-native-9fe3f59_GH0.tar.gz) = 27a599540fdcb369cc4105e998be87dc14be7739d0daeeb5796aca9e422e8619
SIZE (hrydgard-native-9fe3f59_GH0.tar.gz) = 1398942
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

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

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

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

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

@ -0,0 +1,11 @@
--- 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,9 +1,9 @@
# $FreeBSD$
PORTNAME= ppsspp
PORTVERSION= 1.0.1
DISTVERSIONPREFIX= v
PORTREVISION= 2
DISTVERSION?= 1.0.1
PORTREVISION?= 2
CATEGORIES= emulators
PATCH_SITES= https://projects.archlinux.org/svntogit/community.git/plain/trunk/
@ -20,7 +20,9 @@ RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils
USE_GITHUB= yes
GH_ACCOUNT= hrydgard:DEFAULT,lang,native Kingcom:ext_armips
GH_PROJECT= ${PORTNAME}-lang:lang native:native armips:ext_armips
GH_TAGNAME= 52c757e:lang 52ce9c1:native a0b878f:ext_armips
GH_TAGNAME?= 52c757e:lang 52ce9c1:native a0b878f:ext_armips
CONFLICTS_INSTALL?= ${PORTNAME}-devel-[0-9]*
USES= compiler:c++11-lib pkgconfig
USE_GL= glu