aboutsummaryrefslogtreecommitdiff
path: root/audio/libopenshot-audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio/libopenshot-audio')
-rw-r--r--audio/libopenshot-audio/Makefile34
-rw-r--r--audio/libopenshot-audio/distinfo6
-rw-r--r--audio/libopenshot-audio/files/patch-CMakeLists.txt80
-rw-r--r--audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__audio__devices_native_juce__linux__JackAudio.cpp104
-rw-r--r--audio/libopenshot-audio/pkg-descr2
-rw-r--r--audio/libopenshot-audio/pkg-plist6
6 files changed, 189 insertions, 43 deletions
diff --git a/audio/libopenshot-audio/Makefile b/audio/libopenshot-audio/Makefile
index 4670c218c603..efc550615284 100644
--- a/audio/libopenshot-audio/Makefile
+++ b/audio/libopenshot-audio/Makefile
@@ -1,10 +1,12 @@
PORTNAME= libopenshot-audio
DISTVERSIONPREFIX= v
-DISTVERSION= 0.2.2
+DISTVERSION= 0.3.2
+PORTREVISION= 1
CATEGORIES= audio multimedia
MAINTAINER= tatsuki_makino@hotmail.com
COMMENT= OpenShot Audio Library
+WWW= https://www.openshot.org/
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
@@ -17,21 +19,21 @@ USES= cmake compiler:c++14-lang
USE_GITHUB= yes
GH_ACCOUNT= OpenShot
USE_LDCONFIG= yes
-CMAKE_OFF= DOXYFILE_LATEX
+CMAKE_ON= AUTO_INSTALL_DOCS
+CMAKE_OFF= APPIMAGE_BUILD
+DEBUG_FLAGS?= -g
+DEBUG_FLAGS+= -D_DEBUG -DJUCE_FORCE_DEBUG=1
-OPTIONS_DEFINE= DOCS
-OPTIONS_DEFAULT=
-DOCS_BUILD_DEPENDS= doxygen:devel/doxygen
-DOCS_USES= python:3.6+,build
-DOCS_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Doxygen\
- CMAKE_DISABLE_FIND_PACKAGE_PythonInterp
-DOCS_CMAKE_ON= -DCMAKE_INSTALL_DOCDIR:PATH=${DOCSDIR_REL:Q}
-DOCS_PORTDOCS= *
-
-do-build-DOCS-on:
- @(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} doc; then \
- (${ECHO_CMD} "===> ${.TARGET} failed unexpectedly.") | ${FMT_80} ; \
- ${FALSE}; \
- fi)
+OPTIONS_DEFINE= DOCS DOXYGEN JACK
+DOCS_CMAKE_ON= -DCMAKE_INSTALL_DOCDIR:PATH=${DOCSDIR_REL:Q}
+DOCS_PORTDOCS= *
+DOXYGEN_IMPLIES= DOCS
+DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen
+DOXYGEN_CMAKE_BOOL= ENABLE_AUDIO_DOCS
+DOXYGEN_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Doxygen
+JACK_LIB_DEPENDS= libjack.so:audio/jack
+JACK_USES= pkgconfig
+JACK_CMAKE_BOOL= ENABLE_JACK
+JACK_CMAKE_ON= -DJUCE_JACK_CLIENT_NAME:STRING=
.include <bsd.port.mk>
diff --git a/audio/libopenshot-audio/distinfo b/audio/libopenshot-audio/distinfo
index e3c34bdbfc8e..997ec1e717b2 100644
--- a/audio/libopenshot-audio/distinfo
+++ b/audio/libopenshot-audio/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1633834800
-SHA256 (OpenShot-libopenshot-audio-v0.2.2_GH0.tar.gz) = 66bedfda0d8d430598b21bc2dde6c0016a758a6c83467d0273a9d692de10baaf
-SIZE (OpenShot-libopenshot-audio-v0.2.2_GH0.tar.gz) = 1808059
+TIMESTAMP = 1682218800
+SHA256 (OpenShot-libopenshot-audio-v0.3.2_GH0.tar.gz) = f09d5251c934e6c14d98217b44574c508318c8575e47f5c48ffaf54d9bbce3e9
+SIZE (OpenShot-libopenshot-audio-v0.3.2_GH0.tar.gz) = 1772366
diff --git a/audio/libopenshot-audio/files/patch-CMakeLists.txt b/audio/libopenshot-audio/files/patch-CMakeLists.txt
index a6d6ab1c3daf..803837b54fbe 100644
--- a/audio/libopenshot-audio/files/patch-CMakeLists.txt
+++ b/audio/libopenshot-audio/files/patch-CMakeLists.txt
@@ -1,20 +1,19 @@
---- CMakeLists.txt.orig 2021-09-04 23:24:41 UTC
+--- CMakeLists.txt.orig 2023-04-17 13:00:42 UTC
+++ CMakeLists.txt
-@@ -171,6 +171,13 @@ set_target_properties(openshot-audio PROPERTIES
+@@ -184,6 +184,12 @@ set_target_properties(openshot-audio PROPERTIES
EXPORT_NAME Audio # Exports as OpenShot::Audio target
)
-+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-+ find_package(Threads REQUIRED)
-+ if(Threads_FOUND)
-+ target_link_libraries(openshot-audio PRIVATE ${CMAKE_THREAD_LIBS_INIT})
-+ endif(Threads_FOUND)
-+endif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++# Thread library
++find_package(Threads REQUIRED)
++if(Threads_FOUND)
++ target_link_libraries(openshot-audio PRIVATE ${CMAKE_THREAD_LIBS_INIT})
++endif(Threads_FOUND)
+
# Require language features we use
if(CMAKE_VERSION VERSION_GREATER 3.8)
target_compile_features(openshot-audio PUBLIC
-@@ -189,7 +196,8 @@ endif()
+@@ -202,7 +208,8 @@ endif()
# Enable stack-unwinding support in c objects on gcc-based platforms.
# Failing to do so will cause your program to be terminated when a png
# or a jpeg exception is thrown on linux or macosx.
@@ -24,7 +23,7 @@
target_compile_options(openshot-audio PRIVATE -fexceptions)
endif()
-@@ -252,8 +260,8 @@ if(UNIX AND NOT APPLE)
+@@ -265,8 +272,8 @@ if(UNIX AND NOT APPLE)
INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES ${ALSA_LIBRARIES})
endif()
@@ -35,7 +34,7 @@
else()
# For EXPORTED Config
set(NEED_ALSA FALSE)
-@@ -261,10 +269,24 @@ endif()
+@@ -274,10 +281,67 @@ endif()
# ZLIB -- uses IMPORTED target ZLIB::ZLIB which has existed since CMake 3.1
find_package(ZLIB REQUIRED)
@@ -43,18 +42,61 @@
+target_link_libraries(openshot-audio PRIVATE ZLIB::ZLIB)
+# EXECINFO, SYSINFO
-+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++include(CheckFunctionExists)
++include(CheckLibraryExists)
++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)
++ if(EXECINFO_LIBRARY)
++ unset(FUNCTION_BACKTRACE_FOUND CACHE)
++ check_library_exists(${EXECINFO_LIBRARY} backtrace "" FUNCTION_BACKTRACE_FOUND)
++ endif(EXECINFO_LIBRARY)
++endif(NOT FUNCTION_BACKTRACE_FOUND)
++if(NOT FUNCTION_BACKTRACE_FOUND)
++ message(FATAL_ERROR "backtrace - ${FUNCTION_BACKTRACE_FOUND}")
++endif(NOT FUNCTION_BACKTRACE_FOUND)
++if(EXECINFO_LIBRARY)
+ target_link_libraries(openshot-audio PRIVATE ${EXECINFO_LIBRARY})
++endif(EXECINFO_LIBRARY)
++check_function_exists(sysinfo FUNCTION_SYSINFO_FOUND)
++if(NOT FUNCTION_SYSINFO_FOUND)
+ find_library(SYSINFO_LIBRARY NAMES sysinfo)
-+ if(NOT SYSINFO_LIBRARY)
-+ message(FATAL_ERROR "${SYSINFO_LIBRARY}")
-+ endif(NOT SYSINFO_LIBRARY)
++ if(SYSINFO_LIBRARY)
++ unset(FUNCTION_SYSINFO_FOUND CACHE)
++ check_library_exists(${SYSINFO_LIBRARY} sysinfo "" FUNCTION_SYSINFO_FOUND)
++ endif(SYSINFO_LIBRARY)
++endif(NOT FUNCTION_SYSINFO_FOUND)
++if(NOT FUNCTION_SYSINFO_FOUND)
++ message(FATAL_ERROR "sysinfo - ${FUNCTION_SYSINFO_FOUND}")
++endif(NOT FUNCTION_SYSINFO_FOUND)
++if(SYSINFO_LIBRARY)
+ target_link_libraries(openshot-audio PRIVATE ${SYSINFO_LIBRARY})
-+endif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++endif(SYSINFO_LIBRARY)
++
++# JACK
++if(ENABLE_JACK)
++ find_package(PkgConfig QUIET)
++ if(NOT PKG_CONFIG_FOUND)
++ message(FATAL_ERROR "PKG_CONFIG_FOUND: ${PKG_CONFIG_FOUND}")
++ endif(NOT PKG_CONFIG_FOUND)
++ pkg_check_modules(JACK REQUIRED jack)
++ if(NOT JACK_FOUND)
++ message(FATAL_ERROR "JACK_FOUND: ${JACK_FOUND}")
++ endif(NOT JACK_FOUND)
++ if(NOT TARGET JACK::JACK)
++ add_library(JACK::JACK INTERFACE IMPORTED)
++ set_target_properties(JACK::JACK PROPERTIES
++ INTERFACE_INCLUDE_DIRECTORIES ${JACK_INCLUDE_DIRS}
++ INTERFACE_LINK_LIBRARIES ${JACK_LINK_LIBRARIES})
++ endif(NOT TARGET JACK::JACK)
++ target_link_libraries(openshot-audio PRIVATE JACK::JACK)
++ target_compile_definitions(openshot-audio PRIVATE JUCE_JACK=1)
++ if(DEFINED JUCE_JACK_CLIENT_NAME AND NOT JUCE_JACK_CLIENT_NAME STREQUAL "")
++ target_compile_definitions(openshot-audio PRIVATE "JUCE_JACK_CLIENT_NAME=\"${JUCE_JACK_CLIENT_NAME}\"")
++ else(DEFINED JUCE_JACK_CLIENT_NAME AND NOT JUCE_JACK_CLIENT_NAME STREQUAL "")
++ target_compile_definitions(openshot-audio PRIVATE "JUCE_JACK_CLIENT_NAME=\"${PROJECT_NAME}\"")
++ endif(DEFINED JUCE_JACK_CLIENT_NAME AND NOT JUCE_JACK_CLIENT_NAME STREQUAL "")
++endif(ENABLE_JACK)
+
# Link with dynamic loader for platform
-target_link_libraries(openshot-audio PUBLIC ${CMAKE_DL_LIBS})
diff --git a/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__audio__devices_native_juce__linux__JackAudio.cpp b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__audio__devices_native_juce__linux__JackAudio.cpp
new file mode 100644
index 000000000000..f64208c6b74a
--- /dev/null
+++ b/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__audio__devices_native_juce__linux__JackAudio.cpp
@@ -0,0 +1,104 @@
+--- JuceLibraryCode/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp.orig 2023-04-17 13:00:42 UTC
++++ JuceLibraryCode/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp
+@@ -175,6 +175,8 @@ class JackAudioIODevice : public AudioIODevice (publ
+ {
+ juce::jack_set_error_function (errorCallback);
+
++ if (inputId.isNotEmpty())
++ {
+ // open input ports
+ const StringArray inputChannels (getInputChannelNames());
+ for (int i = 0; i < inputChannels.size(); ++i)
+@@ -185,7 +187,10 @@ class JackAudioIODevice : public AudioIODevice (publ
+ inputPorts.add (juce::jack_port_register (client, inputName.toUTF8(),
+ JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0));
+ }
++ }
+
++ if (outputId.isNotEmpty())
++ {
+ // open output ports
+ const StringArray outputChannels (getOutputChannelNames());
+ for (int i = 0; i < outputChannels.size(); ++i)
+@@ -196,6 +201,7 @@ class JackAudioIODevice : public AudioIODevice (publ
+ outputPorts.add (juce::jack_port_register (client, outputName.toUTF8(),
+ JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0));
+ }
++ }
+
+ inChans.calloc (totalNumberOfInputChannels + 2);
+ outChans.calloc (totalNumberOfOutputChannels + 2);
+@@ -273,26 +279,40 @@ class JackAudioIODevice : public AudioIODevice (publ
+
+ if (! inputChannels.isZero())
+ {
+- for (JackPortIterator i (client, true); i.next();)
++ int idx = 0;
++ for (JackPortIterator i (client, true); i.next() && idx < inputPorts.size();)
+ {
+- if (inputChannels [i.index] && i.clientName == getName())
++ if (i.clientName != getName())
++ continue;
++ if (inputChannels [idx])
+ {
+- int error = juce::jack_connect (client, i.ports[i.index], juce::jack_port_name ((jack_port_t*) inputPorts[i.index]));
++ int error = juce::jack_connect (client, i.ports[i.index], juce::jack_port_name ((jack_port_t*) inputPorts[idx]));
+ if (error != 0)
++ {
+ JUCE_JACK_LOG ("Cannot connect input port " + String (i.index) + " (" + i.name + "), error " + String (error));
++ }
++ else
++ ++idx;
+ }
+ }
+ }
+
+ if (! outputChannels.isZero())
+ {
+- for (JackPortIterator i (client, false); i.next();)
++ int idx = 0;
++ for (JackPortIterator i (client, false); i.next() && idx < outputPorts.size();)
+ {
+- if (outputChannels [i.index] && i.clientName == getName())
++ if (i.clientName != getName())
++ continue;
++ if (outputChannels [idx])
+ {
+- int error = juce::jack_connect (client, juce::jack_port_name ((jack_port_t*) outputPorts[i.index]), i.ports[i.index]);
++ int error = juce::jack_connect (client, juce::jack_port_name ((jack_port_t*) outputPorts[idx]), i.ports[i.index]);
+ if (error != 0)
++ {
+ JUCE_JACK_LOG ("Cannot connect output port " + String (i.index) + " (" + i.name + "), error " + String (error));
++ }
++ else
++ ++idx;
+ }
+ }
+ }
+@@ -536,20 +556,20 @@ class JackAudioIODeviceType : public AudioIODeviceTyp
+ // scan for output devices
+ for (JackPortIterator i (client, false); i.next();)
+ {
+- if (i.clientName != (JUCE_JACK_CLIENT_NAME) && ! inputNames.contains (i.clientName))
++ if (i.clientName != (JUCE_JACK_CLIENT_NAME) && ! outputNames.contains (i.clientName))
+ {
+- inputNames.add (i.clientName);
+- inputIds.add (i.ports [i.index]);
++ outputNames.add (i.clientName);
++ outputIds.add (i.ports [i.index]);
+ }
+ }
+
+ // scan for input devices
+ for (JackPortIterator i (client, true); i.next();)
+ {
+- if (i.clientName != (JUCE_JACK_CLIENT_NAME) && ! outputNames.contains (i.clientName))
++ if (i.clientName != (JUCE_JACK_CLIENT_NAME) && ! inputNames.contains (i.clientName))
+ {
+- outputNames.add (i.clientName);
+- outputIds.add (i.ports [i.index]);
++ inputNames.add (i.clientName);
++ inputIds.add (i.ports [i.index]);
+ }
+ }
+
diff --git a/audio/libopenshot-audio/pkg-descr b/audio/libopenshot-audio/pkg-descr
index 7a99df175561..aa4751a64342 100644
--- a/audio/libopenshot-audio/pkg-descr
+++ b/audio/libopenshot-audio/pkg-descr
@@ -1,5 +1,3 @@
OpenShot Audio Library (libopenshot-audio) is a free, open-source project that
enables high-quality editing and playback of audio, and is based on the amazing
JUCE library.
-
-WWW: https://www.openshot.org/
diff --git a/audio/libopenshot-audio/pkg-plist b/audio/libopenshot-audio/pkg-plist
index 8ad48c2a25f2..61490c18cb1f 100644
--- a/audio/libopenshot-audio/pkg-plist
+++ b/audio/libopenshot-audio/pkg-plist
@@ -363,9 +363,9 @@ lib/cmake/OpenShotAudio/OpenShotAudioConfigVersion.cmake
lib/cmake/OpenShotAudio/OpenShotAudioTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/OpenShotAudio/OpenShotAudioTargets.cmake
lib/libopenshot-audio.so
-lib/libopenshot-audio.so.0.2.2
-lib/libopenshot-audio.so.8
-man/man1/openshot-audio-demo.1.gz
+lib/libopenshot-audio.so.0.3.2
+lib/libopenshot-audio.so.9
+share/man/man1/openshot-audio-demo.1.gz
@dir include/libopenshot-audio/juce_audio_devices/native/java/app/com/roli/juce
@dir include/libopenshot-audio/juce_core/native/java/app/com/roli/juce
@dir include/libopenshot-audio/juce_core/native/javacore/app/com/roli/juce