From 4116d3bbe3ad9c6a7e5c9395de6ddb79bf3c2be9 Mon Sep 17 00:00:00 2001 From: Florian Singer Date: Fri, 11 Sep 2020 20:51:37 +0200 Subject: [PATCH 01/10] Added Arch, Flatpak & RPM package files --- pkgs/arch/PKGBUILD | 49 +++++++++++++++ pkgs/flatpak/.gitignore | 2 + pkgs/flatpak/com.github.rafostar.Clapper.yml | 23 +++++++ pkgs/rpm/.gitignore | 3 + pkgs/rpm/_service | 12 ++++ pkgs/rpm/clapper.changes | 4 ++ pkgs/rpm/clapper.rpmlintrc | 1 + pkgs/rpm/clapper.spec | 64 ++++++++++++++++++++ 8 files changed, 158 insertions(+) create mode 100644 pkgs/arch/PKGBUILD create mode 100644 pkgs/flatpak/.gitignore create mode 100644 pkgs/flatpak/com.github.rafostar.Clapper.yml create mode 100644 pkgs/rpm/.gitignore create mode 100644 pkgs/rpm/_service create mode 100644 pkgs/rpm/clapper.changes create mode 100644 pkgs/rpm/clapper.rpmlintrc create mode 100644 pkgs/rpm/clapper.spec diff --git a/pkgs/arch/PKGBUILD b/pkgs/arch/PKGBUILD new file mode 100644 index 00000000..466d43aa --- /dev/null +++ b/pkgs/arch/PKGBUILD @@ -0,0 +1,49 @@ +# +# PKGBUILD file for package clapper +# +# Copyright (C) 2020 sp1rit +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Maintainer: sp1rit + +pkgname=clapper-git +pkgver=0.0.0 +pkgrel=1 +pkgdesc="A GNOME media player built using GJS and powered by GStreamer with OpenGL rendering. Can also be used as a pre-made widget for Gtk apps." +arch=(any) +url="https://github.com/Rafostar/clapper" +license=("GPL-3.0") +depends=("gjs" "gst-plugins-bad-libs") +makedepends=("meson" "gjs") +optdepends=("gstreamer-vaapi: Hardware acceleration") +provides=("${pkgname%-git}") +source=("${pkgname%-git}"::git+https://github.com/Rafostar/clapper.git) +md5sums=("SKIP") + +prepare() { + cd "$pkgname-$pkgver" +} + +build() { + cd "$pkgname-$pkgver" + meson build/ --prefix=/usr +} + +package() { + cd "$pkgname-$pkgver" + DESTDIR="$pkgdir" meson install -C build/ + ln -s "/usr/bin/com.github.rafostar.Clapper" "$pkgdir/bin/clapper" +} + diff --git a/pkgs/flatpak/.gitignore b/pkgs/flatpak/.gitignore new file mode 100644 index 00000000..1afd08ef --- /dev/null +++ b/pkgs/flatpak/.gitignore @@ -0,0 +1,2 @@ +build/ +.flatpak-builder/ diff --git a/pkgs/flatpak/com.github.rafostar.Clapper.yml b/pkgs/flatpak/com.github.rafostar.Clapper.yml new file mode 100644 index 00000000..1c00d420 --- /dev/null +++ b/pkgs/flatpak/com.github.rafostar.Clapper.yml @@ -0,0 +1,23 @@ +app-id: com.github.rafostar.Clapper +runtime: org.gnome.Platform +runtime-version: 3.36 +sdk: org.gnome.Sdk +command: com.github.rafostar.Clapper +finish-args: + - --share=ipc + - --socket=fallback-x11 + - --socket=wayland + - --device=dri + - --filesystem=xdg-videos + - --socket=pulseaudio + - --share=network + +# maybe add additinal codecs? + +modules: + - name: clapper + buildsystem: meson + sources: + - type: git + url: https://github.com/Rafostar/clapper.git + commit: 22e8e443162825f00666ca6898be3e868a3c0749 diff --git a/pkgs/rpm/.gitignore b/pkgs/rpm/.gitignore new file mode 100644 index 00000000..7cc4cb38 --- /dev/null +++ b/pkgs/rpm/.gitignore @@ -0,0 +1,3 @@ +.osc/ +clapper/ +.lock diff --git a/pkgs/rpm/_service b/pkgs/rpm/_service new file mode 100644 index 00000000..f9e3016f --- /dev/null +++ b/pkgs/rpm/_service @@ -0,0 +1,12 @@ + + + https://github.com/Rafostar/clapper.git + git + + + + *.tar + xz + + + \ No newline at end of file diff --git a/pkgs/rpm/clapper.changes b/pkgs/rpm/clapper.changes new file mode 100644 index 00000000..9b065e95 --- /dev/null +++ b/pkgs/rpm/clapper.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Sep 9 08:28:29 UTC 2020 - Florian + +- Initial packaging diff --git a/pkgs/rpm/clapper.rpmlintrc b/pkgs/rpm/clapper.rpmlintrc new file mode 100644 index 00000000..329e0784 --- /dev/null +++ b/pkgs/rpm/clapper.rpmlintrc @@ -0,0 +1 @@ +addFilter("explicit-lib-dependency") diff --git a/pkgs/rpm/clapper.spec b/pkgs/rpm/clapper.spec new file mode 100644 index 00000000..c8890544 --- /dev/null +++ b/pkgs/rpm/clapper.spec @@ -0,0 +1,64 @@ +# +# spec file for package clapper +# +# Copyright (C) 2020 sp1rit +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +Name: clapper +Version: 0.0.0 +Release: 0man +Summary: A GNOME media player +License: GPL-3.0 +URL: https://github.com/Rafostar/clapper +BuildArchitectures: noarch +BuildRoot: %{_builddir}/%{name}-%{version}-build +BuildRequires: meson gjs +Requires: gjs gstreamer +Source0: _service +%if 0%{?suse_version} +Requires: libgstplayer-1_0-0 +Recommends: gstreamer-plugins-vaapi +%endif +%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} +BuildRequires: glibc-all-langpacks +Requires: gstreamer1-plugins-bad-free +Recommends: gstreamer1-vaapi +%endif + +%description +A GNOME media player built using GJS and powered by GStreamer with OpenGL rendering. Can also be used as a pre-made widget for Gtk apps. + +%prep +%setup -q -n %_sourcedir/%name-%version -T -D + +%build +%meson +%meson_build + +%install +%meson_install +ln -s %{_bindir}/com.github.rafostar.Clapper %{buildroot}/%{_bindir}/clapper + +%files +%license COPYING +%doc README.md +%_bindir/com.github.rafostar.Clapper +%_bindir/clapper +%_datadir/com.github.rafostar.Clapper/ +%dir %_datadir/gjs-1.0/ +%_datadir/gjs-1.0/clapper.js + +%changelog From 1267614450552bc7fb91dd6d7ed7aad5c5021411 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Fri, 11 Sep 2020 20:59:40 +0200 Subject: [PATCH 02/10] fixed arch build --- pkgs/arch/.SRCINFO | 18 ++++++++++++++++++ pkgs/arch/.gitignore | 4 ++++ pkgs/arch/PKGBUILD | 10 +++++----- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 pkgs/arch/.SRCINFO create mode 100644 pkgs/arch/.gitignore diff --git a/pkgs/arch/.SRCINFO b/pkgs/arch/.SRCINFO new file mode 100644 index 00000000..212c93c6 --- /dev/null +++ b/pkgs/arch/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = clapper-git + pkgdesc = A GNOME media player built using GJS and powered by GStreamer with OpenGL rendering. Can also be used as a pre-made widget for Gtk apps. + pkgver = 0.0.0 + pkgrel = 1 + url = https://github.com/Rafostar/clapper + arch = any + license = GPL-3.0 + makedepends = meson + makedepends = gjs + depends = gjs + depends = gst-plugins-bad-libs + optdepends = gstreamer-vaapi: Hardware acceleration + provides = clapper + source = clapper-0.0.0::git+https://github.com/Rafostar/clapper.git + md5sums = SKIP + +pkgname = clapper-git + diff --git a/pkgs/arch/.gitignore b/pkgs/arch/.gitignore new file mode 100644 index 00000000..b3e983a2 --- /dev/null +++ b/pkgs/arch/.gitignore @@ -0,0 +1,4 @@ +clapper-0.0.0 +clapper-*.pkg.tar.* +pkg/ +src/ diff --git a/pkgs/arch/PKGBUILD b/pkgs/arch/PKGBUILD index 466d43aa..7483a3fc 100644 --- a/pkgs/arch/PKGBUILD +++ b/pkgs/arch/PKGBUILD @@ -29,21 +29,21 @@ depends=("gjs" "gst-plugins-bad-libs") makedepends=("meson" "gjs") optdepends=("gstreamer-vaapi: Hardware acceleration") provides=("${pkgname%-git}") -source=("${pkgname%-git}"::git+https://github.com/Rafostar/clapper.git) +source=("${pkgname%-git}-$pkgver"::git+https://github.com/Rafostar/clapper.git) md5sums=("SKIP") prepare() { - cd "$pkgname-$pkgver" + cd "${pkgname%-git}-$pkgver" } build() { - cd "$pkgname-$pkgver" + cd "${pkgname%-git}-$pkgver" meson build/ --prefix=/usr } package() { - cd "$pkgname-$pkgver" + cd "${pkgname%-git}-$pkgver" DESTDIR="$pkgdir" meson install -C build/ - ln -s "/usr/bin/com.github.rafostar.Clapper" "$pkgdir/bin/clapper" + ln -s "$pkgdir/usr/bin/com.github.rafostar.Clapper" "$pkgdir/usr/bin/clapper" } From 2ea19aa7693a03e0225713e5edbd5389b63ddd29 Mon Sep 17 00:00:00 2001 From: Spirit <31540351+sp1ritCS@users.noreply.github.com> Date: Fri, 11 Sep 2020 20:53:58 +0000 Subject: [PATCH 03/10] added potentially missing deps --- pkgs/rpm/clapper.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/rpm/clapper.spec b/pkgs/rpm/clapper.spec index c8890544..3c6f0f8d 100644 --- a/pkgs/rpm/clapper.spec +++ b/pkgs/rpm/clapper.spec @@ -26,7 +26,7 @@ URL: https://github.com/Rafostar/clapper BuildArchitectures: noarch BuildRoot: %{_builddir}/%{name}-%{version}-build BuildRequires: meson gjs -Requires: gjs gstreamer +Requires: gjs gstreamer gstreamer1(element-glsinkbin) gstreamer1(element-gtkglsink) Source0: _service %if 0%{?suse_version} Requires: libgstplayer-1_0-0 From 4abca4bd4275baac4d83bd795dc208751852de76 Mon Sep 17 00:00:00 2001 From: Spirit <31540351+sp1ritCS@users.noreply.github.com> Date: Fri, 11 Sep 2020 23:43:54 +0000 Subject: [PATCH 04/10] fixed x86_64 dep issue --- pkgs/rpm/clapper.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/rpm/clapper.spec b/pkgs/rpm/clapper.spec index 3c6f0f8d..281609f8 100644 --- a/pkgs/rpm/clapper.spec +++ b/pkgs/rpm/clapper.spec @@ -26,7 +26,7 @@ URL: https://github.com/Rafostar/clapper BuildArchitectures: noarch BuildRoot: %{_builddir}/%{name}-%{version}-build BuildRequires: meson gjs -Requires: gjs gstreamer gstreamer1(element-glsinkbin) gstreamer1(element-gtkglsink) +Requires: gjs gstreamer gstreamer-plugins-base gstreamer-plugins-good-gtk Source0: _service %if 0%{?suse_version} Requires: libgstplayer-1_0-0 From d37a025500284739adc0122241468ff2c8932198 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Sat, 12 Sep 2020 12:37:05 +0200 Subject: [PATCH 05/10] fixed stuff @Rafostar requested --- pkgs/arch/.SRCINFO | 2 ++ pkgs/arch/.gitignore | 2 +- pkgs/arch/PKGBUILD | 2 +- pkgs/rpm/clapper.spec | 8 ++++---- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/arch/.SRCINFO b/pkgs/arch/.SRCINFO index 212c93c6..8cdcf185 100644 --- a/pkgs/arch/.SRCINFO +++ b/pkgs/arch/.SRCINFO @@ -8,6 +8,8 @@ pkgbase = clapper-git makedepends = meson makedepends = gjs depends = gjs + depends = gst-plugins-base-libs + depends = gst-plugin-gtk depends = gst-plugins-bad-libs optdepends = gstreamer-vaapi: Hardware acceleration provides = clapper diff --git a/pkgs/arch/.gitignore b/pkgs/arch/.gitignore index b3e983a2..0e26cfd4 100644 --- a/pkgs/arch/.gitignore +++ b/pkgs/arch/.gitignore @@ -1,4 +1,4 @@ -clapper-0.0.0 +clapper-*/ clapper-*.pkg.tar.* pkg/ src/ diff --git a/pkgs/arch/PKGBUILD b/pkgs/arch/PKGBUILD index 7483a3fc..60c11d60 100644 --- a/pkgs/arch/PKGBUILD +++ b/pkgs/arch/PKGBUILD @@ -25,7 +25,7 @@ pkgdesc="A GNOME media player built using GJS and powered by GStreamer with Open arch=(any) url="https://github.com/Rafostar/clapper" license=("GPL-3.0") -depends=("gjs" "gst-plugins-bad-libs") +depends=("gjs" "gst-plugins-base-libs" "gst-plugin-gtk" "gst-plugins-bad-libs") makedepends=("meson" "gjs") optdepends=("gstreamer-vaapi: Hardware acceleration") provides=("${pkgname%-git}") diff --git a/pkgs/rpm/clapper.spec b/pkgs/rpm/clapper.spec index 281609f8..b6119aae 100644 --- a/pkgs/rpm/clapper.spec +++ b/pkgs/rpm/clapper.spec @@ -19,22 +19,22 @@ Name: clapper Version: 0.0.0 -Release: 0man +Release: 0 Summary: A GNOME media player License: GPL-3.0 URL: https://github.com/Rafostar/clapper BuildArchitectures: noarch BuildRoot: %{_builddir}/%{name}-%{version}-build BuildRequires: meson gjs -Requires: gjs gstreamer gstreamer-plugins-base gstreamer-plugins-good-gtk +Requires: gjs gstreamer Source0: _service %if 0%{?suse_version} -Requires: libgstplayer-1_0-0 +Requires: gstreamer-plugins-base gstreamer-plugins-good-gtk libgstplayer-1_0-0 Recommends: gstreamer-plugins-vaapi %endif %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} BuildRequires: glibc-all-langpacks -Requires: gstreamer1-plugins-bad-free +Requires: gstreamer1-plugins-base gstreamer1-plugins-good-gtk gstreamer1-plugins-bad-free Recommends: gstreamer1-vaapi %endif From f973f154445a9d55e2df58ecd0f786566c416848 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Sat, 12 Sep 2020 12:41:17 +0200 Subject: [PATCH 06/10] fixed my vim so its on par with githubs tab policy --- pkgs/rpm/clapper.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/rpm/clapper.spec b/pkgs/rpm/clapper.spec index b6119aae..3f871bc6 100644 --- a/pkgs/rpm/clapper.spec +++ b/pkgs/rpm/clapper.spec @@ -23,9 +23,9 @@ Release: 0 Summary: A GNOME media player License: GPL-3.0 URL: https://github.com/Rafostar/clapper -BuildArchitectures: noarch +BuildArchitectures: noarch BuildRoot: %{_builddir}/%{name}-%{version}-build -BuildRequires: meson gjs +BuildRequires: meson gjs Requires: gjs gstreamer Source0: _service %if 0%{?suse_version} From c7be556e6eb47bc7cde7a03ef87d607697088e93 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Sat, 12 Sep 2020 14:06:08 +0200 Subject: [PATCH 07/10] added all codecs from totem, only using gst-libav for now tho; added gst-vaapi, further research required --- .../flatpak/codecs/a52dec-0.7.4-rpath64.patch | 22 +++++++++ .../codecs/a52dec-configure-optflags.patch | 23 +++++++++ pkgs/flatpak/codecs/ffmpeg.json | 49 +++++++++++++++++++ .../gst-libav-stop-caching-codecs.patch | 30 ++++++++++++ pkgs/flatpak/codecs/gst-libav.json | 23 +++++++++ pkgs/flatpak/codecs/gst-plugins-bad-927.patch | 28 +++++++++++ pkgs/flatpak/codecs/gst-plugins-bad.json | 25 ++++++++++ pkgs/flatpak/codecs/gst-plugins-ugly.json | 19 +++++++ pkgs/flatpak/codecs/liba52-prefer-pic.patch | 39 +++++++++++++++ pkgs/flatpak/codecs/liba52-silence.patch | 17 +++++++ pkgs/flatpak/codecs/liba52.json | 36 ++++++++++++++ pkgs/flatpak/codecs/libass.json | 18 +++++++ pkgs/flatpak/codecs/libdvdcss.json | 18 +++++++ pkgs/flatpak/codecs/libdvdnav.json | 18 +++++++ pkgs/flatpak/codecs/libdvdread.json | 18 +++++++ pkgs/flatpak/codecs/libmpeg2-inline.patch | 10 ++++ pkgs/flatpak/codecs/libmpeg2.json | 24 +++++++++ pkgs/flatpak/com.github.rafostar.Clapper.yml | 23 ++++++++- 18 files changed, 439 insertions(+), 1 deletion(-) create mode 100644 pkgs/flatpak/codecs/a52dec-0.7.4-rpath64.patch create mode 100644 pkgs/flatpak/codecs/a52dec-configure-optflags.patch create mode 100644 pkgs/flatpak/codecs/ffmpeg.json create mode 100644 pkgs/flatpak/codecs/gst-libav-stop-caching-codecs.patch create mode 100644 pkgs/flatpak/codecs/gst-libav.json create mode 100644 pkgs/flatpak/codecs/gst-plugins-bad-927.patch create mode 100644 pkgs/flatpak/codecs/gst-plugins-bad.json create mode 100644 pkgs/flatpak/codecs/gst-plugins-ugly.json create mode 100644 pkgs/flatpak/codecs/liba52-prefer-pic.patch create mode 100644 pkgs/flatpak/codecs/liba52-silence.patch create mode 100644 pkgs/flatpak/codecs/liba52.json create mode 100644 pkgs/flatpak/codecs/libass.json create mode 100644 pkgs/flatpak/codecs/libdvdcss.json create mode 100644 pkgs/flatpak/codecs/libdvdnav.json create mode 100644 pkgs/flatpak/codecs/libdvdread.json create mode 100644 pkgs/flatpak/codecs/libmpeg2-inline.patch create mode 100644 pkgs/flatpak/codecs/libmpeg2.json diff --git a/pkgs/flatpak/codecs/a52dec-0.7.4-rpath64.patch b/pkgs/flatpak/codecs/a52dec-0.7.4-rpath64.patch new file mode 100644 index 00000000..e8466eea --- /dev/null +++ b/pkgs/flatpak/codecs/a52dec-0.7.4-rpath64.patch @@ -0,0 +1,22 @@ +--- a52dec-0.7.4/configure~ 2002-07-28 06:50:42.000000000 +0300 ++++ a52dec-0.7.4/configure 2006-02-16 23:03:07.000000000 +0200 +@@ -5839,7 +5839,7 @@ + shlibpath_overrides_runpath=unknown + version_type=none + dynamic_linker="$host_os ld.so" +-sys_lib_dlsearch_path_spec="/lib /usr/lib" ++sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + + case $host_os in +--- a52dec-0.7.4/aclocal.m4~ 2002-07-28 06:50:38.000000000 +0300 ++++ a52dec-0.7.4/aclocal.m4 2006-02-16 23:02:38.000000000 +0200 +@@ -2141,7 +2141,7 @@ + shlibpath_overrides_runpath=unknown + version_type=none + dynamic_linker="$host_os ld.so" +-sys_lib_dlsearch_path_spec="/lib /usr/lib" ++sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + + case $host_os in diff --git a/pkgs/flatpak/codecs/a52dec-configure-optflags.patch b/pkgs/flatpak/codecs/a52dec-configure-optflags.patch new file mode 100644 index 00000000..a0b84632 --- /dev/null +++ b/pkgs/flatpak/codecs/a52dec-configure-optflags.patch @@ -0,0 +1,23 @@ +--- ./configure~ 2002-07-28 06:50:42.000000000 +0300 ++++ ./configure 2003-04-13 17:20:53.000000000 +0300 +@@ -2857,13 +2857,13 @@ + + case "$host" in + i?86-* | k?-*) +- case "$host" in +- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";; +- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";; +- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";; +- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";; +- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";; +- esac ++# case "$host" in ++# i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";; ++# i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";; ++# i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";; ++# i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";; ++# k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";; ++# esac + echo "$as_me:$LINENO: checking if $CC supports $OPT_CFLAGS flags" >&5 + echo $ECHO_N "checking if $CC supports $OPT_CFLAGS flags... $ECHO_C" >&6 + SAVE_CFLAGS="$CFLAGS" diff --git a/pkgs/flatpak/codecs/ffmpeg.json b/pkgs/flatpak/codecs/ffmpeg.json new file mode 100644 index 00000000..2e83ad18 --- /dev/null +++ b/pkgs/flatpak/codecs/ffmpeg.json @@ -0,0 +1,49 @@ +{ + "name": "ffmpeg", + "config-opts": [ + "--prefix=/app/lib/codecs/", + "--libdir=/app/lib/codecs/lib", + "--disable-debug", + "--disable-doc", + "--disable-static", + "--enable-optimizations", + "--enable-shared", + "--disable-ffplay", + "--disable-ffprobe", + "--disable-everything", + "--enable-gnutls", + "--enable-libaom", + "--enable-libdav1d", + "--enable-libfdk-aac", + "--enable-libmp3lame", + "--enable-libfontconfig", + "--enable-libfreetype", + "--enable-libopenh264", + "--enable-libopus", + "--enable-libpulse", + "--enable-libspeex", + "--enable-libtheora", + "--enable-libvorbis", + "--enable-libvpx", + "--enable-libwebp", + "--enable-openal", + "--enable-opengl", + "--enable-sdl2", + "--enable-decoder=ac3,alac,flac,g723_1,g729,libfdk_aac,libopus,mp2,mp3,m4a,pcm_alaw,pcm_mulaw,pcm_f32le,pcm_s16be,pcm_s24be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_u8,tta,vorbis,wavpack,ape,dca,eac3,mlp,tak,truehd,wmav1,wmav2,wmapro", + "--enable-decoder=ass,ffv1,libaom_av1,libdav1d,libopenh264,libvpx_vp8,libvpx_vp9,rawvideo,theora,vp8,vp9,cinepak,flv,hevc,h263,h264,indeo2,indeo3,indeo4,indeo5,mpeg2video,mpeg4,msmpeg4,msmpeg4v1,msmpeg4v2,msmpeg4v3,vp6,vp6a,vp6f,wmv1,wmv2,wmv3,wmv3image", + "--enable-decoder=gif,png,tiff,webp", + "--enable-hwaccel=h264_vaapi,h264_vdpau,hevc_vaapi,hevc_vdpau", + "--enable-parser=aac,ac3,flac,mpegaudio,mpeg4video,opus,vp3,vp8,vorbis,hevc,h264,dca", + "--enable-demuxer=aac,ac3,ass,flac,gif,matroska,mov,mp3,mpegvideo,ogg,wav,avi,h264,m4v", + "--enable-filter=crop,scale", + "--enable-protocol=file" + ], + "sources": [ + { + "type": "git", + "url": "https://git.ffmpeg.org/ffmpeg.git", + "tag": "n4.2.4", + "commit": "f9f95ceebfbd7b7f43c1b7ad34e25d366e6e2d2b" + } + ] +} diff --git a/pkgs/flatpak/codecs/gst-libav-stop-caching-codecs.patch b/pkgs/flatpak/codecs/gst-libav-stop-caching-codecs.patch new file mode 100644 index 00000000..801584d5 --- /dev/null +++ b/pkgs/flatpak/codecs/gst-libav-stop-caching-codecs.patch @@ -0,0 +1,30 @@ +From 2c371f17af1695bd42f572d5ccdb837152b8b67a Mon Sep 17 00:00:00 2001 +From: Thomas Coldrick +Date: Thu, 8 Nov 2018 17:46:53 +0000 +Subject: [PATCH] gst-libav-stop-caching-codecs + +--- + ext/libav/gstav.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c +index 2a88230..bfd19a1 100644 +--- a/ext/libav/gstav.c ++++ b/ext/libav/gstav.c +@@ -155,6 +155,13 @@ plugin_init (GstPlugin * plugin) + /* build global ffmpeg param/property info */ + gst_ffmpeg_cfg_init (); + ++ gst_plugin_add_dependency_simple (plugin, NULL, ++ "/app/lib/codecs/lib", ++ "libavcodec.so.58," ++ "libavformat.so.58," ++ "libswscale.so.5", ++ GST_PLUGIN_DEPENDENCY_FLAG_NONE); ++ + gst_ffmpegaudenc_register (plugin); + gst_ffmpegvidenc_register (plugin); + gst_ffmpegauddec_register (plugin); +-- +2.19.1 + diff --git a/pkgs/flatpak/codecs/gst-libav.json b/pkgs/flatpak/codecs/gst-libav.json new file mode 100644 index 00000000..278b0f41 --- /dev/null +++ b/pkgs/flatpak/codecs/gst-libav.json @@ -0,0 +1,23 @@ +{ + "name": "gst-libav", + "buildsystem": "meson", + "config-opts": [ + "-Ddoc=disabled" + ], + "sources": [ + { + "type": "git", + "url": "https://gitlab.freedesktop.org/gstreamer/gst-libav.git", + "tag": "1.16.2", + "commit": "090cfd40aad49ad645a9bf4bdd62e65b739c95f3" + }, + { + "type": "patch", + "path": "gst-libav-stop-caching-codecs.patch" + } + ], + "post-install": [ + "mkdir -p /app/lib/codecs/lib/gstreamer-1.0", + "mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0" + ] +} diff --git a/pkgs/flatpak/codecs/gst-plugins-bad-927.patch b/pkgs/flatpak/codecs/gst-plugins-bad-927.patch new file mode 100644 index 00000000..056d229c --- /dev/null +++ b/pkgs/flatpak/codecs/gst-plugins-bad-927.patch @@ -0,0 +1,28 @@ +From 40ab4538575dffc7791c7d289d60d30153723307 Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Thu, 19 Dec 2019 15:19:29 -0500 +Subject: [PATCH] autoconvert: Fix lock-less exchange or free condition + +Before this change, we would free the list we just have saved. + +Fixes #1158 +--- + gst/autoconvert/gstautoconvert.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c +index 46bec1314..7bf7cac3c 100644 +--- a/gst/autoconvert/gstautoconvert.c ++++ b/gst/autoconvert/gstautoconvert.c +@@ -895,7 +895,7 @@ gst_auto_convert_load_factories (GstAutoConvert * autoconvert) + + g_assert (all_factories); + +- if (g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL, ++ if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL, + all_factories)) { + gst_plugin_feature_list_free (all_factories); + } +-- +2.22.2 + diff --git a/pkgs/flatpak/codecs/gst-plugins-bad.json b/pkgs/flatpak/codecs/gst-plugins-bad.json new file mode 100644 index 00000000..a7d98393 --- /dev/null +++ b/pkgs/flatpak/codecs/gst-plugins-bad.json @@ -0,0 +1,25 @@ +{ + "name": "gst-plugins-bad", + "buildsystem": "meson", + "cleanup": [ "/bin/*webrtc*", "/bin/crossfade", "/bin/tsparser", "/bin/playout" ], + "config-opts": [ + "-Dopenh264=disabled", + "-Dvdpau=disabled" + ], + "sources": [ + { + "type": "git", + "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git", + "tag": "1.16.2", + "commit": "a6f26408f74a60d02ce6b4f0daee392ce847055f" + }, + { + "type": "patch", + "path": "gst-plugins-bad-927.patch" + } + ], + "post-install": [ + "mkdir -p /app/lib/codecs/lib/gstreamer-1.0", + "mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0" + ] +} diff --git a/pkgs/flatpak/codecs/gst-plugins-ugly.json b/pkgs/flatpak/codecs/gst-plugins-ugly.json new file mode 100644 index 00000000..1f7c8a63 --- /dev/null +++ b/pkgs/flatpak/codecs/gst-plugins-ugly.json @@ -0,0 +1,19 @@ +{ + "name": "gst-plugins-ugly", + "buildsystem": "meson", + "config-opts": [ + "-Dmpeg2dec=enabled" + ], + "sources": [ + { + "type": "git", + "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git", + "tag": "1.16.2", + "commit": "4b2943ee2788331e4000f0f7e226cd5ce2c135a4" + } + ], + "post-install": [ + "mkdir -p /app/lib/codecs/lib/gstreamer-1.0", + "mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0" + ] +} diff --git a/pkgs/flatpak/codecs/liba52-prefer-pic.patch b/pkgs/flatpak/codecs/liba52-prefer-pic.patch new file mode 100644 index 00000000..0d4d645f --- /dev/null +++ b/pkgs/flatpak/codecs/liba52-prefer-pic.patch @@ -0,0 +1,39 @@ +From 4c18c43b4d4ccb1d05ae73b813f26ba193fbeee3 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 18 Jan 2019 17:37:13 +0100 +Subject: [PATCH] Prefer PIC + +--- + configure | 2 +- + liba52/configure.incl | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index b81fdff..bc0267c 100755 +--- a/configure ++++ b/configure +@@ -9640,7 +9640,7 @@ _ACEOF + + + +-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic" ++LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-pic" + + # Check whether --enable-double or --disable-double was given. + if test "${enable_double+set}" = set; then +diff --git a/liba52/configure.incl b/liba52/configure.incl +index 4dbbcea..5eb69ee 100644 +--- a/liba52/configure.incl ++++ b/liba52/configure.incl +@@ -2,7 +2,7 @@ AC_SUBST([LIBA52_CFLAGS]) + AC_SUBST([LIBA52_LIBS]) + + dnl avoid -fPIC when possible +-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic" ++LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-pic" + + AC_ARG_ENABLE([double], + [ --enable-double use double-precision samples]) +-- +2.20.1 + diff --git a/pkgs/flatpak/codecs/liba52-silence.patch b/pkgs/flatpak/codecs/liba52-silence.patch new file mode 100644 index 00000000..a7399661 --- /dev/null +++ b/pkgs/flatpak/codecs/liba52-silence.patch @@ -0,0 +1,17 @@ +diff -ru a52dec.orig/liba52/imdct.c a52dec/liba52/imdct.c +--- a52dec.orig/liba52/imdct.c 2012-02-06 19:40:21.000000000 +0200 ++++ a52dec/liba52/imdct.c 2012-02-06 19:40:53.000000000 +0200 +@@ -419,13 +419,11 @@ + + #ifdef LIBA52_DJBFFT + if (mm_accel & MM_ACCEL_DJBFFT) { +- fprintf (stderr, "Using djbfft for IMDCT transform\n"); + ifft128 = (void (*) (complex_t *)) fftc4_un128; + ifft64 = (void (*) (complex_t *)) fftc4_un64; + } else + #endif + { +- fprintf (stderr, "No accelerated IMDCT transform found\n"); + ifft128 = ifft128_c; + ifft64 = ifft64_c; + } diff --git a/pkgs/flatpak/codecs/liba52.json b/pkgs/flatpak/codecs/liba52.json new file mode 100644 index 00000000..7217aaff --- /dev/null +++ b/pkgs/flatpak/codecs/liba52.json @@ -0,0 +1,36 @@ +{ + "name": "liba52", + "config-opts": [ "--enable-shared", "--disable-static" ], + "rm-configure": true, + "cleanup": [ "/bin/*a52*" ], + "sources": [ + { + "type": "archive", + "url": "http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz", + "sha256": "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33" + }, + { + "type": "patch", + "path": "a52dec-0.7.4-rpath64.patch" + }, + { + "type": "patch", + "path": "a52dec-configure-optflags.patch" + }, + { + "type": "patch", + "path": "liba52-silence.patch" + }, + { + "type": "patch", + "path": "liba52-prefer-pic.patch" + }, + { + "type":"script", + "commands":[ + "autoreconf -fiv" + ], + "dest-filename":"autogen.sh" + } + ] +} diff --git a/pkgs/flatpak/codecs/libass.json b/pkgs/flatpak/codecs/libass.json new file mode 100644 index 00000000..a968b406 --- /dev/null +++ b/pkgs/flatpak/codecs/libass.json @@ -0,0 +1,18 @@ +{ + "name": "libass", + "sources": [ + { + "type": "git", + "url": "https://github.com/libass/libass.git", + "tag": "0.14.0", + "commit": "73284b676b12b47e17af2ef1b430527299e10c17" + }, + { + "type":"script", + "commands":[ + "autoreconf -fiv" + ], + "dest-filename":"autogen.sh" + } + ] +} diff --git a/pkgs/flatpak/codecs/libdvdcss.json b/pkgs/flatpak/codecs/libdvdcss.json new file mode 100644 index 00000000..a706b71a --- /dev/null +++ b/pkgs/flatpak/codecs/libdvdcss.json @@ -0,0 +1,18 @@ +{ + "name": "libdvdcss", + "sources": [ + { + "type": "git", + "url": "https://code.videolan.org/videolan/libdvdcss.git", + "tag": "1.4.2", + "commit": "7b7c185704567398627ad0f9a0d948a63514394b" + }, + { + "type":"script", + "commands":[ + "autoreconf -fiv" + ], + "dest-filename":"autogen.sh" + } + ] +} diff --git a/pkgs/flatpak/codecs/libdvdnav.json b/pkgs/flatpak/codecs/libdvdnav.json new file mode 100644 index 00000000..fef6a1c3 --- /dev/null +++ b/pkgs/flatpak/codecs/libdvdnav.json @@ -0,0 +1,18 @@ +{ + "name": "libdvdnav", + "sources": [ + { + "type": "git", + "url": "https://code.videolan.org/videolan/libdvdnav.git", + "tag": "6.1.0", + "commit": "4f48efd43efb2e3372cb494a8893342e1fb507ae" + }, + { + "type":"script", + "commands":[ + "autoreconf -fiv" + ], + "dest-filename":"autogen.sh" + } + ] +} diff --git a/pkgs/flatpak/codecs/libdvdread.json b/pkgs/flatpak/codecs/libdvdread.json new file mode 100644 index 00000000..0c2255bb --- /dev/null +++ b/pkgs/flatpak/codecs/libdvdread.json @@ -0,0 +1,18 @@ +{ + "name": "libdvdread", + "sources": [ + { + "type": "git", + "url": "https://code.videolan.org/videolan/libdvdread.git", + "tag": "6.1.0", + "commit": "d413571ce39acd404523b6742ba361215f6ada68" + }, + { + "type":"script", + "commands":[ + "autoreconf -fiv" + ], + "dest-filename":"autogen.sh" + } + ] +} diff --git a/pkgs/flatpak/codecs/libmpeg2-inline.patch b/pkgs/flatpak/codecs/libmpeg2-inline.patch new file mode 100644 index 00000000..c80ced70 --- /dev/null +++ b/pkgs/flatpak/codecs/libmpeg2-inline.patch @@ -0,0 +1,10 @@ +--- libmpeg2/configure.ac 2016-01-20 15:31:37.933547037 +0100 ++++ libmpeg2.new/configure.ac 2016-01-20 15:05:40.931231465 +0100 +@@ -149,7 +149,6 @@ + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +-AC_C_ALWAYS_INLINE + AC_C_RESTRICT + AC_C_BUILTIN_EXPECT + AC_C_BIGENDIAN diff --git a/pkgs/flatpak/codecs/libmpeg2.json b/pkgs/flatpak/codecs/libmpeg2.json new file mode 100644 index 00000000..b2d0eb6d --- /dev/null +++ b/pkgs/flatpak/codecs/libmpeg2.json @@ -0,0 +1,24 @@ +{ + "name": "libmpeg2", + "config-opts": [ "--enable-shared", "--disable-static" ], + "rm-configure": true, + "cleanup": [ "/bin/*mpeg2*" ], + "sources": [ + { + "type": "archive", + "url": "http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz", + "sha256": "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4" + }, + { + "type": "patch", + "path": "libmpeg2-inline.patch" + }, + { + "type":"script", + "commands":[ + "autoreconf -fiv" + ], + "dest-filename":"autogen.sh" + } + ] +} diff --git a/pkgs/flatpak/com.github.rafostar.Clapper.yml b/pkgs/flatpak/com.github.rafostar.Clapper.yml index 1c00d420..e47017e9 100644 --- a/pkgs/flatpak/com.github.rafostar.Clapper.yml +++ b/pkgs/flatpak/com.github.rafostar.Clapper.yml @@ -11,13 +11,34 @@ finish-args: - --filesystem=xdg-videos - --socket=pulseaudio - --share=network + - --env=GST_PLUGIN_PATH=/app/lib/codecs/lib/gstreamer-1.0 # maybe add additinal codecs? modules: + # gstreamer from the gnome runtime is outdated, maybe upgrade all modules? + - name: gst-vaapi + buildsystem: meson + sources: + - type: git + url: git://anongit.freedesktop.org/gstreamer/gstreamer-vaapi + tag: 1.16.2 + post-install: + - mkdir -p /app/lib/codecs/lib/gstreamer-1.0 + - mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0 + #- codecs/liba52.json + #- codecs/libmpeg2.json + #- codecs/gst-plugins-ugly.json + #- codecs/libdvdcss.json + #- codecs/libdvdread.json + #- codecs/libdvdnav.json + #- codecs/libass.json + #- codecs/ffmpeg.json + - codecs/gst-libav.json + #- codecs/gst-plugins-bad.json - name: clapper buildsystem: meson sources: - type: git url: https://github.com/Rafostar/clapper.git - commit: 22e8e443162825f00666ca6898be3e868a3c0749 + commit: 6938f014332562e1b7c8f22bf755338268b98d5f From c2856d61460ac66ec6c0c3b0fb5c136321704212 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Sat, 12 Sep 2020 15:17:19 +0200 Subject: [PATCH 08/10] fixed gstreamer1 on RHEL, added libav to suse builds --- pkgs/rpm/clapper.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/rpm/clapper.spec b/pkgs/rpm/clapper.spec index 3f871bc6..fa4ab309 100644 --- a/pkgs/rpm/clapper.spec +++ b/pkgs/rpm/clapper.spec @@ -26,15 +26,15 @@ URL: https://github.com/Rafostar/clapper BuildArchitectures: noarch BuildRoot: %{_builddir}/%{name}-%{version}-build BuildRequires: meson gjs -Requires: gjs gstreamer +Requires: gjs Source0: _service %if 0%{?suse_version} -Requires: gstreamer-plugins-base gstreamer-plugins-good-gtk libgstplayer-1_0-0 -Recommends: gstreamer-plugins-vaapi +Requires: gstreamer gstreamer-plugins-base gstreamer-plugins-good-gtk libgstplayer-1_0-0 +Recommends: gstreamer-plugins-vaapi gstreamer-plugins-libav %endif %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} BuildRequires: glibc-all-langpacks -Requires: gstreamer1-plugins-base gstreamer1-plugins-good-gtk gstreamer1-plugins-bad-free +Requires: gstreamer1 gstreamer1-plugins-base gstreamer1-plugins-good-gtk gstreamer1-plugins-bad-free Recommends: gstreamer1-vaapi %endif From cb3058dc6ff3b6b769274053e501e0e2042ba379 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Sat, 12 Sep 2020 17:48:14 +0200 Subject: [PATCH 09/10] added libav arch optdepend --- pkgs/arch/.SRCINFO | 1 + pkgs/arch/PKGBUILD | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/arch/.SRCINFO b/pkgs/arch/.SRCINFO index 8cdcf185..73463a63 100644 --- a/pkgs/arch/.SRCINFO +++ b/pkgs/arch/.SRCINFO @@ -11,6 +11,7 @@ pkgbase = clapper-git depends = gst-plugins-base-libs depends = gst-plugin-gtk depends = gst-plugins-bad-libs + optdepends = gst-libav: Additional Codecs, optdepends = gstreamer-vaapi: Hardware acceleration provides = clapper source = clapper-0.0.0::git+https://github.com/Rafostar/clapper.git diff --git a/pkgs/arch/PKGBUILD b/pkgs/arch/PKGBUILD index 60c11d60..83f60995 100644 --- a/pkgs/arch/PKGBUILD +++ b/pkgs/arch/PKGBUILD @@ -27,7 +27,7 @@ url="https://github.com/Rafostar/clapper" license=("GPL-3.0") depends=("gjs" "gst-plugins-base-libs" "gst-plugin-gtk" "gst-plugins-bad-libs") makedepends=("meson" "gjs") -optdepends=("gstreamer-vaapi: Hardware acceleration") +optdepends=("gst-libav: Additional Codecs", "gstreamer-vaapi: Hardware acceleration") provides=("${pkgname%-git}") source=("${pkgname%-git}-$pkgver"::git+https://github.com/Rafostar/clapper.git) md5sums=("SKIP") From 404b0f1200595a66a9e0b130775c79967f3bbe51 Mon Sep 17 00:00:00 2001 From: SpiritCS Date: Sun, 13 Sep 2020 01:29:10 +0200 Subject: [PATCH 10/10] cleaned up comments --- pkgs/flatpak/com.github.rafostar.Clapper.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/flatpak/com.github.rafostar.Clapper.yml b/pkgs/flatpak/com.github.rafostar.Clapper.yml index e47017e9..77b1e34f 100644 --- a/pkgs/flatpak/com.github.rafostar.Clapper.yml +++ b/pkgs/flatpak/com.github.rafostar.Clapper.yml @@ -13,10 +13,7 @@ finish-args: - --share=network - --env=GST_PLUGIN_PATH=/app/lib/codecs/lib/gstreamer-1.0 -# maybe add additinal codecs? - modules: - # gstreamer from the gnome runtime is outdated, maybe upgrade all modules? - name: gst-vaapi buildsystem: meson sources: