added community/ams

This commit is contained in:
Kevin Mihelich 2013-11-25 21:05:02 +00:00
parent 328c00dec8
commit 0def96cb5b
5 changed files with 178 additions and 0 deletions

View file

@ -0,0 +1,91 @@
Author: Peter Green <plugwash@p10link.net>
Description: Fix FTBFS on armel.
Bug-Debian: http://bugs.debian.org/570848
Bug: https://sourceforge.net/tracker/?func=detail&aid=2959277&group_id=69130&atid=523503
Forwarded: yes
---
src/canvasfunction.cpp | 24 ++++++++++++------------
src/function.cpp | 4 ++--
2 files changed, 14 insertions(+), 14 deletions(-)
--- ams.orig/src/canvasfunction.cpp
+++ ams/src/canvasfunction.cpp
@@ -34,10 +34,10 @@ void CanvasFunction::mouseMoveEvent(int
qreal x = event->scenePos().x();
qreal y = event->scenePos().y();
- x = std::min(x, 5.0 * FUNCTION_SCALE);
- x = std::max(x, -5.0 * FUNCTION_SCALE);
- y = std::min(y, 5.0 * FUNCTION_SCALE);
- y = std::max(y, -5.0 * FUNCTION_SCALE);
+ x = std::min(x, (qreal)(5.0 * FUNCTION_SCALE));
+ x = std::max(x, (qreal)(-5.0 * FUNCTION_SCALE));
+ y = std::min(y, (qreal)(5.0 * FUNCTION_SCALE));
+ y = std::max(y, (qreal)(-5.0 * FUNCTION_SCALE));
switch (*function.mode) {
case 0:
@@ -58,8 +58,8 @@ void CanvasFunction::mouseMoveEvent(int
for (int _p = 0; _p < function.pointCount; ++_p) {
QPointF newPos = canvasPoints.at(_p)->scenePos();
newPos.setX(newPos.x() + delta);
- newPos.setX(std::min(newPos.x(), 5.0 * FUNCTION_SCALE));
- newPos.setX(std::max(newPos.x(), -5.0 * FUNCTION_SCALE));
+ newPos.setX(std::min(newPos.x(), (qreal)(5.0 * FUNCTION_SCALE)));
+ newPos.setX(std::max(newPos.x(), (qreal)(-5.0 * FUNCTION_SCALE)));
setPoint(_p, newPos);
}
} break;
@@ -69,8 +69,8 @@ void CanvasFunction::mouseMoveEvent(int
for (int _p = 0; _p < function.pointCount; ++_p) {
QPointF newPos = canvasPoints.at(_p)->scenePos();
newPos.setY(newPos.y() + delta);
- newPos.setY(std::min(newPos.y(), 5.0 * FUNCTION_SCALE));
- newPos.setY(std::max(newPos.y(), -5.0 * FUNCTION_SCALE));
+ newPos.setY(std::min(newPos.y(), (qreal)(5.0 * FUNCTION_SCALE)));
+ newPos.setY(std::max(newPos.y(), (qreal)(-5.0 * FUNCTION_SCALE)));
setPoint(_p, newPos);
}
} break;
@@ -80,8 +80,8 @@ void CanvasFunction::mouseMoveEvent(int
for (int _p = 0; _p < function.pointCount; ++_p) {
QPointF newPos = canvasPoints.at(_p)->scenePos();
newPos.setX(pos0[_p].x() * delta);
- newPos.setX(std::min(newPos.x(), 5.0 * FUNCTION_SCALE));
- newPos.setX(std::max(newPos.x(), -5.0 * FUNCTION_SCALE));
+ newPos.setX(std::min(newPos.x(), (qreal)(5.0 * FUNCTION_SCALE)));
+ newPos.setX(std::max(newPos.x(), (qreal)(-5.0 * FUNCTION_SCALE)));
setPoint(_p, newPos);
}
} break;
@@ -91,8 +91,8 @@ void CanvasFunction::mouseMoveEvent(int
for (int _p = 0; _p < function.pointCount; ++_p) {
QPointF newPos = canvasPoints.at(_p)->scenePos();
newPos.setY(pos0[_p].y() * delta);
- newPos.setY(std::min(newPos.y(), 5.0 * FUNCTION_SCALE));
- newPos.setY(std::max(newPos.y(), -5.0 * FUNCTION_SCALE));
+ newPos.setY(std::min(newPos.y(), (qreal)(5.0 * FUNCTION_SCALE)));
+ newPos.setY(std::max(newPos.y(), (qreal)(-5.0 * FUNCTION_SCALE)));
setPoint(_p, newPos);
}
} break;
--- ams.orig/src/function.cpp
+++ ams/src/function.cpp
@@ -144,7 +144,7 @@ void Function::drawBackground(QPainter *
{
qreal y = ceil(rect.topLeft().y() * zoom / FUNCTION_SCALE);
y *= FUNCTION_SCALE / zoom;
- QLineF l(std::max(-5.0 * FUNCTION_SCALE, rect.topLeft().x()), y, std::min(5.0 * FUNCTION_SCALE, rect.topRight().x()), y);
+ QLineF l(std::max((qreal)(-5.0 * FUNCTION_SCALE), rect.topLeft().x()), y, std::min((qreal)(5.0 * FUNCTION_SCALE), rect.topRight().x()), y);
while (l.y1() < rect.bottomLeft().y()) {
painter->drawLine(l);
painter->drawText(l.p1(), s.setNum(l.y1() / FUNCTION_SCALE));
@@ -154,7 +154,7 @@ void Function::drawBackground(QPainter *
{
qreal x = ceil(rect.topLeft().x() * zoom / FUNCTION_SCALE);
x *= FUNCTION_SCALE / zoom;
- QLineF l(x, std::max(-5.0 * FUNCTION_SCALE, rect.topLeft().y()), x, std::min(5.0 * FUNCTION_SCALE, rect.bottomLeft().y()));
+ QLineF l(x, std::max((qreal)(-5.0 * FUNCTION_SCALE), rect.topLeft().y()), x, std::min((qreal)(5.0 * FUNCTION_SCALE), rect.bottomLeft().y()));
while (l.x1() < rect.bottomRight().x()) {
painter->drawLine(l);
painter->drawText(l.p1(), s.setNum(l.x1() / FUNCTION_SCALE));

67
community/ams/PKGBUILD Normal file
View file

@ -0,0 +1,67 @@
# $Id$
# Maintainer : speps <speps at aur dot archlinux dot org>
# Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix qreal usage on ARM
_name=alsamodular
pkgname=ams
pkgver=2.0.1
pkgrel=1
pkgdesc="A realtime modular synthesizer and effect processor"
arch=('i686' 'x86_64')
url="http://alsamodular.sourceforge.net/"
license=('GPL')
depends=('qt4' 'clalsadrv' 'ladspa' 'jack')
makedepends=('fftw')
optdepends=('amb-plugins: ambisonic plugins'
'mcp-plugins: phaser, chorus and moog vcf plugins'
'rev-plugins: reverb plugins'
'swh-plugins: Steve Harris plugins'
'vco-plugins: oscillator plugins'
'fil-plugins: equaliser plugins'
'tap-plugins: toms audio plugins'
'wah-plugins: wah audio plugins'
'cmt: Computer Music Toolkit plugins'
'blop: bandlimited oscillator plugins'
'pvoc: phase-vocoding plugins'
'caps: the C* audio plugins')
install="$pkgname.install"
source=("http://downloads.sourceforge.net/project/$_name/$_name/$pkgver/$pkgname-$pkgver.tar.bz2"
"$pkgname.desktop" "$pkgname.png" '02-armel_minmaxfix.patch')
md5sums=('0d41bd5aac066aa98be45fd7ab12d35f'
'ffa277cffd52254f0297cbc2f200767e'
'0349171d5431f1c6e56085f080eb8c68'
'fd03a89ba2e99dbcab10141677822a2d')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
# strip unwanted flags
sed -i 's/-m\(64\|arch=[a-z1-9]*\) *//' configure
# DSO link flag
export LIBS=" -ldl"
# Fix qreal usage on ARM
patch -p1 -i ../02-armel_minmaxfix.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
# desktop file
install -Dm644 ../$pkgname.desktop \
"$pkgdir/usr/share/applications/$pkgname.desktop"
# icon
install -Dm644 ../$pkgname.png \
"$pkgdir/usr/share/pixmaps/$pkgname.png"
}

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=Alsa Modular Synth
Comment=Realtime modular synthesizer and effect processor
Exec=ams
Icon=ams
Terminal=false
Categories=Application;AudioVideo;AudioVideo;Qt;X-Jack;X-Sound;
StartupNotify=true

11
community/ams/ams.install Normal file
View file

@ -0,0 +1,11 @@
post_install() {
update-desktop-database -q
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}

BIN
community/ams/ams.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB