summaryrefslogtreecommitdiff
path: root/media-libs/giflib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-01 00:07:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-01 00:07:06 +0100
commit1551fe56fd6ba43a94509cffc61b6bf854b7ac9f (patch)
treebe99b6ceb874878a108d68c641b476a2df076517 /media-libs/giflib
parent0e2a727aba684f1a44cc0402a3f77d242140681b (diff)
gentoo auto-resync : 01:06:2024 - 00:07:06
Diffstat (limited to 'media-libs/giflib')
-rw-r--r--media-libs/giflib/Manifest4
-rw-r--r--media-libs/giflib/files/giflib-5.2.2-fortify.patch27
-rw-r--r--media-libs/giflib/files/giflib-5.2.2-verbose-tests.patch74
-rw-r--r--media-libs/giflib/giflib-5.2.2.ebuild76
4 files changed, 181 insertions, 0 deletions
diff --git a/media-libs/giflib/Manifest b/media-libs/giflib/Manifest
index 21d669d27930..ff214b9ea071 100644
--- a/media-libs/giflib/Manifest
+++ b/media-libs/giflib/Manifest
@@ -1,5 +1,9 @@
AUX giflib-5.1.9-gentoo.patch 200 BLAKE2B 0d3e9e349b8ef00a09743ac1424c0f53d293573cfbc80a1105f65041d201a0231cb7e69791b8441a5b286841b507ad6b908f4fe0a514a79b8ba6546385f2fa70 SHA512 2d899722238eecd8bdfa7412cf5778c42c58d2e93c9e02e458b5dc636933f7765fd39ceb7906200425039a6c908b47403ec306dc3c79e1402f3824a351a17081
AUX giflib-5.2.1-fix-missing-quantize-API-symbols.patch 920 BLAKE2B a559e326851cc937977f7b91295b218b444deddb8d03350406be706722139005a01160be6f558064239ef6f245b6dbfbb9836899dc72cc1c3106d7900234cabc SHA512 5de1e8724f5221fa3637b4e6a482f650f7608673e2c9200233290018ec8a0bf1beea049b3979b5f57dbf2b2a5fda409324e636e9af10582fd01c71d92d4de3b3
+AUX giflib-5.2.2-fortify.patch 868 BLAKE2B 3abefc79d531ba086817c233709d16e842dc7751dc6ef013f999ece74dfce76a7536ff0982dccb946c9317f8f1517cbc41eed80c491f311259da0e4583fedf7e SHA512 475cf618ed43e346794d027cb53eed54a9d363f8c76f5ad5ed4b830db63f3970cccad197a79c658290c6df148d23bc18d3d196ec8fbcf1b43e9b258d15cafa13
+AUX giflib-5.2.2-verbose-tests.patch 2343 BLAKE2B ef6591b6ded7e0502700d80df92486e0a7245c5861b539a9c0625a0fa790492486ee88306349f1616d21f72d98615bba45b2014cad0b1a8c70837b0ae1fff810 SHA512 a3e38ecfbe13c9351ee93d92d1064104bb06e63e63674bdde880ea61d4191f498d74aab7a7a3978b56a02d3c5ac3bfd875c0315a72de7e84e41198a2213f6381
DIST giflib-5.2.1.tar.gz 444187 BLAKE2B 8c1e105bbb65dc7ab103976caed70834356440f381ec5118311882fb1c558bb65f6c1081e5767f9835087860de44df5dfcd2826f89744dded548d535736f27f0 SHA512 4550e53c21cb1191a4581e363fc9d0610da53f7898ca8320f0d3ef6711e76bdda2609c2df15dc94c45e28bff8de441f1227ec2da7ea827cb3c0405af4faa4736
+DIST giflib-5.2.2.tar.gz 447175 BLAKE2B 5729628044f1bd9227856c76f67b673760c7c93860d9131ab0f67d900b8090fa24693ce16555ff65cfd839c6c960630d49a19ee26e03bdc9d2b4626f9efac393 SHA512 0865ab2b1904fa14640c655fdb14bb54244ad18a66e358565c00287875d00912343f9be8bfac7658cc0146200d626f7ec9160d7a339f20ba3be6b9941d73975f
EBUILD giflib-5.2.1-r1.ebuild 1853 BLAKE2B 7886c00e1e755425d51586a673f605ce335fac898a28210012d5878048f2d0a24cba30b8950f6f9f78319e3bbf6ae8c17110152dd51b81bba10e3a80650f8b2b SHA512 c1165292258aedceb44ee0ea20555baa58e820abbef79c554c0980d798f2ccefcf958fd28459c4fa406b69fd735a10802083db4d9db499fc84db8c05c8d723e5
+EBUILD giflib-5.2.2.ebuild 1610 BLAKE2B bcfba8c0a9f9a656d26090c6919c742580a5d6e7ec8df8a2d68cbf19436629e1ed152efc49daa85354e76687161c5a7bedba3980c1629682bb2ebe55f4daf07e SHA512 73e86400eaf4a613099a05a248518ecdfda625aa85ed5754b8c553b9ffbf0471e38899d4e30143864ca4c280ce58adaed05e90d3b0b3648101efa7b577dad4ad
MISC metadata.xml 407 BLAKE2B 1cd650ccc597cbc965db8c5ff6ca1303740b2b36024b9d211c6126fa359a28d8f358d32f077b79ecf127f3afda8c0d40121b3a33c67304e135aba4673dfcee9d SHA512 d9bfaf6524644d68fd54d434772c2ff7ca85c2eaf86a59828b620e8af21b47c3c8121cfb6eafa28d314c6036089c549eb04b4b47f912350a7adb8120720c8cea
diff --git a/media-libs/giflib/files/giflib-5.2.2-fortify.patch b/media-libs/giflib/files/giflib-5.2.2-fortify.patch
new file mode 100644
index 000000000000..24fc50059aed
--- /dev/null
+++ b/media-libs/giflib/files/giflib-5.2.2-fortify.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/848807
+
+Fix incorrect length args to snprintf.
+
+Upstream bug: https://sourceforge.net/p/giflib/bugs/170/
+
+--- a/giftext.c
++++ b/giftext.c
+@@ -442,7 +442,7 @@
+ for (i = 1; i <= Len; i++) {
+ (void)snprintf(&HexForm[CrntPlace * 3], 3, " %02x",
+ Extension[i]);
+- (void)snprintf(&AsciiForm[CrntPlace], 3, "%c",
++ (void)snprintf(&AsciiForm[CrntPlace], 2, "%c",
+ MAKE_PRINTABLE(Extension[i]));
+ if (++CrntPlace == 16) {
+ HexForm[CrntPlace * 3] = 0;
+@@ -488,7 +488,7 @@
+ for (i = 0; i < Len; i++) {
+ (void)snprintf(&HexForm[CrntPlace * 3], 3, " %02x",
+ PixelBlock[i]);
+- (void)snprintf(&AsciiForm[CrntPlace], 3, "%c",
++ (void)snprintf(&AsciiForm[CrntPlace], 2, "%c",
+ MAKE_PRINTABLE(PixelBlock[i]));
+ if (++CrntPlace == 16) {
+ HexForm[CrntPlace * 3] = 0;
+
diff --git a/media-libs/giflib/files/giflib-5.2.2-verbose-tests.patch b/media-libs/giflib/files/giflib-5.2.2-verbose-tests.patch
new file mode 100644
index 000000000000..bc114e212f52
--- /dev/null
+++ b/media-libs/giflib/files/giflib-5.2.2-verbose-tests.patch
@@ -0,0 +1,74 @@
+--- a/tests/makefile
++++ b/tests/makefile
+@@ -32,7 +32,7 @@ GIFS := $(shell ls ../pic/*.gif)
+ # Test decompression and rendering by unpacking images,
+ # converting them to RGB, and comparing that result to a check file.
+ render-regress:
+- @for test in $(GIFS); \
++ for test in $(GIFS); \
+ do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ if echo "Testing RGB rendering of $${test}" >&2; \
+@@ -42,7 +42,7 @@ render-regress:
+ done
+ @rm -f $@.*.regress
+ render-rebuild:
+- @for test in $(GIFS); do \
++ for test in $(GIFS); do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ echo "Remaking $${stem}.rgb"; \
+ $(UTILS)/gif2rgb -1 -o $${stem}.rgb $${test}; \
+@@ -68,7 +68,7 @@ gifbuild-regress:
+ @rm -f $@.fire1.ico $@.fire2.ico $@.fire2.gif
+
+ gifclrmp-regress:
+- @for test in $(GIFS); \
++ for test in $(GIFS); \
+ do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ if echo "gifclrmap: Checking colormap of $${test}" >&2; \
+@@ -78,7 +78,7 @@ gifclrmp-regress:
+ done
+ @rm -f $@.*.regress
+ gifclrmp-rebuild:
+- @for test in $(GIFS); do \
++ for test in $(GIFS); do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ echo "Remaking $${stem}.map"; \
+ $(UTILS)/gifclrmp <$${test} >$${stem}.map; \
+@@ -92,7 +92,7 @@ gifecho-regress:
+ @$(UTILS)/gifecho -t "foobar" | $(UTILS)/gifbuild -d | diff -u foobar.ico -
+
+ giffilter-regress:
+- @for test in $(GIFS); \
++ for test in $(GIFS); \
+ do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ if echo "giffiltr: Testing copy of $${test}" >&2; \
+@@ -120,7 +120,7 @@ gifinto-regress:
+ @rm -f $@.giflib.tmp
+
+ gifsponge-regress:
+- @for test in $(GIFS); \
++ for test in $(GIFS); \
+ do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ if echo "gifsponge: Testing copy of $${test}" >&2; \
+@@ -131,7 +131,7 @@ gifsponge-regress:
+ @rm -f $@.*.regress
+
+ giftext-regress:
+- @for test in $(GIFS); \
++ for test in $(GIFS); \
+ do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ if echo "giftext: Checking text dump of $${test}" >&2; \
+@@ -141,7 +141,7 @@ giftext-regress:
+ done
+ @rm -f $@.*.regress
+ giftext-rebuild:
+- @for test in $(GIFS); do \
++ for test in $(GIFS); do \
+ stem=`basename $${test} | sed -e "s/.gif$$//"`; \
+ echo "Remaking $${stem}.dmp"; \
+ $(UTILS)/giftext <$${test} >$${stem}.dmp; \
diff --git a/media-libs/giflib/giflib-5.2.2.ebuild b/media-libs/giflib/giflib-5.2.2.ebuild
new file mode 100644
index 000000000000..fe22c921f716
--- /dev/null
+++ b/media-libs/giflib/giflib-5.2.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="https://sourceforge.net/projects/giflib/"
+SRC_URI="https://downloads.sourceforge.net/giflib/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/7"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
+IUSE="doc static-libs"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.2.1-fix-missing-quantize-API-symbols.patch
+ "${FILESDIR}"/${PN}-5.2.2-fortify.patch
+ "${FILESDIR}"/${PN}-5.2.2-verbose-tests.patch
+)
+
+src_prepare() {
+ default
+
+ # We don't want docs to be built unconditionally
+ sed -i -e '/$(MAKE) -C doc/d' Makefile || die
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ append-lfs-flags
+
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} -std=gnu99 -fPIC" \
+ LDFLAGS="${LDFLAGS}" \
+ OFLAGS="" \
+ all
+
+ if use doc && multilib_is_native_abi; then
+ emake -C doc
+ fi
+}
+
+multilib_src_test() {
+ emake -j1 check
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+
+ if use doc && multilib_is_native_abi; then
+ docinto html
+ dodoc doc/*.html
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ChangeLog NEWS README TODO )
+ einstalldocs
+ if use doc ; then
+ docinto html
+ dodoc -r doc/{gifstandard,whatsinagif}
+ fi
+}