Index: branches/2017Q3/emulators/ppsspp/Makefile =================================================================== --- branches/2017Q3/emulators/ppsspp/Makefile (revision 446764) +++ branches/2017Q3/emulators/ppsspp/Makefile (revision 446765) @@ -1,89 +1,89 @@ # $FreeBSD$ PORTNAME= ppsspp DISTVERSIONPREFIX= v DISTVERSION?= 1.4.2 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= emulators # XXX Get from Debian once #697821 lands MASTER_SITES= https://bazaar.launchpad.net/~sergio-br2/${PORTNAME}/debian-sdl/download/5/${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+ LIB_DEPENDS= libzip.so:archivers/libzip \ libsnappy.so:archivers/snappy \ libavcodec.so:multimedia/ffmpeg RUN_DEPENDS= xdg-open:devel/xdg-utils USE_GITHUB= yes GH_ACCOUNT= hrydgard GH_TUPLE?= hrydgard:glslang:b16f7e68:glslang/ext/glslang \ hrydgard:${PORTNAME}-lang:f32328a:lang/assets/lang \ KhronosGroup:SPIRV-Cross:6381b2f:SPIRV/ext/SPIRV-Cross \ Kingcom:armips:v0.9-26-g770365d:armips/ext/armips \ Kingcom:tinyformat:Release-2.0.1-7-gb7f5a22:tinyformat/ext/armips/ext/tinyformat CONFLICTS_INSTALL= ${PORTNAME}-* USES= cmake:outsource compiler:c++11-lib localbase:ldflags pkgconfig EXCLUDE= libzip zlib EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,} USE_GL= gl glew glu USE_SDL= sdl2 # joystick CMAKE_ARGS= -DUSING_EGL=off -DUSE_SYSTEM_FFMPEG=on SUB_FILES= pkg-message PORTDATA= assets ${PORTNAME} DESKTOP_ENTRIES="PPSSPP" \ "" \ "${PORTNAME}" \ "${PORTNAME} %f" \ "Game;Emulator;" \ "" OPTIONS_DEFINE= OLDJOY OPTIONS_SINGLE= GUI OPTIONS_SINGLE_GUI= QT5 SDL OPTIONS_SLAVE?= SDL OPTIONS_EXCLUDE:= ${OPTIONS_SINGLE_GUI} OLDJOY_DESC= Old joystick support with fixed button mappings (deprecated) OLDJOY_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-old-joy QT5_USE= QT5=qmake_build,buildtools_build,linguisttools_build,gui,opengl,widgets QT5_CMAKE_BOOL= USING_QT_UI QT5_VARS= EXENAME=PPSSPPQt SDL_BUILD_DEPENDS= png>=1.6:graphics/png SDL_LIB_DEPENDS= libpng.so:graphics/png SDL_VARS= EXENAME=PPSSPPSDL post-patch: @${REINPLACE_CMD} -e 's/Linux/${OPSYS}/' \ ${WRKSRC}/assets/gamecontrollerdb.txt @${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,' \ ${WRKSRC}/UI/NativeApp.cpp @${REINPLACE_CMD} -e 's/"unknown"/"${GH_TAGNAME}"/' \ ${WRKSRC}/git-version.cmake do-install: # cmake doesn't pack assets into the app unlike qmake (cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} \ "${PORTDATA:N${PORTNAME}}" ${STAGEDIR}${DATADIR}) # Install the app alongside assets to avoid warnings with GetExeDirectory() ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${EXENAME} \ ${STAGEDIR}${DATADIR}/${PORTNAME} ${LN} -sf ../${DATADIR_REL}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${_DISTDIR}/${PORTNAME}.1 \ ${STAGEDIR}${MAN1PREFIX}/man/man1 (cd ${WRKSRC}/icons && ${COPYTREE_SHARE} \ "hicolor" ${STAGEDIR}${PREFIX}/share/icons) ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps ${INSTALL_DATA} ${WRKSRC}/icons/icon-512.svg \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg .include Index: branches/2017Q3/emulators/ppsspp/files/patch-Common_MemoryUtil.cpp =================================================================== --- branches/2017Q3/emulators/ppsspp/files/patch-Common_MemoryUtil.cpp (revision 446764) +++ branches/2017Q3/emulators/ppsspp/files/patch-Common_MemoryUtil.cpp (revision 446765) @@ -1,35 +1,31 @@ ---- Common/MemoryUtil.cpp.orig 2015-11-19 15:07:48 UTC +https://github.com/hrydgard/ppsspp/pull/9857 + +--- Common/MemoryUtil.cpp.orig 2017-05-27 09:58:05 UTC +++ Common/MemoryUtil.cpp -@@ -32,6 +32,10 @@ - #include +@@ -154,7 +154,7 @@ void *AllocateExecutableMemory(size_t size) { + } + #else + static char *map_hint = 0; +-#if defined(_M_X64) ++#if defined(_M_X64) && !defined(MAP_32BIT) + // Try to request one that is close to our memory location if we're in high memory. + // We use a dummy global variable to give us a good location to start from. + if (!map_hint) { +@@ -176,7 +176,7 @@ void *AllocateExecutableMemory(size_t size) { + void* ptr = mmap(map_hint, size, prot, + MAP_ANON | MAP_PRIVATE + #if defined(_M_X64) && defined(MAP_32BIT) +- | ((uintptr_t) map_hint == 0 ? MAP_32BIT : 0) ++ | MAP_32BIT #endif + , -1, 0); -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -+#include -+#endif -+ - #ifndef _WIN32 - #include - #endif -@@ -149,6 +153,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__) || defined(__FreeBSD_kernel__) -+ // 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 +@@ -193,7 +193,7 @@ void *AllocateExecutableMemory(size_t size) { + ERROR_LOG(MEMMAP, "Failed to allocate executable memory (%d)", (int)size); + PanicAlert("Failed to allocate executable memory\n%s", GetLastErrorMsg()); } - else if ((uintptr_t) map_hint > 0xFFFFFFFFULL) - { +-#if defined(_M_X64) && !defined(_WIN32) ++#if defined(_M_X64) && !defined(MAP_32BIT) && !defined(_WIN32) + else if ((uintptr_t)map_hint <= 0xFFFFFFFF) { + // Round up if we're below 32-bit mark, probably allocating sequentially. + map_hint += round_page(size); Index: branches/2017Q3/emulators/rpcs3/Makefile =================================================================== --- branches/2017Q3/emulators/rpcs3/Makefile (revision 446764) +++ branches/2017Q3/emulators/rpcs3/Makefile (revision 446765) @@ -1,60 +1,61 @@ # $FreeBSD$ PORTNAME= rpcs3 DISTVERSIONPREFIX= v DISTVERSION= 0.0.3 +PORTREVISION= 1 CATEGORIES= emulators MAINTAINER= jbeich@FreeBSD.org COMMENT= PS3 emulator/debugger LICENSE= BSD3CLAUSE BSL GPLv2 MIT ZLIB LICENSE_COMB= multi LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/3rdparty/cereal/LICENSE LICENSE_FILE_BSL= ${WRKSRC}/Utilities/LICENSE_1_0.txt LICENSE_FILE_MIT= ${WRKSRC}/3rdparty/GSL/LICENSE LICENSE_FILE_ZLIB= ${WRKSRC}/asmjit/LICENSE.md LIB_DEPENDS= libpng.so:graphics/png \ libavcodec.so:multimedia/ffmpeg ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= requires int128 and SSSE3 USE_GITHUB= yes GH_ACCOUNT= RPCS3 GH_TUPLE= RPCS3:hidapi:hidapi-0.8.0-rc1-23-gc095a22:hidapi/3rdparty/hidapi \ RPCS3:pugixml:f205aaf:pugixml/3rdparty/pugixml \ RPCS3:yaml-cpp:release-0.5.3-62-g017626a:yamlcpp/Utilities/yaml-cpp \ kobalicek:asmjit:1370fe6:asmjit/asmjit \ Microsoft:GSL:fc5fce4:GSL/3rdparty/GSL \ USCiLab:cereal:v1.2.0:cereal/3rdparty/cereal USES= cmake compiler:c++14-lang iconv:wchar_t localbase:ldflags \ openal:soft pkgconfig USE_GL= gl glew USE_QT5= qmake_build buildtools_build core gui widgets 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 LDFLAGS+= -Wl,--as-needed # GLU PLIST_FILES= bin/${PORTNAME} \ share/applications/${PORTNAME}.desktop \ share/icons/hicolor/48x48/apps/${PORTNAME}.png \ share/icons/hicolor/scalable/apps/${PORTNAME}.svg \ OPTIONS_DEFINE= GDB LLVM OPTIONS_DEFAULT=LLVM GDB_DESC= GDB remote stub (powerpc64 target) GDB_CMAKE_BOOL= WITH_GDB LLVM_DESC= LLVM-based PPU recompiler LLVM_LIB_DEPENDS= libLLVM-4.0.so:devel/llvm40 LLVM_CMAKE_BOOL_OFF= WITHOUT_LLVM post-patch: @${REINPLACE_CMD} -e 's/"unknown"/"${GH_TAGNAME}"/' \ ${WRKSRC}/${PORTNAME}/git-version.cmake .include Index: branches/2017Q3/emulators/rpcs3/files/patch-Utilities_JIT.cpp =================================================================== --- branches/2017Q3/emulators/rpcs3/files/patch-Utilities_JIT.cpp (revision 446764) +++ branches/2017Q3/emulators/rpcs3/files/patch-Utilities_JIT.cpp (revision 446765) @@ -1,35 +1,33 @@ ---- Utilities/JIT.cpp.orig 2017-07-10 15:42:02 UTC +FreeBSD ignores address hints with default RLIMIT_DATA + +--- Utilities/JIT.cpp.orig 2017-07-20 15:05:34 UTC +++ Utilities/JIT.cpp -@@ -31,6 +31,10 @@ +@@ -30,6 +30,8 @@ + + #ifdef _WIN32 #include ++#else ++#include #endif -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -+#include -+#endif -+ #include "JIT.h" - - // Memory manager mutex -@@ -45,6 +49,21 @@ static void* const s_memory = []() -> void* - llvm::InitializeNativeTarget(); +@@ -47,6 +49,11 @@ static void* const s_memory = []() -> void* llvm::InitializeNativeTargetAsmPrinter(); LLVMLinkInMCJIT(); -+ -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -+ // 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) { -+ LOG_ERROR(GENERAL, "LLVM: Failed to lower maximum data segment size"); -+ } -+#endif ++#ifdef MAP_32BIT ++ auto ptr = ::mmap(nullptr, s_memory_size, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_32BIT, -1, 0); ++ if (ptr != MAP_FAILED) ++ return ptr; ++#else for (u64 addr = 0x10000000; addr <= 0x80000000 - s_memory_size; addr += 0x1000000) { + if (auto ptr = utils::memory_reserve(s_memory_size, (void*)addr)) +@@ -54,6 +61,7 @@ static void* const s_memory = []() -> void* + return ptr; + } + } ++#endif + + return utils::memory_reserve(s_memory_size); + }(); Index: branches/2017Q3 =================================================================== --- branches/2017Q3 (revision 446764) +++ branches/2017Q3 (revision 446765) Property changes on: branches/2017Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r446352