{% set name = "pulseaudio" %}
{% set version = "16.1" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-{{ version }}.tar.xz
  sha256: 8eef32ce91d47979f95fd9a935e738cd7eb7463430dabc72863251751e504ae4
  patches:
    - 0001-pulsecore-static_assert-_Static_assert-for-glibc-2.1.patch
    - 0002-tests-Skip-tests-that-fail-for-release-build-when-pa.patch

build:
  number: 1
  skip: true  # [not linux]
  run_exports:
    - {{ pin_subpackage('pulseaudio', max_pin='x.x') }}
  ignore_run_exports_from:
    - {{ compiler('cxx') }}
    - zlib

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - gstreamer-orc
    - m4
    - meson
    - ninja
    - perl-xml-parser
    - pkg-config
  host:
    - alsa-lib
    - alsa-lib >=1.0.24
    - check
    - dbus
    - dbus >=1.4.12
    - fftw
    - fftw >=3.0
    - glib
    - glib >=2.28.0
    - gstreamer-orc
    - jack
    - libatomic_ops
    - libatomic_ops >=1.2
    - libcap
    - libsndfile
    - libsndfile >=1.0.20
    - libsystemd
    - libtool
    - libtool >=2.4
    - libudev
    - openssl
    - zlib
  run:
    - {{ pin_compatible('gstreamer-orc', max_pin='x.x') }}
    - {{ pin_compatible('libtool', max_pin='x') }}

test:
  requires:
    - pkg-config
  commands:
    - test -f ${PREFIX}/include/pulse/version.h
    - test -f ${PREFIX}/lib/libpulse.so
    - test -f ${PREFIX}/lib/pkgconfig/libpulse.pc
    - test -f `pkg-config --variable=modlibexecdir --dont-define-prefix libpulse`/libprotocol-native.so
    - pa-info
    - pacat --help
    - pacmd --help
    - pactl --help
    - padsp -h
    - pamon --version
    - paplay --version
    - parec --version
    - parecord --version
    - pasuspender --help
    - pulseaudio --help


about:
  home: https://www.freedesktop.org/wiki/Software/PulseAudio/
  license: LGPL-2.1-or-later
  license_family: GPL
  license_file: LGPL
  summary: A networked sound server
  doc_url: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/

extra:
  recipe-maintainers:
    - andfoy
    - ryanvolz
    - scopatz
