diff options
author | 2024-05-06 07:40:41 +0100 | |
---|---|---|
committer | 2024-05-06 07:40:41 +0100 | |
commit | 636c3a8d7825a736967e41fce6bdef1ca12992c0 (patch) | |
tree | d11218c750e12be141163fbab0386b057fe0f313 /media-sound/lash | |
parent | package.mask: Last rite media-libs/lastfmlib (diff) | |
download | gentoo-636c3a8d7825a736967e41fce6bdef1ca12992c0.tar.gz gentoo-636c3a8d7825a736967e41fce6bdef1ca12992c0.tar.bz2 gentoo-636c3a8d7825a736967e41fce6bdef1ca12992c0.zip |
media-sound/lash: update EAPI 7 -> 8, fix bashism in configure, fix modern C
Not that I could reproduce the modern C issue but it's obvious.
Closes: https://bugs.gentoo.org/925439
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-sound/lash')
-rw-r--r-- | media-sound/lash/files/lash-0.5.4-autotools.patch | 32 | ||||
-rw-r--r-- | media-sound/lash/files/lash-0.5.4-c99.patch | 11 | ||||
-rw-r--r-- | media-sound/lash/lash-0.5.4-r6.ebuild | 126 |
3 files changed, 169 insertions, 0 deletions
diff --git a/media-sound/lash/files/lash-0.5.4-autotools.patch b/media-sound/lash/files/lash-0.5.4-autotools.patch new file mode 100644 index 000000000000..54988c70bbc7 --- /dev/null +++ b/media-sound/lash/files/lash-0.5.4-autotools.patch @@ -0,0 +1,32 @@ +Fix build with modern autoconf/automake and fix a bashism in configure. +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,5 @@ ++ACLOCAL_AMFLAGS = -I m4 ++ + SUBDIRS = m4 docs lash liblash lashd clients icons pylash + + pkgconfigdir = $(libdir)/pkgconfig +--- a/configure.ac ++++ b/configure.ac +@@ -2,7 +2,6 @@ AC_INIT([LASH],[0.5.4]) + AC_CONFIG_SRCDIR([lash/types.h]) + AC_CONFIG_HEADER([config.h]) + AM_INIT_AUTOMAKE +-AM_ACLOCAL_INCLUDE([m4]) + + ### Check for programs ### + AC_LANG([C]) +@@ -161,10 +160,10 @@ AC_ARG_ENABLE(pylash, [AS_HELP_STRING(--disable-pylash, [Force disable pylash bu + if test x$build_pylash != xdisabled; then + AM_PATH_PYTHON(2.3, python_found=yes, python_found=no) + +- if test x$python_found == xyes; then ++ if test x$python_found = xyes; then + AM_CHECK_PYTHON_HEADERS(, python_found=no) + +- if test x$python_found == xyes; then ++ if test x$python_found = xyes; then + AC_PROG_SWIG(1.3.31) + if test "$SWIG_LIB" ; then + build_pylash=yes diff --git a/media-sound/lash/files/lash-0.5.4-c99.patch b/media-sound/lash/files/lash-0.5.4-c99.patch new file mode 100644 index 000000000000..31dab715db7e --- /dev/null +++ b/media-sound/lash/files/lash-0.5.4-c99.patch @@ -0,0 +1,11 @@ +https://bugs.gentoo.org/925439 +--- a/clients/synth/lash.c ++++ b/clients/synth/lash.c +@@ -22,6 +22,7 @@ + + #include "config.h" + ++#include <stdio.h> + #include <string.h> + #include <unistd.h> + diff --git a/media-sound/lash/lash-0.5.4-r6.ebuild b/media-sound/lash/lash-0.5.4-r6.ebuild new file mode 100644 index 000000000000..1ee913743360 --- /dev/null +++ b/media-sound/lash/lash-0.5.4-r6.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit autotools multilib-minimal python-single-r1 + +DESCRIPTION="LASH Audio Session Handler" +HOMEPAGE="http://www.nongnu.org/lash/" +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="alsa debug gtk python static-libs" # doc + +BDEPEND=" + virtual/pkgconfig +" +RDEPEND=" + dev-libs/libxml2 + sys-apps/util-linux[${MULTILIB_USEDEP}] + virtual/jack + alsa? ( media-libs/alsa-lib ) + gtk? ( x11-libs/gtk+:2 ) + python? ( ${PYTHON_DEPS} ) + || ( sys-libs/readline dev-libs/libedit ) +" +DEPEND=" + ${RDEPEND} + python? ( dev-lang/swig ) +" +# doc? ( >=app-text/texi2html-5 ) + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) +HTML_DOCS=( docs/lash-manual-html-one-page/lash-manual.html ) + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${P}-glibc2.8.patch + "${FILESDIR}"/${P}-swig_version_comparison.patch + "${FILESDIR}"/${P}-gcc47.patch + "${FILESDIR}"/${P}-underlinking.patch + "${FILESDIR}"/${P}-strcmp.patch + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-c99.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + sed -i \ + -e '/texi2html/s:-number:&-sections:' \ + docs/Makefile.am || die #422045 + + eautoreconf +} + +multilib_src_configure() { + # 'no' could be '$(usex doc)' but we use the pregenerated lash-manual.html + export ac_cv_prog_lash_texi2html=no #422045 + + # --enable-pylash would disable it + local myconf=() + if ! multilib_is_native_abi || ! use python; then + myconf+=( --disable-pylash ) + fi + + if ! multilib_is_native_abi; then + # disable remaining configure checks + myconf+=( + JACK_CFLAGS=' ' + JACK_LIBS=' ' + XML2_CFLAGS=' ' + XML2_LIBS=' ' + + vl_cv_lib_readline=no + ) + fi + + ECONF_SOURCE=${S} \ + econf \ + $(use_enable static-libs static) \ + $(multilib_native_use_enable alsa alsa-midi) \ + $(multilib_native_use_enable gtk gtk2) \ + $(multilib_native_use_enable debug) \ + "${myconf[@]}" +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake -C liblash + fi +} + +multilib_src_test() { + multilib_is_native_abi && default +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + else + # headers + emake -C lash DESTDIR="${D}" install + # library + emake -C liblash DESTDIR="${D}" install + # pkg-config + emake DESTDIR="${D}" install-pkgconfigDATA + fi +} + +multilib_src_install_all() { + einstalldocs + find "${D}" -name '*.la' -delete || die + use python && python_optimize +} |