From 9fb1cd86291e571d2a3d6624990d5a39d9b6dbbbab664be7ba59f828461b688f Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Sun, 3 Jan 2016 20:52:03 +0000 Subject: [PATCH] Accepting request 351803 from home:adra:branches:KDE:Extra Added Find-platform-dependant-include-files-of-GStreamer.patch to fix compilation failure in Tumbleweed OBS-URL: https://build.opensuse.org/request/show/351803 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/subtitlecomposer?expand=0&rev=8 --- ...dependant-include-files-of-GStreamer.patch | 63 +++++++++++++++++++ subtitlecomposer.changes | 7 +++ subtitlecomposer.spec | 7 ++- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 Find-platform-dependant-include-files-of-GStreamer.patch diff --git a/Find-platform-dependant-include-files-of-GStreamer.patch b/Find-platform-dependant-include-files-of-GStreamer.patch new file mode 100644 index 0000000..707e6ac --- /dev/null +++ b/Find-platform-dependant-include-files-of-GStreamer.patch @@ -0,0 +1,63 @@ +From: =?utf-8?q?Martin_Stegh=C3=B6fer?= +Date: Sun, 4 Oct 2015 19:02:50 +0200 +Subject: Find platform-dependant include files of GStreamer + +In the current -dev packages of GStreamer 1.x in Debian, the file +"gst/gstconfig.h" is not in the same directory as the rest of the +includes, but in a subdirectory of the library directory. However, +the FindGStreamer.cmake file of Subtitlecomposer is only looking +for a single include directory per component, based on the location +of a single reference file. This patch adds the subdirectory +"gstreamer-1.0/include" of the library dir of a component to the +include dirs variable of the same component. This way, platform- +dependant files like "gst/gstconfig.h" will be found, too. + +Forwarding is not needed, because upstream has moved on from using +the FindGStreamer.cmake. + +Forwarded: not-needed +--- + src/services/FindGStreamer.cmake | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/services/FindGStreamer.cmake b/src/services/FindGStreamer.cmake +index bf25d30..0dcc473 100644 +--- a/src/services/FindGStreamer.cmake ++++ b/src/services/FindGStreamer.cmake +@@ -67,6 +67,14 @@ macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _librar + NAMES ${_library} + HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR} + ) ++ ++ # Add the "gstreamer-1.0/include" sub directory of the lib path to the list of include folders ++ # (in order to be able to resolve "gst/gstconfig.h") ++ if(${_component_prefix}_LIBRARIES) ++ list(GET ${_component_prefix}_LIBRARIES 0 FIRST_LIBRARY) ++ get_filename_component(${_component_prefix}_LIBRARY_DIR ${FIRST_LIBRARY} DIRECTORY) ++ list(APPEND ${_component_prefix}_INCLUDE_DIRS "${${_component_prefix}_LIBRARY_DIR}/gstreamer-1.0/include") ++ endif() + endmacro() + + # ------------------------ +@@ -79,8 +87,9 @@ FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/base/gstadapter.h + + # 1.2. Check GStreamer version + if (GSTREAMER_INCLUDE_DIRS) +- if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h") +- file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS) ++ foreach (GS_INCLUDE_DIR IN LISTS GSTREAMER_INCLUDE_DIRS) ++ if (EXISTS "${GS_INCLUDE_DIR}/gst/gstversion.h") ++ file(READ "${GS_INCLUDE_DIR}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS) + + string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}") + set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}") +@@ -92,7 +101,8 @@ if (GSTREAMER_INCLUDE_DIRS) + set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}") + + set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}") +- endif () ++ endif () ++ endforeach (GS_INCLUDE_DIR) + endif () + + if ("${GStreamer_FIND_VERSION}" VERSION_GREATER "${GSTREAMER_VERSION}") diff --git a/subtitlecomposer.changes b/subtitlecomposer.changes index 18e4dd8..f6a0429 100644 --- a/subtitlecomposer.changes +++ b/subtitlecomposer.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Jan 3 17:57:44 UTC 2016 - asterios.dramis@gmail.com + +- Added Find-platform-dependant-include-files-of-GStreamer.patch in + order to fix finding of platform-dependant include files of + GStreamer (fixes compilation failure). + ------------------------------------------------------------------- Sun Nov 16 23:30:51 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/subtitlecomposer.spec b/subtitlecomposer.spec index f9c5589..6752300 100644 --- a/subtitlecomposer.spec +++ b/subtitlecomposer.spec @@ -1,7 +1,7 @@ # # spec file for package subtitlecomposer # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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 @@ -26,6 +26,8 @@ Url: https://github.com/maxrd2/subtitlecomposer/ Source: https://github.com/maxrd2/%{name}/archive/v%{version}.tar.gz # PATCH-FIX-UPSTREAM NULL-pointer.patch Patch0: NULL-pointer.patch +# PATCH-FIX-OPENSUSE Find-platform-dependant-include-files-of-GStreamer.patch asterios.dramis@gmail.com -- Find platform-dependant include files of GStreamer (taken from Debian) +Patch1: Find-platform-dependant-include-files-of-GStreamer.patch BuildRequires: fdupes BuildRequires: gstreamer-plugins-base-devel BuildRequires: libicu-devel @@ -52,6 +54,9 @@ every platform supported by KDE. %prep %setup -q -n %{name}-%{version} %patch0 -p1 +%if 0%{?suse_version} > 1320 +%patch1 -p1 +%endif # Fix permissions chmod 644 ChangeLog