Split patches

This commit is contained in:
Sebastian Ramacher 2017-04-19 22:48:37 +02:00
parent b86c7f795f
commit 7ca3d40b0d
5 changed files with 106 additions and 70 deletions

View file

@ -1,69 +0,0 @@
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 19 Apr 2017 21:45:40 +0200
Subject: Build system fixes
---
libobs/CMakeLists.txt | 27 ++++++++++++++++++++-------
libobs/util/c99defs.h | 2 +-
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index cd2b80e..de274dd 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -168,6 +168,23 @@ elseif(UNIX)
${libobs_PLATFORM_DEPS}
${X11_XCB_LIBRARIES})
+ include_directories(
+ ${XCB_INCLUDE_DIRS}
+ ${X11_XCB_INCLUDE_DIRS}
+ ${X11_X11_INCLUDE_PATH})
+
+ add_definitions(
+ ${XCB_DEFINITIONS}
+ ${X11_XCB_DEFINITIONS})
+
+ set(libobs_PLATFORM_DEPS
+ ${libobs_PLATFORM_DEPS}
+ ${XCB_LIBRARIES}
+ ${X11_XCB_LIBRARIES}
+ ${X11_X11_LIB}
+ m
+ dl)
+
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
# use the sysinfo compatibility library on bsd
find_package(Libsysinfo REQUIRED)
@@ -401,15 +418,11 @@ target_compile_definitions(libobs
PUBLIC
HAVE_OBSCONFIG_H)
-if(NOT MSVC)
- target_compile_options(libobs
- PUBLIC
- -mmmx
- -msse
- -msse2)
+if(UNIX)
+ set_source_files_properties(${libobs_SOURCES} PROPERTIES
+ COMPILE_FLAGS "-fvisibility=hidden")
endif()
-
target_compile_options(libobs
PUBLIC
"${THREADS_DEFINITIONS}")
diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h
index 43d52c8..4890858 100644
--- a/libobs/util/c99defs.h
+++ b/libobs/util/c99defs.h
@@ -46,7 +46,7 @@
#define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+#define EXPORT __attribute__((visibility("default")))
#endif
#if _MSC_VER && _MSC_VER < 0x0708

View file

@ -0,0 +1,37 @@
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 19 Apr 2017 21:45:40 +0200
Subject: Hide internal symbols
---
libobs/CMakeLists.txt | 4 ++++
libobs/util/c99defs.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index cd2b80e..ef5b9bc 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -409,6 +409,10 @@ if(NOT MSVC)
-msse2)
endif()
+if(UNIX)
+ set_source_files_properties(${libobs_SOURCES} PROPERTIES
+ COMPILE_FLAGS "-fvisibility=hidden")
+endif()
target_compile_options(libobs
PUBLIC
diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h
index 43d52c8..4890858 100644
--- a/libobs/util/c99defs.h
+++ b/libobs/util/c99defs.h
@@ -46,7 +46,7 @@
#define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+#define EXPORT __attribute__((visibility("default")))
#endif
#if _MSC_VER && _MSC_VER < 0x0708

View file

@ -0,0 +1,24 @@
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 19 Apr 2017 22:44:48 +0200
Subject: Link with libm and libdl to fix underlinking
---
libobs/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index ef5b9bc..d1b62c5 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -168,6 +168,11 @@ elseif(UNIX)
${libobs_PLATFORM_DEPS}
${X11_XCB_LIBRARIES})
+ set(libobs_PLATFORM_DEPS
+ ${libobs_PLATFORM_DEPS}
+ m
+ dl)
+
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
# use the sysinfo compatibility library on bsd
find_package(Libsysinfo REQUIRED)

View file

@ -0,0 +1,42 @@
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 19 Apr 2017 23:02:17 +0200
Subject: Link with xcb and X libraries to fix underlinking
---
libobs/CMakeLists.txt | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index d1b62c5..d36afa1 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -14,7 +14,8 @@ endif()
if(UNIX)
find_package(DBus QUIET)
if (NOT APPLE)
- find_package(X11_XCB REQUIRED)
+ find_package(XCB COMPONENTS XCB REQUIRED)
+ find_package(X11 REQUIRED)
endif()
else()
set(HAVE_DBUS "0")
@@ -161,12 +162,17 @@ elseif(UNIX)
endif()
include_directories(
- ${X11_XCB_INCLUDE_DIRS})
+ ${XCB_INCLUDE_DIRS}
+ ${X11_XCB_INCLUDE_DIRS}
+ ${X11_X11_INCLUDE_DIRS})
add_definitions(
+ ${XCB_DEFINITIONS}
${X11_XCB_DEFINITIONS})
set(libobs_PLATFORM_DEPS
${libobs_PLATFORM_DEPS}
- ${X11_XCB_LIBRARIES})
+ ${XCB_LIBRARIES}
+ ${X11_XCB_LIBRARIES}
+ ${X11_X11_LIB})
set(libobs_PLATFORM_DEPS
${libobs_PLATFORM_DEPS}

View file

@ -1,3 +1,5 @@
0001-Use-common-license.patch
0002-Build-system-fixes.patch
0002-Hide-internal-symbols.patch
0003-Use-path-in-usr-lib.patch
0004-Link-with-libm-and-libdl-to-fix-underlinking.patch
0005-Link-with-xcb-and-X-libraries-to-fix-underlinking.patch