commit f297f000b22b28c795ffce915458ed3299df4686
Author: Xavier Bachelot <xavier(a)bachelot.org>
Date: Wed Sep 5 15:28:28 2018 +0200
Fix build on ppc64
lightspark-0.8.1-big_endian_buildfix.patch | 29 +++++++++++++++++++++++++++++
lightspark-0.8.1-ppc64_buildfix.patch | 22 ++++++++++++++++++++++
lightspark.spec | 16 +++++++++++-----
3 files changed, 62 insertions(+), 5 deletions(-)
---
diff --git a/lightspark-0.8.1-big_endian_buildfix.patch
b/lightspark-0.8.1-big_endian_buildfix.patch
new file mode 100644
index 0000000..3f08033
--- /dev/null
+++ b/lightspark-0.8.1-big_endian_buildfix.patch
@@ -0,0 +1,29 @@
+From 3e0fe0862af60768716b04543790cfc80cf75b1d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ludger=20Kr=C3=A4mer?= <dbluelle(a)onlinehome.de>
+Date: Sun, 19 Aug 2018 17:45:57 +0200
+Subject: [PATCH] fix compilation on big endian This is not tested, as I don't
+ have access to a big endian machine see
+
https://github.com/lightspark/lightspark/issues/283
+
+---
+ src/plugin_ppapi/plugin.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugin_ppapi/plugin.cpp b/src/plugin_ppapi/plugin.cpp
+index defd171ff..7b3cae34c 100644
+--- a/src/plugin_ppapi/plugin.cpp
++++ b/src/plugin_ppapi/plugin.cpp
+@@ -76,7 +76,12 @@
+ #else
+ //The interpretation of texture data change with the endianness
+ #if __BYTE_ORDER == __BIG_ENDIAN
+-#define GL_UNSIGNED_INT_8_8_8_8_HOST GL_UNSIGNED_INT_8_8_8_8_REV
++// TODO
++// It's unclear if this needs special handling on big endian.
++// Needs to be tested on a big endian machine.
++// OpenGL-ES doesn't define GL_UNSIGNED_INT_8_8_8_8_REV
++//#define GL_UNSIGNED_INT_8_8_8_8_HOST GL_UNSIGNED_INT_8_8_8_8_REV
++#define GL_UNSIGNED_INT_8_8_8_8_HOST GL_UNSIGNED_BYTE
+ #else
+ #define GL_UNSIGNED_INT_8_8_8_8_HOST GL_UNSIGNED_BYTE
+ #endif
diff --git a/lightspark-0.8.1-ppc64_buildfix.patch
b/lightspark-0.8.1-ppc64_buildfix.patch
new file mode 100644
index 0000000..61edfb3
--- /dev/null
+++ b/lightspark-0.8.1-ppc64_buildfix.patch
@@ -0,0 +1,22 @@
+From 8f9d470f2fe9bb729a41ebe2807853dd11c0eeb3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ludger=20Kr=C3=A4mer?= <dbluelle(a)onlinehome.de>
+Date: Sun, 19 Aug 2018 17:37:47 +0200
+Subject: [PATCH] fix compilation for ppc
+
+---
+ src/platforms/engineutils.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/platforms/engineutils.h b/src/platforms/engineutils.h
+index 49e172617..32e328c29 100644
+--- a/src/platforms/engineutils.h
++++ b/src/platforms/engineutils.h
+@@ -21,6 +21,8 @@
+ #define PLATFORMS_ENGINEUTILS_H 1
+
+ #include <SDL2/SDL.h>
++// on ppc SDL.h includes altivec.h, so we have to undefine vector
++#undef vector
+ #include "compat.h"
+ #include "threading.h"
+ #include "tiny_string.h"
diff --git a/lightspark.spec b/lightspark.spec
index 97406ca..3accbdd 100644
--- a/lightspark.spec
+++ b/lightspark.spec
@@ -19,7 +19,7 @@
Name: lightspark
Version: 0.8.1
-Release: %{?pre:0.}2%{?git_snapshot:.%{date}git}%{?pre:.%{pre}}%{?dist}
+Release: %{?pre:0.}3%{?git_snapshot:.%{date}git}%{?pre:.%{pre}}%{?dist}
Summary: An alternative Flash Player implementation
License: LGPLv3+
URL:
http://lightspark.github.io/
@@ -30,10 +30,10 @@ Source0:
https://github.com/lightspark/lightspark/archive/%{name}-%{versi
%endif
Patch0: lightspark-0.7.2-fix_ffmpeg_include_dir.patch
-
-# Build fails on ppc64, temporarily disable it
-#
https://github.com/lightspark/lightspark/issues/283
-ExcludeArch: ppc64
+#
https://github.com/lightspark/lightspark/commit/8f9d470f2fe9bb729a41ebe28...
+Patch1: lightspark-0.8.1-ppc64_buildfix.patch
+#
https://github.com/lightspark/lightspark/commit/3e0fe0862af60768716b04543...
+Patch2: lightspark-0.8.1-big_endian_buildfix.patch
BuildRequires: boost-devel
BuildRequires: cmake3
@@ -96,6 +96,9 @@ This is the Chromium compatible plugin for %{name}.
%setup -q -n %{name}-%{name}-%{version}
%endif
%patch0 -p1 -b .ffmpeg-include-dir
+%patch1 -p1 -b .ppc64_buildfix
+%patch2 -p1 -b .big_endian_buildfix
+
%build
%cmake3 -DPLUGIN_DIRECTORY="%{_libdir}/mozilla/plugins" \
@@ -147,6 +150,9 @@ desktop-file-validate
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
%changelog
+* Tue Sep 04 2018 Xavier Bachelot <xavier(a)bachelot.org> - 0.8.1-3
+- Fix build on ppc64.
+
* Tue Jul 31 2018 Xavier Bachelot <xavier(a)bachelot.org> - 0.8.1-2
- Remove ppc64le from ExcludeArch:.