summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/obs-studio')
-rw-r--r--media-video/obs-studio/files/obs-studio-ImageMagick-header-path.patch70
-rw-r--r--media-video/obs-studio/obs-studio-18.0.2.ebuild2
-rw-r--r--media-video/obs-studio/obs-studio-19.0.2.ebuild2
-rw-r--r--media-video/obs-studio/obs-studio-20.0.1.ebuild2
4 files changed, 76 insertions, 0 deletions
diff --git a/media-video/obs-studio/files/obs-studio-ImageMagick-header-path.patch b/media-video/obs-studio/files/obs-studio-ImageMagick-header-path.patch
new file mode 100644
index 000000000000..ca1de74973bb
--- /dev/null
+++ b/media-video/obs-studio/files/obs-studio-ImageMagick-header-path.patch
@@ -0,0 +1,70 @@
+From affb84f98477bb490554f56bf82ebffcefa0ec42 Mon Sep 17 00:00:00 2001
+From: Jimi Huotari <chiitoo@gentoo.org>
+Date: Tue, 5 Sep 2017 23:30:24 +0300
+Subject: [PATCH 1/3] libobs: Fix ImageMagick header path
+
+Since ImageMagick 7, the header path has been changed. This commit
+implements a check for the version being used, and includes the
+header as is appropriate.
+
+Special thanks to Hu.
+
+Mantis-Bug: https://obsproject.com/mantis/view.php?id=966
+
+Gentoo-Bug: https://bugs.gentoo.org/627520
+---
+ libobs/CMakeLists.txt | 6 ++++++
+ libobs/graphics/graphics-magick.c | 6 ++++++
+ libobs/obsconfig.h.in | 3 +++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
+index cd2b80e1..e91f366a 100644
+--- a/libobs/CMakeLists.txt
++++ b/libobs/CMakeLists.txt
+@@ -31,6 +31,12 @@ option(LIBOBS_PREFER_IMAGEMAGICK "Prefer ImageMagick over ffmpeg for image loadi
+ if(NOT FFMPEG_AVCODEC_FOUND OR (ImageMagick_MagickCore_FOUND AND LIBOBS_PREFER_IMAGEMAGICK))
+ message(STATUS "Using ImageMagick for image loading in libobs")
+
++ if(${ImageMagick_VERSION_STRING} LESS 7)
++ set(LIBOBS_IMAGEMAGICK_DIR_STYLE LIBOBS_IMAGEMAGICK_DIR_STYLE_6L)
++ elseif(${ImageMagick_VERSION_STRING} GREATER_EQUAL 7)
++ set(LIBOBS_IMAGEMAGICK_DIR_STYLE LIBOBS_IMAGEMAGICK_DIR_STYLE_7GE)
++ endif()
++
+ set(libobs_image_loading_SOURCES
+ graphics/graphics-magick.c)
+ set(libobs_image_loading_LIBRARIES
+diff --git a/libobs/graphics/graphics-magick.c b/libobs/graphics/graphics-magick.c
+index c106bfa6..6e4e1e96 100644
+--- a/libobs/graphics/graphics-magick.c
++++ b/libobs/graphics/graphics-magick.c
+@@ -1,8 +1,14 @@
+ #include "graphics.h"
++#include "obsconfig.h"
+
+ #define MAGICKCORE_QUANTUM_DEPTH 16
+ #define MAGICKCORE_HDRI_ENABLE 0
++
++#if LIBOBS_IMAGEMAGICK_DIR_STYLE == LIBOBS_IMAGEMAGICK_DIR_STYLE_6L
+ #include <magick/MagickCore.h>
++#elif LIBOBS_IMAGEMAGICK_DIR_STYLE == LIBOBS_IMAGEMAGICK_DIR_STYLE_7GE
++#include <MagickCore/MagickCore.h>
++#endif
+
+ void gs_init_image_deps()
+ {
+diff --git a/libobs/obsconfig.h.in b/libobs/obsconfig.h.in
+index f86962d5..cc1f4005 100644
+--- a/libobs/obsconfig.h.in
++++ b/libobs/obsconfig.h.in
+@@ -17,3 +17,6 @@
+ #define OBS_UNIX_STRUCTURE @OBS_UNIX_STRUCTURE@
+ #define BUILD_CAPTIONS @BUILD_CAPTIONS@
+ #define HAVE_DBUS @HAVE_DBUS@
++#define LIBOBS_IMAGEMAGICK_DIR_STYLE_6L 6
++#define LIBOBS_IMAGEMAGICK_DIR_STYLE_7GE 7
++#define LIBOBS_IMAGEMAGICK_DIR_STYLE @LIBOBS_IMAGEMAGICK_DIR_STYLE@
+--
+2.14.1
+
diff --git a/media-video/obs-studio/obs-studio-18.0.2.ebuild b/media-video/obs-studio/obs-studio-18.0.2.ebuild
index 07c1a8007eb9..40f9313612c5 100644
--- a/media-video/obs-studio/obs-studio-18.0.2.ebuild
+++ b/media-video/obs-studio/obs-studio-18.0.2.ebuild
@@ -51,6 +51,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES="${FILESDIR}/${PN}-ImageMagick-header-path.patch"
+
CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
src_configure() {
diff --git a/media-video/obs-studio/obs-studio-19.0.2.ebuild b/media-video/obs-studio/obs-studio-19.0.2.ebuild
index 07c1a8007eb9..40f9313612c5 100644
--- a/media-video/obs-studio/obs-studio-19.0.2.ebuild
+++ b/media-video/obs-studio/obs-studio-19.0.2.ebuild
@@ -51,6 +51,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES="${FILESDIR}/${PN}-ImageMagick-header-path.patch"
+
CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
src_configure() {
diff --git a/media-video/obs-studio/obs-studio-20.0.1.ebuild b/media-video/obs-studio/obs-studio-20.0.1.ebuild
index 07c1a8007eb9..40f9313612c5 100644
--- a/media-video/obs-studio/obs-studio-20.0.1.ebuild
+++ b/media-video/obs-studio/obs-studio-20.0.1.ebuild
@@ -51,6 +51,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES="${FILESDIR}/${PN}-ImageMagick-header-path.patch"
+
CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
src_configure() {