From 909f35e5870544476f76b6eb50e2f5fc83aa0a4352e41297910e8cc43da6366b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Thu, 2 Nov 2017 17:32:20 +0000 Subject: [PATCH] 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 --- rpcs3-unbreak_build.patch | 51 +++++++++++++++++++++++++++++++++++++++ rpcs3.changes | 5 ++++ rpcs3.spec | 3 +++ 3 files changed, 59 insertions(+) create mode 100644 rpcs3-unbreak_build.patch diff --git a/rpcs3-unbreak_build.patch b/rpcs3-unbreak_build.patch new file mode 100644 index 0000000..b95db14 --- /dev/null +++ b/rpcs3-unbreak_build.patch @@ -0,0 +1,51 @@ +From 2a16b469dc1a5fea3cf2a0d52bcbaf7328d648d3 Mon Sep 17 00:00:00 2001 +From: v-fox +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 + diff --git a/rpcs3.changes b/rpcs3.changes index 2a014e5..a9d8398 100644 --- a/rpcs3.changes +++ b/rpcs3.changes @@ -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 diff --git a/rpcs3.spec b/rpcs3.spec index 5d5d448..d533c65 100644 --- a/rpcs3.spec +++ b/rpcs3.spec @@ -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