dev-libs/icu-layoutex: sparc stable wrt bug #716822
[gentoo.git] / dev-libs / libcdio / libcdio-2.1.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools libtool multilib-minimal
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.bz2"
11
12 LICENSE="GPL-3"
13 SLOT="0/19" # 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 BDEPEND="
27         sys-apps/sed
28         sys-devel/gettext
29         virtual/pkgconfig
30         test? ( dev-lang/perl )
31 "
32
33 DOCS=( AUTHORS ChangeLog NEWS.md README{,.libcdio} THANKS TODO )
34
35 MULTILIB_WRAPPED_HEADERS=(
36         /usr/include/cdio/cdio_config.h
37         /usr/include/cdio/version.h
38 )
39
40 PATCHES=(
41         "${FILESDIR}/${PN}-2.1.0-ncurses_pkgconfig.patch"
42 )
43
44 src_prepare() {
45         default
46
47         eautoreconf
48
49         elibtoolize # to prevent -L/usr/lib ending up in the linker line wrt 499510
50 }
51
52 multilib_src_configure() {
53         local util_switch
54         if ! multilib_is_native_abi || use minimal ; then
55                 util_switch="--without"
56         else
57                 util_switch="--with"
58         fi
59
60         local myeconfargs=(
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         # Tests fail if ECONF_SOURCE is not relative
71         ECONF_SOURCE="../${P}" econf "${myeconfargs[@]}"
72 }
73
74 multilib_src_install_all() {
75         einstalldocs
76         find "${ED}" -name '*.la' -delete || die
77 }