1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | # TODO: Improve atomics by using libkern/OSAtomics.h |
---|
4 | # https://bugs.freedesktop.org/show_bug.cgi?id=67795 |
---|
5 | |
---|
6 | PortSystem 1.0 |
---|
7 | PortGroup active_variants 1.1 |
---|
8 | PortGroup compiler_blacklist_versions 1.0 |
---|
9 | PortGroup meson 1.0 |
---|
10 | PortGroup perl5 1.0 |
---|
11 | |
---|
12 | name pulseaudio |
---|
13 | version 17.0 |
---|
14 | revision 1 |
---|
15 | license {BSD LGPL-2.1+ MIT} |
---|
16 | categories audio |
---|
17 | maintainers {ionic @Ionic} openmaintainer |
---|
18 | description A sound server for POSIX OSes |
---|
19 | |
---|
20 | long_description PulseAudio is a sound server for POSIX OSes, meaning that it is a proxy \ |
---|
21 | for your sound applications. It allows you to do advanced operations \ |
---|
22 | on your sound data as it passes between your application and your hardware. \ |
---|
23 | Things like transferring the audio to a different machine, changing \ |
---|
24 | the sample format or channel count and mixing several sounds into one are \ |
---|
25 | easily achieved using a sound server. |
---|
26 | |
---|
27 | homepage https://www.freedesktop.org/wiki/Software/PulseAudio/ |
---|
28 | master_sites https://www.freedesktop.org/software/${name}/releases/ |
---|
29 | |
---|
30 | use_xz yes |
---|
31 | |
---|
32 | checksums rmd160 091da3b1d4d7e4ef464cfc53969995d408985bae \ |
---|
33 | sha256 053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5 \ |
---|
34 | size 1566556 |
---|
35 | |
---|
36 | perl5.branches 5.34 |
---|
37 | |
---|
38 | depends_build-append \ |
---|
39 | port:gettext \ |
---|
40 | port:p${perl5.major}-xml-parser \ |
---|
41 | path:bin/pkg-config:pkgconfig |
---|
42 | |
---|
43 | depends_lib-append port:dbus \ |
---|
44 | port:fftw-3-single \ |
---|
45 | port:gdbm \ |
---|
46 | port:gettext-runtime \ |
---|
47 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
48 | port:libiconv \ |
---|
49 | port:libsndfile \ |
---|
50 | port:libtool \ |
---|
51 | port:orc \ |
---|
52 | port:soxr \ |
---|
53 | port:speexdsp |
---|
54 | |
---|
55 | # configure falls back to libatomic_ops as last resort |
---|
56 | # if no linux kernel support and inline asm snippet fails to build |
---|
57 | # likely to fail on Leopard and older |
---|
58 | # https://trac.macports.org/ticket/42052 |
---|
59 | |
---|
60 | platform darwin { |
---|
61 | if {${os.major} < 10} { |
---|
62 | depends_lib-append port:libatomic_ops |
---|
63 | } |
---|
64 | } |
---|
65 | |
---|
66 | # DO NOT USE! Maintainer-only helper. DO NOT USE! |
---|
67 | #configure.cflags-append -g3 -ggdb3 -gdwarf-4 -O0 |
---|
68 | #configure.cxxflags-append -g3 -ggdb3 -gdwarf-4 -O0 |
---|
69 | |
---|
70 | # Some patches make PulseAudio startup correctly. |
---|
71 | # Will hopefully be merged upstream soon. |
---|
72 | # All work has or will be sent upstream. |
---|
73 | # C.f. https://bugs.freedesktop.org/show_bug.cgi?id=62987 |
---|
74 | # and posts on the mailing list. |
---|
75 | patchfiles-append patch-src_modules_macosx_module_coreaudio_device.c-respect-PA_NAME_MAX.diff \ |
---|
76 | patch-src_daemon_default.pa.in-skip-consolekit-and-systemdlogin.diff \ |
---|
77 | patch-src_pulsecore_shm.c_Static_assert.diff |
---|
78 | |
---|
79 | platform darwin { |
---|
80 | patchfiles-append patch-meson.build.diff |
---|
81 | } |
---|
82 | |
---|
83 | platform darwin 8 { |
---|
84 | patchfiles-append patch-src_modules_macosx_module_coreaudio_device.c-tiger-compat.diff |
---|
85 | } |
---|
86 | |
---|
87 | set meson_config ${workpath}/meson_config.ini |
---|
88 | |
---|
89 | configure.args-append \ |
---|
90 | --native-file ${meson_config} |
---|
91 | |
---|
92 | post-patch { |
---|
93 | # TODO: Generalize this in the meson portgroup. |
---|
94 | set fp [open ${meson_config} w] |
---|
95 | puts ${fp} {[binaries]} |
---|
96 | puts ${fp} "m4='${prefix}/bin/gm4'" |
---|
97 | puts ${fp} "perl='${perl5.bin}'" |
---|
98 | close ${fp} |
---|
99 | } |
---|
100 | |
---|
101 | compiler.c_standard 2011 |
---|
102 | # orc uses stdatomic.h |
---|
103 | compiler.blacklist-append {clang < 700} |
---|
104 | |
---|
105 | configure.args-append \ |
---|
106 | -Dadrian-aec=true \ |
---|
107 | -Dalsa=disabled \ |
---|
108 | -Dasyncns=disabled \ |
---|
109 | -Davahi=disabled \ |
---|
110 | -Dbluez5=disabled \ |
---|
111 | -Dconsolekit=disabled \ |
---|
112 | -Ddatabase=gdbm \ |
---|
113 | -Ddbus=enabled \ |
---|
114 | -Ddoxygen=false \ |
---|
115 | -Delogind=disabled \ |
---|
116 | -Denable-smoother-2=true \ |
---|
117 | -Dfftw=enabled \ |
---|
118 | -Dglib=enabled \ |
---|
119 | -Dgsettings=disabled \ |
---|
120 | -Dgstreamer=disabled \ |
---|
121 | -Dgtk=disabled \ |
---|
122 | -Dhal-compat=false \ |
---|
123 | -Dipv6=false \ |
---|
124 | -Djack=disabled \ |
---|
125 | -Dlirc=disabled \ |
---|
126 | -Dopenssl=disabled \ |
---|
127 | -Dorc=enabled \ |
---|
128 | -Doss-output=disabled \ |
---|
129 | -Dsoxr=enabled \ |
---|
130 | -Dspeex=enabled \ |
---|
131 | -Dsystemd=disabled \ |
---|
132 | -Dtcpwrap=disabled \ |
---|
133 | -Dtests=false \ |
---|
134 | -Dudev=disabled \ |
---|
135 | -Dvalgrind=disabled \ |
---|
136 | -Dwebrtc-aec=disabled \ |
---|
137 | -Dx11=disabled |
---|
138 | |
---|
139 | # Same error as in: https://trac.macports.org/ticket/25064 |
---|
140 | configure.ldflags-append \ |
---|
141 | -lintl |
---|
142 | |
---|
143 | if {${os.platform} eq "darwin" && ${os.major} < 16} { |
---|
144 | # _AbsoluteToNanoseconds |
---|
145 | configure.ldflags-append \ |
---|
146 | -framework CoreServices |
---|
147 | } |
---|
148 | |
---|
149 | add_users pulse group=pulse realname=Pulse\ Audio |
---|
150 | |
---|
151 | variant x11 conflicts minimal { |
---|
152 | configure.args-replace -Dx11=disabled \ |
---|
153 | -Dx11=enabled |
---|
154 | depends_lib-append port:xorg-libX11 \ |
---|
155 | port:xorg-libxcb \ |
---|
156 | port:xorg-libice \ |
---|
157 | port:xorg-libsm \ |
---|
158 | port:xorg-libXtst |
---|
159 | } |
---|
160 | |
---|
161 | variant gtk description {Enable GTK3 support.} { |
---|
162 | configure.args-replace -Dgtk=disabled \ |
---|
163 | -Dgtk=enabled |
---|
164 | depends_lib-append path:lib/pkgconfig/gtk+-3.0.pc:gtk3 |
---|
165 | } |
---|
166 | |
---|
167 | variant jack conflicts minimal description {Enable Jack support.} { |
---|
168 | configure.args-replace -Djack=disabled \ |
---|
169 | -Djack=enabled |
---|
170 | depends_lib-append port:jack |
---|
171 | } |
---|
172 | |
---|
173 | variant openssl description {Enable OpenSSL.} { |
---|
174 | PortGroup openssl 1.0 |
---|
175 | |
---|
176 | configure.args-replace -Dopenssl=disabled \ |
---|
177 | -Dopenssl=enabled |
---|
178 | } |
---|
179 | |
---|
180 | variant valgrind description {Enable Valgrind support.} { |
---|
181 | configure.args-replace -Dvalgrind=disabled \ |
---|
182 | -Dvalgrind=enabled |
---|
183 | depends_lib-append path:bin/valgrind:valgrind-devel |
---|
184 | patchfiles-append patch-src_daemon_caps.c-enable-root.diff |
---|
185 | } |
---|
186 | |
---|
187 | variant tests description {Enable testing.} { |
---|
188 | configure.args-replace -Dtests=false \ |
---|
189 | -Dtests=true |
---|
190 | test.run yes |
---|
191 | } |
---|
192 | |
---|
193 | variant minimal conflicts jack conflicts x11 description {Builds a minimal version. Do not use if unsure. Please build this ONLY in trace mode.} { |
---|
194 | depends_lib-delete port:dbus \ |
---|
195 | port:gdbm \ |
---|
196 | port:fftw-3-single \ |
---|
197 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
198 | port:libiconv \ |
---|
199 | port:orc \ |
---|
200 | port:soxr |
---|
201 | |
---|
202 | configure.args-replace -Ddatabase=gdbm -Ddatabase=simple \ |
---|
203 | -Ddbus=enabled -Ddbus=disabled \ |
---|
204 | -Dfftw=enabled -Dfftw=disabled \ |
---|
205 | -Dglib=enabled -Dglib=disabled \ |
---|
206 | -Dorc=enabled -Dorc=disabled \ |
---|
207 | -Dsoxr=enabled -Dsoxr=disabled |
---|
208 | |
---|
209 | require_active_variants libsndfile no_external_libs |
---|
210 | } |
---|
211 | |
---|
212 | if {![variant_isset minimal]} { |
---|
213 | default_variants +x11 |
---|
214 | } |
---|
215 | |
---|
216 | # https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3808 |
---|
217 | post-destroot { |
---|
218 | set moduledir lib/pulseaudio/modules |
---|
219 | |
---|
220 | lappend modulelibs \ |
---|
221 | libcli.dylib \ |
---|
222 | libprotocol-cli.dylib \ |
---|
223 | libprotocol-http.dylib \ |
---|
224 | libprotocol-native.dylib \ |
---|
225 | libprotocol-simple.dylib \ |
---|
226 | libraop.dylib \ |
---|
227 | librtp.dylib \ |
---|
228 | module-allow-passthrough \ |
---|
229 | module-always-sink \ |
---|
230 | module-always-source \ |
---|
231 | module-augment-properties \ |
---|
232 | module-bonjour-publish \ |
---|
233 | module-card-restore \ |
---|
234 | module-cli \ |
---|
235 | module-cli-protocol-tcp \ |
---|
236 | module-cli-protocol-unix \ |
---|
237 | module-combine \ |
---|
238 | module-combine-sink \ |
---|
239 | module-coreaudio-detect \ |
---|
240 | module-coreaudio-device \ |
---|
241 | module-dbus-protocol \ |
---|
242 | module-default-device-restore \ |
---|
243 | module-detect \ |
---|
244 | module-device-manager \ |
---|
245 | module-device-restore \ |
---|
246 | module-echo-cancel \ |
---|
247 | module-equalizer-sink \ |
---|
248 | module-filter-apply \ |
---|
249 | module-filter-heuristics \ |
---|
250 | module-http-protocol-tcp \ |
---|
251 | module-http-protocol-unix \ |
---|
252 | module-intended-roles \ |
---|
253 | module-ladspa-sink \ |
---|
254 | module-loopback \ |
---|
255 | module-match \ |
---|
256 | module-native-protocol-fd \ |
---|
257 | module-native-protocol-tcp \ |
---|
258 | module-native-protocol-unix \ |
---|
259 | module-null-sink \ |
---|
260 | module-null-source \ |
---|
261 | module-pipe-sink \ |
---|
262 | module-pipe-source \ |
---|
263 | module-position-event-sounds \ |
---|
264 | module-raop-sink \ |
---|
265 | module-remap-sink \ |
---|
266 | module-remap-source \ |
---|
267 | module-rescue-streams \ |
---|
268 | module-role-cork \ |
---|
269 | module-role-ducking \ |
---|
270 | module-rtp-recv \ |
---|
271 | module-rtp-send \ |
---|
272 | module-rygel-media-server \ |
---|
273 | module-simple-protocol-tcp \ |
---|
274 | module-simple-protocol-unix \ |
---|
275 | module-sine \ |
---|
276 | module-sine-source \ |
---|
277 | module-stream-restore \ |
---|
278 | module-suspend-on-idle \ |
---|
279 | module-switch-on-connect \ |
---|
280 | module-switch-on-port-available \ |
---|
281 | module-tunnel-sink \ |
---|
282 | module-tunnel-sink-new \ |
---|
283 | module-tunnel-source \ |
---|
284 | module-tunnel-source-new \ |
---|
285 | module-virtual-sink \ |
---|
286 | module-virtual-source \ |
---|
287 | module-virtual-surround-sink \ |
---|
288 | module-volume-restore \ |
---|
289 | module-x11-bell \ |
---|
290 | module-x11-cork-request \ |
---|
291 | module-x11-publish \ |
---|
292 | module-x11-xsmp |
---|
293 | |
---|
294 | foreach modulelib ${modulelibs} { |
---|
295 | ln -s ${prefix}/${moduledir}/${modulelib}.dylib ${destroot}${prefix}/${moduledir}/${modulelib}.so |
---|
296 | } |
---|
297 | } |
---|
298 | |
---|
299 | livecheck.type regex |
---|
300 | livecheck.url ${master_sites} |
---|
301 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" |
---|