1 |
commit: fe5c356ae6f13e7bd15361a4f3f17e891a629192 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 12 21:23:58 2022 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 12 22:03:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe5c356a |
7 |
|
8 |
media-libs/graphene: add 64-bit vector detection patch |
9 |
|
10 |
MASSIVE prerformance increase on arm64 and ppc64le |
11 |
fedora ships this patch too, so it's well tested |
12 |
|
13 |
1/22 mutest / general OK 0.18s |
14 |
2/22 mutest / hooks OK 0.17s |
15 |
3/22 mutest / types OK 0.17s |
16 |
4/22 graphene / box OK 0.16s 65 subtests passed |
17 |
5/22 graphene / euler OK 0.16s 10 subtests passed |
18 |
6/22 graphene / frustum OK 0.15s 21 subtests passed |
19 |
7/22 graphene / matrix OK 0.15s 70 subtests passed |
20 |
8/22 graphene / plane OK 0.14s 13 subtests passed |
21 |
9/22 graphene / point OK 0.14s 24 subtests passed |
22 |
10/22 graphene / point3d OK 0.13s 36 subtests passed |
23 |
11/22 graphene / quad OK 0.13s 12 subtests passed |
24 |
12/22 graphene / quaternion OK 0.12s 24 subtests passed |
25 |
13/22 graphene / ray OK 0.12s 21 subtests passed |
26 |
14/22 graphene / rect OK 0.12s 65 subtests passed |
27 |
15/22 graphene / simd OK 0.11s 25 subtests passed |
28 |
16/22 graphene / size OK 0.11s 17 subtests passed |
29 |
17/22 graphene / sphere OK 0.10s 17 subtests passed |
30 |
18/22 graphene / triangle OK 0.10s 56 subtests passed |
31 |
19/22 graphene / vec2 OK 0.09s 37 subtests passed |
32 |
20/22 graphene / vec3 OK 0.09s 51 subtests passed |
33 |
21/22 graphene / vec4 OK 0.08s 63 subtests passed |
34 |
22/22 graphene / introspection.py OK 0.13s 1 subtests passed |
35 |
|
36 |
Ok: 22 |
37 |
Expected Fail: 0 |
38 |
Fail: 0 |
39 |
Unexpected Pass: 0 |
40 |
Skipped: 0 |
41 |
Timeout: 0 |
42 |
|
43 |
Acked-by: Matt Turner <mattst88 <AT> gentoo.org> |
44 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
45 |
|
46 |
.../graphene/files/1.10.6-fix-vector-check.patch | 23 ++++++++++ |
47 |
media-libs/graphene/graphene-1.10.6-r1.ebuild | 49 ++++++++++++++++++++++ |
48 |
2 files changed, 72 insertions(+) |
49 |
|
50 |
diff --git a/media-libs/graphene/files/1.10.6-fix-vector-check.patch b/media-libs/graphene/files/1.10.6-fix-vector-check.patch |
51 |
new file mode 100644 |
52 |
index 000000000000..19bee435846b |
53 |
--- /dev/null |
54 |
+++ b/media-libs/graphene/files/1.10.6-fix-vector-check.patch |
55 |
@@ -0,0 +1,23 @@ |
56 |
+From 3ce7bf419e366d88a141d1210ae96182986ea8e9 Mon Sep 17 00:00:00 2001 |
57 |
+From: q66 <daniel@×××××××××.org> |
58 |
+Date: Wed, 9 Jun 2021 15:47:14 +0200 |
59 |
+Subject: [PATCH] meson: fix gcc vector 64-bit check |
60 |
+ |
61 |
+the previous behavior only ever enabled gcc vectors no x86_64 |
62 |
+--- |
63 |
+ meson.build | 2 +- |
64 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
65 |
+ |
66 |
+diff --git a/meson.build b/meson.build |
67 |
+index 5dbfb63..fd37036 100644 |
68 |
+--- a/meson.build |
69 |
++++ b/meson.build |
70 |
+@@ -328,7 +328,7 @@ if get_option('gcc_vector') |
71 |
+ # error "GCC vector intrinsics are disabled on GCC prior to 4.9" |
72 |
+ # elif defined(__arm__) |
73 |
+ # error "GCC vector intrinsics are disabled on ARM" |
74 |
+-# elif !defined(__x86_64__) |
75 |
++# elif (__SIZEOF_POINTER__ < 8) |
76 |
+ # error "GCC vector intrinsics are disabled on 32bit" |
77 |
+ # endif |
78 |
+ #else |
79 |
|
80 |
diff --git a/media-libs/graphene/graphene-1.10.6-r1.ebuild b/media-libs/graphene/graphene-1.10.6-r1.ebuild |
81 |
new file mode 100644 |
82 |
index 000000000000..29dbe5384376 |
83 |
--- /dev/null |
84 |
+++ b/media-libs/graphene/graphene-1.10.6-r1.ebuild |
85 |
@@ -0,0 +1,49 @@ |
86 |
+# Copyright 1999-2022 Gentoo Authors |
87 |
+# Distributed under the terms of the GNU General Public License v2 |
88 |
+ |
89 |
+EAPI=7 |
90 |
+ |
91 |
+PYTHON_COMPAT=( python3_{7..9} ) |
92 |
+inherit xdg-utils meson-multilib python-any-r1 |
93 |
+ |
94 |
+DESCRIPTION="A thin layer of types for graphic libraries" |
95 |
+HOMEPAGE="https://ebassi.github.io/graphene/" |
96 |
+SRC_URI="https://github.com/ebassi/graphene/releases/download/${PV}/${P}.tar.xz" |
97 |
+ |
98 |
+LICENSE="MIT" |
99 |
+SLOT="0" |
100 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
101 |
+IUSE="cpu_flags_arm_neon cpu_flags_x86_sse2 doc +introspection test" |
102 |
+RESTRICT="!test? ( test )" |
103 |
+ |
104 |
+RDEPEND=" |
105 |
+ >=dev-libs/glib-2.30.0:2[${MULTILIB_USEDEP}] |
106 |
+ introspection? ( dev-libs/gobject-introspection:= ) |
107 |
+" |
108 |
+DEPEND="${RDEPEND}" |
109 |
+# Python is only needed with USE=introspection or FEATURES=test, but not bothering with conditional python_setup, as meson uses it too anyway |
110 |
+BDEPEND=" |
111 |
+ ${PYTHON_DEPS} |
112 |
+ doc? ( |
113 |
+ dev-util/gtk-doc |
114 |
+ app-text/docbook-xml-dtd:4.3 |
115 |
+ ) |
116 |
+ virtual/pkgconfig |
117 |
+" |
118 |
+ |
119 |
+PATCHES=( "${FILESDIR}/${PV}-fix-vector-check.patch" ) |
120 |
+ |
121 |
+multilib_src_configure() { |
122 |
+ # TODO: Do we want G_DISABLE_ASSERT as buildtype=release would do upstream? |
123 |
+ local emesonargs=( |
124 |
+ $(meson_native_use_bool doc gtk_doc) |
125 |
+ -Dgobject_types=true |
126 |
+ $(meson_native_use_feature introspection) |
127 |
+ -Dgcc_vector=true # if built-in support tests fail, it'll just not enable vector intrinsics; unfortunately this probably means disabled on clang too, due to it claiming to be <gcc-4.9 |
128 |
+ $(meson_use cpu_flags_x86_sse2 sse2) |
129 |
+ $(meson_use cpu_flags_arm_neon arm_neon) |
130 |
+ $(meson_use test tests) |
131 |
+ -Dinstalled_tests=false |
132 |
+ ) |
133 |
+ meson_src_configure |
134 |
+} |