media-libs/libvorbis: ppc stable wrt bug #699862
[gentoo.git] / media-libs / libvorbis / libvorbis-1.3.6-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 inherit autotools multilib-minimal
6
7 DESCRIPTION="The Ogg Vorbis sound file format library"
8 HOMEPAGE="https://xiph.org/vorbis/"
9 SRC_URI="https://downloads.xiph.org/releases/vorbis/${P}.tar.xz"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ~ppc64 ~sh sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
14 IUSE="static-libs test"
15
16 RESTRICT="!test? ( test )"
17
18 BDEPEND="virtual/pkgconfig"
19
20 RDEPEND=">=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]"
21
22 DEPEND="${RDEPEND}"
23
24 PATCHES=(
25         "${FILESDIR}"/${P}-CVE-2017-14160.patch
26         "${FILESDIR}"/${P}-CVE-2018-10392.patch
27 )
28
29 src_prepare() {
30         default
31
32         sed -i \
33                 -e '/CFLAGS/s:-O20::' \
34                 -e '/CFLAGS/s:-mcpu=750::' \
35                 -e '/CFLAGS/s:-mno-ieee-fp::' \
36                 configure.ac || die
37
38         # Un-hack docdir redefinition.
39         find -name 'Makefile.am' \
40                 -exec sed -i \
41                         -e 's:$(datadir)/doc/$(PACKAGE)-$(VERSION):@docdir@/html:' \
42                         {} + || die
43
44         eautoreconf
45 }
46
47 multilib_src_configure() {
48         local myconf=(
49                 --enable-shared
50                 $(use_enable static-libs static)
51                 $(use_enable test oggtest)
52         )
53
54         einfo "Running configure in ${BUILD_DIR}"
55         ECONF_SOURCE="${S}" econf "${myconf[@]}"
56 }
57
58 multilib_src_install_all() {
59         find "${ED}" -name '*.la' -delete || die
60 }