summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2019-01-05 22:26:18 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2019-01-05 22:26:18 +0100
commit3be906b6d1bf00080db368eff9cef997604e4862 (patch)
tree8382d31fb884736ad8ef8b7ad404e795f8a3aa39 /media-libs/allegro
parentapp-admin/gkrellm: Revbump to get rid of superfluous patch. (diff)
downloadgentoo-3be906b6d1bf00080db368eff9cef997604e4862.tar.gz
gentoo-3be906b6d1bf00080db368eff9cef997604e4862.tar.bz2
gentoo-3be906b6d1bf00080db368eff9cef997604e4862.zip
media-libs/allegro: Backport glibc-2.28 compatibility fix
Bug: https://bugs.gentoo.org/670781 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'media-libs/allegro')
-rw-r--r--media-libs/allegro/allegro-4.4.2-r2.ebuild112
-rw-r--r--media-libs/allegro/files/allegro-4.4.2-glibc228.patch41
2 files changed, 153 insertions, 0 deletions
diff --git a/media-libs/allegro/allegro-4.4.2-r2.ebuild b/media-libs/allegro/allegro-4.4.2-r2.ebuild
new file mode 100644
index 000000000000..19cd6bed639b
--- /dev/null
+++ b/media-libs/allegro/allegro-4.4.2-r2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_IN_SOURCE_BUILD=1
+inherit cmake-utils desktop
+
+DESCRIPTION="cross-platform multimedia library"
+HOMEPAGE="https://liballeg.org/"
+SRC_URI="mirror://sourceforge/alleg/${P}.tar.gz"
+
+LICENSE="Allegro MIT GPL-2+ ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="alsa fbcon jack jpeg opengl oss png svga test vga vorbis X"
+
+RDEPEND="
+ alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ svga? ( media-libs/svgalib )
+ vorbis? ( media-libs/libvorbis )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? ( x11-base/xorg-proto )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-shared.patch
+ "${FILESDIR}"/${P}-underlink.patch
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-rpath.patch
+ "${FILESDIR}"/${P}-Werror-format-security.patch # bug 540470
+ "${FILESDIR}"/${P}-glibc228.patch # bug 670781
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ sed -i \
+ -e "s:allegro-\${ALLEGRO_VERSION}:${PF}:" \
+ docs/CMakeLists.txt || die
+}
+
+src_configure() {
+ # WANT_LINUX_CONSOLE is by default OFF
+ # WANT_EXAMPLES doesn't install anything
+ local mycmakeargs=(
+ -DDOCDIR=share/doc
+ -DINFODIR=share/info
+ -DMANDIR=share/man
+ -DWANT_ALSA=$(usex alsa)
+ -DWANT_EXAMPLES=OFF
+ -DWANT_JACK=$(usex jack)
+ -DWANT_JPGALLEG=$(usex jpeg)
+ -DWANT_LINUX_CONSOLE=OFF
+ -DWANT_LINUX_FBCON=$(usex fbcon)
+ -DWANT_LINUX_SVGALIB=$(usex svga)
+ -DWANT_LINUX_VGA=$(usex vga)
+ -DWANT_LOADPNG=$(usex png)
+ -DWANT_LOGG=$(usex vorbis)
+ -DWANT_OSS=$(usex oss)
+ -DWANT_TESTS=$(usex test)
+ -DWANT_TOOLS=$(usex X)
+ -DWANT_X11=$(usex X)
+ )
+
+ if use X; then
+ mycmakeargs+=( -DWANT_ALLEGROGL=$(usex opengl) )
+ else
+ mycmakeargs+=( -DWANT_ALLEGROGL=OFF )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ rm -r docs/html/{build,tmpfile.txt} || die
+ local HTML_DOCS=( docs/html/. )
+
+ cmake-utils_src_install
+
+ #176020 (init_dialog.3), #409305 (key.3)
+ pushd docs/man >/dev/null
+ local manpage
+ for manpage in $(ls -d *.3); do
+ newman ${manpage} ${PN}-${manpage}
+ done
+ popd >/dev/null
+
+ if use X; then
+ newbin setup/setup ${PN}-setup
+ insinto /usr/share/${PN}
+ doins {keyboard,language,setup/setup}.dat
+ newicon misc/icon.png ${PN}.png
+ make_desktop_entry ${PN}-setup "Allegro Setup" ${PN} "Settings"
+ fi
+}
diff --git a/media-libs/allegro/files/allegro-4.4.2-glibc228.patch b/media-libs/allegro/files/allegro-4.4.2-glibc228.patch
new file mode 100644
index 000000000000..afcdf5100c5e
--- /dev/null
+++ b/media-libs/allegro/files/allegro-4.4.2-glibc228.patch
@@ -0,0 +1,41 @@
+From 4848f1583c3dbe41f5f056869ff2c796d33d8121 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20R=C3=B6nnquist?= <andreas@ronnquist.net>
+Date: Wed, 12 Dec 2018 16:39:23 +0100
+Subject: [PATCH] Remove f* variants of fixed math functions
+
+Removing functions that conflicts with later glibc implementations,
+people should use fix* variants instead.
+(Simply use fixadd instead of fadd).
+---
+ include/allegro/alcompat.h | 18 ------------------
+ 1 file changed, 18 deletions(-)
+
+diff --git a/include/allegro/alcompat.h b/include/allegro/alcompat.h
+index d31ab5b6d..c9536839d 100644
+--- a/include/allegro/alcompat.h
++++ b/include/allegro/alcompat.h
+@@ -40,24 +40,6 @@
+ #endif
+ #endif
+
+- #ifndef ALLEGRO_NO_FIX_ALIASES
+- AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y))
+- AL_ALIAS(fixed fsub(fixed x, fixed y), fixsub(x, y))
+- AL_ALIAS(fixed fmul(fixed x, fixed y), fixmul(x, y))
+- AL_ALIAS(fixed fdiv(fixed x, fixed y), fixdiv(x, y))
+- AL_ALIAS(int fceil(fixed x), fixceil(x))
+- AL_ALIAS(int ffloor(fixed x), fixfloor(x))
+- AL_ALIAS(fixed fcos(fixed x), fixcos(x))
+- AL_ALIAS(fixed fsin(fixed x), fixsin(x))
+- AL_ALIAS(fixed ftan(fixed x), fixtan(x))
+- AL_ALIAS(fixed facos(fixed x), fixacos(x))
+- AL_ALIAS(fixed fasin(fixed x), fixasin(x))
+- AL_ALIAS(fixed fatan(fixed x), fixatan(x))
+- AL_ALIAS(fixed fatan2(fixed y, fixed x), fixatan2(y, x))
+- AL_ALIAS(fixed fsqrt(fixed x), fixsqrt(x))
+- AL_ALIAS(fixed fhypot(fixed x, fixed y), fixhypot(x, y))
+- #endif
+-
+ #endif /* !defined ALLEGRO_SRC */
+
+