*/*: Bump copyright on files touched this year
[gentoo.git] / media-sound / cdparanoia / cdparanoia-3.10.2-r6.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit autotools eutils libtool toolchain-funcs versionator multilib-minimal
6
7 MY_P=${PN}-III-$(get_version_component_range 2-3)
8 DESCRIPTION="an advanced CDDA reader with error correction"
9 HOMEPAGE="https://www.xiph.org/paranoia"
10 SRC_URI="https://downloads.xiph.org/releases/${PN}/${MY_P}.src.tgz
11         https://dev.gentoo.org/~ssuominen/${MY_P}-patches-2.tbz2"
12
13 LICENSE="GPL-2 LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
16 IUSE="static-libs"
17
18 RDEPEND="app-eselect/eselect-cdparanoia"
19 DEPEND=${RDEPEND}
20
21 S=${WORKDIR}/${MY_P}
22
23 src_prepare() {
24         EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patches
25
26         mv configure.guess config.guess
27         mv configure.sub config.sub
28
29         sed -i -e '/configure.\(guess\|sub\)/d' configure.in || die
30
31         eautoconf
32         elibtoolize
33
34         multilib_copy_sources
35 }
36
37 multilib_src_configure() {
38         tc-export AR CC RANLIB
39         econf
40 }
41
42 multilib_src_compile() {
43         emake OPT="${CFLAGS} -I${S}/interface"
44         use static-libs && emake lib OPT="${CFLAGS} -I${S}/interface"
45 }
46
47 multilib_src_install_all() {
48         einstalldocs
49         mv "${ED}"/usr/bin/${PN}{,-paranoia}
50 }
51
52 pkg_postinst() {
53         eselect ${PN} update ifunset
54 }
55
56 pkg_postrm() {
57         eselect ${PN} update ifunset
58 }