From 46862a9c2196514f50fe400c74aa21cfc109ab80 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 4 Sep 2021 21:16:14 +1000
Subject: [PATCH] libopenshot: bump version
---
...-0.2.5.recipe => libopenshot-0.2.6.recipe} | 13 +-
.../patches/libopenshot-0.2.5.patchset | 128 ------------------
.../patches/libopenshot-0.2.6.patchset | 88 ++++++++++++
3 files changed, 96 insertions(+), 133 deletions(-)
rename media-libs/libopenshot/{libopenshot-0.2.5.recipe => libopenshot-0.2.6.recipe} (93%)
delete mode 100644 media-libs/libopenshot/patches/libopenshot-0.2.5.patchset
create mode 100644 media-libs/libopenshot/patches/libopenshot-0.2.6.patchset
diff --git a/media-libs/libopenshot/libopenshot-0.2.5.recipe b/media-libs/libopenshot/libopenshot-0.2.6.recipe
similarity index 93%
rename from media-libs/libopenshot/libopenshot-0.2.5.recipe
rename to media-libs/libopenshot/libopenshot-0.2.6.recipe
index 02b398c28..431e701d1 100644
--- a/media-libs/libopenshot/libopenshot-0.2.5.recipe
+++ b/media-libs/libopenshot/libopenshot-0.2.6.recipe
@@ -4,11 +4,11 @@ dedicated to delivering high quality video editing, animation, and playback \
solutions to the world. This is the same library which powers \
OpenShot Video Editor (version 2.0+). C++, Python are fully supported."
HOMEPAGE="https://www.openshot.org/"
-COPYRIGHT="2008-2020 OpenShot Studios, LLC"
+COPYRIGHT="2008-2021 OpenShot Studios, LLC"
LICENSE="GNU LGPL v3"
-REVISION="4"
+REVISION="1"
SOURCE_URI="https://github.com/OpenShot/libopenshot/archive/v$portVersion.tar.gz"
-CHECKSUM_SHA256="8ae7d226fbd2efbc84da4f7d9d8c7f3cc9616e4de46e1233e3b0a84ac0a429bc"
+CHECKSUM_SHA256="3e6f60c86748ea814a9c0c48e5a59c5b04a5876a43b763258d0dd3f6ae84fde8"
SOURCE_FILENAME="libopenshot-$portVersion.tar.gz"
PATCHES="libopenshot-$portVersion.patchset"
@@ -16,7 +16,7 @@ ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PYTHON_VERSION="3.8"
-libVersion="17"
+libVersion="20"
PROVIDES="
libopenshot$secondaryArchSuffix = $portVersion
@@ -84,6 +84,7 @@ BUILD_REQUIRES="
devel:libexecinfo$secondaryArchSuffix
devel:libjsoncpp$secondaryArchSuffix
devel:libMagick++_6.Q16$secondaryArchSuffix
+ devel:libopencv_core$secondaryArchSuffix
devel:libopenshot_audio$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
@@ -92,6 +93,7 @@ BUILD_REQUIRES="
devel:libswresample$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libzmq$secondaryArchSuffix
+ devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
@@ -139,7 +141,8 @@ INSTALL()
pythonLocation=$prefix/lib/python$pythonVersion
installLocation=$pythonLocation/vendor-packages
pythonDebugInfoDir=$(getPackagePrefix python38_debuginfo)/$relativeDebugInfoDir
- mv $pythonLocation/dist-packages $pythonLocation/vendor-packages
+ mkdir -p $pythonLocation
+ mv $libDir/python/po/vendor-packages $pythonLocation
extractDebugInfo $installLocation/_openshot.so \
"$pythonDebugInfoDir/_openshot.so(libopenshot_python38-$portFullVersion).debuginfo"
# python package
diff --git a/media-libs/libopenshot/patches/libopenshot-0.2.5.patchset b/media-libs/libopenshot/patches/libopenshot-0.2.5.patchset
deleted file mode 100644
index 5d65f516a..000000000
--- a/media-libs/libopenshot/patches/libopenshot-0.2.5.patchset
+++ /dev/null
@@ -1,128 +0,0 @@
-From e901218528cd2e092f64dc68cf2f07364fd83124 Mon Sep 17 00:00:00 2001
-From: Gerasim Troeglazov <3dEyes@gmail.com>
-Date: Sat, 2 May 2020 21:02:14 +1000
-Subject: Fix build for Haiku
-
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 470db45..54a3313 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -38,6 +38,7 @@ For more information, please visit .
-
- ################ ADD CMAKE MODULES ##################
- set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
-+include(GNUInstallDirs)
-
- ################ PROJECT VERSION ####################
- set(PROJECT_VERSION_FULL "0.2.5")
-diff --git a/include/FFmpegUtilities.h b/include/FFmpegUtilities.h
-index 62d64df..f107ccf 100644
---- a/include/FFmpegUtilities.h
-+++ b/include/FFmpegUtilities.h
-@@ -45,6 +45,10 @@
- #define HAVE_HW_ACCEL (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 107, 100))
- #endif
-
-+ #ifdef __HAIKU__
-+ #undef HAVE_HW_ACCEL
-+ #endif
-+
- // Include the FFmpeg headers
- extern "C" {
- #include
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index a544982..9f527ae 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -77,7 +77,7 @@ ENDIF (ImageMagick_FOUND)
-
- ################# LIBOPENSHOT-AUDIO ###################
- # Find JUCE-based openshot Audio libraries
--FIND_PACKAGE(OpenShotAudio 0.2.0 REQUIRED)
-+FIND_PACKAGE(OpenShotAudio REQUIRED)
-
- # Include Juce headers (needed for compile)
- include_directories(${LIBOPENSHOT_AUDIO_INCLUDE_DIRS})
-@@ -426,13 +426,13 @@ set(LIB_INSTALL_DIR lib${LIB_SUFFIX}) # determine correct lib folder
-
- # Install primary library
- INSTALL(TARGETS openshot
-- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-- RUNTIME DESTINATION ${LIB_INSTALL_DIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT library )
-
- INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/
-- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/libopenshot
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot
- FILES_MATCHING PATTERN "*.h")
-
- ############### CPACK PACKAGING ##############
-diff --git a/src/CrashHandler.cpp b/src/CrashHandler.cpp
-index 1782f5b..1d8d54c 100644
---- a/src/CrashHandler.cpp
-+++ b/src/CrashHandler.cpp
-@@ -200,7 +200,7 @@ void CrashHandler::printStackTrace(FILE *out, unsigned int max_frames)
- }
- SymCleanup(process);
-
--#else
-+#elif !defined(__HAIKU__)
- // Linux and Mac stack unwinding
- // Storage array for stack trace address data
- void* addrlist[max_frames+1];
-@@ -320,4 +320,4 @@ void CrashHandler::printStackTrace(FILE *out, unsigned int max_frames)
-
- fprintf(out, "---- End of Stack Trace ----\n");
- ZmqLogger::Instance()->LogToFile("---- End of Stack Trace ----\n");
--}
-\ No newline at end of file
-+}
-diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
-index 21405f6..c1f48b8 100644
---- a/src/bindings/python/CMakeLists.txt
-+++ b/src/bindings/python/CMakeLists.txt
-@@ -90,9 +90,11 @@ print( get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' ) )"
-
- GET_FILENAME_COMPONENT(_ABS_PYTHON_MODULE_PATH
- "${_ABS_PYTHON_MODULE_PATH}" ABSOLUTE)
-+IF (NOT HAIKU)
- FILE(RELATIVE_PATH _REL_PYTHON_MODULE_PATH
- ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH})
- SET(PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH})
-+ENDIF(NOT HAIKU)
- endif()
- message("PYTHON_MODULE_PATH: ${PYTHON_MODULE_PATH}")
-
---
-2.30.0
-
-
-From 9044a47bf07689978e659e05aab620ccf2615463 Mon Sep 17 00:00:00 2001
-From: Jerome Duval
-Date: Tue, 26 Jan 2021 19:11:27 +0100
-Subject: Force python 3.8
-
-
-diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
-index c1f48b8..14bda02 100644
---- a/src/bindings/python/CMakeLists.txt
-+++ b/src/bindings/python/CMakeLists.txt
-@@ -37,8 +37,8 @@ if (POLICY CMP0086)
- cmake_policy(SET CMP0086 OLD)
- endif()
-
--FIND_PACKAGE(PythonInterp 3)
--FIND_PACKAGE(PythonLibs 3)
-+FIND_PACKAGE(PythonInterp 3.8)
-+FIND_PACKAGE(PythonLibs 3.8)
- if (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
-
- ### Include Python header files
---
-2.30.0
-
diff --git a/media-libs/libopenshot/patches/libopenshot-0.2.6.patchset b/media-libs/libopenshot/patches/libopenshot-0.2.6.patchset
new file mode 100644
index 000000000..c2953b8ad
--- /dev/null
+++ b/media-libs/libopenshot/patches/libopenshot-0.2.6.patchset
@@ -0,0 +1,88 @@
+From fafdb707b395355e481d86cfdd1a54a0c01148e2 Mon Sep 17 00:00:00 2001
+From: Gerasim Troeglazov <3dEyes@gmail.com>
+Date: Tue, 31 Aug 2021 21:23:36 +1000
+Subject: Fix build for Haiku
+
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a36eed2..a1022b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,6 +38,7 @@ For more information, please visit .
+
+ ################ ADD CMAKE MODULES ##################
+ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
++include(GNUInstallDirs)
+
+ ################ PROJECT VERSION ####################
+ set(PROJECT_VERSION_FULL "0.2.6")
+diff --git a/src/CrashHandler.cpp b/src/CrashHandler.cpp
+index 7b6c4e7..6acb8df 100644
+--- a/src/CrashHandler.cpp
++++ b/src/CrashHandler.cpp
+@@ -200,7 +200,7 @@ void CrashHandler::printStackTrace(FILE *out, unsigned int max_frames)
+ }
+ SymCleanup(process);
+
+-#else
++#elif !defined(__HAIKU__)
+ // Linux and Mac stack unwinding
+ // Storage array for stack trace address data
+ void* addrlist[max_frames+1];
+@@ -320,4 +320,4 @@ void CrashHandler::printStackTrace(FILE *out, unsigned int max_frames)
+
+ fprintf(out, "---- End of Stack Trace ----\n");
+ ZmqLogger::Instance()->LogToFile("---- End of Stack Trace ----\n");
+-}
+\ No newline at end of file
++}
+diff --git a/src/AudioBufferSource.h b/src/AudioBufferSource.h
+index a899d8d..225de2e 100644
+--- a/src/AudioBufferSource.h
++++ b/src/AudioBufferSource.h
+@@ -32,6 +32,7 @@
+ #define OPENSHOT_AUDIOBUFFERSOURCE_H
+
+ #include
++#include
+ #include
+
+ /// This namespace is the default namespace for all code in the openshot library
+diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp
+index c1eaa74..6d676ad 100644
+--- a/src/FFmpegReader.cpp
++++ b/src/FFmpegReader.cpp
+@@ -362,7 +362,7 @@ void FFmpegReader::Open() {
+ if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) {
+ #elif defined(_WIN32)
+ if( adapter_ptr != NULL ) {
+-#elif defined(__APPLE__)
++#elif defined(__APPLE__) || defined(__HAIKU__)
+ if( adapter_ptr != NULL ) {
+ #endif
+ ZmqLogger::Instance()->AppendDebugMethod("Decode Device present using device");
+diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp
+index 8707756..6631950 100644
+--- a/src/FFmpegWriter.cpp
++++ b/src/FFmpegWriter.cpp
+@@ -1404,7 +1404,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) {
+ snprintf(adapter,sizeof(adapter),"/dev/dri/renderD%d", adapter_num+128);
+ // Maybe 127 is better because the first card would be 1?!
+ adapter_ptr = adapter;
+-#elif defined(_WIN32) || defined(__APPLE__)
++#elif defined(_WIN32) || defined(__APPLE__) || defined(__HAIKU__)
+ adapter_ptr = NULL;
+ #endif
+ }
+@@ -1414,7 +1414,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) {
+ // Check if it is there and writable
+ #if defined(__linux__)
+ if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) {
+-#elif defined(_WIN32) || defined(__APPLE__)
++#elif defined(_WIN32) || defined(__APPLE__) || defined(__HAIKU__)
+ if( adapter_ptr != NULL ) {
+ #endif
+ ZmqLogger::Instance()->AppendDebugMethod("Encode Device present using device", "adapter", adapter_num);
+--
+2.30.2
+