From 199ac0895dfe2391195d7a35c78ecbf14dc5fb93 Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Sun, 18 Jan 2026 07:46:03 -0500 Subject: [PATCH] new bblfs: media-libs/libnsgif-1.0.0 --- media-libs/libnsgif-1.0.0.PKGBUILD | 36 +++++++++++++++++++ ...nsgif-1.0.0-make-test-failures-fatal.patch | 27 ++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 media-libs/libnsgif-1.0.0.PKGBUILD create mode 100644 media-libs/libnsgif-1.0.0/libnsgif-1.0.0-make-test-failures-fatal.patch diff --git a/media-libs/libnsgif-1.0.0.PKGBUILD b/media-libs/libnsgif-1.0.0.PKGBUILD new file mode 100644 index 0000000..88abf46 --- /dev/null +++ b/media-libs/libnsgif-1.0.0.PKGBUILD @@ -0,0 +1,36 @@ +pkgname=libnsgif +pkgver=1.0.0 +pkgdesc="Decoding library for the GIF image file format, written in C" +homepage="https://www.netsurf-browser.org/projects/libnsgif/" +license=("MIT") +depends=(netsurf-buildsystem) +_patches=("libnsgif-1.0.0-make-test-failures-fatal.patch") +_patch_sums=("73a17081ac8a7c5242caffe20cae128a382910bbe053c5332a8cf156c3ad2931306adf332a65a8e772755009082e5d27cc0e35260d8a30538509fa35c1b05716") +sources=("${pkgname}-${pkgver}-src.tar.gz" + "${_patches[@]}" +) +urls=("https://download.netsurf-browser.org/libs/releases/${sources[0]}" + "${_patches[@]}" +) +sha512sums=("e87d5faaa4f586a098357a23bed58a8a7a79c94549b21c3338dd04bd5e074e93a7719d93d79515287b15514a2cf39aaa2abd88fd9aec8785a27594ee5cc2ddc0" + "${_patch_sums[@]}" +) + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + for _patch in ${_patches[@]}; do + patch -p1 -i ${filedir}/${_patch} + done +} + +src_build() { + make COMPONENT_TYPE=lib-shared INCLUDEDIR=include LIBDIR=lib \ + PREFIX=/usr +} + +src_install() { + make COMPONENT_TYPE=lib-shared DESTDIR="$pkgdir" INCLUDEDIR=include \ + LIBDIR=lib PREFIX=/usr install +} + +# vim:ft=sh syn=sh et sw=2: diff --git a/media-libs/libnsgif-1.0.0/libnsgif-1.0.0-make-test-failures-fatal.patch b/media-libs/libnsgif-1.0.0/libnsgif-1.0.0-make-test-failures-fatal.patch new file mode 100644 index 0000000..3225587 --- /dev/null +++ b/media-libs/libnsgif-1.0.0/libnsgif-1.0.0-make-test-failures-fatal.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/918642 +https://github.com/gentoo/gentoo/pull/35142 + +commit 6537507d754ad049dbdc324ec6bdea8b30416d48 +Author: matoro +Date: Fri Feb 16 12:44:14 2024 -0500 + + test: nsgif: make failing tests fatal + + Right now, failing or erroring tests is not currently considered fatal. + This makes any instance of either fatal. + + See: https://github.com/gentoo/gentoo/pull/35142 + +diff --git a/test/runtest.sh b/test/runtest.sh +index fd84847..ef7274c 100755 +--- a/test/runtest.sh ++++ b/test/runtest.sh +@@ -68,7 +68,7 @@ done + echo "Tests:${GIFTESTTOTC} Pass:${GIFTESTPASSC} Fail:${GIFTESTFAILC} Error:${GIFTESTERRC}" + + # exit code +-if [ "${GIFTESTERRC}" -gt 0 ]; then ++if [ "${GIFTESTERRC}" -gt 0 ] || [ "${GIFTESTFAILC}" -gt 0 ]; then + exit 1 + fi +