Initial import
This commit is contained in:
commit
25ff094a25
42
.SRCINFO
Normal file
42
.SRCINFO
Normal file
|
@ -0,0 +1,42 @@
|
|||
pkgbase = ppsspp-git
|
||||
pkgdesc = A PSP emulator written in C++
|
||||
pkgver = 1.0.1.r559.403f6ab
|
||||
pkgrel = 1
|
||||
url = http://www.ppsspp.org/
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = GPL2
|
||||
makedepends = cmake
|
||||
makedepends = git
|
||||
makedepends = glu
|
||||
makedepends = qt5-tools
|
||||
depends = ffmpeg
|
||||
depends = sdl2
|
||||
source = git+https://github.com/hrydgard/ppsspp.git
|
||||
source = git+https://github.com/hrydgard/ppsspp-lang.git
|
||||
source = ppsspp-native::git+https://github.com/hrydgard/native.git
|
||||
source = ppsspp-armips::git+https://github.com/Kingcom/armips.git
|
||||
source = ppsspp-ffmpeg.patch
|
||||
source = ppsspp-gcc5.1.patch
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = 00ef3d221b3a7e967fc79eaed20664f52fe7d303597130c46198e60b81023f8a
|
||||
sha256sums = 719f6ae3efa533872f1db5131bc9e7245d7c2e40e776c9869a0820be17f0ac9d
|
||||
|
||||
pkgname = ppsspp-git
|
||||
provides = ppsspp
|
||||
conflicts = ppsspp
|
||||
conflicts = ppsspp-qt
|
||||
conflicts = ppsspp-qt-git
|
||||
|
||||
pkgname = ppsspp-qt-git
|
||||
depends = ffmpeg
|
||||
depends = sdl2
|
||||
depends = qt5-base
|
||||
provides = ppsspp
|
||||
conflicts = ppsspp
|
||||
conflicts = ppsspp-git
|
||||
conflicts = ppsspp-qt
|
||||
|
6
MKPKG
Normal file
6
MKPKG
Normal file
|
@ -0,0 +1,6 @@
|
|||
arch=('x86_64')
|
||||
pkgname=('ppsspp-git' 'ppsspp-qt-git')
|
||||
|
||||
check_git $packagedir/ppsspp-git/ppsspp
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
103
PKGBUILD
Normal file
103
PKGBUILD
Normal file
|
@ -0,0 +1,103 @@
|
|||
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
|
||||
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
||||
# Contributor: Ben Reedy <thebenj88@gmail.com>
|
||||
# Contributor: Clement Guerin <geecko.dev@free.fr>
|
||||
# Contributor: Thiago Kenji Okada <thiago.mast3r@gmail.com>
|
||||
# Contributor: uberushaximus <uberushaximus@gmail.com>
|
||||
|
||||
pkgbase=ppsspp-git
|
||||
pkgname=('ppsspp-git' 'ppsspp-qt-git')
|
||||
pkgver=1.0.1.r559.403f6ab
|
||||
pkgrel=1
|
||||
pkgdesc='A PSP emulator written in C++'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.ppsspp.org/'
|
||||
license=('GPL2')
|
||||
depends=('ffmpeg' 'sdl2')
|
||||
makedepends=('cmake' 'git' 'glu' 'qt5-tools')
|
||||
source=('git+https://github.com/hrydgard/ppsspp.git'
|
||||
'git+https://github.com/hrydgard/ppsspp-lang.git'
|
||||
'ppsspp-native::git+https://github.com/hrydgard/native.git'
|
||||
'ppsspp-armips::git+https://github.com/Kingcom/armips.git'
|
||||
'ppsspp-ffmpeg.patch'
|
||||
'ppsspp-gcc5.1.patch')
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'00ef3d221b3a7e967fc79eaed20664f52fe7d303597130c46198e60b81023f8a'
|
||||
'719f6ae3efa533872f1db5131bc9e7245d7c2e40e776c9869a0820be17f0ac9d')
|
||||
|
||||
pkgver() {
|
||||
cd ppsspp
|
||||
|
||||
echo "$(git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./')"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ppsspp
|
||||
|
||||
for submodule in native lang ext/armips; do
|
||||
git submodule init ${submodule}
|
||||
git config submodule.${submodule}.url ../ppsspp-${submodule#*/}
|
||||
git submodule update ${submodule}
|
||||
done
|
||||
|
||||
patch -Np1 -i ../ppsspp-ffmpeg.patch
|
||||
patch -Np1 -i ../ppsspp-gcc5.1.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ppsspp
|
||||
|
||||
if [[ -d build ]]; then
|
||||
rm -rf build
|
||||
fi
|
||||
mkdir build && cd build
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE='Release' \
|
||||
-DCMAKE_SKIP_RPATH='TRUE' \
|
||||
-DUSE_SYSTEM_FFMPEG='TRUE'
|
||||
make
|
||||
|
||||
cd ..
|
||||
|
||||
if [[ -d build-qt ]]; then
|
||||
rm -rf build-qt
|
||||
fi
|
||||
mkdir build-qt && cd build-qt
|
||||
|
||||
qmake-qt5 CONFIG+='release' CONFIG+='system_ffmpeg' ../Qt/PPSSPPQt.pro
|
||||
make
|
||||
}
|
||||
|
||||
package_ppsspp-git() {
|
||||
provides=('ppsspp')
|
||||
conflicts=('ppsspp' 'ppsspp-qt' 'ppsspp-qt-git')
|
||||
|
||||
cd ppsspp/build
|
||||
|
||||
install -dm 755 "${pkgdir}"/usr/{bin,share/{applications,man/man1,pixmaps,ppsspp}}
|
||||
install -m 755 PPSSPPSDL "${pkgdir}"/usr/bin/ppsspp
|
||||
cp -dr --no-preserve='ownership' assets "${pkgdir}"/usr/share/ppsspp/
|
||||
install -m 644 ../assets/unix-icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
|
||||
install -m 644 ../debian/ppsspp.desktop "${pkgdir}"/usr/share/applications/
|
||||
install -m 644 ../debian/ppsspp.1 "${pkgdir}"/usr/share/man/man1/
|
||||
}
|
||||
|
||||
package_ppsspp-qt-git() {
|
||||
depends+=('qt5-base')
|
||||
provides=('ppsspp')
|
||||
conflicts=('ppsspp' 'ppsspp-git' 'ppsspp-qt')
|
||||
|
||||
cd ppsspp/build-qt
|
||||
|
||||
install -dm 755 "${pkgdir}"/usr/{bin,share/{applications,man/man1,pixmaps}}
|
||||
install -m 755 ppsspp "${pkgdir}"/usr/bin/
|
||||
install -m 644 ../assets/unix-icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
|
||||
install -m 644 ../debian/ppsspp.desktop "${pkgdir}"/usr/share/applications/
|
||||
install -m 644 ../debian/ppsspp.1 "${pkgdir}"/usr/share/man/man1/
|
||||
}
|
||||
|
||||
# vim ts=2 sw=2 et:
|
423
ppsspp-ffmpeg.patch
Normal file
423
ppsspp-ffmpeg.patch
Normal file
|
@ -0,0 +1,423 @@
|
|||
From 983ae517e17a635e21a84a8abdff338e1805f33b Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Gauduin <alucryd@gmail.com>
|
||||
Date: Mon, 1 Jun 2015 15:29:54 +0200
|
||||
Subject: [PATCH] Try to dynamically link against system ffmpeg when possible
|
||||
|
||||
---
|
||||
CMakeLists.txt | 192 ++++++++++++++++++++++++--------------------
|
||||
CMakeTests/FindFFMPEG.cmake | 167 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 271 insertions(+), 88 deletions(-)
|
||||
create mode 100644 CMakeTests/FindFFMPEG.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index eb66586..00cf33a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -98,6 +98,7 @@ option(UNITTEST "Set to ON to generate the unittest target" ${UNITTEST})
|
||||
option(SIMULATOR "Set to ON when targeting an x86 simulator of an ARM platform" ${SIMULATOR})
|
||||
# :: Options
|
||||
option(USE_FFMPEG "Build with FFMPEG support" ${USE_FFMPEG})
|
||||
+option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
|
||||
|
||||
if(ANDROID OR BLACKBERRY OR IOS)
|
||||
if (NOT CMAKE_TOOLCHAIN_FILE)
|
||||
@@ -411,96 +412,101 @@ add_library(stb_vorbis STATIC
|
||||
native/ext/stb_vorbis/stb_vorbis.h)
|
||||
include_directories(native/ext/stb_vorbis)
|
||||
|
||||
-if(USE_FFMPEG AND NOT DEFINED FFMPEG_BUILDDIR)
|
||||
- if(ANDROID)
|
||||
- if(ARMV7)
|
||||
- set(PLATFORM_ARCH "android/armv7")
|
||||
- elseif(ARM)
|
||||
- set(PLATFORM_ARCH "android/arm")
|
||||
- elseif(X86)
|
||||
- set(PLATFORM_ARCH "android/x86")
|
||||
- endif()
|
||||
- elseif(BLACKBERRY)
|
||||
- set(PLATFORM_ARCH "blackberry/armv7")
|
||||
- elseif(IOS)
|
||||
- set(PLATFORM_ARCH "ios/universal")
|
||||
- elseif(MACOSX)
|
||||
- set(PLATFORM_ARCH "macosx/x86_64")
|
||||
- elseif(LINUX)
|
||||
- if(ARMV7)
|
||||
- set(PLATFORM_ARCH "linux/armv7")
|
||||
- elseif(ARM)
|
||||
- set(PLATFORM_ARCH "linux/arm")
|
||||
- elseif(MIPS)
|
||||
- set(PLATFORM_ARCH "linux/mips32")
|
||||
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
- set(PLATFORM_ARCH "linux/x86_64")
|
||||
- else()
|
||||
- set(PLATFORM_ARCH "linux/x86")
|
||||
- endif()
|
||||
- endif()
|
||||
- # Using static libraries
|
||||
- if (DEFINED PLATFORM_ARCH)
|
||||
- include_directories(ffmpeg/${PLATFORM_ARCH}/include)
|
||||
- link_directories(ffmpeg/${PLATFORM_ARCH}/lib)
|
||||
- set(FFMPEG_LIBRARIES libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
|
||||
+if(USE_FFMPEG)
|
||||
+ if(USE_SYSTEM_FFMPEG)
|
||||
+ include(FindFFMPEG)
|
||||
else()
|
||||
- # Manual definition of system library locations by the user.
|
||||
- if (DEFINED FFMPEG_INCLUDE_PATH)
|
||||
- include_directories(ffmpeg ${FFMPEG_INCLUDE_PATH})
|
||||
- endif()
|
||||
- if (DEFINED AVFORMAT_PATH)
|
||||
+ set(FFMPEG_FOUND OFF)
|
||||
+ endif()
|
||||
+ if(NOT FFMPEG_FOUND)
|
||||
+ if(NOT DEFINED FFMPEG_BUILDDIR)
|
||||
+ if(ANDROID)
|
||||
+ if(ARMV7)
|
||||
+ set(PLATFORM_ARCH "android/armv7")
|
||||
+ elseif(ARM)
|
||||
+ set(PLATFORM_ARCH "android/arm")
|
||||
+ elseif(X86)
|
||||
+ set(PLATFORM_ARCH "android/x86")
|
||||
+ endif()
|
||||
+ elseif(BLACKBERRY)
|
||||
+ set(PLATFORM_ARCH "blackberry/armv7")
|
||||
+ elseif(IOS)
|
||||
+ set(PLATFORM_ARCH "ios/universal")
|
||||
+ elseif(MACOSX)
|
||||
+ set(PLATFORM_ARCH "macosx/x86_64")
|
||||
+ elseif(LINUX)
|
||||
+ if(ARMV7)
|
||||
+ set(PLATFORM_ARCH "linux/armv7")
|
||||
+ elseif(ARM)
|
||||
+ set(PLATFORM_ARCH "linux/arm")
|
||||
+ elseif(MIPS)
|
||||
+ set(PLATFORM_ARCH "linux/mips32")
|
||||
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
+ set(PLATFORM_ARCH "linux/x86_64")
|
||||
+ else()
|
||||
+ set(PLATFORM_ARCH "linux/x86")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ # Using static libraries
|
||||
+ if (DEFINED PLATFORM_ARCH)
|
||||
+ include_directories(ffmpeg/${PLATFORM_ARCH}/include)
|
||||
+ link_directories(ffmpeg/${PLATFORM_ARCH}/lib)
|
||||
+ set(FFMPEG_LIBRARIES libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
|
||||
+ else()
|
||||
+ # Manual definition of system library locations by the user.
|
||||
+ if (DEFINED FFMPEG_INCLUDE_PATH)
|
||||
+ include_directories(ffmpeg ${FFMPEG_INCLUDE_PATH})
|
||||
+ endif()
|
||||
+ if (DEFINED AVFORMAT_PATH)
|
||||
+ add_library(libavformat STATIC IMPORTED)
|
||||
+ set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${AVFORMAT_PATH})
|
||||
+ SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavformat)
|
||||
+ endif()
|
||||
+ if (DEFINED AVCODEC_PATH)
|
||||
+ add_library(libavcodec STATIC IMPORTED)
|
||||
+ set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${AVCODEC_PATH})
|
||||
+ SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavcodec)
|
||||
+ endif()
|
||||
+ if (DEFINED AVUTIL_PATH)
|
||||
+ add_library(libavutil STATIC IMPORTED)
|
||||
+ set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${AVUTIL_PATH})
|
||||
+ SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavutil)
|
||||
+ endif()
|
||||
+ if (DEFINED SWRESAMPLE_PATH)
|
||||
+ add_library(libswresample STATIC IMPORTED)
|
||||
+ set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${SWRESAMPLE_PATH})
|
||||
+ SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswresample)
|
||||
+ endif()
|
||||
+ if (DEFINED SWSCALE_PATH)
|
||||
+ add_library(libswscale STATIC IMPORTED)
|
||||
+ set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${SWSCALE_PATH})
|
||||
+ SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswscale)
|
||||
+ endif()
|
||||
+ endif(DEFINED PLATFORM_ARCH)
|
||||
+ else(NOT DEFINED FFMPEG_BUILDDIR)
|
||||
+ # Using shared libraries
|
||||
+ include_directories(ffmpeg ${FFMPEG_BUILDDIR})
|
||||
+
|
||||
add_library(libavformat STATIC IMPORTED)
|
||||
- set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${AVFORMAT_PATH})
|
||||
- SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavformat)
|
||||
- endif()
|
||||
- if (DEFINED AVCODEC_PATH)
|
||||
+ set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavformat/libavformat.a)
|
||||
add_library(libavcodec STATIC IMPORTED)
|
||||
- set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${AVCODEC_PATH})
|
||||
- SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavcodec)
|
||||
- endif()
|
||||
- if (DEFINED AVUTIL_PATH)
|
||||
+ set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavcodec/libavcodec.a)
|
||||
add_library(libavutil STATIC IMPORTED)
|
||||
- set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${AVUTIL_PATH})
|
||||
- SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavutil)
|
||||
- endif()
|
||||
- if (DEFINED SWRESAMPLE_PATH)
|
||||
+ set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavutil/libavutil.a)
|
||||
add_library(libswresample STATIC IMPORTED)
|
||||
- set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${SWRESAMPLE_PATH})
|
||||
- SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswresample)
|
||||
- endif()
|
||||
- if (DEFINED SWSCALE_PATH)
|
||||
+ set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswresample/libswresample.a)
|
||||
add_library(libswscale STATIC IMPORTED)
|
||||
- set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${SWSCALE_PATH})
|
||||
- SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswscale)
|
||||
- endif()
|
||||
- endif(DEFINED PLATFORM_ARCH)
|
||||
-endif(USE_FFMPEG AND NOT DEFINED FFMPEG_BUILDDIR)
|
||||
-
|
||||
-if(USE_FFMPEG)
|
||||
- # Using shared libraries
|
||||
- if(DEFINED FFMPEG_BUILDDIR)
|
||||
- include_directories(ffmpeg ${FFMPEG_BUILDDIR})
|
||||
-
|
||||
- add_library(libavformat STATIC IMPORTED)
|
||||
- set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavformat/libavformat.a)
|
||||
- add_library(libavcodec STATIC IMPORTED)
|
||||
- set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavcodec/libavcodec.a)
|
||||
- add_library(libavutil STATIC IMPORTED)
|
||||
- set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavutil/libavutil.a)
|
||||
- add_library(libswresample STATIC IMPORTED)
|
||||
- set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswresample/libswresample.a)
|
||||
- add_library(libswscale STATIC IMPORTED)
|
||||
- set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswscale/libswscale.a)
|
||||
-
|
||||
- SET (FFMPEG_LIBRARIES
|
||||
- libavformat
|
||||
- libavcodec
|
||||
- libavutil
|
||||
- libswresample
|
||||
- libswscale
|
||||
- )
|
||||
- endif()
|
||||
+ set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswscale/libswscale.a)
|
||||
+
|
||||
+ SET (FFMPEG_LIBRARIES
|
||||
+ libavformat
|
||||
+ libavcodec
|
||||
+ libavutil
|
||||
+ libswresample
|
||||
+ libswscale
|
||||
+ )
|
||||
+ endif(NOT DEFINED FFMPEG_BUILDDIR)
|
||||
+ endif(NOT FFMPEG_FOUND)
|
||||
|
||||
find_library(ICONV_LIBRARY NAMES iconv)
|
||||
if (ICONV_LIBRARY)
|
||||
@@ -514,15 +520,25 @@ if(USE_FFMPEG)
|
||||
endif()
|
||||
endif(APPLE)
|
||||
|
||||
- set(LinkCommon ${LinkCommon} ${FFMPEG_LIBRARIES})
|
||||
+ if(FFMPEG_FOUND)
|
||||
+ set(nativeExtraLibs ${nativeExtraLibs} ${FFMPEG_LIBRARIES})
|
||||
+ else()
|
||||
+ set(LinkCommon ${LinkCommon} ${FFMPEG_LIBRARIES})
|
||||
+ endif()
|
||||
+ target_link_libraries(Common ${FFMPEG_LIBRARIES})
|
||||
add_definitions(-DUSE_FFMPEG)
|
||||
endif(USE_FFMPEG)
|
||||
|
||||
# Modification to show where we are pulling the ffmpeg libraries from.
|
||||
if(USE_FFMPEG AND DEFINED FFMPEG_LIBRARIES)
|
||||
- target_link_libraries(Common ${FFMPEG_LIBRARIES})
|
||||
message(STATUS "FFMPEG library locations:")
|
||||
- if(DEFINED PLATFORM_ARCH)
|
||||
+ if(FFMPEG_FOUND)
|
||||
+ message(STATUS "libavcodec location: ${FFMPEG_avcodec_LIBRARY}")
|
||||
+ message(STATUS "libavformat location: ${FFMPEG_avformat_LIBRARY}")
|
||||
+ message(STATUS "libavutil location: ${FFMPEG_avutil_LIBRARY}")
|
||||
+ message(STATUS "libswresample location: ${FFMPEG_swresample_LIBRARY}")
|
||||
+ message(STATUS "libswscale location: ${FFMPEG_swscale_LIBRARY}")
|
||||
+ elseif(DEFINED PLATFORM_ARCH)
|
||||
set(TEMP ${CMAKE_SOURCE_DIR}/ffmpeg/${PLATFORM_ARCH}/lib)
|
||||
message(STATUS "libavcodec location: ${TEMP}/libavcodec.a")
|
||||
message(STATUS "libavformat location: ${TEMP}/libavformat.a")
|
||||
@@ -540,7 +556,7 @@ if(USE_FFMPEG AND DEFINED FFMPEG_LIBRARIES)
|
||||
message(STATUS "libswresample location: ${TEMP}")
|
||||
get_target_property(TEMP libswscale IMPORTED_LOCATION)
|
||||
message(STATUS "libswscale location: ${TEMP}")
|
||||
- endif(DEFINED PLATFORM_ARCH)
|
||||
+ endif()
|
||||
else()
|
||||
message(STATUS "ERROR: No FFMPEG library locations")
|
||||
endif()
|
||||
diff --git a/CMakeTests/FindFFMPEG.cmake b/CMakeTests/FindFFMPEG.cmake
|
||||
new file mode 100644
|
||||
index 0000000..8fac08f
|
||||
--- /dev/null
|
||||
+++ b/CMakeTests/FindFFMPEG.cmake
|
||||
@@ -0,0 +1,167 @@
|
||||
+# FindFFMPEG
|
||||
+# ----------
|
||||
+#
|
||||
+# Find the native FFMPEG includes and libraries
|
||||
+#
|
||||
+# This module defines:
|
||||
+#
|
||||
+# FFMPEG_INCLUDE_DIR, where to find avformat.h, avcodec.h...
|
||||
+# FFMPEG_LIBRARIES, the libraries to link against to use FFMPEG.
|
||||
+# FFMPEG_FOUND, If false, do not try to use FFMPEG.
|
||||
+#
|
||||
+# also defined, but not for general use are:
|
||||
+#
|
||||
+# FFMPEG_avformat_LIBRARY, where to find the FFMPEG avformat library.
|
||||
+# FFMPEG_avcodec_LIBRARY, where to find the FFMPEG avcodec library.
|
||||
+#
|
||||
+# This is useful to do it this way so that we can always add more libraries
|
||||
+# if needed to ``FFMPEG_LIBRARIES`` if ffmpeg ever changes...
|
||||
+
|
||||
+#=============================================================================
|
||||
+# Copyright: 1993-2008 Ken Martin, Will Schroeder, Bill Lorensen
|
||||
+#
|
||||
+# Distributed under the OSI-approved BSD License (the "License");
|
||||
+# see accompanying file Copyright.txt for details.
|
||||
+#
|
||||
+# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+# See the License for more information.
|
||||
+#=============================================================================
|
||||
+# (To distribute this file outside of ppsspp, substitute the full
|
||||
+# License text for the above reference.)
|
||||
+
|
||||
+find_path(FFMPEG_INCLUDE_DIR1 avformat.h
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/ffmpeg
|
||||
+ $ENV{FFMPEG_DIR}/libavformat
|
||||
+ $ENV{FFMPEG_DIR}/include/libavformat
|
||||
+ $ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
+ /usr/local/include/ffmpeg
|
||||
+ /usr/include/ffmpeg
|
||||
+ /usr/include/libavformat
|
||||
+ /usr/include/ffmpeg/libavformat
|
||||
+ /usr/local/include/libavformat
|
||||
+)
|
||||
+
|
||||
+find_path(FFMPEG_INCLUDE_DIR2 avcodec.h
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/ffmpeg
|
||||
+ $ENV{FFMPEG_DIR}/libavcodec
|
||||
+ $ENV{FFMPEG_DIR}/include/libavcodec
|
||||
+ $ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
+ /usr/local/include/ffmpeg
|
||||
+ /usr/include/ffmpeg
|
||||
+ /usr/include/libavcodec
|
||||
+ /usr/include/ffmpeg/libavcodec
|
||||
+ /usr/local/include/libavcodec
|
||||
+)
|
||||
+
|
||||
+find_path(FFMPEG_INCLUDE_DIR3 avutil.h
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/ffmpeg
|
||||
+ $ENV{FFMPEG_DIR}/libavutil
|
||||
+ $ENV{FFMPEG_DIR}/include/libavutil
|
||||
+ $ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
+ /usr/local/include/ffmpeg
|
||||
+ /usr/include/ffmpeg
|
||||
+ /usr/include/libavutil
|
||||
+ /usr/include/ffmpeg/libavutil
|
||||
+ /usr/local/include/libavutil
|
||||
+)
|
||||
+
|
||||
+find_path(FFMPEG_INCLUDE_DIR4 swresample.h
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/ffmpeg
|
||||
+ $ENV{FFMPEG_DIR}/libswresample
|
||||
+ $ENV{FFMPEG_DIR}/include/libswresample
|
||||
+ $ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
+ /usr/local/include/ffmpeg
|
||||
+ /usr/include/ffmpeg
|
||||
+ /usr/include/libswresample
|
||||
+ /usr/include/ffmpeg/libswresample
|
||||
+ /usr/local/include/libswresample
|
||||
+)
|
||||
+
|
||||
+find_path(FFMPEG_INCLUDE_DIR5 swscale.h
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/ffmpeg
|
||||
+ $ENV{FFMPEG_DIR}/libswscale
|
||||
+ $ENV{FFMPEG_DIR}/include/libswscale
|
||||
+ $ENV{FFMPEG_DIR}/include/ffmpeg
|
||||
+ /usr/local/include/ffmpeg
|
||||
+ /usr/include/ffmpeg
|
||||
+ /usr/include/libswscale
|
||||
+ /usr/include/ffmpeg/libswscale
|
||||
+ /usr/local/include/libswscale
|
||||
+)
|
||||
+
|
||||
+if(FFMPEG_INCLUDE_DIR1 AND
|
||||
+ FFMPEG_INCLUDE_DIR2 AND
|
||||
+ FFMPEG_INCLUDE_DIR3 AND
|
||||
+ FFMPEG_INCLUDE_DIR4 AND
|
||||
+ FFMPEG_INCLUDE_DIR5
|
||||
+)
|
||||
+ set(FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR1}
|
||||
+ ${FFMPEG_INCLUDE_DIR2}
|
||||
+ ${FFMPEG_INCLUDE_DIR3}
|
||||
+ ${FFMPEG_INCLUDE_DIR4}
|
||||
+ ${FFMPEG_INCLUDE_DIR5}
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
+find_library(FFMPEG_avformat_LIBRARY avformat
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/lib
|
||||
+ $ENV{FFMPEG_DIR}/libavformat
|
||||
+ /usr/local/lib
|
||||
+ /usr/lib
|
||||
+)
|
||||
+
|
||||
+find_library(FFMPEG_avcodec_LIBRARY avcodec
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/lib
|
||||
+ $ENV{FFMPEG_DIR}/libavcodec
|
||||
+ /usr/local/lib
|
||||
+ /usr/lib
|
||||
+)
|
||||
+
|
||||
+find_library(FFMPEG_avutil_LIBRARY avutil
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/lib
|
||||
+ $ENV{FFMPEG_DIR}/libavutil
|
||||
+ /usr/local/lib
|
||||
+ /usr/lib
|
||||
+)
|
||||
+
|
||||
+find_library(FFMPEG_swresample_LIBRARY swresample
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/lib
|
||||
+ $ENV{FFMPEG_DIR}/libswresample
|
||||
+ /usr/local/lib
|
||||
+ /usr/lib
|
||||
+)
|
||||
+
|
||||
+find_library(FFMPEG_swscale_LIBRARY swscale
|
||||
+ $ENV{FFMPEG_DIR}
|
||||
+ $ENV{FFMPEG_DIR}/lib
|
||||
+ $ENV{FFMPEG_DIR}/libswscale
|
||||
+ /usr/local/lib
|
||||
+ /usr/lib
|
||||
+)
|
||||
+
|
||||
+if(FFMPEG_INCLUDE_DIR)
|
||||
+ if(FFMPEG_avformat_LIBRARY AND
|
||||
+ FFMPEG_avcodec_LIBRARY AND
|
||||
+ FFMPEG_avutil_LIBRARY AND
|
||||
+ FFMPEG_swresample_LIBRARY AND
|
||||
+ FFMPEG_swscale_LIBRARY
|
||||
+ )
|
||||
+ set(FFMPEG_FOUND "YES")
|
||||
+ set(FFMPEG_LIBRARIES ${FFMPEG_avformat_LIBRARY}
|
||||
+ ${FFMPEG_avcodec_LIBRARY}
|
||||
+ ${FFMPEG_avutil_LIBRARY}
|
||||
+ ${FFMPEG_swresample_LIBRARY}
|
||||
+ ${FFMPEG_swscale_LIBRARY}
|
||||
+ )
|
||||
+ endif()
|
||||
+endif()
|
||||
--
|
||||
2.4.2
|
||||
|
40
ppsspp-gcc5.1.patch
Normal file
40
ppsspp-gcc5.1.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
diff -rupN ppsspp.orig/ext/xbrz/xbrz.cpp ppsspp/ext/xbrz/xbrz.cpp
|
||||
--- ppsspp.orig/ext/xbrz/xbrz.cpp 2015-06-01 14:16:20.005738417 +0200
|
||||
+++ ppsspp/ext/xbrz/xbrz.cpp 2015-06-01 14:21:30.365765974 +0200
|
||||
@@ -648,23 +648,21 @@ void scalePixel(const Kernel_3x3& ker,
|
||||
auto eq = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_) < cfg.equalColorTolerance_; };
|
||||
auto dist = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_); };
|
||||
|
||||
- const bool doLineBlend = [&]() -> bool
|
||||
- {
|
||||
- if (getBottomR(blend) >= BLEND_DOMINANT)
|
||||
- return true;
|
||||
+ bool doLineBlend;
|
||||
|
||||
- //make sure there is no second blending in an adjacent rotation for this pixel: handles insular pixels, mario eyes
|
||||
- if (getTopR(blend) != BLEND_NONE && !eq(e, g)) //but support double-blending for 90° corners
|
||||
- return false;
|
||||
- if (getBottomL(blend) != BLEND_NONE && !eq(e, c))
|
||||
- return false;
|
||||
+ if (getBottomR(blend) >= BLEND_DOMINANT)
|
||||
+ doLineBlend = true;
|
||||
|
||||
- //no full blending for L-shapes; blend corner only (handles "mario mushroom eyes")
|
||||
- if (!eq(e, i) && eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c))
|
||||
- return false;
|
||||
-
|
||||
- return true;
|
||||
- }();
|
||||
+ //make sure there is no second blending in an adjacent rotation for this pixel: handles insular pixels, mario eyes
|
||||
+ else if (getTopR(blend) != BLEND_NONE && !eq(e, g)) //but support double-blending for 90° corners
|
||||
+ doLineBlend = false;
|
||||
+ else if (getBottomL(blend) != BLEND_NONE && !eq(e, c))
|
||||
+ doLineBlend = false;
|
||||
+ //no full blending for L-shapes; blend corner only (handles "mario mushroom eyes")
|
||||
+ else if (!eq(e, i) && eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c))
|
||||
+ doLineBlend = false;
|
||||
+ else
|
||||
+ doLineBlend = true;
|
||||
|
||||
const uint32_t px = dist(e, f) <= dist(e, h) ? f : h; //choose most similar color
|
||||
|
Loading…
Reference in New Issue
Block a user