dev-libs/icu-layoutex: sparc stable wrt bug #716822
[gentoo.git] / dev-libs / libcdio / libcdio-2.0.0.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 inherit autotools libtool multilib-minimal toolchain-funcs
7
8 DESCRIPTION="A library to encapsulate CD-ROM reading and control"
9 HOMEPAGE="https://www.gnu.org/software/libcdio/"
10 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-3"
13 SLOT="0/18" # subslot is based on SONAME
14 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"
15 IUSE="cddb +cxx minimal static-libs test"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="
19         !minimal? (
20                 >=sys-libs/ncurses-5.7-r7:0=
21                 cddb? ( >=media-libs/libcddb-1.3.2 )
22         )
23         >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
24 "
25 DEPEND="${RDEPEND}
26         sys-apps/sed
27         sys-devel/gettext
28         virtual/pkgconfig
29         test? ( dev-lang/perl )
30 "
31
32 DOCS="AUTHORS ChangeLog NEWS README* THANKS TODO"
33
34 MULTILIB_WRAPPED_HEADERS=(
35         /usr/include/cdio/cdio_config.h
36         /usr/include/cdio/version.h
37 )
38
39 src_prepare() {
40         default
41
42         eautoreconf
43
44         sed \
45                 -e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" \
46                 -i configure || die
47
48         elibtoolize # to prevent -L/usr/lib ending up in the linker line wrt 499510
49 }
50
51 multilib_src_configure() {
52         local util_switch
53         if ! multilib_is_native_abi || use minimal ; then
54                 util_switch="--without"
55         else
56                 util_switch="--with"
57         fi
58
59         # Tests fail if ECONF_SOURCE is not relative
60         ECONF_SOURCE="../${P}" econf \
61                 --disable-maintainer-mode \
62                 $(use_enable cxx) \
63                 --disable-cpp-progs \
64                 --disable-example-progs \
65                 $(use_enable static-libs static) \
66                 $(use_enable cddb) \
67                 --disable-vcd-info \
68                 ${util_switch}-{cd-drive,cd-info,cdda-player,cd-read,iso-info,iso-read}
69 }
70
71 multilib_src_install_all() {
72         einstalldocs
73         find "${ED}" -name '*.la' -delete || die
74 }