pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/gtk3 gtk3: fix sincos() portability; define HAVE_A...
details: https://anonhg.NetBSD.org/pkgsrc/rev/14ebb09713d1
branches: trunk
changeset: 390990:14ebb09713d1
user: adam <adam%pkgsrc.org@localhost>
date: Mon Jan 02 12:04:53 2023 +0000
description:
gtk3: fix sincos() portability; define HAVE_ATK_BRIDGE
diffstat:
x11/gtk3/Makefile | 5 +--
x11/gtk3/distinfo | 5 ++-
x11/gtk3/patches/patch-meson.build | 7 ++--
x11/gtk3/patches/patch-tests_gtkgears.c | 49 +++++++++++++++++++++++++++++++++
4 files changed, 58 insertions(+), 8 deletions(-)
diffs (118 lines):
diff -r d02f433e5a23 -r 14ebb09713d1 x11/gtk3/Makefile
--- a/x11/gtk3/Makefile Mon Jan 02 11:32:46 2023 +0000
+++ b/x11/gtk3/Makefile Mon Jan 02 12:04:53 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.177 2023/01/01 21:21:35 adam Exp $
+# $NetBSD: Makefile,v 1.178 2023/01/02 12:04:53 adam Exp $
DISTNAME= gtk+-3.24.36
PKGNAME= ${DISTNAME:S/gtk/gtk3/}
@@ -17,8 +17,7 @@
# "error: 'for' loop initial declarations are only allowed in C99 mode"
USE_LANGUAGES= c99 c++
USE_PKGLOCALEDIR= yes
-USE_TOOLS+= ggrep gmake perl pkg-config bash xgettext msgmerge
-USE_TOOLS+= gdbus-codegen
+USE_TOOLS+= bash gdbus-codegen ggrep msgmerge perl pkg-config xgettext
PTHREAD_AUTO_VARS= yes
MESON_ARGS+= -Dgtk_doc=true
diff -r d02f433e5a23 -r 14ebb09713d1 x11/gtk3/distinfo
--- a/x11/gtk3/distinfo Mon Jan 02 11:32:46 2023 +0000
+++ b/x11/gtk3/distinfo Mon Jan 02 12:04:53 2023 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.97 2023/01/01 21:21:35 adam Exp $
+$NetBSD: distinfo,v 1.98 2023/01/02 12:04:53 adam Exp $
BLAKE2s (gtk+-3.24.36.tar.xz) = f15cf26424935a14fec5b539e60ea7dca37d14a9479b71bad1403b8bfe53e50f
SHA512 (gtk+-3.24.36.tar.xz) = 76280e847653576e6fd0586d6044ab315f04c3548c211b37612c4ac77f7bbccfcff17459b9d1d3cbddeb74a62a0bcac05f850b89a20d4abc3893c6c387ecb03a
@@ -10,5 +10,6 @@
SHA1 (patch-gtk_fallback-c89.c) = eaf5ac8aace9eab673eed0e265d4cb2617bf1fcd
SHA1 (patch-gtk_gtkfontchooserwidget.c) = 0f4a47b7260e9227ed7e20613bbe435163afd149
SHA1 (patch-gtk_gtklabel.c) = 8ec7e9df8d2169f15698ff6a29cf8254ca44ea61
-SHA1 (patch-meson.build) = e5e3ca8a42876fae22a2dad5cf63571b28d36812
+SHA1 (patch-meson.build) = d20fc548e048de7a094836359cb22845888438ea
SHA1 (patch-meson_options.txt) = 8477c12e5a5116ca2eef7be0c272e86451d8d94f
+SHA1 (patch-tests_gtkgears.c) = f335cbb84d6e254b4feba3b1fe619a41229037e0
diff -r d02f433e5a23 -r 14ebb09713d1 x11/gtk3/patches/patch-meson.build
--- a/x11/gtk3/patches/patch-meson.build Mon Jan 02 11:32:46 2023 +0000
+++ b/x11/gtk3/patches/patch-meson.build Mon Jan 02 12:04:53 2023 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-meson.build,v 1.1 2023/01/01 21:21:35 adam Exp $
+$NetBSD: patch-meson.build,v 1.2 2023/01/02 12:04:53 adam Exp $
Make gtk3-atk-bridge an option to avoid unwanted dbus dependency.
---- meson.build.orig 2023-01-01 19:10:33.000000000 +0000
+--- meson.build.orig 2022-12-22 14:01:18.000000000 +0000
+++ meson.build
@@ -137,6 +137,7 @@ wayland_enabled = get_option('way
broadway_enabled = get_option('broadway_backend')
@@ -12,12 +12,13 @@
os_unix = false
os_linux = false
-@@ -564,7 +565,9 @@ if x11_enabled
+@@ -564,7 +565,10 @@ if x11_enabled
xfixes_dep = dependency('xfixes', required: false)
xcomposite_dep = dependency('xcomposite', required: false)
fontconfig_dep = dependency('fontconfig', fallback: ['fontconfig', 'fontconfig_dep'])
+ if atkbridge_enabled
atkbridge_dep = dependency('atk-bridge-2.0', version: at_spi2_atk_req)
++ cdata.set('HAVE_ATK_BRIDGE', 1)
+ endif
backend_immodules += ['xim']
diff -r d02f433e5a23 -r 14ebb09713d1 x11/gtk3/patches/patch-tests_gtkgears.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk3/patches/patch-tests_gtkgears.c Mon Jan 02 12:04:53 2023 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-tests_gtkgears.c,v 1.1 2023/01/02 12:04:53 adam Exp $
+
+sincos() is problematic, because it is built-in GCC, gets detected by meson,
+but then making docs fails.
+
+--- tests/gtkgears.c.orig 2023-01-02 11:39:17.817427476 +0000
++++ tests/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)
++my_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 varius 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]);
++ my_sincos(i * 2.0 * G_PI / teeth + da * 0, &s[0], &c[0]);
++ my_sincos(i * 2.0 * M_PI / teeth + da * 1, &s[1], &c[1]);
++ my_sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
++ my_sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
++ my_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);
++ my_sincos(radians, &sine, &cosine);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0))
+ return;
Home |
Main Index |
Thread Index |
Old Index