commit: fe5c356ae6f13e7bd15361a4f3f17e891a629192 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> AuthorDate: Wed Jan 12 21:23:58 2022 +0000 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> CommitDate: Wed Jan 12 22:03:55 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe5c356a
media-libs/graphene: add 64-bit vector detection patch MASSIVE prerformance increase on arm64 and ppc64le fedora ships this patch too, so it's well tested 1/22 mutest / general OK 0.18s 2/22 mutest / hooks OK 0.17s 3/22 mutest / types OK 0.17s 4/22 graphene / box OK 0.16s 65 subtests passed 5/22 graphene / euler OK 0.16s 10 subtests passed 6/22 graphene / frustum OK 0.15s 21 subtests passed 7/22 graphene / matrix OK 0.15s 70 subtests passed 8/22 graphene / plane OK 0.14s 13 subtests passed 9/22 graphene / point OK 0.14s 24 subtests passed 10/22 graphene / point3d OK 0.13s 36 subtests passed 11/22 graphene / quad OK 0.13s 12 subtests passed 12/22 graphene / quaternion OK 0.12s 24 subtests passed 13/22 graphene / ray OK 0.12s 21 subtests passed 14/22 graphene / rect OK 0.12s 65 subtests passed 15/22 graphene / simd OK 0.11s 25 subtests passed 16/22 graphene / size OK 0.11s 17 subtests passed 17/22 graphene / sphere OK 0.10s 17 subtests passed 18/22 graphene / triangle OK 0.10s 56 subtests passed 19/22 graphene / vec2 OK 0.09s 37 subtests passed 20/22 graphene / vec3 OK 0.09s 51 subtests passed 21/22 graphene / vec4 OK 0.08s 63 subtests passed 22/22 graphene / introspection.py OK 0.13s 1 subtests passed Ok: 22 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0 Acked-by: Matt Turner <mattst88 <AT> gentoo.org> Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> .../graphene/files/1.10.6-fix-vector-check.patch | 23 ++++++++++ media-libs/graphene/graphene-1.10.6-r1.ebuild | 49 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) 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 new file mode 100644 index 000000000000..19bee435846b --- /dev/null +++ b/media-libs/graphene/files/1.10.6-fix-vector-check.patch @@ -0,0 +1,23 @@ +From 3ce7bf419e366d88a141d1210ae96182986ea8e9 Mon Sep 17 00:00:00 2001 +From: q66 <[email protected]> +Date: Wed, 9 Jun 2021 15:47:14 +0200 +Subject: [PATCH] meson: fix gcc vector 64-bit check + +the previous behavior only ever enabled gcc vectors no x86_64 +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 5dbfb63..fd37036 100644 +--- a/meson.build ++++ b/meson.build +@@ -328,7 +328,7 @@ if get_option('gcc_vector') + # error "GCC vector intrinsics are disabled on GCC prior to 4.9" + # elif defined(__arm__) + # error "GCC vector intrinsics are disabled on ARM" +-# elif !defined(__x86_64__) ++# elif (__SIZEOF_POINTER__ < 8) + # error "GCC vector intrinsics are disabled on 32bit" + # endif + #else diff --git a/media-libs/graphene/graphene-1.10.6-r1.ebuild b/media-libs/graphene/graphene-1.10.6-r1.ebuild new file mode 100644 index 000000000000..29dbe5384376 --- /dev/null +++ b/media-libs/graphene/graphene-1.10.6-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +inherit xdg-utils meson-multilib python-any-r1 + +DESCRIPTION="A thin layer of types for graphic libraries" +HOMEPAGE="https://ebassi.github.io/graphene/" +SRC_URI="https://github.com/ebassi/graphene/releases/download/${PV}/${P}.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="cpu_flags_arm_neon cpu_flags_x86_sse2 doc +introspection test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/glib-2.30.0:2[${MULTILIB_USEDEP}] + introspection? ( dev-libs/gobject-introspection:= ) +" +DEPEND="${RDEPEND}" +# Python is only needed with USE=introspection or FEATURES=test, but not bothering with conditional python_setup, as meson uses it too anyway +BDEPEND=" + ${PYTHON_DEPS} + doc? ( + dev-util/gtk-doc + app-text/docbook-xml-dtd:4.3 + ) + virtual/pkgconfig +" + +PATCHES=( "${FILESDIR}/${PV}-fix-vector-check.patch" ) + +multilib_src_configure() { + # TODO: Do we want G_DISABLE_ASSERT as buildtype=release would do upstream? + local emesonargs=( + $(meson_native_use_bool doc gtk_doc) + -Dgobject_types=true + $(meson_native_use_feature introspection) + -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 + $(meson_use cpu_flags_x86_sse2 sse2) + $(meson_use cpu_flags_arm_neon arm_neon) + $(meson_use test tests) + -Dinstalled_tests=false + ) + meson_src_configure +}
