commit dbf55c2424b8093cb3d4af179474c0464d329838
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Sun Sep 23 16:55:29 2018 +0200
First rpm rhbz#5015
.gitignore | 1 +
ppsspp-1.1.0-git-version.patch | 42 ++++++++++
ppsspp-armv7.patch | 12 +++
ppsspp.appdata.xml | 35 ++++++++
ppsspp.desktop | 11 +++
ppsspp.spec | 178 +++++++++++++++++++++++++++++++++++++++++
sources | 1 +
7 files changed, 280 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5feab63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ppsspp-6d0ed4a.tar.gz
diff --git a/ppsspp-1.1.0-git-version.patch b/ppsspp-1.1.0-git-version.patch
new file mode 100644
index 0000000..e2faa01
--- /dev/null
+++ b/ppsspp-1.1.0-git-version.patch
@@ -0,0 +1,42 @@
+diff -urN ppsspp-1.1.0/git-version.cmake ppsspp-1.1.0-patched/git-version.cmake
+--- ppsspp-1.1.0/git-version.cmake 2015-10-05 02:52:23.000000000 +1000
++++ ppsspp-1.1.0-patched/git-version.cmake 2015-10-05 23:23:47.691228897 +1000
+@@ -1,37 +1,7 @@
+ set(GIT_VERSION_FILE "${SOURCE_DIR}/git-version.cpp")
+-set(GIT_VERSION "unknown")
++set(GIT_VERSION "@@unknown_version@@")
+ set(GIT_VERSION_UPDATE "1")
+
+-find_package(Git)
+-if(GIT_FOUND AND EXISTS "${SOURCE_DIR}/.git/")
+- execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
+- WORKING_DIRECTORY ${SOURCE_DIR}
+- RESULT_VARIABLE exit_code
+- OUTPUT_VARIABLE GIT_VERSION)
+- if(NOT ${exit_code} EQUAL 0)
+- message(WARNING "git describe failed, unable to include version.")
+- endif()
+- string(STRIP ${GIT_VERSION} GIT_VERSION)
+-else()
+- message(WARNING "git not found, unable to include version.")
+-endif()
+-
+-if(EXISTS ${GIT_VERSION_FILE})
+- # Don't update if marked not to update.
+- file(STRINGS ${GIT_VERSION_FILE} match
+- REGEX "PPSSPP_GIT_VERSION_NO_UPDATE 1")
+- if(NOT ${match} EQUAL "")
+- set(GIT_VERSION_UPDATE "0")
+- endif()
+-
+- # Don't update if it's already the same.
+- file(STRINGS ${GIT_VERSION_FILE} match
+- REGEX "${GIT_VERSION}")
+- if(NOT ${match} EQUAL "")
+- set(GIT_VERSION_UPDATE "0")
+- endif()
+-endif()
+-
+ set(code_string "// This is a generated file.\n\n"
+ "const char *PPSSPP_GIT_VERSION = \"${GIT_VERSION}\"\;\n\n"
+ "// If you don't want this file to update/recompile, change to 1.\n"
diff --git a/ppsspp-armv7.patch b/ppsspp-armv7.patch
new file mode 100644
index 0000000..6e15b9a
--- /dev/null
+++ b/ppsspp-armv7.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f9a21e4f..4f2fba85c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,7 @@
+ if(CMAKE_SYSTEM_PROCESSOR)
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
+ set(ARM ON)
++ add_definitions(-mfpu=neon -fomit-frame-pointer -ftree-vectorize
-mvectorize-with-neon-quad -ffast-math -DARM_NEON)
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7")
+ set(ARMV7 ON)
+ # Horrifying workaround for bug in android cmake stuff for asm files
diff --git a/ppsspp.appdata.xml b/ppsspp.appdata.xml
new file mode 100644
index 0000000..ae8bd16
--- /dev/null
+++ b/ppsspp.appdata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id type="desktop">ppsspp.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <summary>A PSP emulator</summary>
+ <name>PPSSPP</name>
+ <project_license>GPL-2.0+ and BSD</project_license>
+ <categories>
+ <category>Games</category>
+ <category>ActionGame</category>
+ <category>Simulation</category>
+ </categories>
+ <description>
+ <p>
+ PPSSPP - a fast and portable PSP emulator.
+ </p>
+ </description>
+ <releases>
+ <release version="1.6.3" date="2018-06-05">
+ <description>
+ <p>This is the current stable release</p>
+ </description>
+ </release>
+ </releases>
+ <url
type="homepage">https://www.ppsspp.org//</url>
+ <screenshots>
+ <screenshot type="default">
+ <
image>https://sagitter.fedorapeople.org/ppsspp/ppsspp1.png</image>
+ </screenshot>
+ <screenshot>
+ <
image>https://sagitter.fedorapeople.org/ppsspp/ppsspp2.png</image>
+ </screenshot>
+ </screenshots>
+ <updatecontact>sagitter_at_fedoraproject.org</updatecontact>
+</component>
diff --git a/ppsspp.desktop b/ppsspp.desktop
new file mode 100644
index 0000000..a3a75a7
--- /dev/null
+++ b/ppsspp.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Terminal=false
+Name=PPSSPP
+Exec=/usr/bin/PPSSPPQt
+Icon=/usr/share/icons/ppsspp/ppsspp.png
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
+Name[en_US]=ppsspp
diff --git a/ppsspp.spec b/ppsspp.spec
new file mode 100644
index 0000000..256a2a7
--- /dev/null
+++ b/ppsspp.spec
@@ -0,0 +1,178 @@
+#
https://github.com/hrydgard/ppsspp/issues/8823
+ExcludeArch: %{power64}
+
+# -Wl,--as-needed breaks linking on fedora 30+
+%undefine _ld_as_needed
+
+%global commit 6d0ed4ad0700030f6e80b1f6a420b8983624e93d
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global date 20180912
+
+Name: ppsspp
+Version: 1.6.3
+Release: 4.%{date}git%{shortcommit}%{?dist}
+Summary: A PSP emulator
+License: BSD and GPLv2+
+URL:
https://www.ppsspp.org/
+
+# git clone
https://github.com/hrydgard/ppsspp.git
+# git checkout 6d0ed4ad0700030f6e80b1f6a420b8983624e93d
+## This commit coincides with a post-commit of release 1.6.3
+## We need to checkout it, then download relative submodules
+## which are not included in the source code:
+# git submodule update --init ext/armips
+# git submodule update --init ext/glslang
+# git submodule update --init ext/SPIRV-Cross
+# git submodule update --init ext/discord-rpc
+# rm -rf ppsspp/.git ppsspp/.gitignore
+# tar -czvf ppsspp-%%{shortcommit}.tar.gz ppsspp
+Source0:
https://github.com/hrydgard/%{name}/archive/%{commit}/%{name}-%{shortcomm...
+Source1: %{name}.desktop
+Source2: %{name}.appdata.xml
+
+# Fix version
+Patch0: %{name}-1.1.0-git-version.patch
+Patch1: %{name}-armv7.patch
+
+BuildRequires: mesa-libEGL-devel
+BuildRequires: mesa-libGLES-devel
+BuildRequires: cmake3
+BuildRequires: chrpath
+BuildRequires: desktop-file-utils
+BuildRequires: ffmpeg-devel
+BuildRequires: wayland-devel
+BuildRequires: snappy-devel
+BuildRequires: SDL2-devel
+BuildRequires: gcc, gcc-c++
+BuildRequires: libzip-devel
+BuildRequires: glew-devel
+BuildRequires: libGL-devel
+BuildRequires: qt5-qtbase-devel
+BuildRequires: qt5-qttools-devel
+BuildRequires: libappstream-glib
+BuildRequires: rapidjson-devel
+
+Requires: %{name}-data = %{version}-%{release}
+Requires: hicolor-icon-theme
+
+%description
+PPSSPP - a fast and portable PSP emulator.
+
+
+%package data
+Summary: Data files of %{name}
+BuildArch: noarch
+
+%description data
+Data files of %{name}.
+
+
+%prep
+%autosetup -n %{name} -p1
+
+# Set version
+sed -e 's|@@unknown_version@@|%{version}|g' -i git-version.cmake
+
+# Remove unrecognized flag
+sed -i.bak '/Wno-deprecated-register/d' CMakeLists.txt
+
+# Downgrade optimization level to the default one for fedora
+sed -e 's| -O3 | -O2 |g' -i CMakeLists.txt
+
+## Remove spurious executable permissions
+find ext Core -perm /755 -type f \( -name "*.cpp" -o -name "*.h" -o
-name "*.hpp" -o -name "*.y" \) -exec chmod -x {} ';'
+
+
+%build
+export LDFLAGS="%{__global_ldflags} -lGL -fPIC"
+%cmake3 -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/%{name} \
+ -Wno-dev -DARMIPS_REGEXP:BOOL=OFF \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
+ -DUSE_FFMPEG:BOOL=ON -DUSE_SYSTEM_FFMPEG:BOOL=ON \
+ -DUSE_SYSTEM_LIBZIP:BOOL=ON -DUSE_WAYLAND_WSI:BOOL=ON \
+ -DUSING_EGL:BOOL=ON -DUSING_GLES2:BOOL=OFF -DUSING_X11_VULKAN=ON \
+ -DUSING_QT_UI:BOOL=ON -DENABLE_GLSLANG_BINARIES:BOOL=OFF \
+ -DLIBRETRO:BOOL=ON -DENABLE_HLSL:BOOL=OFF \
+ -DOPENGL_xmesa_INCLUDE_DIR:PATH="%{_includedir}/GL -I%{_includedir}/GLES2"\
+ -DHEADLESS=OFF -DZLIB_INCLUDE_DIR:PATH=%{_includedir} \
+%ifarch %{ix86}
+ -DX86:BOOL=ON \
+%endif
+%ifarch %{arm} aarch64
+ -DARM:BOOL=ON \
+%endif
+%ifarch armv7l armv7hl armv7hnl
+ -DARMV7:BOOL=ON \
+%endif
+%ifarch x86_64
+ -DX86_64:BOOL=ON \
+%endif
+ -DBUILD_TESTING:BOOL=OFF
+%make_build V=1
+
+
+%install
+%make_install
+
+# Install PPSSPP executable
+install -Dpm 755 ./PPSSPPQt %{buildroot}%{_bindir}/PPSSPPQt
+
+# Set rpath
+chrpath -r %{_libdir}/%{name} %{buildroot}%{_bindir}/PPSSPPQt
+
+# Install data files
+mkdir -p %{buildroot}%{_datadir}/%{name}
+cp -a ./assets %{buildroot}%{_datadir}/%{name}/
+install -pm 644 Qt/languages/* %{buildroot}%{_datadir}/%{name}/assets/lang/
+
+# Remove unnecessary files
+rm -rf %{buildroot}%{_includedir}
+
+# Install icons
+mkdir -p %{buildroot}%{_datadir}/icons
+cp -a icons/hicolor %{buildroot}%{_datadir}/icons/
+
+mkdir -p %{buildroot}%{_datadir}/icons/%{name}
+install -pm 644 icons/icon-114.png %{buildroot}%{_datadir}/icons/%{name}/%{name}.png
+
+# Install desktop file
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install -m 644 %SOURCE1 --dir=%{buildroot}%{_datadir}/applications
+
+# Install appdata file
+mkdir -p %{buildroot}%{_metainfodir}
+install -pm 644 %SOURCE2 %{buildroot}%{_metainfodir}/
+appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
+
+
+%files
+%{_bindir}/PPSSPPQt
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
+%{_datadir}/icons/%{name}/
+%{_datadir}/applications/%{name}.desktop
+%{_metainfodir}/%{name}.appdata.xml
+%{_libdir}/%{name}/
+
+
+%files data
+%doc README.md
+%license LICENSE.TXT
+%{_datadir}/%{name}/
+
+
+%changelog
+* Wed Sep 12 2018 Antonio Trande <sagitter(a)fedoraproject.org> -
1.6.3-4.20180912git6d0ed4a
+- Enable USE_WAYLAND_WSI
+- Install runtime libraries
+
+* Tue Sep 11 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 1.6.3-3
+- Use different ARM compiler flags (-mfpu=neon -fomit-frame-pointer -ftree-vectorize
-mvectorize-with-neon-quad -ffast-math -DARM_NEON)
+- Enable Vulkan
+- BR reorganized
+
+* Sat Sep 08 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 1.6.3-2
+- Wayland on epel7 uses an unversioned libwayland-egl library
+
+* Wed Sep 05 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 1.6.3-1
+- Initial package
diff --git a/sources b/sources
index e69de29..99e1425 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ae094a96785f6e316d4603ebaf7f1cee ppsspp-6d0ed4a.tar.gz