New package - pulseaudio (#19378)

This PR adds the pulseaudio package and the speexdsp package as a
dependency. In addition, this PR adds a `libs` property to the libtool
package.
This commit is contained in:
Glenn Johnson 2020-10-19 16:11:45 -05:00 committed by GitHub
parent 95b9875e95
commit c31e96dcd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 153 additions and 0 deletions

View File

@ -42,6 +42,12 @@ def determine_version(cls, exe):
def autoreconf(self, spec, prefix):
Executable('./bootstrap')()
@property
def libs(self):
return find_libraries(
['libltdl'], root=self.prefix, recursive=True, shared=True
)
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name))

View File

@ -0,0 +1,93 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Pulseaudio(AutotoolsPackage):
"""PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy
for your sound applications.
PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for
your sound applications. It allows you to do advanced operations on your
sound data as it passes between your application and your hardware. Things
like transferring the audio to a different machine, changing the sample
format or channel count and mixing several sounds into one are easily
achieved using a sound server."""
homepage = "https://www.freedesktop.org/wiki/Software/PulseAudio/"
url = "https://freedesktop.org/software/pulseaudio/releases/pulseaudio-13.0.tar.xz"
version('13.0', sha256='961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057')
variant('alsa', default=False, description='alsa support')
variant('fftw', default=False, description='FFTW support')
variant('gconf', default=False, description='Gconf support')
variant('openssl', default=False,
description='openSSL support (used for Airtunes/RAOP)')
variant('x11', default=False, description='x11 support')
depends_on('alsa-lib@1.0.19:', when='+alsa')
depends_on('dbus@1.4.12:')
depends_on('fftw@3:', when='+fftw')
depends_on('gdbm')
depends_on('gettext@0.18.1:')
depends_on('glib')
depends_on('gconf', when='+gconf')
depends_on('json-c@0.11:')
depends_on('libcap')
depends_on('libiconv')
depends_on('libsndfile@1.0.18:')
depends_on('libtool@2.4:') # links to libltdl.so
depends_on('libsm', when='+x11')
depends_on('libuuid', when='+x11')
depends_on('libx11', when='+x11')
depends_on('libxcb', when='+x11')
depends_on('libxau', when='+x11')
depends_on('libxext', when='+x11')
depends_on('libxi', when='+x11')
depends_on('libxtst', when='+x11')
depends_on('openssl', when='+openssl')
depends_on('perl-xml-parser', type='build')
depends_on('speexdsp@1.2:')
def configure_args(self):
args = [
'--disable-systemd-daemon',
'--disable-systemd-journal',
'--disable-systemd-login',
'--disable-udev',
'--disable-waveout',
'--enable-dbus',
'--enable-glib2',
'--with-database=gdbm',
'--with-systemduserunitdir=no',
'CPPFLAGS={0}'.format(self.spec['libtool'].headers.cpp_flags),
'LDFLAGS={0}'.format(self.spec['libtool'].libs.search_flags),
]
# toggle based on variants
args += self.enable_or_disable('alsa')
args += self.enable_or_disable('gconf')
args += self.enable_or_disable('openssl')
args += self.enable_or_disable('x11')
args += self.with_or_without('fftw')
# possible future variants
args.extend([
'--disable-asyncns',
'--disable-avahi',
'--disable-bluez5',
'--disable-gcov',
'--disable-gsettings',
'--disable-gtk3',
'--disable-hal-compat',
'--disable-jack',
'--disable-lirc',
'--disable-orc',
'--disable-tcpwrap',
])
return args

View File

@ -0,0 +1,11 @@
--- a/configure.ac 2019-04-25 22:57:34.000000000 -0500
+++ b/configure.ac 2020-10-16 11:40:00.577784873 -0500
@@ -266,7 +266,7 @@
#include <mkl.h>
void func() {
DFTI_DESCRIPTOR_HANDLE h;
- MKL_LONG result=DftiCreateDescriptor(&h, DFTI_SINGLE, DFTI_REAL, 0);
+ MKL_LONG result=DftiCreateDescriptor(&h, DFTI_SINGLE, DFTI_REAL, 0, 1);
}]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_FAILURE([Failed to compile MKL test program. Make sure you set CFLAGS to include the include directory and set LDFLAGS to include the library directory and all necesarry libraries.])]

View File

@ -0,0 +1,43 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Speexdsp(AutotoolsPackage):
"""SpeexDSP is a patent-free, Open Source/Free Software DSP library."""
homepage = "https://github.com/xiph/speexdsp"
url = "https://github.com/xiph/speexdsp/archive/SpeexDSP-1.2.0.tar.gz"
version('1.2.0', sha256='d7032f607e8913c019b190c2bccc36ea73fc36718ee38b5cdfc4e4c0a04ce9a4')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
depends_on('fftw-api')
patch('mkl.patch')
def autoreconf(self, spec, prefix):
autoreconf('--install', '--verbose', '--force')
def configure_args(self):
args = []
if 'intel-mkl' in self.spec:
# get the blas libs explicitly to avoid scalapack getting returned
args.extend([
'--with-fft=proprietary-intel-mkl',
'CPPFLAGS={0}'.format(
self.spec['intel-mkl'].headers.cpp_flags),
'LDFLAGS={0}'.format(self.spec['blas'].libs.ld_flags),
])
elif 'fftw' in self.spec:
args.append('--with-fft=gpl-fftw3')
return args