Accepting request 281038 from home:Andreas_Schwab:Factory

- webkitgtk-libatomic.patch: Check if libatomic is needed in order to use
  std::atomic, fixes build on ppc

OBS-URL: https://build.opensuse.org/request/show/281038
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/webkit2gtk3?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2015-01-20 17:16:49 +00:00 committed by Git OBS Bridge
parent cf8ef1be10
commit 8aaeea8f4b
3 changed files with 42 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jan 13 15:27:07 UTC 2015 - schwab@suse.de
- webkitgtk-libatomic.patch: Check if libatomic is needed in order to use
std::atomic, fixes build on ppc
-------------------------------------------------------------------
Wed Dec 17 21:56:51 UTC 2014 - zaitor@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package webkit2gtk3
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -36,6 +36,8 @@ Source: http://webkitgtk.org/releases/%{_name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE webkitgtk-typelib-sharelib-link.patch dimstar@opensuse.org -- Fixup the .gir file to contain the full library name for libjavascriptcore.
Patch0: webkitgtk-typelib-sharelib-link.patch
# PATCH-FIX-UPSTREAM webkitgtk-libatomic.patch webkit#130837 Check if libatomic is needed in order to use std::atomic
Patch1: webkitgtk-libatomic.patch
BuildRequires: bison >= 2.3
BuildRequires: cmake
BuildRequires: gcc-c++
@ -206,6 +208,7 @@ more.
%prep
%setup -q -n webkitgtk-%{version}
%patch0 -p1
%patch1 -p1
%build
# Use linker flags to reduce memory consumption

32
webkitgtk-libatomic.patch Normal file
View File

@ -0,0 +1,32 @@
2014-11-20 Alberto Garcia <berto@igalia.com>
Webkit2 doesnt build on powerpc 32 bits
https://bugs.webkit.org/show_bug.cgi?id=130837
Reviewed by NOBODY (OOPS!).
Check if libatomic is needed in order to use std::atomic, and add
it to the list of WebKit2 libraries.
* PlatformGTK.cmake:
diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
index 954aa0e..298ec7c 100644
--- a/Source/WebKit2/PlatformGTK.cmake
+++ b/Source/WebKit2/PlatformGTK.cmake
@@ -467,6 +467,15 @@ list(APPEND NetworkProcess_SOURCES
NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
)
+file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
+ "#include <atomic>\n"
+ "int main() { std::atomic<int64_t> i(0); i++; return 0; }\n")
+try_compile(ATOMIC_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomic.cpp)
+if (NOT ATOMIC_BUILD_SUCCEEDED)
+ list(APPEND WebKit2_LIBRARIES atomic)
+endif ()
+file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
+
set(SharedWebKit2Libraries
${WebKit2_LIBRARIES}
)