summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2023-02-24 12:19:47 +0000
committerMarek Szuba <marecki@gentoo.org>2023-02-24 16:49:57 +0000
commitd1fe964780a082775839a682dcbc4b600dc44042 (patch)
tree8cc25a390161fac9dcd80c58446ba29c314086d1 /media-libs
parentsys-apps/fwupd: add 1.8.11 (diff)
downloadgentoo-d1fe964780a082775839a682dcbc4b600dc44042.tar.gz
gentoo-d1fe964780a082775839a682dcbc4b600dc44042.tar.bz2
gentoo-d1fe964780a082775839a682dcbc4b600dc44042.zip
media-libs/aalib: patch a free-offset-pointer bug
While at it, update EAPI 7 -> 8 and drop IUSE=static-libs. Thanks-to: Jocelyn Mayer <l_indien@mailmagic.fr> Closes: https://bugs.gentoo.org/894978 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/aalib/aalib-1.4_rc5-r10.ebuild68
-rw-r--r--media-libs/aalib/files/aalib-1.4_rc5-free-offset-pointer.patch14
2 files changed, 82 insertions, 0 deletions
diff --git a/media-libs/aalib/aalib-1.4_rc5-r10.ebuild b/media-libs/aalib/aalib-1.4_rc5-r10.ebuild
new file mode 100644
index 000000000000..a5d8982b8ca9
--- /dev/null
+++ b/media-libs/aalib/aalib-1.4_rc5-r10.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal toolchain-funcs
+
+MY_P="${P/_/}"
+S="${WORKDIR}/${PN}-1.4.0"
+
+DESCRIPTION="A ASCII-Graphics Library"
+HOMEPAGE="http://aa-project.sourceforge.net/aalib/"
+SRC_URI="mirror://sourceforge/aa-project/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="X gpm slang"
+
+RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
+ gpm? ( >=sys-libs/gpm-1.20.7-r2[${MULTILIB_USEDEP}] )
+ slang? ( >=sys-libs/slang-2.2.4-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ X? ( x11-base/xorg-proto )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4_rc4-gentoo.patch
+ "${FILESDIR}"/${PN}-1.4_rc4-m4.patch
+ "${FILESDIR}"/${PN}-1.4_rc5-fix-protos.patch #224267
+ "${FILESDIR}"/${PN}-1.4_rc5-fix-aarender.patch #214142
+ "${FILESDIR}"/${PN}-1.4_rc5-tinfo.patch #468566
+ "${FILESDIR}"/${PN}-1.4_rc5-key-down-OOB.patch
+ "${FILESDIR}"/${PN}-1.4_rc5-more-protos.patch
+ "${FILESDIR}"/${PN}-1.4_rc5-free-offset-pointer.patch #894978
+)
+
+DOCS=( ANNOUNCE AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ default
+
+ sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:g' "${S}"/src/*.c
+
+ # Fix bug #165617.
+ use gpm || sed -i \
+ 's/gpm_mousedriver_test=yes/gpm_mousedriver_test=no/' "${S}/configure.in"
+
+ #467988 automake-1.13
+ mv configure.{in,ac} || die
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} econf \
+ $(use_with slang slang-driver) \
+ $(use_with X x11-driver) \
+ PKG_CONFIG=$(tc-getPKG_CONFIG)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${D}" -name '*.la' -type f -delete || die
+}
diff --git a/media-libs/aalib/files/aalib-1.4_rc5-free-offset-pointer.patch b/media-libs/aalib/files/aalib-1.4_rc5-free-offset-pointer.patch
new file mode 100644
index 000000000000..3ae697e3189c
--- /dev/null
+++ b/media-libs/aalib/files/aalib-1.4_rc5-free-offset-pointer.patch
@@ -0,0 +1,14 @@
+--- a/src/aarender.c
++++ b/src/aarender.c
+@@ -63,10 +63,10 @@ void aa_renderpalette(aa_context * c, __
+ errors[0] = calloc(1, (x2 + 5) * sizeof(int));
+ if (errors[0] == NULL)
+ dither = AA_ERRORDISTRIB;
+- errors[0] += 3;
+ errors[1] = calloc(1, (x2 + 5) * sizeof(int));
+ if (errors[1] == NULL)
+ free(errors[0]), dither = AA_ERRORDISTRIB;
++ errors[0] += 3;
+ errors[1] += 3;
+ cur = 0;
+ }