[packages/dotnet-gstreamer-sharp/DEVEL-1.x] - first try with new GStreamer# bindings; builds, but relies on GLibSharp extensions

qboosh qboosh at pld-linux.org
Sun Apr 24 08:05:56 CEST 2022


commit e39e2094c0b989ade56a645621f3f8d6866ceeb9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 24 08:05:43 2022 +0200

    - first try with new GStreamer# bindings; builds, but relies on GLibSharp extensions

 dotnet-gstreamer-sharp.spec             |  87 +++++++++++++--------------
 gstreamer-sharp-system-gtk-sharp3.patch | 101 ++++++++++++++++++++++++++++++++
 2 files changed, 143 insertions(+), 45 deletions(-)
---
diff --git a/dotnet-gstreamer-sharp.spec b/dotnet-gstreamer-sharp.spec
index a49d38d..49c4f64 100644
--- a/dotnet-gstreamer-sharp.spec
+++ b/dotnet-gstreamer-sharp.spec
@@ -1,30 +1,35 @@
 Summary:	.NET bindings for GStreamer 1.0
 Summary(pl.UTF-8):	Wiązania GStreamera 1.0 dla .NET
 Name:		dotnet-gstreamer-sharp
-Version:	0.99.0
-Release:	1
-License:	AGPL v3+
+Version:	1.20.1
+Release:	0.1
+License:	LGPL v2.1+
 Group:		Libraries
-Source0:	http://gstreamer.freedesktop.org/src/gstreamer-sharp/gstreamer-sharp-%{version}.tar.gz
-# Source0-md5:	467cdfdb75e0ad568c2d7bc5c47e0c25
-URL:		http://gstreamer.org/
-BuildRequires:	autoconf >= 2.50
-BuildRequires:	automake
-BuildRequires:	dotnet-gtk-sharp3-devel >= 2.99.2
+Source0:	https://gstreamer.freedesktop.org/src/gstreamer-sharp/gstreamer-sharp-%{version}.tar.xz
+# Source0-md5:	4d18fa3a9bba4266db8a3db0869c885a
+Source1:	https://github.com/GLibSharp/GtkSharp/archive/4c85f1479cf2e0dc056c0d288785e5a1d7251cb1/GtkSharp-4c85f1479cf2e0dc056c0d288785e5a1d7251cb1.tar.gz
+# Source1-md5:	0917a7cba40ceaf9ec8b4e187df24f03
+Source2:	https://github.com/GLibSharp/bindinator/archive/c29b965e5ee4a9bd7fcf6b8f4d78dba6c9cbe6ac/bindinator-c29b965e5ee4a9bd7fcf6b8f4d78dba6c9cbe6ac.tar.gz
+# Source2-md5:	940e8b3f838000e7b428f01a7e47dec0
+Patch0:		gstreamer-sharp-system-gtk-sharp3.patch
+URL:		https://gstreamer.freedesktop.org/
+BuildRequires:	dotnet-gtk-sharp3-devel >= 3.22.6
 BuildRequires:	glib2-devel >= 1:2.18.1
 BuildRequires:	gstreamer-devel >= 1.0
 BuildRequires:	gstreamer-plugins-base-devel >= 1.0
-BuildRequires:	libtool >= 2:2
+BuildRequires:	meson >= 0.59
 BuildRequires:	mono-csharp >= 2.4
-BuildRequires:	monodoc >= 1.1
+BuildRequires:	ninja >= 1.5
 BuildRequires:	pkgconfig
-BuildRequires:	rpmbuild(monoautodeps)
-Requires:	dotnet-gtk-sharp3 >= 2.99.2
+BuildRequires:	rpmbuild(macros) >= 1.745
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+Requires:	dotnet-gtk-sharp3 >= 3.22.6
 Requires:	glib2 >= 1:2.18.1
 Requires:	gstreamer >= 1.0
 Requires:	gstreamer-plugins-base >= 1.0
 Requires:	mono >= 2.4
-ExclusiveArch:	%{ix86} %{x8664} arm hppa ia64 ppc s390 s390x sparc sparcv9 sparc64
+ExclusiveArch:	%{ix86} %{x8664} %{arm} hppa ia64 ppc s390 s390x sparc sparcv9 sparc64
 ExcludeArch:	i386
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -39,7 +44,7 @@ Summary:	Development files for GStreamer-sharp library
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki GStreamer-sharp
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	monodoc >= 1.1
+Obsoletes:	dotnet-gstreamer-sharp-static < 1.14
 
 %description devel
 Development files for GStreamer-sharp library.
@@ -47,36 +52,30 @@ Development files for GStreamer-sharp library.
 %description devel -l pl.UTF-8
 Pliki programistyczne biblioteki GStreamer-sharp.
 
-%package static
-Summary:	Static gstreamer-sharp library
-Summary(pl.UTF-8):	Biblioteka statyczna gstreamer-sharp
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-
-%description static
-Static gstreamer-sharp library.
-
-%description static -l pl.UTF-8
-Biblioteka statyczna gstreamer-sharp.
-
 %prep
-%setup -q -c
+%setup -q -n gstreamer-sharp-%{version} -a1 -a2
+# currently not possible: relies on extensions from GLibSharp fork, openmedicus is not sufficient
+#patch0 -p1
+
+%{__mv} GtkSharp-* subprojects/gtk-sharp
+%{__mv} bindinator-* subprojects/bindinator
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure
-%{__make}
+%meson build
+
+%ninja_build -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgstreamersharpglue-1.0.0.la
+# build system doesn't support installing
+MESON_BUILD_ROOT=$(pwd)/build \
+MESON_INSTALL_DESTDIR_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
+%{__python3} gacutil_install.py \
+	gstreamer-sharp sources/gstreamer-sharp.dll \
+	gst-editing-services-sharp ges/gst-editing-services-sharp.dll
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -86,17 +85,15 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc LICENSE NEWS README.md
-%attr(755,root,root) %{_libdir}/libgstreamersharpglue-1.0.0.so
+%doc README.md
+%{_prefix}/lib/mono/gac/gst-editing-services-sharp
 %{_prefix}/lib/mono/gac/gstreamer-sharp
 
 %files devel
 %defattr(644,root,root,755)
+%dir %{_prefix}/lib/mono/gst-editing-services-sharp
+%{_prefix}/lib/mono/gst-editing-services-sharp/gst-editing-services-sharp.dll
 %dir %{_prefix}/lib/mono/gstreamer-sharp
 %{_prefix}/lib/mono/gstreamer-sharp/gstreamer-sharp.dll
-%{_prefix}/lib/monodoc/sources/gstreamer-sharp-docs.*
-%{_pkgconfigdir}/gstreamer-sharp-1.0.pc
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libgstreamersharpglue-1.0.0.a
+# not included in this version
+#%{_pkgconfigdir}/gstreamer-sharp-1.0.pc
diff --git a/gstreamer-sharp-system-gtk-sharp3.patch b/gstreamer-sharp-system-gtk-sharp3.patch
new file mode 100644
index 0000000..072f6ee
--- /dev/null
+++ b/gstreamer-sharp-system-gtk-sharp3.patch
@@ -0,0 +1,101 @@
+--- gstreamer-sharp-1.20.1/meson.build.orig	2022-03-14 12:33:40.000000000 +0100
++++ gstreamer-sharp-1.20.1/meson.build	2022-04-23 18:54:29.496085263 +0200
+@@ -18,34 +18,23 @@ if csc.get_id() == 'mono'
+ endif
+ 
+ 
+-subproject('gtk-sharp', default_options: ['install=false'])
+-gtk_sharp = subproject('gtk-sharp')
++has_gtk = true
++gtk_sharp_dep = dependency('gtk-sharp-3.0', version: gtk_sharp_required_version,
++      fallback: ['gtk_sharp', 'gtk_sharp_dep'])
+ 
+-glib_sharp_dep = gtk_sharp.get_variable('glib_sharp_dep')
+-glib_sharp = gtk_sharp.get_variable('glib_sharp')
++glib_sharp_dep = dependency('glib-sharp-3.0', version: gtk_sharp_required_version,
++      fallback: ['gtk_sharp', 'glib_sharp_dep'])
+ 
+-gio_sharp_dep = gtk_sharp.get_variable('gio_sharp_dep')
+-gio_sharp = gtk_sharp.get_variable('gio_sharp')
++gio_sharp_dep = dependency('gio-sharp-3.0', version: gtk_sharp_required_version,
++      fallback: ['gtk_sharp', 'gio_sharp_dep'])
+ 
+-gapi_fixup = gtk_sharp.get_variable('gapi_fixup')
+-gapi_codegen = gtk_sharp.get_variable('gapi_codegen')
+-
+-glib_api_includes = gtk_sharp.get_variable('glib_api_includes')
+-gio_api_includes = gtk_sharp.get_variable('gio_api_includes')
+-has_gtk = gtk_sharp.get_variable('has_gtk')
+-if has_gtk
+-  gtk_sharp_dep = [gtk_sharp.get_variable('gtk_sharp_dep'),
+-    gtk_sharp.get_variable('atk_sharp_dep')]
+-else
+-  gtk_sharp_dep = dependency('gtk-sharp-3.0', version: gtk_sharp_required_version,
+-      required: false)
+-endif
++gapi_fixup = find_program('gapi3-fixup')
++gapi_codegen = find_program('gapi3-codegen')
+ 
+-mono_path = [gtk_sharp.get_variable('mono_path'), join_paths(meson.current_build_dir(), 'sources')]
++glib_api_includes = glib_sharp_dep.get_variable('gapidir') / 'glib-api.xml'
++gio_api_includes = gio_sharp_dep.get_variable('gapidir') / 'gio-api.xml'
+ 
+-codegen_dependencies = [gapi_codegen, gapi_fixup, glib_sharp, gio_sharp]
+-gapi_fixup = gapi_fixup.full_path()
+-gapi_codegen = gapi_codegen.full_path()
++mono_path = [gtk_sharp_dep.get_variable('libdir') / 'mono', join_paths(meson.current_build_dir(), 'sources')]
+ 
+ gacutil = find_program('gacutil')
+ generate_api = find_program('generate_code.py')
+@@ -124,43 +113,13 @@ testsenv.prepend('LD_LIBRARY_PATH', test
+ subdir('sources')
+ if ges_dep.found()
+   subdir('ges')
+-  custom_target('GESSharp-nuget',
+-      command: [nuget, '--package-name', 'GESSharp',
+-          '--assembly', ges_sharp.full_path(),
+-          '--dependency=GstSharp:' + meson.project_version(),
+-          '--project-url', 'https://gstreamer.freedesktop.org/modules/gstreamer-sharp.html',
+-          '--icon-url', 'https://gstreamer.freedesktop.org/images/header-logo-top.png',
+-          '--license-url', 'https://cgit.freedesktop.org/gstreamer/gstreamer-sharp/plain/COPYING',
+-          '--version', meson.project_version(),
+-          '--tags', 'GStreamer GES GstSharp bindings',
+-          '--builddir', meson.current_build_dir(),
+-          '--dependency', 'GstSharp:' + meson.project_version(),
+-      ],
+-      output: 'GESSharp.' + meson.project_version() + '.nupkg'
+-  )
+ endif
+ 
+-custom_target('GstSharp-nuget',
+-    command: [nuget, '--package-name', 'GstSharp',
+-        '--assembly', gst_sharp.full_path(),
+-        '--assembly', gio_sharp.full_path(),
+-        '--assembly', glib_sharp.full_path(),
+-        '--project-url', 'https://gstreamer.freedesktop.org/modules/gstreamer-sharp.html',
+-        '--icon-url', 'https://gstreamer.freedesktop.org/images/header-logo-top.png',
+-        '--license-url', 'https://cgit.freedesktop.org/gstreamer/gstreamer-sharp/plain/COPYING',
+-        '--version', meson.project_version(),
+-        '--tags', 'GStreamer GstSharp bindings',
+-        '--builddir', meson.current_build_dir(),
+-    ],
+-    output: 'GstSharp.' + meson.project_version() + '.nupkg',
+-)
+ 
+ subdir('samples')
+ subdir('Tests')
+ 
+-bindinator = subproject('bindinator', default_options: ['gapi_fixup=@0@'.format(gapi_fixup)])
+-if bindinator.get_variable('found')
+-    bindinate = bindinator.get_variable('bindinate')
++    bindinate = find_program('bindinate')
+     run_target('bindinate_gstreamer',
+         command: [bindinate,
+             '--name=gstreamer', '--regenerate=true',
+@@ -180,6 +139,3 @@ if bindinator.get_variable('found')
+     python3 = import('python3').find_python()
+     run_target('update-code', command: [find_program('update_sources.py')])
+     run_target('update-all', command: [find_program('update_sources.py'), 'bindinate'])
+-else
+-    warning('Bindinator not usable as some required dependencies are not avalaible.')
+-endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dotnet-gstreamer-sharp.git/commitdiff/e39e2094c0b989ade56a645621f3f8d6866ceeb9



More information about the pld-cvs-commit mailing list