Switch to new package format

This commit is contained in:
2026-06-13 19:59:18 +03:00
parent 57abc48547
commit c3404fe0f0
4 changed files with 2622 additions and 2 deletions
+4 -1
View File
@@ -1,9 +1,11 @@
name: gd
description: Open source code library for the dynamic creation of images
version: 2.3.3
revision: 2
revision: 3
url: https://libgd.github.io/
license: custom
maintainers:
- [email protected]
architecture: any
type: source
depends:
@@ -13,6 +15,7 @@ depends:
- libwebp
- libxpm
optional_depends:
- git
- perl
downloads:
- url: https://github.com/libgd/libgd/archive/gd-${BPM_PKG_VERSION}.tar.gz
+9 -1
View File
@@ -1,7 +1,15 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
cd "$BPM_SOURCE"
git apply -p1 "$BPM_WORKDIR"/0001-fix-bug-inheif-usage-stride-is-required.patch
patch -Np1 -i "$BPM_WORKDIR"/0002-avoid-segfault-of-bug788.patch
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,27 @@
From 21633377174354199c3ea3e4b23f64cfaeacc50a Mon Sep 17 00:00:00 2001
From: "Christoph M. Becker" <[email protected]>
Date: Thu, 26 Dec 2024 11:56:38 +0100
Subject: [PATCH] Avoid segfault of bug788 (#907)
If the heif image can't be created for whatever reason, `dst` is `NULL`
what causes a segfault when we try to access its dimensions. We catch
that with a test assertion, and bail out if that fails.
---
tests/heif/bug788.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/heif/bug788.c b/tests/heif/bug788.c
index 5475251b6..2e2a9ea6f 100644
--- a/tests/heif/bug788.c
+++ b/tests/heif/bug788.c
@@ -24,6 +24,10 @@ int main () {
data = gdImageHeifPtrEx(in, &size, 200, GD_HEIF_CODEC_HEVC, GD_HEIF_CHROMA_444);
dst = gdImageCreateFromHeifPtr(size, data);
+ if (!gdTestAssert(dst != NULL)) {
+ gdImageDestroy(in);
+ return gdNumFailures();
+ }
diff = gdImageCreateTrueColor(gdImageSX(dst), gdImageSY(dst));
if (gdTestAssertMsg(dst != NULL, "cannot compare with NULL buffer")) {
gdTestImageDiff(in, dst, diff, &result);