From 53c676ef1172c02469129c67c7f5b22858b7d29e Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: Mon, 7 Oct 2019 14:24:51 +0200 Subject: [PATCH] Revert "qm-dsp fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675833" This reverts commit 52fc4f97926f26880900f66cbe65a096545f2d12. Unretirement request: https://pagure.io/releng/issue/8871 --- .gitignore | 2 + dead.package | 1 - qm-dsp-flags.patch | 21 ++++++ qm-dsp-install.patch | 65 ++++++++++++++++++ qm-dsp.spec | 155 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 6 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 dead.package create mode 100644 qm-dsp-flags.patch create mode 100644 qm-dsp-install.patch create mode 100644 qm-dsp.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0420e55 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/qm-dsp-1.7.tar.gz +/qm-dsp-1.7.1.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index 62cf9e5..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -qm-dsp fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675833 diff --git a/qm-dsp-flags.patch b/qm-dsp-flags.patch new file mode 100644 index 0000000..b65de31 --- /dev/null +++ b/qm-dsp-flags.patch @@ -0,0 +1,21 @@ +Author: František Dvořák +Date: Wed Nov 4 14:11:41 2015 +0100 + + Build flags and not using internal lapack headers. + +diff --git a/Makefile b/Makefile +index e501466..7f91722 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,10 @@ + +-CFLAGS := -DNDEBUG -O3 -fPIC -ffast-math -msse -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS -I./include ++CFLAGS := -DNDEBUG -fPIC -ffast-math -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS -I./include $(CFLAGS) + + #CFLAGS := -DNDEBUG -g -fPIC -DUSE_PTHREADS -I./include + + CXXFLAGS := $(CFLAGS) ++LDFLAGS := $(LDFLAGS) + + include build/general/Makefile.inc + diff --git a/qm-dsp-install.patch b/qm-dsp-install.patch new file mode 100644 index 0000000..9554089 --- /dev/null +++ b/qm-dsp-install.patch @@ -0,0 +1,65 @@ +Author: František Dvořák +Date: Wed Nov 4 20:25:16 2015 +0100 + + Update Makefile: + * install target: headers, static library + * add missing header + * kill bundled kissfft + +diff --git a/build/general/Makefile.inc b/build/general/Makefile.inc +index da0644b..b3a7319 100644 +--- a/build/general/Makefile.inc ++++ b/build/general/Makefile.inc +@@ -4,9 +4,10 @@ CXX ?= g++ + CC ?= gcc + AR ?= ar + RANLIB ?= ranlib ++INSTALL ?= install -p + +-CFLAGS := $(CFLAGS) -I. -Iext/kissfft -Iext/kissfft/tools -Dkiss_fft_scalar=double +-CXXFLAGS := $(CXXFLAGS) -I. -Iext/kissfft -Iext/kissfft/tools -Dkiss_fft_scalar=double ++CFLAGS := $(CFLAGS) -I. -Dkiss_fft_scalar=double ++CXXFLAGS := $(CXXFLAGS) -I. -Dkiss_fft_scalar=double + + HEADERS := base/Pitch.h \ + base/Window.h \ +@@ -47,13 +48,12 @@ HEADERS := base/Pitch.h \ + maths/MathAliases.h \ + maths/MathUtilities.h \ + maths/MedianFilter.h \ ++ maths/nan-inf.h \ + maths/Polyfit.h \ + maths/pca/pca.h \ + thread/AsynchronousTask.h \ + thread/BlockAllocator.h \ +- thread/Thread.h \ +- ext/kissfft/kiss_fft.h \ +- ext/kissfft/tools/kiss_fftr.h ++ thread/Thread.h + + SOURCES := base/Pitch.cpp \ + base/KaiserWindow.cpp \ +@@ -91,9 +91,7 @@ SOURCES := base/Pitch.cpp \ + maths/KLDivergence.cpp \ + maths/MathUtilities.cpp \ + maths/pca/pca.c \ +- thread/Thread.cpp \ +- ext/kissfft/kiss_fft.c \ +- ext/kissfft/tools/kiss_fftr.c ++ thread/Thread.cpp + + OBJECTS := $(SOURCES:.cpp=.o) + OBJECTS := $(OBJECTS:.c=.o) +@@ -106,6 +104,12 @@ $(LIBRARY): $(OBJECTS) + depend: + makedepend -fbuild/general/Makefile.inc -Y -- $(CFLAGS) -- $(SOURCES) + ++install: ++ $(INSTALL) -D -m 0644 $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ++ for h in $(HEADERS); do \ ++ $(INSTALL) -D -m 0644 $$h $(DESTDIR)$(PREFIX)/include/qm-dsp/$$h; \ ++ done ++ + clean: + rm -f $(OBJECTS) + diff --git a/qm-dsp.spec b/qm-dsp.spec new file mode 100644 index 0000000..e98527a --- /dev/null +++ b/qm-dsp.spec @@ -0,0 +1,155 @@ +# debuginfo not supported for static libraries, RB #209316 +%global debug_package %{nil} + +Name: qm-dsp +Version: 1.7.1 +Release: 9%{?dist} +Summary: Library for DSP and Music Informatics purposes + +# some source files with different original licenses, see README.txt +License: GPLv2+ +# original homepage: http://isophonics.net/QMVampPlugins +URL: http://vamp-plugins.org/plugin-doc/qm-vamp-plugins.html +Source0: https://code.soundsoftware.ac.uk/attachments/download/1582/%{name}-%{version}.tar.gz +# build flags +# (not intended for upstream) +Patch0: qm-dsp-flags.patch +# install header files +# http://vamp-plugins.org/forum/index.php/topic,270.0.html +Patch1: qm-dsp-install.patch + +BuildRequires: gcc-c++ +BuildRequires: atlas-devel +BuildRequires: imake +BuildRequires: kiss-fft-static +BuildRequires: valgrind +%if 0%{?rhel} && 0%{?rhel} <= 7 +BuildRequires: boost148-devel +%else +BuildRequires: boost-devel +%endif + +%description +%{name} is a C++ library of functions for DSP and Music Informatics purposes +developed at Queen Mary, University of London. It is used by the QM Vamp +Plugins (q.v.) among other things. + + +%package devel +Summary: %{summary} +Provides: %{name}-static = %{version}-%{release} + +%description devel +%{name} is a C++ library of functions for DSP and Music Informatics purposes +developed at Queen Mary, University of London. It is used by the QM Vamp +Plugins (q.v.) among other things. + +This package contains header files and static library for development with +qm-dsp. + + +%prep +%setup -q +cp -p build/linux/Makefile.linux32 Makefile +%patch0 -p1 +%patch1 -p1 +# use specified CFLAGS for tests +cat >> tests/Makefile < tests/Makefile.novg + + +%build +# unbundle kiss-fft +make depend + +# extra cflags used in upstream +%ifarch %{ix86} +EXTRA_CFLAGS="-msse -mfpmath=sse" +%endif +%ifarch x86_64 +EXTRA_CFLAGS="-msse -msse2 -mfpmath=sse" +%endif + +# build +CFLAGS="$EXTRA_CFLAGS %{?optflags} -I%{_includedir}/kissfft" \ +LDFLAGS="%{?__global_ldflags}" \ +make %{?_smp_mflags} + + +%install +make install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir} + + +%check +%if 0%{?rhel} && 0%{?rhel} <= 7 +BOOST_CPPFLAGS="-I%{_includedir}/boost148" +BOOST_LDFLAGS="-L%{_libdir}/boost148" +%endif +# disable valgrind on AArch64 +%ifarch aarch64 +MAKE_ARGS='-f Makefile.novg' +%endif +CFLAGS="${BOOST_CPPFLAGS} %{?optflags} -Dkiss_fft_scalar=double" \ +LDFLAGS="${BOOST_LDFLAGS} %{?__global_ldflags} -lkiss_fft_double -lkiss_fftr_double" \ +make %{?_smp_mflags} -C tests $MAKE_ARGS + + +%files devel +%license COPYING +%doc README.txt +%{_libdir}/libqm-dsp.a +%{_includedir}/%{name}/ + + +%changelog +* Fri Jul 26 2019 Fedora Release Engineering - 1.7.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.7.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.7.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 1.7.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.7.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.7.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Feb 16 2017 František Dvořák - 1.7.1-3 +- Disable valgrind on AArch64 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Nov 14 2016 František Dvořák - 1.7.1-1 +- Update to 1.7.1 (#1279112) +- New homepage +- Unbundled new kiss-fft library +- Removed C++ patch released in upstream +- Rebased build flags and install patches +- New packaging guidelines (license tag) +- Enabled tests + +* Thu Feb 04 2016 Fedora Release Engineering - 1.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 1.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Nov 05 2014 František Dvořák - 1.7-2 +- Updated patches and added comments + +* Sun Aug 3 2014 František Dvořák - 1.7-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..fe867ff --- /dev/null +++ b/sources @@ -0,0 +1 @@ +9c7a7b15926000e15a9e3c7c06492e58 qm-dsp-1.7.1.tar.gz