- Update to 0.9.0 beta1

PR:		ports/70491
Submitted by:	Jean-Yves Lefort <jylefort@brutele.be> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-08-16 07:40:57 +00:00
parent 32e9445796
commit 22f0da95df
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=116358
9 changed files with 96 additions and 307 deletions

View file

@ -6,15 +6,17 @@
#
PORTNAME= hydrogen
PORTVERSION= 0.8.2
PORTVERSION= 0.9.0.b1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}-0.9.0beta1
MAINTAINER= jylefort@brutele.be
COMMENT= An advanced drum machine
LIB_DEPENDS= audiofile:${PORTSDIR}/audio/libaudiofile
LIB_DEPENDS= sndfile:${PORTSDIR}/audio/libsndfile \
FLAC:${PORTSDIR}/audio/flac
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
@ -26,7 +28,6 @@ CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include
LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --program-prefix="" --disable-alsa-seq
ALL_TARGET= clean all
MAN1= hydrogen.1
@ -59,9 +60,7 @@ post-patch:
-e 's|-pthread|${PTHREAD_LIBS}|g' \
${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -e 's|/usr|${LOCALBASE}|' \
${WRKSRC}/lib/LadspaFX.cpp \
${WRKSRC}/lib/fx/LadspaFX.cpp \
${WRKSRC}/lib/PreferencesMng.cpp
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
${WRKSRC}/data/demo_songs/*.h2song
.include <bsd.port.post.mk>

View file

@ -1,2 +1,2 @@
MD5 (hydrogen-0.8.2.tar.gz) = 65e16cabfaa414dabdd0039cad5eee94
SIZE (hydrogen-0.8.2.tar.gz) = 2066644
MD5 (hydrogen-0.9.0beta1.tar.gz) = 85261cff0eca380bfcb2731fd490f4a8
SIZE (hydrogen-0.9.0beta1.tar.gz) = 2499727

View file

@ -0,0 +1,15 @@
--- hydrogen_gui/InstrumentPropertiesDialog.cpp.orig Sun Aug 15 19:06:50 2004
+++ hydrogen_gui/InstrumentPropertiesDialog.cpp Sun Aug 15 19:07:17 2004
@@ -42,6 +42,12 @@
#include "Mixer.h"
#include "PatternEditorPanel.h"
+// workaround
+
+inline int round(double x) { return x > 0 ? (int) (x+0.5) :
+-(int)(-x+0.5); }
+
+
InstrumentPropertiesDialog::InstrumentPropertiesDialog( QWidget* parent )
: InstrumentPropertiesDialog_UI(parent)
, Object( "InstrPropDialog" )

View file

@ -0,0 +1,10 @@
--- hydrogen_gui/PatternEditor.cpp.orig Sun Aug 15 19:17:40 2004
+++ hydrogen_gui/PatternEditor.cpp Sun Aug 15 19:30:40 2004
@@ -36,6 +36,7 @@
#include <assert.h>
#include "qcursor.h"
+#include <algo.h>
PatternEditor::PatternEditor(QWidget* parent, PatternEditorPanel *pPanel)
: QWidget(parent, "", WNoAutoErase )

View file

@ -0,0 +1,11 @@
--- hydrogen_gui/SongEditor.cpp.orig Sun Aug 15 19:31:41 2004
+++ hydrogen_gui/SongEditor.cpp Sun Aug 15 19:31:55 2004
@@ -40,6 +40,8 @@
#include "qvbox.h"
#include "qcursor.h"
+#include <algo.h>
+
SongEditorPanel::SongEditorPanel(QWidget *parent)
: QWidget(parent)
, Object( "SongEditPanel" )

View file

@ -1,275 +0,0 @@
--- lib/Hydrogen.cpp.orig Tue Mar 9 11:31:37 2004
+++ lib/Hydrogen.cpp Thu Jun 24 17:05:13 2004
@@ -44,6 +44,263 @@
#include "AlsaMidiDriver.h"
+/*
+ * ====================================================
+ * 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);
+}
+
+static 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);
+ }
+}
+
+
// GLOBALS
pthread_mutex_t m_engineLock_mutex; /// Mutex for syncronized access to the song object
@@ -1919,7 +2176,7 @@
uint res = pref->getPatternEditorGridResolution();
int nBase = pref->isPatternEditorUsingTriplets() ? 3 : 4;
int scalar = (4 * MAX_NOTES) / (res*nBase);
- int qcolumn = (int)::round(column / (double)scalar) * scalar;
+ int qcolumn = (int)::compat_round(column / (double)scalar) * scalar;
if (qcolumn == MAX_NOTES) qcolumn = 0;
//printf ("column=%d qcol=%d\n", column, qcolumn);

View file

@ -0,0 +1,10 @@
--- lib/PreferencesMng.cpp.orig Sun Aug 15 18:53:34 2004
+++ lib/PreferencesMng.cpp Sun Aug 15 18:53:45 2004
@@ -70,7 +70,6 @@
}
else {
m_ladspaPathVect.push_back("/usr/lib/ladspa");
- m_ladspaPathVect.push_back("/usr/local/lib/ladspa");
}
recordEvents = false;

View file

@ -1,11 +1,11 @@
--- tools/Makefile.in.orig Tue Jun 22 18:51:15 2004
+++ tools/Makefile.in Tue Jun 22 18:51:24 2004
@@ -243,7 +243,7 @@
--- tools/Makefile.in.orig Sun Aug 15 18:48:10 2004
+++ tools/Makefile.in Sun Aug 15 18:48:16 2004
@@ -240,7 +240,7 @@
hydrogenPlayer_SOURCES = hydrogenPlayer.cpp
hydrogenPlayer_LDADD = ../lib/libhydrogen.a
hydrogenPlayer_LDADD = ../lib/libhydrogen.a ../lib/xml/libtinyxml.a ../lib/drivers/libdrivers.a ../lib/fx/libfx.a ../lib/smf/libsmf.a
-hydrogenPlayer_LDFLAGS = -ldl $(all_libraries)
+hydrogenPlayer_LDFLAGS = $(all_libraries)
subdir = tools
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
hydrogen2midi_SOURCES = hydrogen2midi.cpp
hydrogen2midi_LDADD = ../lib/libhydrogen.a ../lib/xml/libtinyxml.a ../lib/drivers/libdrivers.a ../lib/fx/libfx.a ../lib/smf/libsmf.a

View file

@ -1,4 +1,5 @@
bin/hydrogen
bin/hydrogen2midi
bin/hydrogenPlayer
share/hydrogen/data/DefaultSong.h2song
share/hydrogen/data/click.wav
@ -7,24 +8,25 @@ share/hydrogen/data/demo_songs/GM_kit_Jazzy.h2song
share/hydrogen/data/demo_songs/GM_kit_demo1.h2song
share/hydrogen/data/demo_songs/GM_kit_demo2.h2song
share/hydrogen/data/demo_songs/GM_kit_demo3.h2song
share/hydrogen/data/drumkits/GMkit/clap_Dry_c.wav
share/hydrogen/data/drumkits/GMkit/cra_Jazz.wav
share/hydrogen/data/drumkits/GMkit/cra_Rock_a.wav
share/hydrogen/data/drumkits/GMkit/cym_Jazz.wav
share/hydrogen/data/drumkits/GMkit/cym_Rock_b.wav
share/hydrogen/data/demo_songs/tutorial_georgyporgy.h2song
share/hydrogen/data/drumkits/GMkit/clap_Dry_c.flac
share/hydrogen/data/drumkits/GMkit/cra_Jazz.flac
share/hydrogen/data/drumkits/GMkit/cra_Rock_a.flac
share/hydrogen/data/drumkits/GMkit/cym_Jazz.flac
share/hydrogen/data/drumkits/GMkit/cym_Rock_b.flac
share/hydrogen/data/drumkits/GMkit/drumkit.xml
share/hydrogen/data/drumkits/GMkit/emptySample.wav
share/hydrogen/data/drumkits/GMkit/hhc_Dry_a.wav
share/hydrogen/data/drumkits/GMkit/hhc_Rock_b.wav
share/hydrogen/data/drumkits/GMkit/hhp_Dry_a.wav
share/hydrogen/data/drumkits/GMkit/kick_Dry_b.wav
share/hydrogen/data/drumkits/GMkit/misc_Cowbell.wav
share/hydrogen/data/drumkits/GMkit/sn_Jazz_c.wav
share/hydrogen/data/drumkits/GMkit/sn_Wet_b.wav
share/hydrogen/data/drumkits/GMkit/stick_Woody.wav
share/hydrogen/data/drumkits/GMkit/tom_Rock_hi.wav
share/hydrogen/data/drumkits/GMkit/tom_Rock_lo.wav
share/hydrogen/data/drumkits/GMkit/tom_Rock_mid.wav
share/hydrogen/data/drumkits/GMkit/emptySample.flac
share/hydrogen/data/drumkits/GMkit/hhc_Dry_a.flac
share/hydrogen/data/drumkits/GMkit/hhc_Rock_b.flac
share/hydrogen/data/drumkits/GMkit/hhp_Dry_a.flac
share/hydrogen/data/drumkits/GMkit/kick_Dry_b.flac
share/hydrogen/data/drumkits/GMkit/misc_Cowbell.flac
share/hydrogen/data/drumkits/GMkit/sn_Jazz_c.flac
share/hydrogen/data/drumkits/GMkit/sn_Wet_b.flac
share/hydrogen/data/drumkits/GMkit/stick_Woody.flac
share/hydrogen/data/drumkits/GMkit/tom_Rock_hi.flac
share/hydrogen/data/drumkits/GMkit/tom_Rock_lo.flac
share/hydrogen/data/drumkits/GMkit/tom_Rock_mid.flac
share/hydrogen/data/emptySample.wav
share/hydrogen/i18n/hydrogen.es.qm
share/hydrogen/i18n/hydrogen.fr.qm
@ -170,11 +172,27 @@ share/hydrogen/manual/img/recBtn_on.png
share/hydrogen/manual/img/showFX_on.png
share/hydrogen/manual/img/showPeaks_on.png
share/hydrogen/manual/img/tastiera.png
share/hydrogen/manual/img_tutorial/Bridge1_4th.png
share/hydrogen/manual/img_tutorial/Bridge3_3a_hh.png
share/hydrogen/manual/img_tutorial/C3_6+7.png
share/hydrogen/manual/img_tutorial/Intro4th.png
share/hydrogen/manual/img_tutorial/PatternBase1.png
share/hydrogen/manual/img_tutorial/PatternBase2.png
share/hydrogen/manual/img_tutorial/Riff1b.png
share/hydrogen/manual/img_tutorial/Riff1c.png
share/hydrogen/manual/img_tutorial/Riff1d.png
share/hydrogen/manual/img_tutorial/Verse8th.png
share/hydrogen/manual/img_tutorial/VerseAll.png
share/hydrogen/manual/img_tutorial/VerseBridge.png
share/hydrogen/manual/img_tutorial/VerseBridge_hh.png
share/hydrogen/manual/manual.html
share/hydrogen/manual/manual_de.html
share/hydrogen/manual/manual_en.html
share/hydrogen/manual/manual_es.html
share/hydrogen/manual/manual_fr.html
share/hydrogen/manual/manual_it.html
share/hydrogen/manual/tutorial_en.html
share/hydrogen/manual/tutorial_it.html
@dirrm share/hydrogen/data/demo_songs
@dirrm share/hydrogen/data/drumkits/GMkit
@dirrm share/hydrogen/data/drumkits
@ -188,5 +206,6 @@ share/hydrogen/manual/manual_it.html
@dirrm share/hydrogen/img/splash
@dirrm share/hydrogen/img
@dirrm share/hydrogen/manual/img
@dirrm share/hydrogen/manual/img_tutorial
@dirrm share/hydrogen/manual
@dirrm share/hydrogen