diff --git a/_service b/_service
index fc1cb2c..e992b64 100644
--- a/_service
+++ b/_service
@@ -1,16 +1,15 @@
-
+
git
https://github.com/hrydgard/ppsspp.git
ppsspp
- v1.3
- 1.3
- %ci
+ 1.4
+ 0~git%cd
enable
-
+
*.tar
xz
-
+
diff --git a/_service:recompress:tar_scm:ppsspp-1.3.20160917T152231.tar.xz b/_service:recompress:tar_scm:ppsspp-1.3.20160917T152231.tar.xz
deleted file mode 100644
index 837acc7..0000000
--- a/_service:recompress:tar_scm:ppsspp-1.3.20160917T152231.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:90f9803f19fff212441e42ac4213ad018a2483c0ee8b63a80e39bc630245c26e
-size 99612312
diff --git a/_service:set_version:ppsspp.spec b/_service:set_version:ppsspp.spec
deleted file mode 100644
index 9368a7f..0000000
--- a/_service:set_version:ppsspp.spec
+++ /dev/null
@@ -1,108 +0,0 @@
-#
-# spec file for package ppsspp
-#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
-#
-# All modifications and additions to the file contributed by third parties
-# remain the property of their copyright owners, unless otherwise agreed
-# upon. The license for this file, and modifications and additions to the
-# file, is the same license as for the pristine package itself (unless the
-# license for the pristine package is not an Open Source License, in which
-# case the license is the MIT License). An "Open Source License" is a
-# license that conforms to the Open Source Definition (Version 1.9)
-# published by the Open Source Initiative.
-
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
-
-%define debug_package %{nil}
-Name: ppsspp
-Version: 1.3.20160917T152231
-Release: 0
-Summary: PlayStation Portable Emulator
-License: GPL-2.0+
-Group: System/Emulators/Other
-Url: ppsspp.org
-Source0: %{name}-%{version}.tar.xz
-Patch0: disable-buildtime-git-version-creation.patch
-BuildRequires: Mesa-devel
-BuildRequires: gcc-c++
-BuildRequires: hicolor-icon-theme
-BuildRequires: libqt5-qttools-devel
-BuildRequires: libzip-devel
-BuildRequires: pkgconfig
-BuildRequires: snappy-devel
-BuildRequires: unzip
-BuildRequires: update-desktop-files
-BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5OpenGL)
-BuildRequires: pkgconfig(libavcodec)
-BuildRequires: pkgconfig(sdl2)
-BuildRequires: pkgconfig(zlib)
-
-%description
-PPSSPP is a PSP emulator written in C++, and translates PSP CPU instructions directly into optimized x86, x64 and ARM machine code, using JIT recompilers (dynarecs).
-
-PPSSPP can thus run on quite low-spec hardware, including stronger ARM-based phones and tablets, as long as there's support for OpenGL ES 2.0.
-
-This package contains a GIT snapshot. Updated frequently.
-
-%prep
-%setup -q
-
-# give PPSSPP a clue about lrelease
-sed -i -e '/LREL_TOOL/s:lrelease$:lrelease-qt5:g' Qt/PPSSPP.pro
-%patch0 -p1
-#%patch1 -p1
-echo "// This is a generated file.
-
-const char *PPSSPP_GIT_VERSION = \"%{version}\";
-
-// If you don't want this file to update/recompile, change to 1.
-#define PPSSPP_GIT_VERSION_NO_UPDATE 1
-" > git-version.cpp
-
-# try to force usage of system libraries
-#rm -rf ext/zlib
-#rm -rf ext/snappy
-#rm -rf native/ext/libzip
-
-%build
-mkdir build
-cd build
-%qmake5 \
- QMAKE_CFLAGS="%{optflags} ${CFLAGS}" \
- QMAKE_CXXFLAGS="%{optflags} ${CXXFLAGS}" \
- 'CONFIG+=release' \
- ../Qt/PPSSPPQt.pro
-%make_jobs
-
-%install
-install -D -p -m 755 build/ppsspp %{buildroot}%{_bindir}/ppsspp
-
-for icon in assets/unix-icons/hicolor/*/*/*.png; do
- install -D -p -m 644 "${icon}" \
- "%{buildroot}%{_datadir}/icons/${icon#assets/unix-icons}"
-done
-
-%suse_update_desktop_file -c %{name} PPSSPP 'PSP Emulator' %{name} %{name} System Emulator
-
-%post
-%desktop_database_post
-%icon_theme_cache_post
-
-%postun
-%desktop_database_postun
-%icon_theme_cache_postun
-
-%files
-%defattr(-,root,root)
-%doc README.md LICENSE.TXT
-%{_bindir}/%{name}
-%dir %{_datadir}/icons/hicolor/512x512
-%dir %{_datadir}/icons/hicolor/512x512/apps
-%{_datadir}/icons/hicolor/*/apps/%{name}.*
-%{_datadir}/applications/%{name}.desktop
-
-%changelog
diff --git a/_service:tar_scm:_servicedata b/_service:tar_scm:_servicedata
deleted file mode 100644
index ec3b527..0000000
--- a/_service:tar_scm:_servicedata
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- https://github.com/hrydgard/ppsspp.git
- 6d0d36bf914a3f5373627a362d65facdcfbbfe5f
\ No newline at end of file
diff --git a/_service:tar_scm:ppsspp.changes b/_service:tar_scm:ppsspp.changes
deleted file mode 100644
index 8cb1859..0000000
--- a/_service:tar_scm:ppsspp.changes
+++ /dev/null
@@ -1,19 +0,0 @@
--------------------------------------------------------------------
-Mon Sep 26 14:19:49 UTC 2016 - opensuse-packaging@opensuse.org
-
-- Update to version 1.3.20160917T152231:
- * Make the last commit slightly safer by adding a mutex
- * Determine alpha test texture after texture.
- * Use safest alpha status in texture replace.
- * Revert "ARM64 icache flush: Don't bother with the minimum cache line size, just use the current."
- * Be completely safe on Exynos even if future OS:es start running the big and LITTLE cores simultaneously (don't know if they already do)
- * Update lang
- * Update chinese.txt korean.txt (learning files for font atlas)
- * Update font atlas with the latest Chinese chars used
- * Update version to 1.3
-
--------------------------------------------------------------------
-Mon Sep 26 14:54 UTC 2016 - pousaduarte@gmail.com
-
-- Update to latest git snapshot
- * use qt build
diff --git a/_servicedata b/_servicedata
new file mode 100644
index 0000000..2b8f334
--- /dev/null
+++ b/_servicedata
@@ -0,0 +1,4 @@
+
+
+ https://github.com/hrydgard/ppsspp.git
+ 0cb4344da1ab5f644589e1c987cfd93a86558c8f
\ No newline at end of file
diff --git a/disable-buildtime-git-version-creation.patch b/disable-buildtime-git-version-creation.patch
deleted file mode 100644
index 051c706..0000000
--- a/disable-buildtime-git-version-creation.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-*** old/CMakeLists.txt 2014-01-08 14:10:40.035843263 +0530
---- new/CMakeLists.txt 2014-01-08 14:11:30.987970363 +0530
-*************** setup_target_project(${CoreLibName} Core
-*** 1169,1175 ****
-
- # Generate git-version.cpp at build time.
- add_custom_target(GitVersion ALL
-! DEPENDS something_that_never_exists)
- add_custom_command(OUTPUT something_that_never_exists
- COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
- -P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
---- 1169,1175 ----
-
- # Generate git-version.cpp at build time.
- add_custom_target(GitVersion ALL
-! ) # DEPENDS something_that_never_exists)
- add_custom_command(OUTPUT something_that_never_exists
- COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
- -P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
diff --git a/ppsspp-1.4.0~git20170412.tar.xz b/ppsspp-1.4.0~git20170412.tar.xz
new file mode 100644
index 0000000..8de3950
--- /dev/null
+++ b/ppsspp-1.4.0~git20170412.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:251e04f21fcbf30248dc2a93641fca0115e2d3ae5313890853b916e8b7878e22
+size 173067988
diff --git a/ppsspp.changes b/ppsspp.changes
index 313ef15..3be519c 100644
--- a/ppsspp.changes
+++ b/ppsspp.changes
@@ -1,3 +1,64 @@
+-------------------------------------------------------------------
+Wed Apr 12 10:01:26 UTC 2017 - pousaduarte@gmail.com
+
+- Update to version 1.4.0~git20170412:
+ * Windows: Fix mismatch on multitouch finger up.
+ * Windows: Cleanup type conversion in touch.
+ * Fix framebuffer size flopping back and forth.
+ * Fix largest framebuf size in throughmode.
+
+-------------------------------------------------------------------
+Tue Apr 11 12:50:41 UTC 2017 - pousaduarte@gmail.com
+
+- Update to version 1.4.0~git20170411:
+ * Fix issues with software GPU on D3D11
+
+-------------------------------------------------------------------
+Mon Apr 10 19:07:51 UTC 2017 - pousaduarte@gmail.com
+
+- Update to version 1.4.0~git20170410:
+ * Update lang
+ * Track flags to reduce unnecessary VRAM zeroing.
+ * Cleanup 16-bit VRAM clearing.
+ * Skip downloads of cleared VRAM.
+ * Linux: Added support for Hidromancer gamepad device driver
+
+-------------------------------------------------------------------
+Sun Apr 09 11:59:20 UTC 2017 - pousaduarte@gmail.com
+
+- Update to version 1.4.0~git20170409:
+ * Windows: Make the window positioning code slightly saner and more straightforward.
+ * Switch back to using CXSCREEN/CYSCREEN for centering instead of the virtual screen.
+ * Typo fix
+ * When not resetting Y position, clamp Y to 0 early. See #9563
+ * When resetting Y, make sure we don't end up outside the screen. See #9563
+ * SaveState: Correct crash on rewind usage.
+
+-------------------------------------------------------------------
+Fri Apr 07 08:36:15 UTC 2017 - pousaduarte@gmail.com
+
+- Update to version 1.4.20170407:
+ * Fix out-of-bounds framebuffer blit on color bind.
+ * QtMain: Renamed mis-named variable assets_dir to external_dir
+ * Use the root of the memstick as a tempdir for downloads. Should help #8711
+
+-------------------------------------------------------------------
+Thu Apr 06 16:22:05 UTC 2017 - pousaduarte@gmail.com
+
+- Update to version 1.4.20170406:
+ * Further fixes to #9554
+ * Make the gesture detector treat all touches fully individually. Fixes issues with last commit.
+ * Windows: Fix check state after menu translate.
+ * Allow using any touchId to scroll. Should help #9554.
+ * Restore calls to UpdateUI from sceUmd, now that it's faster.
+ * Fix XInput polling in UWP apps. Should help #9555
+ * Touch on Windows Desktop: Apply the DPI scale *after* ScreenToClient.
+ * Minor cleanup with GOLD define - only use it in System_GetPropertyInt
+ * Operator precedence fix in ifdef
+ * Remove unused code
+ * Make scroll gesture detector compatible with other touches than #0. Should help #9554.
+ * Remove unnecessary disable-buildtime-git-version-creation.patch
+
-------------------------------------------------------------------
Mon Sep 26 14:54 UTC 2016 - pousaduarte@gmail.com
diff --git a/ppsspp.spec b/ppsspp.spec
index edf5dec..5efa4bd 100644
--- a/ppsspp.spec
+++ b/ppsspp.spec
@@ -16,45 +16,74 @@
#
-%define debug_package %{nil}
-Name: ppsspp
-Version: 1.3+git
-Release: 0
-Summary: PlayStation Portable Emulator
-License: GPL-2.0+
-Group: System/Emulators/Other
-Url: ppsspp.org
-Source0: %{name}-%{version}.tar.xz
-Patch0: disable-buildtime-git-version-creation.patch
-BuildRequires: Mesa-devel
-BuildRequires: gcc-c++
-BuildRequires: hicolor-icon-theme
-BuildRequires: libqt5-qttools-devel
-BuildRequires: libzip-devel
-BuildRequires: pkgconfig
-BuildRequires: snappy-devel
-BuildRequires: unzip
-BuildRequires: update-desktop-files
-BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5OpenGL)
-BuildRequires: pkgconfig(libavcodec)
-BuildRequires: pkgconfig(sdl2)
-BuildRequires: pkgconfig(zlib)
+Name: ppsspp
+Version: 1.4.0~git20170412
+Release: 0
+Summary: PlayStation Portable Emulator
+License: GPL-2.0+
+Group: System/Emulators/Other
+Url: http://www.ppsspp.org
+Source: %{name}-%{version}.tar.xz
+
+BuildRequires: gcc-c++
+BuildRequires: cmake >= 3.6
+BuildRequires: Mesa-devel
+BuildRequires: libzip-devel
+BuildRequires: snappy-devel
+BuildRequires: unzip
+BuildRequires: fdupes
+BuildRequires: pkgconfig(gl)
+BuildRequires: pkgconfig(glew)
+BuildRequires: pkgconfig(sdl2)
+BuildRequires: pkgconfig(zlib)
+BuildRequires: pkgconfig(libpng)
+
+%if 0%{?sle_version} != 120100
+BuildRequires: vulkan-devel
+%endif
+
+#Qt deps:
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5OpenGL)
+
+#ffmpeg deps:
+BuildRequires: pkgconfig(libavcodec)
+BuildRequires: pkgconfig(libswscale)
+BuildRequires: pkgconfig(libavformat)
+BuildRequires: pkgconfig(libavutil)
+BuildRequires: pkgconfig(libavdevice)
+BuildRequires: pkgconfig(libavfilter)
+BuildRequires: pkgconfig(libpostproc)
+BuildRequires: pkgconfig(libswresample)
+
+#Desktop icon deps
+BuildRequires: update-desktop-files
+Requires(post): hicolor-icon-theme
+Requires(postun): hicolor-icon-theme
+
+Requires: %{name}-common
%description
PPSSPP is a PSP emulator written in C++, and translates PSP CPU instructions directly into optimized x86, x64 and ARM machine code, using JIT recompilers (dynarecs).
-PPSSPP can thus run on quite low-spec hardware, including stronger ARM-based phones and tablets, as long as there's support for OpenGL ES 2.0.
+%package qt
+Summary: PPSSPP Qt backend
+Group: System/Emulators/Other
+Requires: %{name}-common
-This package contains a GIT snapshot. Updated frequently.
+%description qt
+PPSSPP build using the Qt framework
+
+%package common
+Summary: PPSSPP assets
+Group: System/Emulators/Other
+
+%description common
+Required assets for PPSSPP GUI
%prep
%setup -q
-# give PPSSPP a clue about lrelease
-sed -i -e '/LREL_TOOL/s:lrelease$:lrelease-qt5:g' Qt/PPSSPP.pro
-%patch0 -p1
-#%patch1 -p1
echo "// This is a generated file.
const char *PPSSPP_GIT_VERSION = \"%{version}\";
@@ -63,30 +92,64 @@ const char *PPSSPP_GIT_VERSION = \"%{version}\";
#define PPSSPP_GIT_VERSION_NO_UPDATE 1
" > git-version.cpp
-# try to force usage of system libraries
-#rm -rf ext/zlib
-#rm -rf ext/snappy
-#rm -rf native/ext/libzip
-
%build
-mkdir build
-cd build
-%qmake5 \
- QMAKE_CFLAGS="%{optflags} ${CFLAGS}" \
- QMAKE_CXXFLAGS="%{optflags} ${CXXFLAGS}" \
- 'CONFIG+=release' \
- ../Qt/PPSSPPQt.pro
+%cmake .. \
+ -DUSE_FFMPEG="ON" \
+ -DUSE_SYSTEM_FFMPEG="ON" \
+ -DUSING_QT_UI="ON" \
+ -DGOLD="ON" \
+ %if 0%{?sle_version} != 120100
+ -DNO_VULKAN="OFF"
+ %endif
+
+%make_jobs
+
+cd ..
+%__mv build build-qt
+
+%cmake .. \
+ -DUSE_FFMPEG="ON" \
+ -DUSE_SYSTEM_FFMPEG="ON" \
+ -DGOLD="ON" \
+ %if 0%{?sle_version} != 120100
+ -DNO_VULKAN="OFF"
+ %endif
+
%make_jobs
%install
-install -D -p -m 755 build/ppsspp %{buildroot}%{_bindir}/ppsspp
+%__mkdir -p %{buildroot}%{_bindir}
+%__mkdir -p %{buildroot}%{_libexecdir}/%{name}
-for icon in assets/unix-icons/hicolor/*/*/*.png; do
- install -D -p -m 644 "${icon}" \
- "%{buildroot}%{_datadir}/icons/${icon#assets/unix-icons}"
-done
+#setup wrapper(s)
+cat > %{buildroot}%{_bindir}/%{name}-qt << 'EOF'
+#!/bin/sh
+exec %{_libexecdir}/%{name}/%{name}-qt "$@"
+
+EOF
+
+cat > %{buildroot}%{_bindir}/%{name} << 'EOF'
+#!/bin/sh
+exec %{_libexecdir}/%{name}/%{name} "$@"
+
+EOF
+
+#install files
+
+%__install -m 755 -D build-qt/PPSSPPQt %{buildroot}%{_libexecdir}/%{name}/%{name}-qt
+%__install -m 755 -D build/PPSSPPSDL %{buildroot}%{_libexecdir}/%{name}/%{name}
+
+%__mv assets %{buildroot}%{_libexecdir}/%{name}/
+%__mkdir -p %{buildroot}%{_datadir}/pixmaps
+%__install -m 444 -D icons/icon.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
%suse_update_desktop_file -c %{name} PPSSPP 'PSP Emulator' %{name} %{name} System Emulator
+%suse_update_desktop_file -c %{name}-qt PPSSPPQt 'PSP Emulator' %{name}-qt %{name} System Emulator
+
+%fdupes %{buildroot}
+
+%check
+%ctest
%post
%desktop_database_post
@@ -96,13 +159,29 @@ done
%desktop_database_postun
%icon_theme_cache_postun
+%files qt
+%defattr(-,root,root)
+%attr(755, root, root) %{_bindir}/%{name}-qt
+%{_libexecdir}/%{name}/%{name}-qt
+%{_datadir}/applications/%{name}-qt.desktop
+
+%files common
+%defattr(-,root,root)
+#Fix SLE_12_SP2 and LEAP 42.1 builds
+%if 0%{?sle_version} <= 120200 && 0%{?suse_version} <= 1320
+%doc README.md LICENSE.TXT
+%else
+%doc README.md
+%license LICENSE.TXT
+%endif
+%{_libexecdir}/%{name}/assets
+%{_datadir}/pixmaps/%{name}.svg
+
%files
%defattr(-,root,root)
-%doc README.md LICENSE.TXT
-%{_bindir}/%{name}
-%dir %{_datadir}/icons/hicolor/512x512
-%dir %{_datadir}/icons/hicolor/512x512/apps
-%{_datadir}/icons/hicolor/*/apps/%{name}.*
+%dir %{_libexecdir}/%{name}
+%attr(755, root, root) %{_bindir}/%{name}
+%{_libexecdir}/%{name}/%{name}
%{_datadir}/applications/%{name}.desktop
%changelog