pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/gtk4 gtk4: don't clash with builtin sincos(3)
details: https://anonhg.NetBSD.org/pkgsrc/rev/920cbc8db7b6
branches: trunk
changeset: 383201:920cbc8db7b6
user: tnn <tnn%pkgsrc.org@localhost>
date: Sun Aug 14 21:05:32 2022 +0000
description:
gtk4: don't clash with builtin sincos(3)
diffstat:
x11/gtk4/distinfo | 3 +-
x11/gtk4/patches/patch-demos_gtk-demo_gtkgears.c | 49 ++++++++++++++++++++++++
2 files changed, 51 insertions(+), 1 deletions(-)
diffs (65 lines):
diff -r d092fb1cd10c -r 920cbc8db7b6 x11/gtk4/distinfo
--- a/x11/gtk4/distinfo Sun Aug 14 20:57:59 2022 +0000
+++ b/x11/gtk4/distinfo Sun Aug 14 21:05:32 2022 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.5 2022/07/29 16:08:20 wiz Exp $
+$NetBSD: distinfo,v 1.6 2022/08/14 21:05:32 tnn Exp $
BLAKE2s (gtk-4.6.6.tar.xz) = 520d6e0edc306ef03691c57e499f1a98ea094bbe30bfe3d731487e8833776758
SHA512 (gtk-4.6.6.tar.xz) = b743d99029d7d51db19396641023eefd5d25bbacbd89ad6660d43e382b26fe6cc5e9ce8f0dbb3f4ac7d2143db617ea0c2e2d3cc8926fc93d735eb76ffb2f8309
Size (gtk-4.6.6.tar.xz) = 23085304 bytes
+SHA1 (patch-demos_gtk-demo_gtkgears.c) = f09912bb4bef8589f694d4ed1a4744afe422ccbd
SHA1 (patch-meson.build) = 89b91ba48b35baafb35598d3dd82577de8fc424c
diff -r d092fb1cd10c -r 920cbc8db7b6 x11/gtk4/patches/patch-demos_gtk-demo_gtkgears.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk4/patches/patch-demos_gtk-demo_gtkgears.c Sun Aug 14 21:05:32 2022 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-demos_gtk-demo_gtkgears.c,v 1.1 2022/08/14 21:05:32 tnn Exp $
+
+Don't clash with builtin sincos(3).
+Needed because we disabled the sincos(3) test in meson.build.
+
+--- demos/gtk-demo/gtkgears.c.orig 2022-07-02 18:38:25.000000000 +0000
++++ demos/gtk-demo/gtkgears.c
+@@ -48,14 +48,12 @@
+ #define VERTICES_PER_TOOTH 34
+ #define GEAR_VERTEX_STRIDE 6
+
+-#ifndef HAVE_SINCOS
+ static void
+-sincos (double x, double *_sin, double *_cos)
++static_sincos (double x, double *_sin, double *_cos)
+ {
+ *_sin = sin (x);
+ *_cos = cos (x);
+ }
+-#endif
+
+ /**
+ * Struct describing the vertices in triangle strip
+@@ -306,11 +304,11 @@ create_gear (GLfloat inner_radius,
+ struct point p[7];
+
+ /* Calculate needed sin/cos for various angles */
+- sincos(i * 2.0 * G_PI / teeth + da * 0, &s[0], &c[0]);
+- sincos(i * 2.0 * M_PI / teeth + da * 1, &s[1], &c[1]);
+- sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
+- sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
+- sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]);
++ static_sincos(i * 2.0 * G_PI / teeth + da * 0, &s[0], &c[0]);
++ static_sincos(i * 2.0 * M_PI / teeth + da * 1, &s[1], &c[1]);
++ static_sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
++ static_sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
++ static_sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]);
+
+ GEAR_POINT(p[0], r2, 1);
+ GEAR_POINT(p[1], r2, 2);
+@@ -519,7 +517,7 @@ void perspective(GLfloat *m, GLfloat fov
+ identity(tmp);
+
+ deltaZ = zFar - zNear;
+- sincos(radians, &sine, &cosine);
++ static_sincos(radians, &sine, &cosine);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0))
+ return;
Home |
Main Index |
Thread Index |
Old Index