aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb
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 11:18:15 +0100
commit83c9405df5748744ef673ac8757bb89d7050ad8d (patch)
treeb17b76fbf590e52fe70f154ab73f40f1a762e34a /meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb
parent0cb4f11614bd3b17db8e6b3516761193cd45d082 (diff)
downloadopenembedded-core-contrib-83c9405df5748744ef673ac8757bb89d7050ad8d.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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb92
1 files changed, 62 insertions, 30 deletions
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"
BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2+"
-DEPENDS = "alsa-lib ncurses glib-2.0"
+DEPENDS = "alsa-lib"
LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \
"
SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
- file://autotools.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
- file://gitcompile_hdajacksensetest \
file://0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch \
+ file://musl.patch \
"
SRC_URI[md5sum] = "5ca8c9437ae779997cd62fb2815fef19"
SRC_URI[sha256sum] = "d69c4dc2fb641a974d9903e9eb78c94cb0c7ac6c45bae664f0c9d6c0a1593227"
inherit autotools-brokensep pkgconfig
-
+# brokensep as as10k1 (and probably more) fail out of tree
CLEANBROKEN = "1"
-EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
-PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
-
-# configure.ac/.in doesn't exist so force copy
-AUTOTOOLS_COPYACLOCAL = "1"
-
-do_compile_prepend () {
- #Automake dir is not correctly detected in cross compilation case
- export AUTOMAKE_DIR="$(automake --print-libdir)"
- export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/ ${ACLOCALEXTRAPATH}"
-
- cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
+# Here we use PACKAGECONFIG options to pick which directories we configure/build.
+# Remember on upgrades to check that no new tools have been added.
+PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \
+ sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \
+ ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'echomixer envy24control rmedigicontrol', '', d)} \
+ ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \
+ "
+
+PACKAGECONFIG[as10k1] = ""
+PACKAGECONFIG[echomixer] = ",,gtk+"
+PACKAGECONFIG[envy24control] = ",,gtk+"
+PACKAGECONFIG[hda-verb] = ""
+PACKAGECONFIG[hdajackretask] = ",,gtk+3"
+PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0"
+PACKAGECONFIG[hdspconf] = ",,fltk"
+PACKAGECONFIG[hdsploader] = ""
+PACKAGECONFIG[hdspmixer] = ",,fltk"
+PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygtk"
+PACKAGECONFIG[ld10k1] = ""
+PACKAGECONFIG[mixartloader] = ""
+PACKAGECONFIG[pcxhrloader] = ""
+PACKAGECONFIG[qlo10k1] = ",,qt-x11-free"
+PACKAGECONFIG[rmedigicontrol] = ",,gtk+"
+PACKAGECONFIG[sb16_csp] = ""
+PACKAGECONFIG[seq--sbiload] = ""
+PACKAGECONFIG[sscape_ctl] = ""
+PACKAGECONFIG[us428control] = ""
+PACKAGECONFIG[usx2yloader] = ""
+PACKAGECONFIG[vxloader] = ""
+
+python do_configure() {
+ for subdir in d.getVar("PACKAGECONFIG").split():
+ subdir = subdir.replace("--", "/")
+ bb.note("Configuring %s" % subdir)
+ dd = d.createCopy()
+ dd.setVar("S", os.path.join(d.getVar("S"), subdir))
+ bb.build.exec_func("autotools_do_configure", dd)
}
-do_install_append() {
- sed -i -e "s|/usr/bin/python2|/usr/bin/env python2|g" ${D}${bindir}/hwmixvolume
+python do_compile() {
+ for subdir in d.getVar("PACKAGECONFIG").split():
+ subdir = subdir.replace("--", "/")
+ bb.note("Compiling %s" % subdir)
+ dd = d.createCopy()
+ dd.setVar("S", os.path.join(d.getVar("S"), subdir))
+ bb.build.exec_func("autotools_do_compile", dd)
}
-PACKAGES =+ "${PN}-hwmixvolume"
-
-FILES_${PN}-hwmixvolume = "${bindir}/hwmixvolume"
-
-FILES_${PN} += "${datadir}/ld10k1 \
- ${datadir}/icons/hicolor \
- "
-
-RDEPENDS_${PN}-hwmixvolume += "python"
+python do_install() {
+ for subdir in d.getVar("PACKAGECONFIG").split():
+ subdir = subdir.replace("--", "/")
+ bb.note("Installing %s" % subdir)
+ dd = d.createCopy()
+ dd.setVar("S", os.path.join(d.getVar("S"), subdir))
+ bb.build.exec_func("autotools_do_install", dd)
+
+ # Just remove bash-needing init script that isn't installed as an init script
+ try:
+ os.remove(oe.path.join(d.getVar("D"), d.getVar("sbindir"), "ld10k1d"))
+ except:
+ pass
+}
+FILES_${PN} += "${datadir}"