Skip to content

Commit

Permalink
(#4241) pulseaudio: bump required_conan_version and libcap + minor co…
Browse files Browse the repository at this point in the history
…smetic changes

* bump required_conan_version

for validate()

* bump libcap

* reorder methods by order of execution
  • Loading branch information
SpaceIm authored Jan 14, 2021
1 parent cc5d108 commit 04696da
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions recipes/pulseaudio/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from conans.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.29.0"
required_conan_version = ">=1.32.0"


class PulseAudioConan(ConanFile):
name = "pulseaudio"
Expand Down Expand Up @@ -35,21 +36,12 @@ class PulseAudioConan(ConanFile):
"with_dbus": False,
}

build_requires = "gettext/0.20.1", "libtool/2.4.6"
_autotools = None

@property
def _source_subfolder(self):
return "source_subfolder"

_autotools = None

def validate(self):
if self.options.get_safe("with_fftw") and self.options["fftw"].precision != "single":
raise ConanInvalidConfiguration("Pulse audio cannot use fftw %s precision."
"Either set option fftw:precision=single"
"or pulseaudio:with_fftw=False"
% self.options["fftw"].precision)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand All @@ -64,10 +56,9 @@ def configure(self):
if not self.options.with_dbus:
del self.options.with_fftw


def requirements(self):
self.requires("libsndfile/1.0.30")
self.requires("libcap/2.45")
self.requires("libcap/2.46")
if self.options.with_alsa:
self.requires("libalsa/1.2.4")
if self.options.with_glib:
Expand All @@ -81,6 +72,17 @@ def requirements(self):
if self.options.with_dbus:
self.requires("dbus/1.12.20")

def validate(self):
if self.options.get_safe("with_fftw") and self.options["fftw"].precision != "single":
raise ConanInvalidConfiguration("Pulse audio cannot use fftw %s precision."
"Either set option fftw:precision=single"
"or pulseaudio:with_fftw=False"
% self.options["fftw"].precision)

def build_requirements(self):
self.build_requires("gettext/0.20.1")
self.build_requires("libtool/2.4.6")

def source(self):
tools.get(**self.conan_data["sources"][self.version])
extracted_dir = self.name + "-" + self.version
Expand Down

0 comments on commit 04696da

Please sign in to comment.