Accepting request 1061504 from home:alarrosa:branches:multimedia:libs

- Add patch to reduce the required meson version to 0.61.0 since
  that's what we have in SLE 15:
  * reduce-required-meson.patch
- Probably because of a problem in SLE's meson, the generated
  pkgconfig files are missing some variables that are needed by
  rpm to generate the pkgconfig(...) provides correctly. In order
  to fix this, we now check for those variables and insert them
  in the pc files before installation if they're missing.

OBS-URL: https://build.opensuse.org/request/show/1061504
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/gstreamer?expand=0&rev=191
This commit is contained in:
Bjørn Lie 2023-01-27 12:32:35 +00:00 committed by Git OBS Bridge
parent 69afd5dfd0
commit b1e5b89d31
3 changed files with 36 additions and 1 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Jan 27 10:10:31 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Add patch to reduce the required meson version to 0.61.0 since
that's what we have in SLE 15:
* reduce-required-meson.patch
- Probably because of a problem in SLE's meson, the generated
pkgconfig files are missing some variables that are needed by
rpm to generate the pkgconfig(...) provides correctly. In order
to fix this, we now check for those variables and insert them
in the pc files before installation if they're missing.
-------------------------------------------------------------------
Tue Jan 24 16:46:29 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -34,6 +34,8 @@ Source99: baselibs.conf
Patch1: gstreamer-rpm-prov.patch
# PATCH-FIX-OPENSUSE gstreamer-pie.patch mgorse@suse.com -- create position-independent executables.
Patch2: gstreamer-pie.patch
# PATCH-FIX-OPENSUSE reduce-required-meson.patch alarrosa@suse.com -- build with meson 0.61
Patch3: reduce-required-meson.patch
BuildRequires: bison >= 2.4
BuildRequires: check-devel
@ -41,7 +43,7 @@ BuildRequires: flex >= 2.5.31
BuildRequires: gobject-introspection-devel >= 1.31.1
BuildRequires: libcap-devel
BuildRequires: libcap-progs
BuildRequires: meson >= 0.62
BuildRequires: meson >= 0.61
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: python3-xml
@ -155,6 +157,15 @@ sed -i "s/gst-plugin-scanner/gst-plugin-scanner-%{_target_cpu}/" meson.build
%{nil}
%meson_build
# meson 0.61.4 in SLE 15 SP5 doesn't generate all variables needed in the pc files
# As a result the pkgconfig(...) provides are not generated in the rpm file so
# we have to add the variables to the pc files if they're missing
for pc in *-suse-linux/meson-private/*.pc ; do
grep -q ^datarootdir= $pc || sed -ie "/^pluginsdir=.*/a datarootdir=\${prefix}\/share" $pc ;
grep -q ^datadir= $pc || sed -ie "/^datarootdir=.*/a datadir=\${datarootdir}" $pc ;
grep -q ^libexecdir= $pc || sed -ie "/^datadir=.*/a libexecdir=\${prefix}\/libexec" $pc ;
done
%install
%meson_install
%find_lang %{name}-%{gst_branch}

View File

@ -0,0 +1,12 @@
Index: gstreamer-1.22.0/meson.build
===================================================================
--- gstreamer-1.22.0.orig/meson.build
+++ gstreamer-1.22.0/meson.build
@@ -1,6 +1,6 @@
project('gstreamer', 'c',
version : '1.22.0',
- meson_version : '>= 0.62',
+ meson_version : '>= 0.61',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])