<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e78a871704a5a6e0d2bede705749ab902ce205fb">https://github.com/macports/macports-ports/commit/e78a871704a5a6e0d2bede705749ab902ce205fb</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e78a871704a5a6e0d2bede705749ab902ce205fb
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Sun Dec 31 20:59:44 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> csound: add portaudio and pulseaudio variants, fix headers install
</span>---
audio/csound/Portfile | 55 +++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 49 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/csound/Portfile b/audio/csound/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 42e6adec051..522aa695779 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/audio/csound/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/audio/csound/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,10 +6,10 @@ PortGroup github 1.0
</span>
github.setup csound csound 6.18.1
github.tarball_from archive
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 3
</span> categories audio
license LGPL-2.1+
<span style='display:block; white-space:pre;background:#ffe0e0;'>-maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
</span>
homepage https://www.csound.com
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,16 +41,20 @@ patchfiles MAC_OS_X_VERSION.patch
</span> patchfiles-append 0001-Use-correct-clang-options-in-CMakeLists.patch \
0002-Altivec-code-is-broken-for-Darwin-so-disable-it-ther.patch
<span style='display:block; white-space:pre;background:#ffe0e0;'>-cmake.out_of_source yes
</span> compiler.cxx_standard 2011
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args-append -DFAIL_MISSING=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DBUILD_CXX_INTERFACE=ON \
</span> -DBUILD_DSSI_OPCODES=OFF \
-DBUILD_JAVA_INTERFACE=OFF \
-DBUILD_LUA_INTERFACE=OFF \
-DBUILD_TESTS=OFF \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_UTILITIES=ON \
</span> -DCS_FRAMEWORK_DEST=${frameworks_dir} \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DFAIL_MISSING=ON \
</span> -DUSE_ALSA=OFF \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_CURL=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_DOUBLE=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_GETTEXT=ON \
</span> -DUSE_JACK=OFF \
-DUSE_PORTAUDIO=OFF \
-DUSE_PORTMIDI=OFF \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -60,16 +64,55 @@ configure.args-append -DFAIL_MISSING=ON \
</span> # Building static lib does not hurt even without tests enabled, since dylib is still built as well.
configure.args-append -DBUILD_STATIC_LIBRARY=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${configure.build_arch} ni [list arm i386 ppc]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +double
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [variant_isset double] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set libname CsoundLib64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set libname CsoundLib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set cs_framework_path ${libname}.framework/Versions/6.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set csoundlib ${cs_framework_path}/${libname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-destroot {
# While this is not immediately obvious upon install, dylib and binaries are built with wrong paths:
# /opt/local/lib/CsoundLib64.framework/Versions/6.0/CsoundLib64
# At the same time this is installed correctly into the framework directory, so the path points to nothing.
# CMakeLists are a mess, and it is unclear what in particular breaks this. Fix paths in destroot:
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set csoundlib CsoundLib64.framework/Versions/6.0/CsoundLib64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${destroot}${frameworks_dir} "install_name_tool -id ${frameworks_dir}/${csoundlib} ./${csoundlib}"
</span> system -W ${destroot}${prefix}/lib "install_name_tool -change ${prefix}/lib/${csoundlib} ${frameworks_dir}/${csoundlib} ./libcsnd6.6.0.dylib"
foreach bin [glob ${destroot}${prefix}/bin/*] {
system "install_name_tool -change ${prefix}/lib/${csoundlib} ${frameworks_dir}/${csoundlib} ${bin}"
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Existing targets also omit headers from /interfaces, which are needed for some dependents:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://github.com/CsoundQt/CsoundQt/issues/392
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/include/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse f ${worksrcpath}/interfaces {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file isfile ${f}] && ([file extension ${f}] == ".h" || [file extension ${f}] == ".hpp")} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy ${f} ${destroot}${prefix}/include/${name}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant double description "Use double precision" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # See: http://www.csounds.com/manual/html/MiscCsound64.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DUSE_DOUBLE=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_DOUBLE=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant portaudio conflicts pulseaudio description "Use PortAudio" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:portaudio
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DUSE_PORTAUDIO=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_PORTAUDIO=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant pulseaudio conflicts portaudio description "Use PulseAudio" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:pulseaudio
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DUSE_PULSEAUDIO=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_PULSEAUDIO=ON
</span> }
variant tests description "Build tests" {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -78,7 +121,7 @@ variant tests description "Build tests" {
</span> -DBUILD_TESTS=ON
# Otherwise libraries are looked for in the prefix, which fails, if the port has not been installed earlier.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- test.env-append DYLD_LIBRARY_PATH=${cmake.build_dir}:${cmake.build_dir}/CsoundLib64.framework/Versions/6.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env-append DYLD_LIBRARY_PATH=${cmake.build_dir}:${cmake.build_dir}/${cs_framework_path}
</span> test.run yes
}
</pre><pre style='margin:0'>
</pre>