Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/lash/
Date: Sat, 25 Jun 2022 09:22:37
Message-Id: 1656148939.1da6951ab3ad4ebe08200982602bebe1883cfacc.fordfrog@gentoo
1 commit: 1da6951ab3ad4ebe08200982602bebe1883cfacc
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 25 09:22:19 2022 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 25 09:22:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1da6951a
7
8 media-sound/lash: eapi8, python 3.10 + 3.11
9
10 Bug: https://bugs.gentoo.org/846077
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 media-sound/lash/lash-0.5.4-r5.ebuild | 124 ++++++++++++++++++++++++++++++++++
14 1 file changed, 124 insertions(+)
15
16 diff --git a/media-sound/lash/lash-0.5.4-r5.ebuild b/media-sound/lash/lash-0.5.4-r5.ebuild
17 new file mode 100644
18 index 000000000000..ef267b70ea16
19 --- /dev/null
20 +++ b/media-sound/lash/lash-0.5.4-r5.ebuild
21 @@ -0,0 +1,124 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +PYTHON_COMPAT=( python3_{7..11} )
28 +
29 +inherit autotools multilib-minimal python-single-r1
30 +
31 +DESCRIPTION="LASH Audio Session Handler"
32 +HOMEPAGE="http://www.nongnu.org/lash/"
33 +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
34 +
35 +LICENSE="GPL-2"
36 +SLOT="0"
37 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
38 +IUSE="alsa debug gtk python static-libs" # doc
39 +
40 +BDEPEND="
41 + virtual/pkgconfig
42 +"
43 +RDEPEND="
44 + dev-libs/libxml2
45 + sys-apps/util-linux[${MULTILIB_USEDEP}]
46 + virtual/jack
47 + alsa? ( media-libs/alsa-lib )
48 + gtk? ( x11-libs/gtk+:2 )
49 + python? ( ${PYTHON_DEPS} )
50 + || ( sys-libs/readline dev-libs/libedit )
51 +"
52 +DEPEND="
53 + ${RDEPEND}
54 + python? ( dev-lang/swig )
55 +"
56 +# doc? ( >=app-text/texi2html-5 )
57 +
58 +DOCS=( AUTHORS ChangeLog NEWS README TODO )
59 +HTML_DOCS=( docs/lash-manual-html-one-page/lash-manual.html )
60 +
61 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
62 +
63 +PATCHES=(
64 + "${FILESDIR}"/${P}-glibc2.8.patch
65 + "${FILESDIR}"/${P}-swig_version_comparison.patch
66 + "${FILESDIR}"/${P}-gcc47.patch
67 + "${FILESDIR}"/${P}-underlinking.patch
68 + "${FILESDIR}"/${P}-strcmp.patch
69 +)
70 +
71 +pkg_setup() {
72 + use python && python-single-r1_pkg_setup
73 +}
74 +
75 +src_prepare() {
76 + sed -i \
77 + -e '/texi2html/s:-number:&-sections:' \
78 + docs/Makefile.am || die #422045
79 +
80 + default
81 +
82 + AT_M4DIR=m4 eautoreconf
83 +}
84 +
85 +multilib_src_configure() {
86 + # 'no' could be '$(usex doc)' but we use the pregenerated lash-manual.html
87 + export ac_cv_prog_lash_texi2html=no #422045
88 +
89 + # --enable-pylash would disable it
90 + local myconf=()
91 + if ! multilib_is_native_abi || ! use python; then
92 + myconf+=( --disable-pylash )
93 + fi
94 +
95 + if ! multilib_is_native_abi; then
96 + # disable remaining configure checks
97 + myconf+=(
98 + JACK_CFLAGS=' '
99 + JACK_LIBS=' '
100 + XML2_CFLAGS=' '
101 + XML2_LIBS=' '
102 +
103 + vl_cv_lib_readline=no
104 + )
105 + fi
106 +
107 + ECONF_SOURCE=${S} \
108 + econf \
109 + $(use_enable static-libs static) \
110 + $(multilib_native_use_enable alsa alsa-midi) \
111 + $(multilib_native_use_enable gtk gtk2) \
112 + $(multilib_native_use_enable debug) \
113 + "${myconf[@]}"
114 +}
115 +
116 +multilib_src_compile() {
117 + if multilib_is_native_abi; then
118 + default
119 + else
120 + emake -C liblash
121 + fi
122 +}
123 +
124 +multilib_src_test() {
125 + multilib_is_native_abi && default
126 +}
127 +
128 +multilib_src_install() {
129 + if multilib_is_native_abi; then
130 + emake DESTDIR="${D}" install
131 + else
132 + # headers
133 + emake -C lash DESTDIR="${D}" install
134 + # library
135 + emake -C liblash DESTDIR="${D}" install
136 + # pkg-config
137 + emake DESTDIR="${D}" install-pkgconfigDATA
138 + fi
139 +}
140 +
141 +multilib_src_install_all() {
142 + einstalldocs
143 + find "${D}" -name '*.la' -delete || die
144 + use python && python_optimize
145 +}