diff --git a/multimedia/libopenshot/Makefile b/multimedia/libopenshot/Makefile index 6fd8fa9c29a7..241fdbbe76f9 100644 --- a/multimedia/libopenshot/Makefile +++ b/multimedia/libopenshot/Makefile @@ -1,67 +1,68 @@ PORTNAME= libopenshot DISTVERSIONPREFIX= v -DISTVERSION= 0.3.0 -PORTREVISION= 2 +DISTVERSION= 0.3.1 CATEGORIES= multimedia PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= tatsuki_makino@hotmail.com COMMENT= OpenShot Video Library WWW= https://www.openshot.org/ LICENSE= BSD3CLAUSE LGPL3+ LICENSE_COMB= multi LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/LICENSES/BSD-3-Clause.txt -LICENSE_FILE_LGPL3+ = ${WRKSRC}/LICENSES/LGPL-3.0-or-later.txt +LICENSE_FILE_LGPL3+ = ${WRKSRC}/COPYING BUILD_DEPENDS= swig:devel/swig \ ${LOCALBASE}/include/zmq.hpp:net/cppzmq LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ libbabl-0.1.so:x11/babl \ libjsoncpp.so:devel/jsoncpp \ libopenshot-audio.so:audio/libopenshot-audio \ libzmq.so:net/libzmq4 -USES= cmake pkgconfig python qt:5 +USES= cmake pkgconfig python:build qt:5 USE_GITHUB= yes GH_ACCOUNT= OpenShot USE_LDCONFIG= yes USE_PYTHON= flavors USE_QT= core gui widgets buildtools:build qmake:build CMAKE_ON= USE_SYSTEM_JSONCPP DISABLE_BUNDLED_JSONCPP\ USE_HW_ACCEL ENABLE_PYTHON\ - CMAKE_DISABLE_FIND_PACKAGE_Catch2\ - CMAKE_DISABLE_FIND_PACKAGE_Ruby + CMAKE_DISABLE_FIND_PACKAGE_Catch2 CMAKE_OFF= ENABLE_PARALLEL_CTEST VERBOSE_TESTS ENABLE_COVERAGE\ - APPIMAGE_BUILD BUILD_TESTING ENABLE_TESTS ENABLE_RUBY + APPIMAGE_BUILD BUILD_TESTING ENABLE_TESTS -OPTIONS_DEFINE= DOCS IMAGEMAGICK OPENCV RESVG +OPTIONS_DEFINE= DOCS IMAGEMAGICK OPENCV RESVG RUBY OPTIONS_DEFAULT= IMAGEMAGICK OPENCV OPTIONS_SUB= yes RESVG_DESC?= SVG vector graphics support via resvg DOCS_BUILD_DEPENDS= doxygen:devel/doxygen DOCS_CMAKE_BOOL= ENABLE_LIB_DOCS DOCS_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Doxygen DOCS_CMAKE_ON= -DCMAKE_INSTALL_DOCDIR:PATH=${DOCSDIR_REL:Q} DOCS_PORTDOCS= * IMAGEMAGICK_USES= magick IMAGEMAGICK_CMAKE_BOOL= ENABLE_MAGICK IMAGEMAGICK_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_ImageMagick OPENCV_LIB_DEPENDS= libopencv_core.so:graphics/opencv \ libprotobuf.so:devel/protobuf OPENCV_CMAKE_BOOL= ENABLE_OPENCV OPENCV_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_OpenCV\ CMAKE_DISABLE_FIND_PACKAGE_Protobuf OPENCV_CMAKE_ON= -DOpenCV_DIR:STRING=${LOCALBASE:Q}/cmake/opencv4 RESVG_LIB_DEPENDS= libresvg.so:graphics/resvg-capi RESVG_USE_OFF= QT=svg RESVG_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Resvg RESVG_CMAKE_ON= -DRESVGDIR:STRING=${LOCALBASE:Q} +RUBY_USES= ruby:build +RUBY_CMAKE_BOOL= ENABLE_RUBY +RUBY_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Ruby .if !exists(/usr/include/omp.h) USES+= compiler:gcc-c++11-lib .else USES+= compiler:c++14-lang .endif .include diff --git a/multimedia/libopenshot/distinfo b/multimedia/libopenshot/distinfo index de668a7db0c6..221087b79125 100644 --- a/multimedia/libopenshot/distinfo +++ b/multimedia/libopenshot/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1670814000 -SHA256 (OpenShot-libopenshot-v0.3.0_GH0.tar.gz) = 5b289432b1209f11fe60c17c07e9365ab62e3074dcc7d50996fc816dfe54a282 -SIZE (OpenShot-libopenshot-v0.3.0_GH0.tar.gz) = 26122831 +TIMESTAMP = 1681095600 +SHA256 (OpenShot-libopenshot-v0.3.1_GH0.tar.gz) = 239f9df1f5b547257d5e76062c3177ff3ff372b8cda336637d752141a5a8e625 +SIZE (OpenShot-libopenshot-v0.3.1_GH0.tar.gz) = 26131959 diff --git a/multimedia/libopenshot/files/patch-src_CMakeLists.txt b/multimedia/libopenshot/files/patch-src_CMakeLists.txt index fe66e19d8c7b..c94d5a8ab374 100644 --- a/multimedia/libopenshot/files/patch-src_CMakeLists.txt +++ b/multimedia/libopenshot/files/patch-src_CMakeLists.txt @@ -1,16 +1,21 @@ ---- src/CMakeLists.txt.orig 2022-12-01 22:04:03 UTC +--- src/CMakeLists.txt.orig 2023-03-27 18:48:43 UTC +++ src/CMakeLists.txt -@@ -516,6 +516,13 @@ See https://github.com/opencv/opencv/issues/19260]]) +@@ -516,6 +516,18 @@ See https://github.com/opencv/opencv/issues/19260]]) endif() # ENABLE_OPENCV add_feature_info("OpenCV algorithms" ENABLE_OPENCV "Use OpenCV algorithms") +# EXECINFO -+find_library(EXECINFO_LIBRARY NAMES execinfo) -+if(NOT EXECINFO_LIBRARY) -+ message(FATAL_ERROR "${EXECINFO_LIBRARY}") -+endif(NOT EXECINFO_LIBRARY) -+target_link_libraries(openshot PRIVATE ${EXECINFO_LIBRARY}) ++include(CheckFunctionExists) ++check_function_exists("backtrace" FUNCTION_BACKTRACE_FOUND) ++if(NOT FUNCTION_BACKTRACE_FOUND) ++ find_library(EXECINFO_LIBRARY NAMES execinfo) ++ if(NOT EXECINFO_LIBRARY) ++ message(FATAL_ERROR "${EXECINFO_LIBRARY}") ++ endif(NOT EXECINFO_LIBRARY) ++ target_link_libraries(openshot PRIVATE ${EXECINFO_LIBRARY}) ++endif(NOT FUNCTION_BACKTRACE_FOUND) ++unset(FUNCTION_BACKTRACE_FOUND) + ############### LINK LIBRARY ################# # Link remaining dependency libraries if(DEFINED PROFILER) diff --git a/multimedia/libopenshot/files/patch-src_CrashHandler.cpp b/multimedia/libopenshot/files/patch-src_CrashHandler.cpp new file mode 100644 index 000000000000..68352051a92e --- /dev/null +++ b/multimedia/libopenshot/files/patch-src_CrashHandler.cpp @@ -0,0 +1,19 @@ +--- src/CrashHandler.cpp.orig 2023-03-27 18:48:43 UTC ++++ src/CrashHandler.cpp +@@ -204,14 +204,14 @@ void CrashHandler::printStackTrace(FILE *out, unsigned + // Resolve addresses into strings containing "filename(function+address)", + // Actually it will be ## program address function + offset + // this array must be free()-ed +- char** symbollist = backtrace_symbols( addrlist, addrlen ); ++ char** symbollist = backtrace_symbols_fmt( addrlist, addrlen, "%f(%n%D) [%a]" ); + + size_t funcnamesize = 1024; + char funcname[1024]; + + // Iterate over the returned symbol lines. Skip the first 4, it is the + // address of this function. +- for ( unsigned int i = 4; i < addrlen; i++ ) ++ for ( unsigned int i = 1; i < addrlen; i++ ) + { + char* begin_name = NULL; + char* begin_offset = NULL; diff --git a/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp b/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp index 827ea05a2821..369816073bd3 100644 --- a/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp +++ b/multimedia/libopenshot/files/patch-src_FFmpegWriter.cpp @@ -1,65 +1,65 @@ ---- src/FFmpegWriter.cpp.orig 2022-12-01 22:04:03 UTC +--- src/FFmpegWriter.cpp.orig 2023-03-27 18:48:43 UTC +++ src/FFmpegWriter.cpp @@ -166,7 +166,7 @@ void FFmpegWriter::SetVideoOptions(bool has_video, std const AVCodec *new_codec; // Check if the codec selected is a hardware accelerated codec #if USE_HW_ACCEL -#if defined(__linux__) +#if defined(__unix__) if (strstr(codec.c_str(), "_vaapi") != NULL) { new_codec = avcodec_find_encoder_by_name(codec.c_str()); hw_en_on = 1; @@ -216,7 +216,7 @@ void FFmpegWriter::SetVideoOptions(bool has_video, std } #else // unknown OS new_codec = avcodec_find_encoder_by_name(codec.c_str()); -#endif //__linux__/_WIN32/__APPLE__ +#endif //__unix__/_WIN32/__APPLE__ #else // USE_HW_ACCEL new_codec = avcodec_find_encoder_by_name(codec.c_str()); #endif // USE_HW_ACCEL @@ -563,6 +563,7 @@ void FFmpegWriter::SetOption(StreamType stream, std::s else { av_opt_set_int(c->priv_data, "crf", std::min(std::stoi(value),63), 0); } + break; case AV_CODEC_ID_HEVC : c->bit_rate = 0; if (strstr(info.vcodec.c_str(), "svt_hevc") != NULL) { @@ -571,6 +572,8 @@ void FFmpegWriter::SetOption(StreamType stream, std::s av_opt_set_int(c->priv_data, "forced-idr",1,0); } break; + default: + break; } #endif // FFmpeg 4.0+ } else { -@@ -1459,21 +1462,25 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVS +@@ -1470,21 +1473,25 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVS adapter_num = openshot::Settings::Instance()->HW_EN_DEVICE_SET; std::clog << "Encoding Device Nr: " << adapter_num << "\n"; if (adapter_num < 3 && adapter_num >=0) { -#if defined(__linux__) +#if defined(__unix__) 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__) adapter_ptr = NULL; +#else + adapter_ptr = NULL; #endif } else { adapter_ptr = NULL; // Just to be sure } // Check if it is there and writable -#if defined(__linux__) +#if defined(__unix__) if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) { #elif defined(_WIN32) || defined(__APPLE__) + if( adapter_ptr != NULL ) { +#else if( adapter_ptr != NULL ) { #endif ZmqLogger::Instance()->AppendDebugMethod( diff --git a/multimedia/libopenshot/pkg-plist b/multimedia/libopenshot/pkg-plist index f7198faf1671..5e82b8c0aecc 100644 --- a/multimedia/libopenshot/pkg-plist +++ b/multimedia/libopenshot/pkg-plist @@ -1,102 +1,104 @@ include/libopenshot/AudioBufferSource.h include/libopenshot/AudioDevices.h +include/libopenshot/AudioLocation.h include/libopenshot/AudioReaderSource.h include/libopenshot/AudioResampler.h include/libopenshot/AudioWaveformer.h include/libopenshot/CVObjectDetection.h include/libopenshot/CVStabilization.h include/libopenshot/CVTracker.h include/libopenshot/CacheBase.h include/libopenshot/CacheDisk.h include/libopenshot/CacheMemory.h include/libopenshot/ChannelLayouts.h include/libopenshot/ChunkReader.h include/libopenshot/ChunkWriter.h include/libopenshot/Clip.h include/libopenshot/ClipBase.h include/libopenshot/ClipProcessingJobs.h include/libopenshot/Color.h include/libopenshot/Coordinate.h include/libopenshot/CrashHandler.h include/libopenshot/DummyReader.h include/libopenshot/EffectBase.h include/libopenshot/EffectInfo.h include/libopenshot/Effects.h include/libopenshot/Enums.h include/libopenshot/Exceptions.h include/libopenshot/FFmpegReader.h include/libopenshot/FFmpegUtilities.h include/libopenshot/FFmpegWriter.h include/libopenshot/Fraction.h include/libopenshot/Frame.h include/libopenshot/FrameMapper.h include/libopenshot/ImageReader.h include/libopenshot/ImageWriter.h include/libopenshot/Json.h include/libopenshot/KeyFrame.h include/libopenshot/MagickUtilities.h include/libopenshot/OpenCVUtilities.h include/libopenshot/OpenMPUtilities.h include/libopenshot/OpenShot.h include/libopenshot/OpenShotVersion.h include/libopenshot/PlayerBase.h include/libopenshot/Point.h include/libopenshot/ProcessingController.h include/libopenshot/Profiles.h include/libopenshot/Qt/AudioPlaybackThread.h include/libopenshot/Qt/PlayerDemo.h include/libopenshot/Qt/PlayerPrivate.h include/libopenshot/Qt/VideoCacheThread.h include/libopenshot/Qt/VideoPlaybackThread.h include/libopenshot/Qt/VideoRenderWidget.h include/libopenshot/Qt/VideoRenderer.h include/libopenshot/QtHtmlReader.h include/libopenshot/QtImageReader.h include/libopenshot/QtPlayer.h include/libopenshot/QtTextReader.h include/libopenshot/QtUtilities.h include/libopenshot/ReaderBase.h include/libopenshot/RendererBase.h include/libopenshot/Settings.h include/libopenshot/TextReader.h include/libopenshot/Timeline.h include/libopenshot/TimelineBase.h include/libopenshot/TrackedObjectBBox.h include/libopenshot/TrackedObjectBase.h include/libopenshot/WriterBase.h include/libopenshot/ZmqLogger.h include/libopenshot/audio_effects/Compressor.h include/libopenshot/audio_effects/Delay.h include/libopenshot/audio_effects/Distortion.h include/libopenshot/audio_effects/Echo.h include/libopenshot/audio_effects/Expander.h include/libopenshot/audio_effects/Noise.h include/libopenshot/audio_effects/ParametricEQ.h include/libopenshot/audio_effects/Robotization.h include/libopenshot/audio_effects/STFT.h include/libopenshot/audio_effects/Whisperization.h include/libopenshot/effects/Bars.h include/libopenshot/effects/Blur.h include/libopenshot/effects/Brightness.h include/libopenshot/effects/Caption.h include/libopenshot/effects/ChromaKey.h include/libopenshot/effects/ColorShift.h include/libopenshot/effects/Crop.h include/libopenshot/effects/Deinterlace.h include/libopenshot/effects/Hue.h include/libopenshot/effects/Mask.h include/libopenshot/effects/Negate.h include/libopenshot/effects/ObjectDetection.h include/libopenshot/effects/Pixelate.h include/libopenshot/effects/Saturation.h include/libopenshot/effects/Shift.h include/libopenshot/effects/Stabilizer.h include/libopenshot/effects/Tracker.h include/libopenshot/effects/Wave.h include/libopenshot/sort_filter/Hungarian.h include/libopenshot/sort_filter/KalmanTracker.h lib/libopenshot.so -lib/libopenshot.so.0.3.0 -lib/libopenshot.so.23 +lib/libopenshot.so.0.3.1 +lib/libopenshot.so.24 %%PYTHON_SITELIBDIR%%/_openshot.so %%PYTHON_SITELIBDIR%%/openshot.py +%%RUBY%%%%RUBY_VENDORARCHLIBDIR%%/openshot.so