diff mbox series

[meta-multimedia] libdca: add recipe

Message ID 20230914154206.2143189-1-f_l_k@t-online.de
State Under Review
Headers show
Series [meta-multimedia] libdca: add recipe | expand

Commit Message

Markus Volk Sept. 14, 2023, 3:42 p.m. UTC
This adds a recipe for videolans libdca.
It is needed to add dts support for gstreamer/ffmpeg

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 ...am-dont-create-symlinks-for-static-l.patch | 32 +++++++++++++++++++
 .../recipes-multimedia/libdca/libdca_0.0.7.bb | 16 ++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch
 create mode 100644 meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb

Comments

Khem Raj Sept. 14, 2023, 4:14 p.m. UTC | #1
On Thu, Sep 14, 2023 at 8:42 AM Markus Volk <f_l_k@t-online.de> wrote:
>
> This adds a recipe for videolans libdca.
> It is needed to add dts support for gstreamer/ffmpeg
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  ...am-dont-create-symlinks-for-static-l.patch | 32 +++++++++++++++++++
>  .../recipes-multimedia/libdca/libdca_0.0.7.bb | 16 ++++++++++
>  2 files changed, 48 insertions(+)
>  create mode 100644 meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch
>  create mode 100644 meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb
>
> diff --git a/meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch b/meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch
> new file mode 100644
> index 000000000..06cd4092e
> --- /dev/null
> +++ b/meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch
> @@ -0,0 +1,32 @@
> +From 0a78f5679267ccf801931925b2754bad5ec572f0 Mon Sep 17 00:00:00 2001
> +From: Markus Volk <f_l_k@t-online.de>
> +Date: Tue, 12 Sep 2023 16:15:46 +0200
> +Subject: [PATCH] libdca/Makefile.am: dont create symlinks for static lib
> +
> +Signed-off-by: Markus Volk <f_l_k@t-online.de>
> +
> +fixes:
> +ERROR: libdca-0.0.7-r0 do_populate_sysroot: sstate found an absolute path symlink /home/flk/poky/build/tmp/work/corei7-64-poky-linux/libdca/0.0.7/sysroot-destdir/usr/lib/libdts.a pointing at /home/flk/poky/build/tmp/work/corei7-64-poky-linux/libdca/0.0.7/image/usr/lib/libdca.a. Please replace this with a relative link.
> +
> +Upstream-Status: Inappropriate [OE Specific]
> +---
> + libdca/Makefile.am | 6 ------
> + 1 file changed, 6 deletions(-)
> +
> +diff --git a/libdca/Makefile.am b/libdca/Makefile.am
> +index 05bdaca..97d6f15 100644
> +--- a/libdca/Makefile.am
> ++++ b/libdca/Makefile.am
> +@@ -10,9 +10,3 @@ libdca_la_LIBADD = $(LIBDCA_LIBS)
> +
> + pkgconfigdir = $(libdir)/pkgconfig
> + pkgconfig_DATA = libdca.pc libdts.pc
> +-
> +-install-exec-hook:
> +-      $(LN_S)f "$(DESTDIR)$(libdir)/libdca.a" "$(DESTDIR)$(libdir)/libdts.a"

if we change it into
 $(LN_S)f libdca.a "$(DESTDIR)$(libdir)/libdts.a"

Then it becomes relative and can be submitted upstream as well.

> +-
> +-uninstall-hook:
> +-      unlink "$(DESTDIR)$(libdir)/libdts.a"
> +--
> +2.41.0
> +
> diff --git a/meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb b/meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb
> new file mode 100644
> index 000000000..eacab0bfa
> --- /dev/null
> +++ b/meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb
> @@ -0,0 +1,16 @@
> +DESCRIPTION = "decoding library for DTS Coherent Acoustics streams"
> +SECTION = "libs/multimedia"
> +LICENSE = "GPL-2.0-only"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
> +
> +DEPENDS = "glib-2.0"
> +
> +SRC_URI = " \
> +       git://code.videolan.org/videolan/libdca.git;protocol=https;branch=master \
> +       file://0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch \
> +"
> +
> +SRCREV = "d00468139d3e9e03a93b1cef7c3f4e396f5b6871"
> +S = "${WORKDIR}/git"
> +
> +inherit autotools pkgconfig
> --
> 2.41.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#104874): https://lists.openembedded.org/g/openembedded-devel/message/104874
> Mute This Topic: https://lists.openembedded.org/mt/101360704/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Markus Volk Sept. 14, 2023, 4:28 p.m. UTC | #2
On Thu, Sep 14 2023 at 09:14:26 AM -07:00:00, Khem Raj 
<raj.khem@gmail.com> wrote:
> 
> if we change it into
>  $(LN_S)f libdca.a "$(DESTDIR)$(libdir)/libdts.a"
> 
> Then it becomes relative and can be submitted upstream as well.

This change has already been requested some years ago:
<https://code.videolan.org/videolan/libdca/-/issues/3>

Anyway, the static lib isn't built by default so this would add a 
broken symlink to the package I guess ?
Khem Raj Sept. 14, 2023, 4:56 p.m. UTC | #3
On Thu, Sep 14, 2023 at 9:28 AM Markus Volk <f_l_k@t-online.de> wrote:
>
> On Thu, Sep 14 2023 at 09:14:26 AM -07:00:00, Khem Raj <raj.khem@gmail.com> wrote:
>
> if we change it into $(LN_S)f libdca.a "$(DESTDIR)$(libdir)/libdts.a" Then it becomes relative and can be submitted upstream as well.
>
>
> This change has already been requested some years ago:
> https://code.videolan.org/videolan/libdca/-/issues/3
>
> Anyway, the static lib isn't built by default so this would add a broken symlink to the package I guess ?

That would be a separate problem and the target creating this symlink
should depend on static lib generation target.
but as such, It would be good to use the upstream proposed revert.
Markus Volk Sept. 15, 2023, 4:57 a.m. UTC | #4
After further testing I found out that gstreamer can also support dts 
if you use the gstreamer-libav plugin, since ffmpeg has dcadec code 
built in. Less lightweight than building the gstreamer-plugin-dts with 
libdca, but more feature complete. So in the meantime there is no real 
reason to use libdca anymore. I'll send an updated patch if you still 
want to add it, but probably this recipe can just be left out.

On Thu, Sep 14 2023 at 09:56:53 AM -07:00:00, Khem Raj 
<raj.khem@gmail.com> wrote:
> On Thu, Sep 14, 2023 at 9:28 AM Markus Volk <f_l_k@t-online.de 
> <mailto:f_l_k@t-online.de>> wrote:
>> 
>>  On Thu, Sep 14 2023 at 09:14:26 AM -07:00:00, Khem Raj 
>> <raj.khem@gmail.com <mailto:raj.khem@gmail.com>> wrote:
>> 
>>  if we change it into $(LN_S)f libdca.a 
>> "$(DESTDIR)$(libdir)/libdts.a" Then it becomes relative and can be 
>> submitted upstream as well.
>> 
>> 
>>  This change has already been requested some years ago:
>>  <https://code.videolan.org/videolan/libdca/-/issues/3>
>> 
>>  Anyway, the static lib isn't built by default so this would add a 
>> broken symlink to the package I guess ?
> 
> That would be a separate problem and the target creating this symlink
> should depend on static lib generation target.
> but as such, It would be good to use the upstream proposed revert.
Khem Raj Sept. 15, 2023, 5:13 a.m. UTC | #5
On Thu, Sep 14, 2023 at 9:57 PM Markus Volk <f_l_k@t-online.de> wrote:
>
> After further testing I found out that gstreamer can also support dts if you use the gstreamer-libav plugin, since ffmpeg has dcadec code built in. Less lightweight than building the gstreamer-plugin-dts with libdca, but more feature complete. So in the meantime there is no real reason to use libdca anymore. I'll send an updated patch if you still want to add it, but probably this recipe can just be left out.

I will leave it out for now. One less recipe to maintain

>
> On Thu, Sep 14 2023 at 09:56:53 AM -07:00:00, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Thu, Sep 14, 2023 at 9:28 AM Markus Volk <f_l_k@t-online.de> wrote:
>
> On Thu, Sep 14 2023 at 09:14:26 AM -07:00:00, Khem Raj <raj.khem@gmail.com> wrote: if we change it into $(LN_S)f libdca.a "$(DESTDIR)$(libdir)/libdts.a" Then it becomes relative and can be submitted upstream as well. This change has already been requested some years ago: https://code.videolan.org/videolan/libdca/-/issues/3 Anyway, the static lib isn't built by default so this would add a broken symlink to the package I guess ?
>
> That would be a separate problem and the target creating this symlink should depend on static lib generation target. but as such, It would be good to use the upstream proposed revert.
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch b/meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch
new file mode 100644
index 000000000..06cd4092e
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libdca/libdca/0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch
@@ -0,0 +1,32 @@ 
+From 0a78f5679267ccf801931925b2754bad5ec572f0 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Tue, 12 Sep 2023 16:15:46 +0200
+Subject: [PATCH] libdca/Makefile.am: dont create symlinks for static lib
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+fixes:
+ERROR: libdca-0.0.7-r0 do_populate_sysroot: sstate found an absolute path symlink /home/flk/poky/build/tmp/work/corei7-64-poky-linux/libdca/0.0.7/sysroot-destdir/usr/lib/libdts.a pointing at /home/flk/poky/build/tmp/work/corei7-64-poky-linux/libdca/0.0.7/image/usr/lib/libdca.a. Please replace this with a relative link.
+
+Upstream-Status: Inappropriate [OE Specific]
+---
+ libdca/Makefile.am | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/libdca/Makefile.am b/libdca/Makefile.am
+index 05bdaca..97d6f15 100644
+--- a/libdca/Makefile.am
++++ b/libdca/Makefile.am
+@@ -10,9 +10,3 @@ libdca_la_LIBADD = $(LIBDCA_LIBS)
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libdca.pc libdts.pc
+-
+-install-exec-hook:
+-	$(LN_S)f "$(DESTDIR)$(libdir)/libdca.a" "$(DESTDIR)$(libdir)/libdts.a"
+-
+-uninstall-hook:
+-	unlink "$(DESTDIR)$(libdir)/libdts.a"
+-- 
+2.41.0
+
diff --git a/meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb b/meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb
new file mode 100644
index 000000000..eacab0bfa
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libdca/libdca_0.0.7.bb
@@ -0,0 +1,16 @@ 
+DESCRIPTION = "decoding library for DTS Coherent Acoustics streams"
+SECTION = "libs/multimedia"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = " \
+	git://code.videolan.org/videolan/libdca.git;protocol=https;branch=master \
+	file://0001-libdca-Makefile.am-dont-create-symlinks-for-static-l.patch \
+"
+
+SRCREV = "d00468139d3e9e03a93b1cef7c3f4e396f5b6871"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig