From d3391146c2dafb9d43be680a2144104398a18064 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 05:30:44 +0100 Subject: [PATCH] build qt5 bindings [release 1.2.0-2mamba;Sat Jan 16 2016] --- libqt-gstreamer-1.2.0-gstreamer-1.6.patch | 39 ++++++++++++ libqt-gstreamer.spec | 78 +++++++++++++++++++++-- 2 files changed, 112 insertions(+), 5 deletions(-) create mode 100644 libqt-gstreamer-1.2.0-gstreamer-1.6.patch diff --git a/libqt-gstreamer-1.2.0-gstreamer-1.6.patch b/libqt-gstreamer-1.2.0-gstreamer-1.6.patch new file mode 100644 index 0000000..6e875f6 --- /dev/null +++ b/libqt-gstreamer-1.2.0-gstreamer-1.6.patch @@ -0,0 +1,39 @@ +From e2ca8094aa8d0eac1c3a98df66fe94ce0c754088 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Santamar=C3=ADa?= +Date: Fri, 2 Oct 2015 15:00:29 +0300 +Subject: Fix compilation with GStreamer >= 1.5.1 + +apply gstreamer pkg-config definitions To ensure gstreamer builds correctly, +pick up its cflags in FindGstreamer and apply them to the build as definitions + +https://lists.ubuntu.com/archives/kubuntu-devel/2015-August/009819.html + +https://bugzilla.gnome.org/show_bug.cgi?id=751382 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4d3e7dd..5744015 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,7 @@ find_package(GObject) + macro_log_feature(GOBJECT_FOUND "GObject" "Required to build QtGLib" "http://www.gtk.org/" TRUE) + + set(CMAKE_REQUIRED_INCLUDES ${QTGSTREAMER_INCLUDES}) ++add_definitions(${GSTREAMER_DEFINITIONS}) + include(CheckCXXSourceCompiles) + check_cxx_source_compiles(" + #include +diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake +index dab91ac..fe6cde1 100644 +--- a/cmake/modules/FindGStreamer.cmake ++++ b/cmake/modules/FindGStreamer.cmake +@@ -36,6 +36,7 @@ if (PKG_CONFIG_FOUND) + exec_program(${PKG_CONFIG_EXECUTABLE} + ARGS --variable pluginsdir gstreamer-${GSTREAMER_ABI_VERSION} + OUTPUT_VARIABLE PKG_GSTREAMER_PLUGIN_DIR) ++ set(GSTREAMER_DEFINITIONS ${PKG_GSTREAMER_CFLAGS}) + endif() + + find_library(GSTREAMER_LIBRARY +-- +cgit v0.10.2 + diff --git a/libqt-gstreamer.spec b/libqt-gstreamer.spec index 9211773..54be4ab 100644 --- a/libqt-gstreamer.spec +++ b/libqt-gstreamer.spec @@ -1,7 +1,7 @@ %define apiver 1.0 Name: libqt-gstreamer Version: 1.2.0 -Release: 1mamba +Release: 2mamba Summary: C++ bindings for GStreamer with a Qt-style API Group: System/Libraries Vendor: openmamba @@ -9,16 +9,20 @@ Distribution: openmamba Packager: Silvan Calarco URL: http://gstreamer.freedesktop.org/wiki/QtGStreamer Source: http://gstreamer.freedesktop.org/src/qt-gstreamer/qt-gstreamer-%{version}.tar.xz +Patch0: libqt-gstreamer-1.2.0-gstreamer-1.6.patch License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel +BuildRequires: libGL-devel +BuildRequires: libQt5Declarative +BuildRequires: libQtDeclarative BuildRequires: libgcc BuildRequires: libglib-devel BuildRequires: libgst-plugins-base-devel BuildRequires: libgstreamer-devel BuildRequires: libqt4-devel +BuildRequires: libqt5-devel BuildRequires: libstdc++6-devel -BuildRequires: pkg-config ## AUTOBUILDREQ-END BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -31,22 +35,48 @@ QtGStreamer provides C++ bindings for GStreamer with a Qt-style API, plus some h Group: Development/Libraries Summary: Development files for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} -## note: you can add this requirement if .pc files are provided by this package -#Requires: pkgconfig +Requires: pkgconfig %description devel This package contains libraries and header files for developing applications that use %{name}. +%package -n libQt5GStreamer +Group: System/Libraries +Summary: C++ bindings for GStreamer with a Qt5-style API + +%description -n libQt5GStreamer +QtGStreamer provides C++ bindings for GStreamer with a Qt-style API, plus some helper classes for integrating GStreamer better in Qt applications. + +%package -n libQt5GStreamer-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: libQt5GStreamer = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libQt5GStreamer-devel +This package contains libraries and header files for developing applications that use %{name}. + %prep %setup -q -n qt-gstreamer-%{version} +%patch0 -p1 %build -%cmake -d build +%cmake -d build \ + -DQTGSTREAMER_EXAMPLES=OFF \ + -DQT_VERSION=4 + +%make + +cd .. +%cmake -d build-qt5 \ + -DQTGSTREAMER_EXAMPLES=OFF \ + -DQT_VERSION=5 + %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall -C build +%makeinstall -C build-qt5 %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -84,7 +114,45 @@ This package contains libraries and header files for developing applications tha %{_libdir}/pkgconfig/QtGStreamerUtils-%{apiver}.pc #%doc README +%files -n libQt5GStreamer +%defattr(-,root,root) +%{_libdir}/libQt5GLib-2.0.so.* +%{_libdir}/libQt5GStreamer-1.0.so.* +%{_libdir}/libQt5GStreamerQuick-1.0.so.* +%{_libdir}/libQt5GStreamerUi-1.0.so.* +%{_libdir}/libQt5GStreamerUtils-1.0.so.* +%doc COPYING + +%files -n libQt5GStreamer-devel +%defattr(-,root,root) +%dir %{_includedir}/Qt5GStreamer +%dir %{_includedir}/Qt5GStreamer/QGlib +%{_includedir}/Qt5GStreamer/QGlib/* +%dir %{_includedir}/Qt5GStreamer/QGst +%{_includedir}/Qt5GStreamer/QGst/* +%dir %{_libdir}/cmake/Qt5GStreamer +%{_libdir}/cmake/Qt5GStreamer/*.cmake +%{_libdir}/gstreamer-1.0/libgstqt5videosink.so +%{_libdir}/libQt5GLib-2.0.so +%{_libdir}/libQt5GStreamer-1.0.so +%{_libdir}/libQt5GStreamerQuick-1.0.so +%{_libdir}/libQt5GStreamerUi-1.0.so +%{_libdir}/libQt5GStreamerUtils-1.0.so +%{_libdir}/pkgconfig/Qt5GLib-2.0.pc +%{_libdir}/pkgconfig/Qt5GStreamer-1.0.pc +%{_libdir}/pkgconfig/Qt5GStreamerQuick-1.0.pc +%{_libdir}/pkgconfig/Qt5GStreamerUi-1.0.pc +%{_libdir}/pkgconfig/Qt5GStreamerUtils-1.0.pc +%{_libdir}/qt5/imports/QtGStreamer/libQtGStreamerQuick1.so +%{_libdir}/qt5/imports/QtGStreamer/qmldir +%{_libdir}/qt5/qml/QtGStreamer/libQtGStreamerQuick2.so +%{_libdir}/qt5/qml/QtGStreamer/qmldir + + %changelog +* Sat Jan 16 2016 Silvan Calarco 1.2.0-2mamba +- build qt5 bindings + * Thu Sep 18 2014 Silvan Calarco 1.2.0-1mamba - update to 1.2.0