From e9324589df11e022364898997009bcfb8033a027 Mon Sep 17 00:00:00 2001 From: Maxime Gauduin Date: Mon, 15 Jun 2015 11:46:13 +0200 Subject: [PATCH] Fix: ppsspp-git 1.0.1.r599.0597b92 Patch merged upstream --- .SRCINFO | 4 +- PKGBUILD | 5 +- ppsspp-ffmpeg.patch | 423 -------------------------------------------- 3 files changed, 2 insertions(+), 430 deletions(-) delete mode 100644 ppsspp-ffmpeg.patch diff --git a/.SRCINFO b/.SRCINFO index cdfd981..1115ecb 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = ppsspp-git pkgdesc = A PSP emulator written in C++ - pkgver = 1.0.1.r559.403f6ab + pkgver = 1.0.1.r599.0597b92 pkgrel = 1 url = http://www.ppsspp.org/ arch = i686 @@ -16,13 +16,11 @@ pkgbase = 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 diff --git a/PKGBUILD b/PKGBUILD index fd4bda9..bfa5487 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -7,7 +7,7 @@ pkgbase=ppsspp-git pkgname=('ppsspp-git' 'ppsspp-qt-git') -pkgver=1.0.1.r559.403f6ab +pkgver=1.0.1.r599.0597b92 pkgrel=1 pkgdesc='A PSP emulator written in C++' arch=('i686' 'x86_64') @@ -19,13 +19,11 @@ 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() { @@ -43,7 +41,6 @@ prepare() { git submodule update ${submodule} done - patch -Np1 -i ../ppsspp-ffmpeg.patch patch -Np1 -i ../ppsspp-gcc5.1.patch } diff --git a/ppsspp-ffmpeg.patch b/ppsspp-ffmpeg.patch deleted file mode 100644 index 87d2780..0000000 --- a/ppsspp-ffmpeg.patch +++ /dev/null @@ -1,423 +0,0 @@ -From 983ae517e17a635e21a84a8abdff338e1805f33b Mon Sep 17 00:00:00 2001 -From: Maxime Gauduin -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 -