From nobody Mon May 6 15:06:00 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VY4VK0DDwz5KPMP; Mon, 06 May 2024 15:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VY4VJ6q58z4Tpr; Mon, 6 May 2024 15:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715007961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zjt2scKZ2cZ/O2id/YA4Srx4jLvWlNWW5AvKMc+R2K0=; b=Qap02i9rcHyX5ONkOX+9S1Yqu8r0U82i6Cp2EgKRFneYYs7kWWkRuuta2Se/6kvr7rCPFH YCv0b2lCuqyZPTquMEnLt9zNWdPHNiCqbbrj5AW6uz+2MzaulPBkETMUU3PCnpqeacNFp0 joBdw4FZk4AFXfxWIIMu5oRaUesDd/1DTuBFQ1pGd2ULSdAb6WTz8+NHkSjCnLDIg44WBP 7Q1xa2jEsIAHEoPJz6SaH/2EANM0hsr0w75FmWR7jE2Nzw8fgsueUzLSeBWOQEKT19WU5T IfonE78gyuLkkXUnokRDZ13hR3M7mABhxY894G0VMBK9UlDAXZNPgYBI/z7BSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715007961; a=rsa-sha256; cv=none; b=Bca45991KBY0W+dQOtGwjHiJ02752jKx8qOI9b/Re7qqXhmKBC5afaITB0pMjWrEl7JJVT cCcbCjtcRqp/D6As9Lu5j0mPL+DDLVdCtXGRQprpyTtvlDU0zmlY4CCY0963v9YfKtVagk DZXh+0kVtH3VesRoNKeLNWr7x6yLhoCY52erd/bc0mVIBlFWW+NqiUGNAINCAA8mmnOFOP Em4jChfEDwo2soRyOP9iItb6EKxxHvqX3zMyi7lp4vQQzNdMA/ettjCwa5UWZKWVP4rsxI sX1rfufW2l96rOYXD66ot9k7QT/OU05cvoDIST/ij2BzT4KFZilOFujsm43wMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715007961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zjt2scKZ2cZ/O2id/YA4Srx4jLvWlNWW5AvKMc+R2K0=; b=xhMfGePkrzKhYa9T4B5BkWBefUm3GWzIvWhyrOUusOW9TIVD2WNOWf2sgmL9pKADvnuP8D CshmaVuKiI9hWgXb+COCxM786O01z8r4nlfKAu6MKNmI+5ktOG6T1sc7uOdsCIDrlJFzXX 5qvmkhy97QbxzhVLOr5IB8KfCmew/AUrxTSaxljaqLXMVFpLyHS0dL8qTIJmXKc6OGMYig W0xT2k6kP2TdvfkurRtco+c3zOtXWY+nGtsHHldAQcHNgLDQc4uuQSbvGymkUfbeKSs5j1 2+mzPJ96P93qhElBML27ZWz8pwSWgOD1WRuwpBu+5VxzG9mEynzlZVAmCNIvEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VY4VJ6R5Xz12Cv; Mon, 6 May 2024 15:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 446F60d8004413; Mon, 6 May 2024 15:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 446F60x8004410; Mon, 6 May 2024 15:06:00 GMT (envelope-from git) Date: Mon, 6 May 2024 15:06:00 GMT Message-Id: <202405061506.446F60x8004410@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: 69132b6a36d2 - main - audio/libopenshot-audio: fix OPTIONS List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69132b6a36d2e845e09165330f1112379a2c4df3 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=69132b6a36d2e845e09165330f1112379a2c4df3 commit 69132b6a36d2e845e09165330f1112379a2c4df3 Author: Tatsuki Makino AuthorDate: 2024-05-06 14:57:18 +0000 Commit: Vladimir Druzenko CommitDate: 2024-05-06 15:05:32 +0000 audio/libopenshot-audio: fix OPTIONS Documents that require doxygen have been separated into DOXYGEN option. It is off by default. JACK option has been changed. It seems to be no longer experimental, but there will be bugs PR: 277647 --- audio/libopenshot-audio/Makefile | 20 ++-- audio/libopenshot-audio/files/patch-CMakeLists.txt | 44 ++++++--- ...udio__devices_native_juce__linux__JackAudio.cpp | 104 +++++++++++++++++++++ 3 files changed, 146 insertions(+), 22 deletions(-) diff --git a/audio/libopenshot-audio/Makefile b/audio/libopenshot-audio/Makefile index 9ce7ee009c86..efc550615284 100644 --- a/audio/libopenshot-audio/Makefile +++ b/audio/libopenshot-audio/Makefile @@ -1,6 +1,7 @@ PORTNAME= libopenshot-audio DISTVERSIONPREFIX= v DISTVERSION= 0.3.2 +PORTREVISION= 1 CATEGORIES= audio multimedia MAINTAINER= tatsuki_makino@hotmail.com @@ -20,16 +21,19 @@ GH_ACCOUNT= OpenShot USE_LDCONFIG= yes CMAKE_ON= AUTO_INSTALL_DOCS CMAKE_OFF= APPIMAGE_BUILD +DEBUG_FLAGS?= -g +DEBUG_FLAGS+= -D_DEBUG -DJUCE_FORCE_DEBUG=1 -OPTIONS_DEFINE= DOCS JACK -JACK_DESC= JACK audio server support (experimental) -DOCS_BUILD_DEPENDS= doxygen:devel/doxygen -DOCS_CMAKE_BOOL= ENABLE_AUDIO_DOCS -DOCS_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Doxygen -DOCS_CMAKE_ON= -DCMAKE_INSTALL_DOCDIR:PATH=${DOCSDIR_REL:Q} -DOCS_PORTDOCS= * +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_USES= pkgconfig JACK_CMAKE_BOOL= ENABLE_JACK +JACK_CMAKE_ON= -DJUCE_JACK_CLIENT_NAME:STRING= .include diff --git a/audio/libopenshot-audio/files/patch-CMakeLists.txt b/audio/libopenshot-audio/files/patch-CMakeLists.txt index 77d703632177..803837b54fbe 100644 --- a/audio/libopenshot-audio/files/patch-CMakeLists.txt +++ b/audio/libopenshot-audio/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2023-03-21 22:56:18 UTC +--- CMakeLists.txt.orig 2023-04-17 13:00:42 UTC +++ CMakeLists.txt @@ -184,6 +184,12 @@ set_target_properties(openshot-audio PROPERTIES EXPORT_NAME Audio # Exports as OpenShot::Audio target @@ -34,7 +34,7 @@ else() # For EXPORTED Config set(NEED_ALSA FALSE) -@@ -274,10 +281,51 @@ endif() +@@ -274,10 +281,67 @@ endif() # ZLIB -- uses IMPORTED target ZLIB::ZLIB which has existed since CMake 3.1 find_package(ZLIB REQUIRED) @@ -43,24 +43,35 @@ +# EXECINFO, SYSINFO +include(CheckFunctionExists) -+check_function_exists("backtrace" FUNCTION_BACKTRACE_FOUND) ++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) -+ target_link_libraries(openshot-audio PRIVATE ${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) -+unset(FUNCTION_BACKTRACE_FOUND) -+check_function_exists("sysinfo" FUNCTION_SYSINFO_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) -+ target_link_libraries(openshot-audio PRIVATE ${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) -+unset(FUNCTION_SYSINFO_FOUND) ++if(SYSINFO_LIBRARY) ++ target_link_libraries(openshot-audio PRIVATE ${SYSINFO_LIBRARY}) ++endif(SYSINFO_LIBRARY) + +# JACK +if(ENABLE_JACK) @@ -80,6 +91,11 @@ + 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 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]); + } + } +