diff options
author | jylefort <jylefort@FreeBSD.org> | 2005-10-23 09:41:18 +0800 |
---|---|---|
committer | jylefort <jylefort@FreeBSD.org> | 2005-10-23 09:41:18 +0800 |
commit | 9279b5dd27bf3ef7fa34a865672f271a9c33111b (patch) | |
tree | 1d3d6641d51a990ce6cdafaed575259bcb8c651e | |
parent | 0cec6e6ba9101a538511722fd4df1ffae1af50d5 (diff) | |
download | freebsd-ports-gnome-9279b5dd27bf3ef7fa34a865672f271a9c33111b.tar.gz freebsd-ports-gnome-9279b5dd27bf3ef7fa34a865672f271a9c33111b.tar.zst freebsd-ports-gnome-9279b5dd27bf3ef7fa34a865672f271a9c33111b.zip |
- Respect ${LOCALBASE} and ${X11BASE} [1]
- Do not provide round() anymore, since it is part of FreeBSD since 5.3
- Reformat the Makefile (one less tab between variables and values)
Reported by: pointyhat via kris [1]
-rw-r--r-- | audio/mixxx/Makefile | 53 | ||||
-rw-r--r-- | audio/mixxx/files/patch-src::compat_round.cpp | 258 | ||||
-rw-r--r-- | audio/mixxx/files/patch-src::compat_round.h | 9 | ||||
-rw-r--r-- | audio/mixxx/files/patch-src::enginebuffer.cpp | 28 | ||||
-rw-r--r-- | audio/mixxx/files/patch-src::mixxx.pro | 25 | ||||
-rw-r--r-- | audio/mixxx/files/patch-src::probabilityvector.cpp | 19 |
6 files changed, 36 insertions, 356 deletions
diff --git a/audio/mixxx/Makefile b/audio/mixxx/Makefile index 5f308203e840..ec07cb03e5ae 100644 --- a/audio/mixxx/Makefile +++ b/audio/mixxx/Makefile @@ -5,36 +5,36 @@ # $FreeBSD$ # -PORTNAME= mixxx -PORTVERSION= 1.4.2 -CATEGORIES= audio -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +PORTNAME= mixxx +PORTVERSION= 1.4.2 +CATEGORIES= audio +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} -MAINTAINER= jylefort@FreeBSD.org -COMMENT= A DJ mixing application +MAINTAINER= jylefort@FreeBSD.org +COMMENT= A DJ mixing application -BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ - qmake:${PORTSDIR}/devel/qmake -LIB_DEPENDS= samplerate:${PORTSDIR}/audio/libsamplerate \ - portaudio:${PORTSDIR}/audio/portaudio \ - mad:${PORTSDIR}/audio/libmad \ - id3tag:${PORTSDIR}/audio/libid3tag \ - vorbis:${PORTSDIR}/audio/libvorbis \ - sndfile:${PORTSDIR}/audio/libsndfile +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ + qmake:${PORTSDIR}/devel/qmake +LIB_DEPENDS= samplerate:${PORTSDIR}/audio/libsamplerate \ + portaudio:${PORTSDIR}/audio/portaudio \ + mad:${PORTSDIR}/audio/libmad \ + id3tag:${PORTSDIR}/audio/libid3tag \ + vorbis:${PORTSDIR}/audio/libvorbis \ + sndfile:${PORTSDIR}/audio/libsndfile -USE_X_PREFIX= yes -USE_QT_VER= 3 -USE_REINPLACE= yes -HAS_CONFIGURE= yes +USE_X_PREFIX= yes +USE_QT_VER= 3 +USE_REINPLACE= yes +HAS_CONFIGURE= yes CONFIGURE_WRKSRC= ${WRKSRC}/src -BUILD_WRKSRC= ${WRKSRC}/src -INSTALL_WRKSRC= ${WRKSRC}/src +BUILD_WRKSRC= ${WRKSRC}/src +INSTALL_WRKSRC= ${WRKSRC}/src -CONFIGURE_ENV= QTDIR="${X11BASE}" QMAKESPEC="freebsd-g++" -CONFIGURE_ARGS= --prefix=${PREFIX} -MAKE_ENV= QTDIR="${X11BASE}" +CONFIGURE_ENV= QTDIR="${X11BASE}" QMAKESPEC="freebsd-g++" +CONFIGURE_ARGS= --prefix=${PREFIX} +MAKE_ENV= QTDIR="${X11BASE}" .include <bsd.port.pre.mk> @@ -42,6 +42,10 @@ MAKE_ENV= QTDIR="${X11BASE}" IGNORE= does not compile on FreeBSD 4.x, due to lack of pselect() in libc .endif +.if ${OSVERSION} < 503001 +IGNORE= does not compile on FreeBSD < 5.3, due to lack of round() in libm +.endif + .if ${OSVERSION} >= 600000 && ${ARCH} == "amd64" BROKEN= "does not build" .endif @@ -54,6 +58,9 @@ post-patch: @${REINPLACE_CMD} \ -e 's|system( ld|& -shared -L${LOCALBASE}/lib -L${X11BASE}/lib|' \ ${CONFIGURE_WRKSRC}/check.qbas + @${REINPLACE_CMD} \ + -e 's|/usr/local|${LOCALBASE}|; s|/opt|${X11BASE}|' \ + ${CONFIGURE_WRKSRC}/paths.qbas .if !defined(NOPORTDOCS) post-install: diff --git a/audio/mixxx/files/patch-src::compat_round.cpp b/audio/mixxx/files/patch-src::compat_round.cpp deleted file mode 100644 index 2fdb1ebb93a3..000000000000 --- a/audio/mixxx/files/patch-src::compat_round.cpp +++ /dev/null @@ -1,258 +0,0 @@ ---- src/compat_round.cpp.orig Fri Jun 25 22:50:04 2004 -+++ src/compat_round.cpp Fri Jun 25 22:50:24 2004 -@@ -0,0 +1,255 @@ -+/* ==================================================== -+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -+ * -+ * Developed at SunPro, a Sun Microsystems, Inc. business. -+ * Permission to use, copy, modify, and distribute this -+ * software is freely granted, provided that this notice -+ * is preserved. -+ * ==================================================== -+ * -+ * Copyright (c) 2003, Steven G. Kargl -+ * Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org> -+ * Copyright (c) 2002, 2003 David Schultz <dschultz@uclink.Berkeley.EDU> -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice unmodified, this list of conditions, and the following -+ * disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#include <math.h> -+ -+/* Symbolic constants to classify floating point numbers. */ -+#define COMPAT_FP_INFINITE 0x01 -+#define COMPAT_FP_NAN 0x02 -+#define COMPAT_FP_NORMAL 0x04 -+#define COMPAT_FP_SUBNORMAL 0x08 -+#define COMPAT_FP_ZERO 0x10 -+ -+#include <sys/endian.h> -+#define compat_fpclassify(x) \ -+ ((sizeof (x) == sizeof (float)) ? compat___fpclassifyf(x) \ -+ : (sizeof (x) == sizeof (double)) ? compat___fpclassifyd(x) \ -+ : compat___fpclassifyl(x)) -+ -+union compat_IEEEf2bits { -+ float f; -+ struct { -+#if _BYTE_ORDER == _LITTLE_ENDIAN -+ unsigned int man :23; -+ unsigned int exp :8; -+ unsigned int sign :1; -+#else /* _BIG_ENDIAN */ -+ unsigned int sign :1; -+ unsigned int exp :8; -+ unsigned int man :23; -+#endif -+ } bits; -+}; -+ -+union compat_IEEEd2bits { -+ double d; -+ struct { -+#if _BYTE_ORDER == _LITTLE_ENDIAN -+ unsigned int manl :32; -+ unsigned int manh :20; -+ unsigned int exp :11; -+ unsigned int sign :1; -+#else /* _BIG_ENDIAN */ -+ unsigned int sign :1; -+ unsigned int exp :11; -+ unsigned int manh :20; -+ unsigned int manl :32; -+#endif -+ } bits; -+}; -+ -+#ifdef __alpha__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+ unsigned int manl :32; -+ unsigned int manh :20; -+ unsigned int exp :11; -+ unsigned int sign :1; -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((void)0) -+#elif __amd64__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+ unsigned int manl :32; -+ unsigned int manh :32; -+ unsigned int exp :15; -+ unsigned int sign :1; -+ unsigned int junkl :16; -+ unsigned int junkh :32; -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) -+#elif __arm__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+ unsigned int manl :32; -+ unsigned int manh :32; -+ unsigned int exp :15; -+ unsigned int sign :1; -+ unsigned int junk :16; -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) -+#elif __i386__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+ unsigned int manl :32; -+ unsigned int manh :32; -+ unsigned int exp :15; -+ unsigned int sign :1; -+ unsigned int junk :16; -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) -+#elif __ia64__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+#if _BYTE_ORDER == _LITTLE_ENDIAN -+ unsigned int manl :32; -+ unsigned int manh :32; -+ unsigned int exp :15; -+ unsigned int sign :1; -+ unsigned long junk :48; -+#else /* _BIG_ENDIAN */ -+ unsigned long junk :48; -+ unsigned int sign :1; -+ unsigned int exp :15; -+ unsigned int manh :32; -+ unsigned int manl :32; -+#endif -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) -+#elif __powerpc__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+ unsigned int sign :1; -+ unsigned int exp :15; -+ unsigned long long manh :48; -+ unsigned long long manl :64; -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((void)0) -+#elif __sparc64__ -+union compat_IEEEl2bits { -+ long double e; -+ struct { -+ unsigned int sign :1; -+ unsigned int exp :15; -+ unsigned long manh :48; -+ unsigned long manl :64; -+ } bits; -+}; -+#define compat_mask_nbit_l(u) ((void)0) -+#endif -+ -+static int -+compat___fpclassifyf(float f) -+{ -+ union compat_IEEEf2bits u; -+ -+ u.f = f; -+ if (u.bits.exp == 0) { -+ if (u.bits.man == 0) -+ return (COMPAT_FP_ZERO); -+ return (COMPAT_FP_SUBNORMAL); -+ } -+ if (u.bits.exp == 255) { -+ if (u.bits.man == 0) -+ return (COMPAT_FP_INFINITE); -+ return (COMPAT_FP_NAN); -+ } -+ return (COMPAT_FP_NORMAL); -+} -+ -+static int -+compat___fpclassifyd(double d) -+{ -+ union compat_IEEEd2bits u; -+ -+ u.d = d; -+ if (u.bits.exp == 0) { -+ if ((u.bits.manl | u.bits.manh) == 0) -+ return (COMPAT_FP_ZERO); -+ return (COMPAT_FP_SUBNORMAL); -+ } -+ if (u.bits.exp == 2047) { -+ if ((u.bits.manl | u.bits.manh) == 0) -+ return (COMPAT_FP_INFINITE); -+ return (COMPAT_FP_NAN); -+ } -+ return (COMPAT_FP_NORMAL); -+} -+ -+static int -+compat___fpclassifyl(long double e) -+{ -+ union compat_IEEEl2bits u; -+ -+ u.e = e; -+ if (u.bits.exp == 0) { -+ if ((u.bits.manl | u.bits.manh) == 0) -+ return (COMPAT_FP_ZERO); -+ return (COMPAT_FP_SUBNORMAL); -+ } -+ compat_mask_nbit_l(u); /* Mask normalization bit if applicable. */ -+ if (u.bits.exp == 32767) { -+ if ((u.bits.manl | u.bits.manh) == 0) -+ return (COMPAT_FP_INFINITE); -+ return (COMPAT_FP_NAN); -+ } -+ return (COMPAT_FP_NORMAL); -+} -+ -+double -+compat_round(double x) -+{ -+ double t; -+ int i; -+ -+ i = compat_fpclassify(x); -+ if (i == COMPAT_FP_INFINITE || i == COMPAT_FP_NAN) -+ return (x); -+ -+ if (x >= 0.0) { -+ t = ceil(x); -+ if (t - x > 0.5) -+ t -= 1.0; -+ return (t); -+ } else { -+ t = ceil(-x); -+ if (t + x > 0.5) -+ t -= 1.0; -+ return (-t); -+ } -+} diff --git a/audio/mixxx/files/patch-src::compat_round.h b/audio/mixxx/files/patch-src::compat_round.h deleted file mode 100644 index e8fc945f4203..000000000000 --- a/audio/mixxx/files/patch-src::compat_round.h +++ /dev/null @@ -1,9 +0,0 @@ ---- src/compat_round.h.orig Fri Jun 25 22:50:14 2004 -+++ src/compat_round.h Fri Jun 25 22:50:24 2004 -@@ -0,0 +1,6 @@ -+#ifndef _COMPAT_ROUND_H -+#define _COMPAT_ROUND_H -+ -+double compat_round (double x); -+ -+#endif /* _COMPAT_ROUND_H */ diff --git a/audio/mixxx/files/patch-src::enginebuffer.cpp b/audio/mixxx/files/patch-src::enginebuffer.cpp deleted file mode 100644 index 91e9856f3699..000000000000 --- a/audio/mixxx/files/patch-src::enginebuffer.cpp +++ /dev/null @@ -1,28 +0,0 @@ ---- src/enginebuffer.cpp.orig Fri Jun 25 19:27:39 2004 -+++ src/enginebuffer.cpp Fri Jun 25 19:28:08 2004 -@@ -32,6 +32,7 @@ - #include "visual/visualchannel.h" - #include "mathstuff.h" - #include "player.h" -+#include "compat_round.h" - - - // Static default values for rate buttons -@@ -361,7 +362,7 @@ - //qDebug("seeking... %f",change); - - // Find new playpos -- double new_playpos = round(change*file_length_old); -+ double new_playpos = compat_round(change*file_length_old); - if (!even((int)new_playpos)) - new_playpos--; - if (new_playpos > file_length_old) -@@ -382,7 +383,7 @@ - // Set the cue point at the current play position: - void EngineBuffer::slotControlCueSet(double) - { -- double cue = max(0.,round(filepos_play-Player::getBufferSize())); -+ double cue = max(0.,compat_round(filepos_play-Player::getBufferSize())); - if (!even((int)cue)) - cue--; - cuePoint->set(cue); diff --git a/audio/mixxx/files/patch-src::mixxx.pro b/audio/mixxx/files/patch-src::mixxx.pro index 4ab3570173e3..9b9548b42a12 100644 --- a/audio/mixxx/files/patch-src::mixxx.pro +++ b/audio/mixxx/files/patch-src::mixxx.pro @@ -1,5 +1,5 @@ ---- src/mixxx.pro.orig Mon Oct 11 11:58:09 2004 -+++ src/mixxx.pro Tue Oct 12 21:50:29 2004 +--- src/mixxx.pro.orig Fri Oct 22 09:29:25 2004 ++++ src/mixxx.pro Sun Oct 23 02:53:58 2005 @@ -31,15 +31,7 @@ DEFINES += __PORTAUDIO__ SOURCES += playerportaudio.cpp @@ -25,14 +25,12 @@ win32:SOURCES += powermatewin.cpp win32:HEADERS += powermatewin.h win32:LIBS += setupapi.lib -@@ -145,16 +135,14 @@ +@@ -145,16 +135,12 @@ # Mouse SOURCES += mouse.cpp HEADERS += mouse.h -unix:!macx:SOURCES += mouselinux.cpp -unix:!macx:HEADERS += mouselinux.h -+#unix:!macx:SOURCES += mouselinux.cpp -+#unix:!macx:HEADERS += mouselinux.h #win32:SOURCES += mousewin.cpp #win32:HEADERS += mousewin.h @@ -44,7 +42,7 @@ # KissFFT KISSFFT_DIR = ../lib/kissfft -@@ -163,9 +151,8 @@ +@@ -163,9 +149,8 @@ INCLUDEPATH += $$KISSFFT_DIR # Audio scaling @@ -56,7 +54,7 @@ # Debug plotting through gplot API #unix:DEFINES += __GNUPLOT__ -@@ -197,7 +184,6 @@ +@@ -197,7 +182,6 @@ SETTINGS_FILE = \".mixxx.cfg\" TRACK_FILE = \".mixxxtrack.xml\" @@ -64,7 +62,7 @@ } unix { -@@ -259,23 +245,12 @@ +@@ -259,23 +243,12 @@ keyb.path = $${UNIX_SHARE_PATH}/keyboard keyb.files = keyboard/* @@ -89,14 +87,3 @@ } -@@ -295,6 +270,10 @@ - # Socket - SOURCES += mixxxsocketserver.cpp mixxxsocketclient.cpp #mixxxsocketcli.cpp - HEADERS += mixxxsocketserver.h mixxxsocketclient.h #mixxxsocket.cli.h -+ -+# compat_round() -+SOURCES += compat_round.cpp -+HEADERS += compat_round.h - - IMAGES += icon.png - DEFINES += SETTINGS_FILE=$$SETTINGS_FILE TRACK_FILE=$$TRACK_FILE diff --git a/audio/mixxx/files/patch-src::probabilityvector.cpp b/audio/mixxx/files/patch-src::probabilityvector.cpp deleted file mode 100644 index 12e5bcd94309..000000000000 --- a/audio/mixxx/files/patch-src::probabilityvector.cpp +++ /dev/null @@ -1,19 +0,0 @@ ---- src/probabilityvector.cpp.orig Fri Jun 25 19:36:10 2004 -+++ src/probabilityvector.cpp Fri Jun 25 19:36:33 2004 -@@ -18,6 +18,7 @@ - #include "probabilityvector.h" - #include "mathstuff.h" - #include "qapplication.h" -+#include "compat_round.h" - - ProbabilityVector::ProbabilityVector(float fMinInterval, float fMaxInterval, int iBins) - { -@@ -55,7 +56,7 @@ - - for (float j=fStart; j<fEnd; j++) - { -- int idx = round((fCenter+j)); -+ int idx = compat_round((fCenter+j)); - m_pHist[idx] += exp((-0.5*j*j)/(0.5*(CSAMPLE)kiGaussWidth))*fValue; //*fHysterisisFactor; - if (m_pHist[idx]>m_pHist[m_iCurrMaxBin]) - { |