1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic
8 DESCRIPTION="Multimedia library used by many games"
9 HOMEPAGE="https://plib.sourceforge.net/"
10 SRC_URI="https://plib.sourceforge.net/dist/${P}.tar.gz"
14 KEYWORDS="~alpha amd64 ~hppa ppc sparc x86"
16 DEPEND="virtual/opengl"
20 "${FILESDIR}"/${P}-shared-libs.patch
21 "${FILESDIR}"/${P}-X11-r1.patch
22 "${FILESDIR}"/${P}-CVE-2011-4620.patch
23 "${FILESDIR}"/${P}-CVE-2012-4552.patch
33 append-cxxflags -std=c++03
35 # violates strict aliasing rules and is LTO-unsafe: https://bugs.gentoo.org/860048
36 # Per upstream in 2021, "PLIB has been obsolete and unmaintained for at LEAST 15 years!!"
37 # so this is getting fixed exactly never and getting worse.
38 append-cxxflags -fno-strict-aliasing
51 dodoc KNOWN_BUGS TODO* NOTICE
53 find "${ED}" -name '*.la' -delete || die