From bbd7a1e9c065b134ca0f7743366b2f245a36a0ad Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 28 Jul 2022 12:16:05 +0200 Subject: [PATCH] Revert back to 1.10.6 for now The 1.10.8 update never had a successful build in koji as it's FTBFS on i686. https://github.com/ebassi/graphene/issues/246 --- .gitignore | 1 - graphene-1.10.6-perf-aarch64.patch | 83 ++++++++++++++++++++++++++++++ graphene-1.10.6-perf.patch | 26 ++++++++++ graphene.spec | 17 +++--- sources | 2 +- 5 files changed, 118 insertions(+), 11 deletions(-) create mode 100644 graphene-1.10.6-perf-aarch64.patch create mode 100644 graphene-1.10.6-perf.patch diff --git a/.gitignore b/.gitignore index 78cb77c..069748a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ /graphene-1.10.2.tar.xz /graphene-1.10.4.tar.xz /graphene-1.10.6.tar.xz -/graphene-1.10.8.tar.xz diff --git a/graphene-1.10.6-perf-aarch64.patch b/graphene-1.10.6-perf-aarch64.patch new file mode 100644 index 0000000..a64620a --- /dev/null +++ b/graphene-1.10.6-perf-aarch64.patch @@ -0,0 +1,83 @@ +From 2aae5d2280d02812669ac38e3981692b98de7c10 Mon Sep 17 00:00:00 2001 +From: Dor Askayo +Date: Sat, 3 Apr 2021 16:37:30 +0300 +Subject: [PATCH 1/2] graphene-config: Enable NEON for AArch64 on Linux + +NEON is fully supported by AArch64. However, GCC doesn't seem to define +__ARM_NEON__ or _M_ARM64 for AArch64. + +Using __aarch64__ should allow a proper detection of this case. +--- + include/graphene-config.h.meson | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/graphene-config.h.meson b/include/graphene-config.h.meson +index 949eee7..96192cc 100644 +--- a/include/graphene-config.h.meson ++++ b/include/graphene-config.h.meson +@@ -19,7 +19,7 @@ extern "C" { + #mesondefine GRAPHENE_HAS_SSE + # endif + +-# if defined(__ARM_NEON__) || defined (_M_ARM64) ++# if defined(__ARM_NEON__) || defined (_M_ARM64) || defined (__aarch64__) + #mesondefine GRAPHENE_HAS_ARM_NEON + # endif + +-- +2.31.1 + +From fbfbdad5a3f38ddbe543ee8c236b4315bba111b9 Mon Sep 17 00:00:00 2001 +From: Dor Askayo +Date: Sat, 3 Apr 2021 16:40:30 +0300 +Subject: [PATCH 2/2] meson: Fix detection of AArch64 on Linux + +Neither __ARM_EABI__ nor __ARM_NEON__ are defined by GCC for AArch64, +and -mfpu=neon is not required as NEON is always supported in AArch64. +--- + meson.build | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/meson.build b/meson.build +index c96aded..86d8eb8 100644 +--- a/meson.build ++++ b/meson.build +@@ -10,6 +10,7 @@ project('graphene', 'c', + + cc = meson.get_compiler('c') + host_system = host_machine.system() ++host_cpu_family = host_machine.cpu_family() + + add_project_arguments([ '-D_GNU_SOURCE' ], language: 'c') + +@@ -352,11 +353,13 @@ neon_cflags = [] + if get_option('arm_neon') + neon_prog = ''' + #if !defined (_MSC_VER) || defined (__clang__) +-# ifndef __ARM_EABI__ +-# error "EABI is required (to be sure that calling conventions are compatible)" +-# endif +-# ifndef __ARM_NEON__ +-# error "No ARM NEON instructions available" ++# if !defined (_M_ARM64) && !defined (__aarch64__) ++# ifndef __ARM_EABI__ ++# error "EABI is required (to be sure that calling conventions are compatible)" ++# endif ++# ifndef __ARM_NEON__ ++# error "No ARM NEON instructions available" ++# endif + # endif + #endif + #include +@@ -376,7 +379,7 @@ int main () { + + test_neon_cflags = [] + +- if cc.get_id() != 'msvc' ++ if cc.get_id() != 'msvc' and host_cpu_family != 'aarch64' + test_neon_cflags += ['-mfpu=neon'] + endif + +-- +2.31.1 + diff --git a/graphene-1.10.6-perf.patch b/graphene-1.10.6-perf.patch new file mode 100644 index 0000000..7f6a66e --- /dev/null +++ b/graphene-1.10.6-perf.patch @@ -0,0 +1,26 @@ +From 3b3e316908e4fb15056d10fb9d5271eed6f65051 Mon Sep 17 00:00:00 2001 +From: q66 +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 +-- +2.31.1 + diff --git a/graphene.spec b/graphene.spec index f7c5672..a58c15d 100644 --- a/graphene.spec +++ b/graphene.spec @@ -1,11 +1,16 @@ Name: graphene -Version: 1.10.8 -Release: 2%{?dist} +Version: 1.10.6 +Release: 4%{?dist} Summary: Thin layer of types for graphic libraries License: MIT URL: https://github.com/ebassi/graphene -Source0: https://download.gnome.org/sources/%{name}/1.10/%{name}-%{version}.tar.xz +Source: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz +# https://github.com/ebassi/graphene/commit/3b3e316908e4fb15056d10fb9d5271eed6f65051 +# https://github.com/ebassi/graphene/commit/fbfbdad5a3f38ddbe543ee8c236b4315bba111b9 +Patch0: graphene-1.10.6-perf-aarch64.patch +# https://github.com/ebassi/graphene/commit/3b3e316908e4fb15056d10fb9d5271eed6f65051 +Patch1: graphene-1.10.6-perf.patch BuildRequires: gcc BuildRequires: gobject-introspection-devel @@ -73,12 +78,6 @@ the functionality of the installed %{name} package. %{_datadir}/installed-tests/ %changelog -* Thu Jul 21 2022 Fedora Release Engineering - 1.10.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Mar 18 2022 David King - 1.10.8-1 -- Update to 1.10.8 - * Thu Jan 20 2022 Fedora Release Engineering - 1.10.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index d0dd3ed..ed01a89 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (graphene-1.10.8.tar.xz) = c56dab6712cf58387d0512a213cd0cd456679e46a495ee5cfd9bc25440cda2d72d56974af4e462f3c863869a1e2e506b702f468933045609d35fdf006212c67d +SHA512 (graphene-1.10.6.tar.xz) = 075e8c712509655d0614258a7fd2943e67a9642334cdabdc15d2489a88c961e278f7464a513080cd287f5371c7ece8ceb7565d1718a8b71fea4a4977f82aeb72