aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-11-06 11:13:14 +0800
committerjbeich <jbeich@FreeBSD.org>2017-11-06 11:13:14 +0800
commite6ef1829ff6e155e3b81c5556f58f1c0033804ff (patch)
tree99d67963cc7b422f5e24bb7de3e988dc199ce702
parent8d03ac652b1fdcfbbcbbb044dcadb14df47be19d (diff)
downloadfreebsd-ports-gnome-e6ef1829ff6e155e3b81c5556f58f1c0033804ff.tar.gz
freebsd-ports-gnome-e6ef1829ff6e155e3b81c5556f58f1c0033804ff.tar.zst
freebsd-ports-gnome-e6ef1829ff6e155e3b81c5556f58f1c0033804ff.zip
emulators/citra: convert backout into upstream fix
-rw-r--r--emulators/citra/Makefile3
-rw-r--r--emulators/citra/distinfo2
-rw-r--r--emulators/citra/files/patch-revert-pr3042119
3 files changed, 5 insertions, 119 deletions
diff --git a/emulators/citra/Makefile b/emulators/citra/Makefile
index 9a5b31a6a953..ba9534203813 100644
--- a/emulators/citra/Makefile
+++ b/emulators/citra/Makefile
@@ -5,6 +5,9 @@ PORTVERSION= s20171105
PORTREVISION?= 0
CATEGORIES= emulators
+PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES= ff17773c28b1.patch:-p1
+
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Nintendo 3DS emulator/debugger
diff --git a/emulators/citra/distinfo b/emulators/citra/distinfo
index e1f7d0302f84..5270ed75a7da 100644
--- a/emulators/citra/distinfo
+++ b/emulators/citra/distinfo
@@ -21,3 +21,5 @@ SHA256 (weidai11-cryptopp-CRYPTOPP_5_6_5-610-g24bc2b8_GH0.tar.gz) = 9f3f59538ba0
SIZE (weidai11-cryptopp-CRYPTOPP_5_6_5-610-g24bc2b8_GH0.tar.gz) = 7008104
SHA256 (whoshuu-cpr-1.3.0-12-gb5758fb_GH0.tar.gz) = 84ea509dc08766d7182b867b78ba6dd16f3352d85b18b0654661079b8617dae4
SIZE (whoshuu-cpr-1.3.0-12-gb5758fb_GH0.tar.gz) = 34100
+SHA256 (ff17773c28b1.patch) = ecc6ef211c4436945b632dcc427ed4ca51cb66f12079054003983fce0c44db5a
+SIZE (ff17773c28b1.patch) = 783
diff --git a/emulators/citra/files/patch-revert-pr3042 b/emulators/citra/files/patch-revert-pr3042
deleted file mode 100644
index e24c68f2f655..000000000000
--- a/emulators/citra/files/patch-revert-pr3042
+++ /dev/null
@@ -1,119 +0,0 @@
-https://github.com/citra-emu/citra/issues/3079
-
---- src/core/hle/kernel/errors.h.orig 2017-11-05 08:32:46 UTC
-+++ src/core/hle/kernel/errors.h
-@@ -13,7 +13,6 @@ enum {
- OutOfHandles = 19,
- SessionClosedByRemote = 26,
- PortNameTooLong = 30,
-- WrongLockingThread = 31,
- NoPendingSessions = 35,
- WrongPermission = 46,
- InvalidBufferDescriptor = 48,
---- src/core/hle/kernel/mutex.cpp.orig 2017-11-05 08:32:46 UTC
-+++ src/core/hle/kernel/mutex.cpp
-@@ -7,7 +7,6 @@
- #include <boost/range/algorithm_ext/erase.hpp>
- #include "common/assert.h"
- #include "core/core.h"
--#include "core/hle/kernel/errors.h"
- #include "core/hle/kernel/kernel.h"
- #include "core/hle/kernel/mutex.h"
- #include "core/hle/kernel/thread.h"
-@@ -59,35 +58,20 @@ void Mutex::Acquire(Thread* thread) {
- lock_count++;
- }
-
--ResultCode Mutex::Release(Thread* thread) {
-- // We can only release the mutex if it's held by the calling thread.
-- if (thread != holding_thread) {
-- if (holding_thread) {
-- LOG_ERROR(
-- Kernel,
-- "Tried to release a mutex (owned by thread id %u) from a different thread id %u",
-- holding_thread->thread_id, thread->thread_id);
-+void Mutex::Release() {
-+ // Only release if the mutex is held
-+ if (lock_count > 0) {
-+ lock_count--;
-+
-+ // Yield to the next thread only if we've fully released the mutex
-+ if (lock_count == 0) {
-+ holding_thread->held_mutexes.erase(this);
-+ holding_thread->UpdatePriority();
-+ holding_thread = nullptr;
-+ WakeupAllWaitingThreads();
-+ Core::System::GetInstance().PrepareReschedule();
- }
-- return ResultCode(ErrCodes::WrongLockingThread, ErrorModule::Kernel,
-- ErrorSummary::InvalidArgument, ErrorLevel::Permanent);
- }
--
-- // Note: It should not be possible for the situation where the mutex has a holding thread with a
-- // zero lock count to occur. The real kernel still checks for this, so we do too.
-- if (lock_count <= 0)
-- return ResultCode(ErrorDescription::InvalidResultValue, ErrorModule::Kernel,
-- ErrorSummary::InvalidState, ErrorLevel::Permanent);
--
-- lock_count--;
--
-- // Yield to the next thread only if we've fully released the mutex
-- if (lock_count == 0) {
-- holding_thread->held_mutexes.erase(this);
-- holding_thread->UpdatePriority();
-- holding_thread = nullptr;
-- WakeupAllWaitingThreads();
-- Core::System::GetInstance().PrepareReschedule();
-- }
- }
-
- void Mutex::AddWaitingThread(SharedPtr<Thread> thread) {
-@@ -118,4 +102,4 @@ void Mutex::UpdatePriority() {
- }
- }
-
--} // namespace Kernel
-+} // namespace
---- src/core/hle/kernel/mutex.h.orig 2017-11-05 08:32:46 UTC
-+++ src/core/hle/kernel/mutex.h
-@@ -8,7 +8,6 @@
- #include "common/common_types.h"
- #include "core/hle/kernel/kernel.h"
- #include "core/hle/kernel/wait_object.h"
--#include "core/hle/result.h"
-
- namespace Kernel {
-
-@@ -53,12 +52,7 @@ class Mutex final : public WaitObject { (public)
- void AddWaitingThread(SharedPtr<Thread> thread) override;
- void RemoveWaitingThread(Thread* thread) override;
-
-- /**
-- * Attempts to release the mutex from the specified thread.
-- * @param thread Thread that wants to release the mutex.
-- * @returns The result code of the operation.
-- */
-- ResultCode Release(Thread* thread);
-+ void Release();
-
- private:
- Mutex();
-@@ -71,4 +65,4 @@ class Mutex final : public WaitObject { (public)
- */
- void ReleaseThreadMutexes(Thread* thread);
-
--} // namespace Kernel
-+} // namespace
---- src/core/hle/svc.cpp.orig 2017-11-05 08:32:46 UTC
-+++ src/core/hle/svc.cpp
-@@ -818,7 +818,9 @@ static ResultCode ReleaseMutex(Kernel::Handle handle)
- if (mutex == nullptr)
- return ERR_INVALID_HANDLE;
-
-- return mutex->Release(Kernel::GetCurrentThread());
-+ mutex->Release();
-+
-+ return RESULT_SUCCESS;
- }
-
- /// Get the ID of the specified process