File mingw64-phonon.spec of Package mingw64-phonon

#
# spec file for package mingw64-phonon
#
# 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/
#


Name:           mingw64-phonon
Version:        4.7.1
Release:        0
#!BuildIgnore: post-build-checks
Summary:        The Phonon multimedia library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
Url:            https://projects.kde.org/phonon
Source0:        phonon-%{version}.tar.xz
# we need this to resolve problems with cmake target export ... you can only remove this if phonon-vlc still compiles
Patch0:         wtf.patch
BuildRequires:  automoc4
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-libqt4-devel
BuildRequires:  mingw64-libqt4-filesystem
BuildRequires:  xz
%_mingw64_package_header_debug
BuildArch:      noarch

%description
The Phonon multimedia library.

%package devel
Summary:        The Phonon multimedia library
Group:          Development/Libraries/C and C++

%description devel
The Phonon multimedia library

%_mingw64_debug_package

%prep
%setup -q -n phonon-%{version}
%patch -P 0 -p1

# Phonon always includes the gcc linker argument -Wl,--disable-auto-import
# for the Win64 target. However, this causes a linker failure as libsupc++
# isn't pulled in. Drop the disable-auto-import argument
sed -i s@'-Wl,--disable-auto-import'@@ cmake/FindPhononInternal.cmake

%build
rm -f CMakeCache.txt
rm -f cmake/FindQt4.cmake
%{_mingw64_cmake_qt4} -DPHONON_NO_DBUS=TRUE -DPHONON_BUILDSYSTEM_DIR=%{_mingw64_datadir}/phonon/buildsystem/

%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}
rm -vf %{buildroot}/%{_mingw64_datadir}/phonon/buildsystem/FindQt4.cmake
rm -vf %{buildroot}/%{_mingw64_datadir}/qt5/mkspecs/modules/qt_phonon.pri

%files
%defattr(-,root,root,-)
%{_mingw64_bindir}/libphonon.dll
%{_mingw64_bindir}/libphononexperimental.dll

%files devel
%defattr(-,root,root,-)
%{_mingw64_libdir}/cmake/phonon/
%{_mingw64_datadir}/phonon/

%{_mingw64_includedir}/KDE/
%{_mingw64_includedir}/phonon/
%{_mingw64_libdir}/libphonon.dll.a
%{_mingw64_libdir}/libphononexperimental.dll.a

# %{_mingw64_datadir}/qt4/mkspecs/modules/qt_phonon.pri
# %{_mingw64_datadir}/qt4

%changelog
openSUSE Build Service is sponsored by