summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-06-11 21:38:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-15 17:56:25 +0100
commitb054015357b2b03f308af00a41b29c649cbca171 (patch)
treef3858a3481ce2509fa98f21668a13842980ad8fe /meta/recipes-multimedia
parent89cbaca35943228aef60cfbc8ce1d2cb245b11e6 (diff)
downloadpoky-b054015357b2b03f308af00a41b29c649cbca171.tar.gz
alsa-tools: rewrite packaging
alsa-tools is actually a collection of 20 separate tools, each with their own configure scripts. The dependencies are varied, old, and estoric (FLTK, GTK+ 1, 2, and 3, PyGTK 2, Qt3). Instead of maintaining patches to try and pick a subset that builds, use PACKAGECONFIG and some magic to build what the user requests. By default we build all the tools which have no dependencies, and the tools which need GTK+ 2 or GTK+ 3 if the relevant DISTRO_FEATURES are enabled. Add a patch to fix the build of ld10k1 with musl. The ncurses build dependency doesn't seem to be checked for, so remove that. (From OE-Core rev: 83c9405df5748744ef673ac8757bb89d7050ad8d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch14
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/autotools.patch44
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest13
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch29
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/musl.patch47
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb92
6 files changed, 119 insertions, 120 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch b/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch
index 2290915eab..c137bc8a28 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch
+++ b/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch
@@ -1,14 +1,18 @@
1From 2e48e4045e1e951433da0ca4b1e49798eedde14f Mon Sep 17 00:00:00 2001 1Upstream-Status: Backport
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4From a861bdabf02cd9bfb3ec7c0571c563c0fa14adfb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 5From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 24 Apr 2018 12:21:18 -0700 6Date: Tue, 24 Apr 2018 12:24:32 -0700
4Subject: [PATCH] Fix clang -Wreserved-user-defined-literal warnings 7Subject: [PATCH] us428control: Fix clang -Wreserved-user-defined-literal
8 warnings
5 9
6| us428control.cc:66:18: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] 10| us428control.cc:66:18: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
7| printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n"); 11| printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n");
8| ^ 12| ^
9 13
10Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10360805/]
11Signed-off-by: Khem Raj <raj.khem@gmail.com> 14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
12--- 16---
13 us428control/us428control.cc | 2 +- 17 us428control/us428control.cc | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 18 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -26,3 +30,5 @@ index e839bf4..8cb3c42 100644
26 printf("mode is one of (us224, us428, mixxx)\n"); 30 printf("mode is one of (us224, us428, mixxx)\n");
27 } 31 }
28 /* 32 /*
33--
341.7.11.7
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
deleted file mode 100644
index c85834a593..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From b9a65bf3ba5628cfe8cfd2d10ce2dcf11a606775 Mon Sep 17 00:00:00 2001
2From: Dongxiao Xu <dongxiao.xu@intel.com>
3Date: Thu, 14 Jul 2011 15:40:36 +0800
4Subject: [PATCH] alsa-tools: Fix recipe build error.
5
6Add parameters to autoreconf to support cross compile.
7Remove some sub-components which needs further recipe support.
8
9Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
10
11Upstream-Status: Inappropriate [configuration]
12
13---
14 Makefile | 4 ++--
15 ld10k1/gitcompile | 2 +-
16 2 files changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/Makefile b/Makefile
19index c32bf25..1119372 100644
20--- a/Makefile
21+++ b/Makefile
22@@ -1,8 +1,8 @@
23 VERSION = 1.1.6
24 TOP = .
25-SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
26+SUBDIRS = as10k1 envy24control \
27 mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
28- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \
29+ us428control usx2yloader vxloader echomixer \
30 hwmixvolume hdajackretask hda-verb hdajacksensetest
31
32 all:
33diff --git a/ld10k1/gitcompile b/ld10k1/gitcompile
34index 99429ac..20005d9 100755
35--- a/ld10k1/gitcompile
36+++ b/ld10k1/gitcompile
37@@ -1,6 +1,6 @@
38 #!/bin/bash
39
40-autoreconf -fi || exit 1
41+autoreconf $ACLOCAL_FLAGS -fi || exit 1
42 export CFLAGS='-O2 -Wall -pipe -g'
43 echo "CFLAGS=$CFLAGS"
44 echo "./configure $@"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest b/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest
deleted file mode 100755
index 58328bd3a5..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest
+++ /dev/null
@@ -1,13 +0,0 @@
1#!/bin/bash
2
3aclocal $ACLOCAL_FLAGS || exit 1
4automake --foreign --add-missing || exit 1
5autoconf || exit 1
6export CFLAGS='-O2 -Wall -pipe -g'
7echo "CFLAGS=$CFLAGS"
8echo "./configure $@"
9./configure $@ || exit 1
10unset CFLAGS
11if [ -z "$GITCOMPILE_NO_MAKE" ]; then
12 make || exit 1
13fi
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
deleted file mode 100644
index 54373d1a8f..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1Remove some sub-components which need gtk+.
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Rogerio Nunes <ronunes@gmail.com>
6Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
7
8Update patch for alsa-tools 1.0.29
9
10Signed-off-by: Kai Kang <kai.kang@windriver.com>
11
12diff --git a/Makefile b/Makefile
13index 2457a1c..72346d9 100644
14--- a/Makefile
15+++ b/Makefile
16@@ -1,9 +1,9 @@
17 VERSION = 1.1.5
18 TOP = .
19-SUBDIRS = as10k1 envy24control \
20- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
21- us428control usx2yloader vxloader echomixer \
22- hwmixvolume hdajackretask hda-verb hdajacksensetest
23+SUBDIRS = as10k1 \
24+ mixartloader pcxhrloader sb16_csp seq sscape_ctl \
25+ us428control usx2yloader vxloader \
26+ hwmixvolume hda-verb hdajacksensetest
27
28 all:
29 @for i in $(SUBDIRS); do \
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/musl.patch b/meta/recipes-multimedia/alsa/alsa-tools/musl.patch
new file mode 100644
index 0000000000..9eb129c379
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-tools/musl.patch
@@ -0,0 +1,47 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 235d9c5e8381518b0a8661786e7e0cbdd1bbcd01 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Tue, 12 Jun 2018 13:24:34 +0100
7Subject: [PATCH] ld10k1: define _GNU_SOURCE and use sighandler_t
8
9__sighandler_t is a glibc internal type which doesn't exist in musl. By using
10AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE defined, both glibc and musl
11then expose sighandler_t.
12
13Signed-off-by: Ross Burton <ross.burton@intel.com>
14Signed-off-by: Takashi Iwai <tiwai@suse.de>
15---
16 ld10k1/configure.ac | 1 +
17 ld10k1/src/ld10k1_fnc1.c | 2 +-
18 2 files changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/ld10k1/configure.ac b/ld10k1/configure.ac
21index 276b24e..f48ca31 100644
22--- a/ld10k1/configure.ac
23+++ b/ld10k1/configure.ac
24@@ -4,6 +4,7 @@ AC_CONFIG_MACRO_DIR([m4])
25 AM_MAINTAINER_MODE([enable])
26
27 AC_CONFIG_HEADERS(config.h)
28+AC_USE_SYSTEM_EXTENSIONS
29 AC_PROG_CC
30 AC_PROG_LD
31 AC_PROG_INSTALL
32diff --git a/ld10k1/src/ld10k1_fnc1.c b/ld10k1/src/ld10k1_fnc1.c
33index 343584c..ddc43c6 100644
34--- a/ld10k1/src/ld10k1_fnc1.c
35+++ b/ld10k1/src/ld10k1_fnc1.c
36@@ -179,7 +179,7 @@ int main_loop(comm_param *param, int audigy, const char *card_id, int tram_size,
37 {
38 fd_set active_fd_set/*, read_fd_set*/;
39 int i, j, res = 0;
40- __sighandler_t old_sig_pipe;
41+ sighandler_t old_sig_pipe;
42
43 int main_sock = 0;
44 int data_sock = 0;
45--
462.11.0
47
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb
index e065eec6b8..90e54dbb14 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb
@@ -3,53 +3,85 @@ HOMEPAGE = "http://www.alsa-project.org"
3BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" 3BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
4SECTION = "console/utils" 4SECTION = "console/utils"
5LICENSE = "GPLv2 & LGPLv2+" 5LICENSE = "GPLv2 & LGPLv2+"
6DEPENDS = "alsa-lib ncurses glib-2.0" 6DEPENDS = "alsa-lib"
7 7
8LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ 8LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
9 file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \ 9 file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \
10 " 10 "
11 11
12SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \ 12SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
13 file://autotools.patch \
14 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
15 file://gitcompile_hdajacksensetest \
16 file://0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch \ 13 file://0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch \
14 file://musl.patch \
17 " 15 "
18 16
19SRC_URI[md5sum] = "5ca8c9437ae779997cd62fb2815fef19" 17SRC_URI[md5sum] = "5ca8c9437ae779997cd62fb2815fef19"
20SRC_URI[sha256sum] = "d69c4dc2fb641a974d9903e9eb78c94cb0c7ac6c45bae664f0c9d6c0a1593227" 18SRC_URI[sha256sum] = "d69c4dc2fb641a974d9903e9eb78c94cb0c7ac6c45bae664f0c9d6c0a1593227"
21 19
22inherit autotools-brokensep pkgconfig 20inherit autotools-brokensep pkgconfig
23 21# brokensep as as10k1 (and probably more) fail out of tree
24CLEANBROKEN = "1" 22CLEANBROKEN = "1"
25 23
26EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'" 24# Here we use PACKAGECONFIG options to pick which directories we configure/build.
27 25# Remember on upgrades to check that no new tools have been added.
28PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}" 26PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \
29PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3," 27 sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \
30 28 ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'echomixer envy24control rmedigicontrol', '', d)} \
31# configure.ac/.in doesn't exist so force copy 29 ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \
32AUTOTOOLS_COPYACLOCAL = "1" 30 "
33 31
34do_compile_prepend () { 32PACKAGECONFIG[as10k1] = ""
35 #Automake dir is not correctly detected in cross compilation case 33PACKAGECONFIG[echomixer] = ",,gtk+"
36 export AUTOMAKE_DIR="$(automake --print-libdir)" 34PACKAGECONFIG[envy24control] = ",,gtk+"
37 export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/ ${ACLOCALEXTRAPATH}" 35PACKAGECONFIG[hda-verb] = ""
38 36PACKAGECONFIG[hdajackretask] = ",,gtk+3"
39 cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile 37PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0"
38PACKAGECONFIG[hdspconf] = ",,fltk"
39PACKAGECONFIG[hdsploader] = ""
40PACKAGECONFIG[hdspmixer] = ",,fltk"
41PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygtk"
42PACKAGECONFIG[ld10k1] = ""
43PACKAGECONFIG[mixartloader] = ""
44PACKAGECONFIG[pcxhrloader] = ""
45PACKAGECONFIG[qlo10k1] = ",,qt-x11-free"
46PACKAGECONFIG[rmedigicontrol] = ",,gtk+"
47PACKAGECONFIG[sb16_csp] = ""
48PACKAGECONFIG[seq--sbiload] = ""
49PACKAGECONFIG[sscape_ctl] = ""
50PACKAGECONFIG[us428control] = ""
51PACKAGECONFIG[usx2yloader] = ""
52PACKAGECONFIG[vxloader] = ""
53
54python do_configure() {
55 for subdir in d.getVar("PACKAGECONFIG").split():
56 subdir = subdir.replace("--", "/")
57 bb.note("Configuring %s" % subdir)
58 dd = d.createCopy()
59 dd.setVar("S", os.path.join(d.getVar("S"), subdir))
60 bb.build.exec_func("autotools_do_configure", dd)
40} 61}
41 62
42do_install_append() { 63python do_compile() {
43 sed -i -e "s|/usr/bin/python2|/usr/bin/env python2|g" ${D}${bindir}/hwmixvolume 64 for subdir in d.getVar("PACKAGECONFIG").split():
65 subdir = subdir.replace("--", "/")
66 bb.note("Compiling %s" % subdir)
67 dd = d.createCopy()
68 dd.setVar("S", os.path.join(d.getVar("S"), subdir))
69 bb.build.exec_func("autotools_do_compile", dd)
44} 70}
45 71
46PACKAGES =+ "${PN}-hwmixvolume" 72python do_install() {
47 73 for subdir in d.getVar("PACKAGECONFIG").split():
48FILES_${PN}-hwmixvolume = "${bindir}/hwmixvolume" 74 subdir = subdir.replace("--", "/")
49 75 bb.note("Installing %s" % subdir)
50FILES_${PN} += "${datadir}/ld10k1 \ 76 dd = d.createCopy()
51 ${datadir}/icons/hicolor \ 77 dd.setVar("S", os.path.join(d.getVar("S"), subdir))
52 " 78 bb.build.exec_func("autotools_do_install", dd)
53 79
54RDEPENDS_${PN}-hwmixvolume += "python" 80 # Just remove bash-needing init script that isn't installed as an init script
81 try:
82 os.remove(oe.path.join(d.getVar("D"), d.getVar("sbindir"), "ld10k1d"))
83 except:
84 pass
85}
55 86
87FILES_${PN} += "${datadir}"