summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-15 07:15:16 +0100
committerSam James <sam@gentoo.org>2023-04-15 07:15:16 +0100
commit23992eb4e9aadd9e4db52362305b1a7812e97e7b (patch)
tree4b29e9de65f6df910f7764d698c4861982f7fabd /media-gfx/gnofract4d
parentdev-db/unixODBC: fix build w/ clang 16 (diff)
downloadgentoo-23992eb4e9aadd9e4db52362305b1a7812e97e7b.tar.gz
gentoo-23992eb4e9aadd9e4db52362305b1a7812e97e7b.tar.bz2
gentoo-23992eb4e9aadd9e4db52362305b1a7812e97e7b.zip
media-gfx/gnofract4d: fix build w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/gnofract4d')
-rw-r--r--media-gfx/gnofract4d/files/gnofract4d-4.3_p20221125-clang16.patch44
-rw-r--r--media-gfx/gnofract4d/gnofract4d-4.3_p20221125-r1.ebuild (renamed from media-gfx/gnofract4d/gnofract4d-4.3_p20221125.ebuild)4
2 files changed, 48 insertions, 0 deletions
diff --git a/media-gfx/gnofract4d/files/gnofract4d-4.3_p20221125-clang16.patch b/media-gfx/gnofract4d/files/gnofract4d-4.3_p20221125-clang16.patch
new file mode 100644
index 000000000000..3ca2ae35911a
--- /dev/null
+++ b/media-gfx/gnofract4d/files/gnofract4d-4.3_p20221125-clang16.patch
@@ -0,0 +1,44 @@
+https://github.com/fract4d/gnofract4d/pull/254
+
+From dd92a4bf2c6e68352203c511f465846e5c96407b Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Fri, 14 Apr 2023 09:33:28 +0200
+Subject: [PATCH] Declare image_lookup, gradient in fract_stdlib.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This avoids test failures in generated code with C compilers
+that do not support implicit function declartions:
+
+> raise fracttypes.TranslationError(
+ "Error reported by C compiler:%s" % output)
+E fract4d_compiler.fracttypes.TranslationError: Error reported by C co
+mpiler:/tmp/fract4d_4tueiy9c/gnofract4d-cache/fract4d_9ebc1853081db2ea5eb7cce846
+42cd4e.c: In function ‘pf_calc’:
+E /tmp/fract4d_4tueiy9c/gnofract4d-cache/fract4d_9ebc1853081db2ea5eb7c
+ce84642cd4e.c:282:1: error: implicit declaration of function ‘image_lookup’
+E 282 | image_lookup(t__a_cf1image,z_re,z_im, &t__cf10, &t__cf11, &t
+__cf12);
+E | ^~~~~~~~~~~~
+
+
+> raise fracttypes.TranslationError(
+ "Error reported by C compiler:%s" % output)
+E fract4d_compiler.fracttypes.TranslationError: Error reported by C compiler:/tmp/fract4d_4tueiy9c/gnofract4d-cache/fract4d_2ccc81a001cdf717973d45d4cbd12778.c: In function ‘pf_calc’:
+E /tmp/fract4d_4tueiy9c/gnofract4d-cache/fract4d_2ccc81a001cdf717973d45d4cbd12778.c:323:1: error: implicit declaration of function ‘gradient’
+E 323 | gradient(t__a__gradient,t__cf09, &t__cf010, &t__cf011, &t__cf012);
+E | ^~~~~~~~
+--- a/fract4d/c/fract_stdlib.h
++++ b/fract4d/c/fract_stdlib.h
+@@ -52,6 +52,9 @@ extern "C"
+ double read_float_array_2D(void *array, int x, int y);
+ int write_float_array_2D(void *array, int x, int y, double val);
+
++ void image_lookup(void *im, double x, double y, double *pr, double *pg, double *pb);
++ void gradient(void *grad_object, double index, double *r, double *g, double *b);
++
+ #ifdef __cplusplus
+ }
+ #endif
+
diff --git a/media-gfx/gnofract4d/gnofract4d-4.3_p20221125.ebuild b/media-gfx/gnofract4d/gnofract4d-4.3_p20221125-r1.ebuild
index 8fc1f112c6e4..2132a58fe933 100644
--- a/media-gfx/gnofract4d/gnofract4d-4.3_p20221125.ebuild
+++ b/media-gfx/gnofract4d/gnofract4d-4.3_p20221125-r1.ebuild
@@ -38,6 +38,10 @@ distutils_enable_tests pytest
S="${WORKDIR}/${PN}-${COMMIT}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.3_p20221125-clang16.patch
+)
+
src_prepare() {
sed -i -e "s:share/doc/gnofract4d/:share/doc/${PF}/:" setup.py || die