SHA256
1
0
forked from pool/rpcs3

Accepting request 537426 from home:kah0922:branches:Emulators

- Added rpcs3-unbreak_build.patch to fix build.

The patch is from X0F's branch.

OBS-URL: https://build.opensuse.org/request/show/537426
OBS-URL: https://build.opensuse.org/package/show/Emulators/rpcs3?expand=0&rev=9
This commit is contained in:
Klaus Kämpf 2017-11-02 17:32:20 +00:00 committed by Git OBS Bridge
parent 07f9912f1a
commit 909f35e587
3 changed files with 59 additions and 0 deletions

51
rpcs3-unbreak_build.patch Normal file
View File

@ -0,0 +1,51 @@
From 2a16b469dc1a5fea3cf2a0d52bcbaf7328d648d3 Mon Sep 17 00:00:00 2001
From: v-fox <virtuousfox@gmail.com>
Date: Tue, 24 Oct 2017 07:08:29 +0500
Subject: [PATCH] unbreak build by removing dependency on non-existing static
libraries and linking with shared ones, as everyone should
---
CMakeLists.txt | 2 ++
rpcs3/CMakeLists.txt | 12 +++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89bc070..273e85a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0.2)
option(WITH_GDB "WITH_GDB" OFF)
option(WITHOUT_LLVM "WITHOUT_LLVM" OFF)
+option(USE_SHARED_LLVM_LIBS "Link against shared LLVM libs, instead of statically.
+Only recommended on Gentoo. May interfere with mesa driver and make RPCS3 non-functional." OFF)
if (WITH_GDB)
add_definitions(-DWITH_GDB_DEBUGGER)
diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt
index 641be7d..976c320 100644
--- a/rpcs3/CMakeLists.txt
+++ b/rpcs3/CMakeLists.txt
@@ -296,10 +296,16 @@ if(NOT LLVM_FOUND)
else()
add_definitions(${LLVM_DEFINITIONS})
add_definitions(-DLLVM_AVAILABLE)
- if (CMAKE_BUILD_TYPE STREQUAL "Release")
- llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler)
+
+ if (USE_SHARED_LLVM_LIBS)
+ Message("WARNING! Linking against shared LLVM libs may conflict with your system's mesa, rendering RPCS3 non-functional!")
+ set(LLVM_LIBS LLVM)
else()
- llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
+ if (CMAKE_BUILD_TYPE STREQUAL "Release")
+ llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler)
+ else()
+ llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
+ endif()
endif()
if (NOT MSVC)
--
2.14.2

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 25 19:07:37 UTC 2017 - kah0922@gmail.com
- Added rpcs3-unbreak_build.patch to fix build.
-------------------------------------------------------------------
Sun Oct 15 11:17:29 UTC 2017 - pousaduarte@gmail.com

View File

@ -23,6 +23,7 @@ Summary: PS3 emulator/debugger
License: GPL-2.0
Url: https://rpcs3.net/
Source0: %{name}-%{version}.tar.xz
Patch0: rpcs3-unbreak_build.patch
ExclusiveArch: x86_64
#BuildRequires: gcc-c++
@ -64,6 +65,7 @@ An open-source PlayStation 3 emulator/debugger written in C++.
%prep
%setup -q
%patch0 -p1
GIT_VERSION=$(echo %{version} | sed 's|.*git|git~|g')
@ -89,6 +91,7 @@ cmake . \
-DCMAKE_CXX_FLAGS="%{optflags}" \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_SKIP_RPATH="YES" \
-DUSE_SHARED_LLVM_LIBS=ON \
-DCMAKE_EXE_LINKER_FLAGS="$(llvm-config --libs mcjit vectorize ipo x86codegen x86disassembler)"
%make_jobs