dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-libs / libcdio-paranoia / libcdio-paranoia-0.93_p1-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 MY_P=${PN}-10.2+${PV/_p/+}
7
8 inherit autotools flag-o-matic multilib-minimal
9
10 DESCRIPTION="an advanced CDDA reader with error correction"
11 HOMEPAGE="https://www.gnu.org/software/libcdio/"
12 SRC_URI="mirror://gnu/${PN%-*}/${MY_P}.tar.gz"
13
14 # COPYING-GPL from cdparanoia says "2 or later"
15 # COPYING-LGPL from cdparanoia says "2.1 or later" but 2 files are without the
16 # clause "or later" so we use LGPL-2.1 without +
17 LICENSE="GPL-3+ GPL-2+ LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
20 IUSE="+cxx static-libs test"
21
22 RDEPEND="app-eselect/eselect-cdparanoia
23         >=dev-libs/libcdio-0.93[${MULTILIB_USEDEP}]
24         >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
25 "
26
27 DEPEND="${RDEPEND}
28         sys-devel/gettext
29         virtual/pkgconfig
30         test? ( dev-lang/perl )"
31
32 RESTRICT="!test? ( test )"
33
34 S="${WORKDIR}/${MY_P}"
35
36 DOCS=( AUTHORS ChangeLog NEWS README THANKS )
37
38 PATCHES=(
39         "${FILESDIR}"/${PN}-0.90-oos-tests.patch
40 )
41
42 src_prepare() {
43         default
44         sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466410
45         eautoreconf
46
47         [[ ${CC} == *clang* ]] && append-flags -std=gnu89
48 }
49
50 multilib_src_configure() {
51         local myeconfargs=(
52                 --disable-maintainer-mode
53                 --disable-example-progs
54                 $(use_enable cxx)
55                 --disable-cpp-progs
56                 --with-cd-paranoia-name=libcdio-paranoia
57                 $(use_enable static-libs static)
58         )
59         # Darwin linker doesn't get this
60         [[ ${CHOST} == *-darwin* ]] && myeconfargs+=( --without-versioned-libs )
61         ECONF_SOURCE="${S}" \
62                 econf "${myeconfargs[@]}"
63 }
64
65 multilib_src_install_all() {
66         einstalldocs
67         find "${D}" -type f -name '*.la' -delete || die
68 }
69
70 pkg_postinst() {
71         eselect cdparanoia update ifunset
72 }
73
74 pkg_postrm() {
75         eselect cdparanoia update ifunset
76 }