From 4e815d69d73ad73ee3af023947747ee7aedab696 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: May 29 2018 11:12:49 +0000 Subject: Fix PPC allegro app builds failing due to alcompat.h defining aliases for fadd / fdiv / fmull which conflict with system headers (#1582916, #1582917) Modernize spec-file a bit --- diff --git a/allegro-4.4.2-no-fix-aliases.patch b/allegro-4.4.2-no-fix-aliases.patch new file mode 100644 index 0000000..d3c7830 --- /dev/null +++ b/allegro-4.4.2-no-fix-aliases.patch @@ -0,0 +1,12 @@ +diff -up allegro-4.4.2/include/allegro/alcompat.h~ allegro-4.4.2/include/allegro/alcompat.h +--- allegro-4.4.2/include/allegro/alcompat.h~ 2009-12-20 02:10:56.000000000 +0100 ++++ allegro-4.4.2/include/allegro/alcompat.h 2018-05-29 12:57:32.182913729 +0200 +@@ -40,7 +40,7 @@ + #endif + #endif + +- #ifndef ALLEGRO_NO_FIX_ALIASES ++ #ifdef ALLEGRO_FIX_ALIASES + AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y)) + AL_ALIAS(fixed fsub(fixed x, fixed y), fixsub(x, y)) + AL_ALIAS(fixed fmul(fixed x, fixed y), fixmul(x, y)) diff --git a/allegro.spec b/allegro.spec index 30bad6a..2fce1fa 100644 --- a/allegro.spec +++ b/allegro.spec @@ -6,7 +6,7 @@ Name: allegro Version: 4.4.2 -Release: 19%{?dist} +Release: 20%{?dist} Summary: A game programming library Summary(es): Una libreria de programacion de juegos @@ -23,8 +23,11 @@ Patch2: allegro-4.0.3-libdir.patch Patch3: allegro-4.2.3-pack-formatstring.patch Patch4: allegro-4.4.2-dynamic-addons.patch Patch5: allegro-4.4.2-buildsys-fix.patch +%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 20 || 0%{?rhel} >= 8 Patch6: allegro-4.4.2-doc-noversion.patch +%else Patch7: allegro-4.4.2-doc-install.patch +%endif # Replace racy recursive mutex implementation with proper recursive mutexes Patch8: allegro-4.4.2-mutex-fix.patch # Calling Xsync from the bg thread causes deadlock issues @@ -32,6 +35,8 @@ Patch9: allegro-4.4.2-no-xsync-from-thread.patch # gnome-shell starts apps while gnome-shell has the keyb grabbed... Patch10: allegro-4.4.2-keybgrab-fix.patch Patch11: allegro-4.4.2-Werror-format-security.patch +# PPC builds fail when we define aliases for fadd / fdiv / fmull +Patch12: allegro-4.4.2-no-fix-aliases.patch BuildRequires: texinfo cmake BuildRequires: xorg-x11-proto-devel libX11-devel libXpm-devel libXcursor-devel BuildRequires: libXxf86vm-devel libXxf86dga-devel libGL-devel libGLU-devel @@ -237,21 +242,7 @@ developing applications that use logg. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 20 || 0%{?rhel} >= 8 -%patch6 -p1 -%else -%patch7 -p1 -%endif -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 +%autosetup -p1 %build @@ -271,7 +262,7 @@ done %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install # installation of these is broken, because they use a cmake GLOB, but # that gets "resolved" when runnning cmake, and at that time the files # to install aren't generated yet ... @@ -320,8 +311,8 @@ fi %doc %{_maindocdir}/THANKS %doc %{_maindocdir}/addons.txt %doc %{_maindocdir}/faq.txt -%doc %{_maindocdir}/license.txt %doc %{_maindocdir}/readme.txt +%license %{_maindocdir}/license.txt %config(noreplace) %{_sysconfdir}/allegrorc %{_libdir}/liballeg.so.4* %{_libdir}/allegro @@ -420,6 +411,11 @@ fi %changelog +* Tue May 29 2018 Hans de Goede - 4.4.2-20 +- Fix PPC allegro app builds failing due to alcompat.h defining aliases for + fadd / fdiv / fmull which conflict with system headers (#1582916, #1582917) +- Modernize spec-file a bit + * Wed Feb 07 2018 Fedora Release Engineering - 4.4.2-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild