Initial import (#1060519).

This commit is contained in:
František Dvořák 2014-11-05 14:58:22 +01:00
parent 2849dd7f7a
commit e59ecd9fec
6 changed files with 179 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/qm-dsp-1.7.tar.gz

34
qm-dsp-cxx-build.patch Normal file
View File

@ -0,0 +1,34 @@
Fix build with gcc 4.6
diff -r 410f9e18a249 -r 915365c58758 build/linux/Makefile.linux
--- a/build/linux/Makefile.linux Fri Oct 14 09:41:38 2011 +0100
+++ b/build/linux/Makefile.linux Fri Oct 14 09:48:47 2011 +0100
@@ -1,5 +1,5 @@
-CFLAGS := -DNDEBUG -O3 -fno-exceptions -fPIC -ffast-math -msse -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS
+CFLAGS := -DNDEBUG -O3 -fno-exceptions -fPIC -ffast-math -msse -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS -I./include
CXXFLAGS := $(CFLAGS)
include build/general/Makefile.inc
diff -r 410f9e18a249 -r 915365c58758 dsp/tempotracking/DownBeat.h
--- a/dsp/tempotracking/DownBeat.h Fri Oct 14 09:41:38 2011 +0100
+++ b/dsp/tempotracking/DownBeat.h Fri Oct 14 09:48:47 2011 +0100
@@ -17,6 +17,7 @@
#define DOWNBEAT_H
#include <vector>
+#include <cstddef>
#include "dsp/rateconversion/Decimator.h"
diff -r 410f9e18a249 -r 915365c58758 dsp/tempotracking/TempoTrackV2.h
--- a/dsp/tempotracking/TempoTrackV2.h Fri Oct 14 09:41:38 2011 +0100
+++ b/dsp/tempotracking/TempoTrackV2.h Fri Oct 14 09:48:47 2011 +0100
@@ -18,6 +18,7 @@
#define TEMPOTRACKV2_H
#include <vector>
+#include <cstddef>
using std::vector;

27
qm-dsp-flags.patch Normal file
View File

@ -0,0 +1,27 @@
Build flags and not using internal lapack headers.
diff --git a/build/linux/Makefile.linux b/build/linux/Makefile.linux
index 5f2b331..a60a4ee 100644
--- a/build/linux/Makefile.linux
+++ b/build/linux/Makefile.linux
@@ -1,6 +1,7 @@
-CFLAGS := -DNDEBUG -O3 -fno-exceptions -fPIC -ffast-math -msse -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS -I./include
+CFLAGS := -DNDEBUG -fno-exceptions -fPIC -ffast-math -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS $(CFLAGS)
CXXFLAGS := $(CFLAGS)
+LDFLAGS := $(LDFLAGS)
include build/general/Makefile.inc
diff --git a/build/linux/Makefile.linux64 b/build/linux/Makefile.linux64
deleted file mode 100644
index b5460d4..0000000
--- a/build/linux/Makefile.linux64
+++ /dev/null
@@ -1,6 +0,0 @@
-
-CFLAGS := -DNDEBUG -O3 -fno-exceptions -fPIC -ffast-math -msse -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -DUSE_PTHREADS -Ibuild/linux/amd64
-CXXFLAGS := $(CFLAGS)
-
-include build/general/Makefile.inc
-

35
qm-dsp-install.patch Normal file
View File

@ -0,0 +1,35 @@
Install header files and static library, add missing header.
diff --git a/build/general/Makefile.inc b/build/general/Makefile.inc
index 77d4b65..e887471 100644
--- a/build/general/Makefile.inc
+++ b/build/general/Makefile.inc
@@ -4,6 +4,7 @@ CXX ?= g++
CC ?= gcc
AR ?= ar
RANLIB ?= ranlib
+INSTALL ?= install -p
CFLAGS := $(CFLAGS) -I.
CXXFLAGS := $(CXXFLAGS) -I.
@@ -42,6 +43,7 @@ HEADERS := base/Pitch.h \
maths/KLDivergence.h \
maths/MathAliases.h \
maths/MathUtilities.h \
+ maths/nan-inf.h \
maths/Polyfit.h \
maths/pca/pca.h \
thread/AsynchronousTask.h \
@@ -89,6 +91,12 @@ $(LIBRARY): $(OBJECTS)
$(AR) cr $@ $^
$(RANLIB) $@
+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 $(OBJECTS)

81
qm-dsp.spec Normal file
View File

@ -0,0 +1,81 @@
# debuginfo not supported for static libraries, RB #209316
%global debug_package %{nil}
Name: qm-dsp
Version: 1.7
Release: 2%{?dist}
Summary: Library for DSP and Music Informatics purposes
# some source files with different original licenses, see README.txt
License: GPLv2+
URL: http://isophonics.net/QMVampPlugins
Source0: https://code.soundsoftware.ac.uk/attachments/download/103/%{name}-%{version}.tar.gz
# C++ build fix
# https://code.soundsoftware.ac.uk/projects/qm-dsp/repository/revisions/915365c58758
Patch0: qm-dsp-cxx-build.patch
# build flags
# (not intended for upstream)
Patch1: qm-dsp-flags.patch
# install header files
# http://vamp-plugins.org/forum/index.php/topic,270.0.html
Patch2: qm-dsp-install.patch
BuildRequires: atlas-devel
%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
%patch0 -p1
%patch1 -p1
%patch2 -p1
ln -s build/linux/Makefile.linux Makefile
%build
# extra cflags used in upstream
%ifarch %{ix86}
EXTRA_CFLAGS="-msse -mfpmath=sse"
%endif
%ifarch x86_64
EXTRA_CFLAGS="-msse -msse2 -mfpmath=sse"
%endif
CFLAGS="$EXTRA_CFLAGS %{?optflags}" \
LDFLAGS="%{?__global_ldflags}" \
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir}
%files devel
%doc COPYING README.txt
%{_libdir}/libqm-dsp.a
%{_includedir}/%{name}
%changelog
* Wed Nov 05 2014 František Dvořák <valtri@civ.zcu.cz> - 1.7-2
- Update patches and add comments
* Sun Aug 3 2014 František Dvořák <valtri@civ.zcu.cz> - 1.7-1
- Initial package

View File

@ -0,0 +1 @@
d167a1477ab40cc3df965ed338dcd6a5 qm-dsp-1.7.tar.gz