File mingw32-portaudio.spec of Package mingw32-portaudio

#
# spec file for package mingw32-portaudio
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define package_date 20140130
Name:           mingw32-portaudio
Version:        19
Release:        0
Summary:        Portable Real-Time Audio Library
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            http://www.portaudio.com/
Source:         pa_stable_v19_%{package_date}.tgz
Source1:        functiondiscoverykeys.h
Source2:        ksmedia.h
Source3:        sal.h
Patch0:         portaudio-mingw-cxx-libtool.patch
Patch1:         portaudio-buildfix.patch
#!BuildIgnore: post-build-checks
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  doxygen
BuildRequires:  libtool
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-filesystem
%_mingw32_package_header_debug
BuildArch:      noarch

%description
PortAudio is a portable audio I/O library designed for cross-platform
support of audio. It uses a callback mechanism to request audio
processing. Audio can be generated in various formats, including 32 bit
floating point, and will be converted to the native format internally.

%package -n mingw32-libportaudio2
Summary:        Portable Real-Time Audio Library
Group:          System/Libraries
Obsoletes:      %{name}
Provides:       %{name}

%description -n mingw32-libportaudio2
PortAudio is a portable audio I/O library designed for cross-platform
support of audio. It uses a callback mechanism to request audio
processing. Audio can be generated in various formats, including 32 bit
floating point, and will be converted to the native format internally.

%package devel
Summary:        Development package for the portaudio library
Group:          Development/Languages/C and C++

%description devel
This package contains the files needed to compile programs that use the
portaudio library.

%_mingw32_debug_package

%prep
%setup -q -n portaudio
%patch -P 0 -p0
%patch -P 1 -p0
rm -f src/hostapi/wasapi/mingw-include/*
cp %{S:1} src/hostapi/wasapi/mingw-include
cp %{S:2} src/hostapi/wasapi/mingw-include
cp %{S:3} src/hostapi/wasapi/mingw-include
ln -s %{_mingw32_includedir}/ksmedia.h src/hostapi/wasapi/mingw-include/ksmedia-mingw.h

%build
autoreconf -fiv
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw32_cache}
%{_mingw32_configure} \
 --with-winapi=wmme,directx,wdmks,wasapi \
  --disable-static
make %{?_smp_mflags} || make
doxygen

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print

%files -n mingw32-libportaudio2
%defattr(-,root,root)
%{_mingw32_bindir}/libportaudio-2.dll

%files devel
%defattr(-,root,root)
%doc README.txt LICENSE.txt
%doc doc/html
%{_mingw32_includedir}/*
%{_mingw32_libdir}/pkgconfig/*.pc
%{_mingw32_libdir}/lib*.dll.a

%changelog
openSUSE Build Service is sponsored by