diff options
author | jbeich <jbeich@FreeBSD.org> | 2015-05-28 06:54:35 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2015-05-28 06:54:35 +0800 |
commit | f2c3a5fdc7178c15d92403a3a4e177462c502f09 (patch) | |
tree | 7fa433784df7db4eb9bc8fdf43a7b01365dca254 /emulators | |
parent | afa2b69c49c7fb453dcaf81968b95d0728ee0828 (diff) | |
download | freebsd-ports-gnome-f2c3a5fdc7178c15d92403a3a4e177462c502f09.tar.gz freebsd-ports-gnome-f2c3a5fdc7178c15d92403a3a4e177462c502f09.tar.zst freebsd-ports-gnome-f2c3a5fdc7178c15d92403a3a4e177462c502f09.zip |
emulators/ppsspp: switch SDL=on to system libpng
Do not wait for upstream release if a vulnerability is found. [1]
QT* already use system libpng via QImage in x11-toolkits/qt*-gui.
GitHub: hrydgard/native#273 [1]
Security: CVE-2014-9495 [1]
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/ppsspp/Makefile | 4 | ||||
-rw-r--r-- | emulators/ppsspp/files/patch-CMakeLists.txt | 14 | ||||
-rw-r--r-- | emulators/ppsspp/files/patch-Core_Screenshot.cpp | 11 | ||||
-rw-r--r-- | emulators/ppsspp/files/patch-native_image_png__load.cpp | 11 |
4 files changed, 39 insertions, 1 deletions
diff --git a/emulators/ppsspp/Makefile b/emulators/ppsspp/Makefile index 6c19f4774aaf..27872cb8b00c 100644 --- a/emulators/ppsspp/Makefile +++ b/emulators/ppsspp/Makefile @@ -3,7 +3,7 @@ PORTNAME= ppsspp PORTVERSION= 1.0.1 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators .ifndef GITHUB_GROUPS MASTER_SITES= https://codeload.github.com/${GH_ACCOUNT}/${PORTNAME}-lang/tar.gz/52c757e?dummy=/:lang \ @@ -52,6 +52,8 @@ QT4_USE= QT4=qmake_build,moc_build,rcc_build,uic_build,linguisttools_build,gui,o QT5_USES= qmake:outsource QT5_USE= QT5=qmake_build,buildtools_build,linguisttools_build,gui,opengl,widgets SDL_USES= cmake:outsource ninja +SDL_BUILD_DEPENDS= png>=1.6:${PORTSDIR}/graphics/png +SDL_LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png SDL_LDFLAGS= -L${LOCALBASE}/lib # ffmpeg .include <bsd.port.options.mk> diff --git a/emulators/ppsspp/files/patch-CMakeLists.txt b/emulators/ppsspp/files/patch-CMakeLists.txt index f18627ac98e1..8d992e6a3469 100644 --- a/emulators/ppsspp/files/patch-CMakeLists.txt +++ b/emulators/ppsspp/files/patch-CMakeLists.txt @@ -20,3 +20,17 @@ add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64) endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +@@ -525,9 +527,10 @@ target_link_libraries(libzip ${ZLIB_LIBR + include_directories(native/ext/libzip) + set(LIBZIP_LIBRARY libzip) + +-# FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17 +-find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h") +-find_library(PNG_LIBRARY NAMES png17 libpng17) ++find_package(PkgConfig) ++pkg_check_modules(PNG libpng>=1.6) ++set(PNG_LIBRARY ${PNG_LIBRARIES}) ++set(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS}) + find_package(PackageHandleStandardArgs) + find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR) + if (PNG_FOUND) diff --git a/emulators/ppsspp/files/patch-Core_Screenshot.cpp b/emulators/ppsspp/files/patch-Core_Screenshot.cpp new file mode 100644 index 000000000000..91e42f3f2534 --- /dev/null +++ b/emulators/ppsspp/files/patch-Core_Screenshot.cpp @@ -0,0 +1,11 @@ +--- Core/Screenshot.cpp.orig 2015-02-26 20:05:06 UTC ++++ Core/Screenshot.cpp +@@ -18,7 +18,7 @@ + #ifdef USING_QT_UI + #include <QtGui/QImage> + #else +-#include <libpng17/png.h> ++#include "png.h" + #include "ext/jpge/jpge.h" + #endif + diff --git a/emulators/ppsspp/files/patch-native_image_png__load.cpp b/emulators/ppsspp/files/patch-native_image_png__load.cpp new file mode 100644 index 000000000000..f652e4bf4946 --- /dev/null +++ b/emulators/ppsspp/files/patch-native_image_png__load.cpp @@ -0,0 +1,11 @@ +--- native/image/png_load.cpp.orig 2015-02-23 23:22:58 UTC ++++ native/image/png_load.cpp +@@ -5,7 +5,7 @@ + #ifdef USING_QT_UI + #include <QtGui/QImage> + #else +-#include "libpng17/png.h" ++#include "png.h" + #endif + + #include "png_load.h" |