summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-29 13:20:59 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-29 13:20:59 +0000
commit6f14c4537470258b5b66bcc416e8f78633695bbc (patch)
tree87af9fdae95623b426e329ab7c68f112978c4944
parent- Cleanup objformat-removal fallout (diff)
- Update to 0.9.9
PR: 110947 Submitted by: trasz
Notes
Notes: svn path=/head/; revision=188761
-rw-r--r--audio/cheesetracker/Makefile20
-rw-r--r--audio/cheesetracker/distinfo6
-rw-r--r--audio/cheesetracker/files/cheesetracker.pro202
-rw-r--r--audio/cheesetracker/files/patch-SConstruct11
-rw-r--r--audio/cheesetracker/files/patch-common::components::audio::sample_data.cpp20
-rw-r--r--audio/cheesetracker/files/patch-common::components::file::file_access.cpp11
-rw-r--r--audio/cheesetracker/files/patch-common::drivers::posix::mutex_lock_pthread.h10
-rw-r--r--audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_jack.cpp17
-rw-r--r--audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_oss.cpp9
-rw-r--r--audio/cheesetracker/files/patch-common::drivers::posix::timer_sigalarm.cpp11
-rw-r--r--audio/cheesetracker/files/patch-common::interface__QT::audio::sample_editor_format.cpp6
-rw-r--r--audio/cheesetracker/files/patch-common::plugins::effects::custom::chorus_effect.cpp16
-rw-r--r--audio/cheesetracker/files/patch-common::plugins::effects::custom::freeverb_effect.cpp14
-rw-r--r--audio/cheesetracker/files/patch-common::plugins::effects::ladspa::ladspa_effect.cpp14
-rw-r--r--audio/cheesetracker/files/patch-common::plugins::resamplers::helpers.h14
-rw-r--r--audio/cheesetracker/files/patch-detect.py94
-rw-r--r--audio/cheesetracker/files/patch-interface_binds::editor.cpp11
-rw-r--r--audio/cheesetracker/files/patch-trackercore::tracker_voice.cpp14
-rw-r--r--audio/cheesetracker/pkg-plist2
19 files changed, 140 insertions, 362 deletions
diff --git a/audio/cheesetracker/Makefile b/audio/cheesetracker/Makefile
index 603432933a45..b063743f4e1a 100644
--- a/audio/cheesetracker/Makefile
+++ b/audio/cheesetracker/Makefile
@@ -7,8 +7,7 @@
#
PORTNAME= cheesetracker
-PORTVERSION= 0.9.1
-PORTREVISION= 1
+PORTVERSION= 0.9.9
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= cheesetronic
@@ -18,10 +17,12 @@ COMMENT= An Impulse Tracker clone
BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:${PORTSDIR}/audio/ladspa \
qmake:${PORTSDIR}/devel/qmake
-LIB_DEPENDS= sigc-1.2.5:${PORTSDIR}/devel/libsigc++12
+LIB_DEPENDS= sigc-1.2.5:${PORTSDIR}/devel/libsigc++12 \
+ jack.0:${PORTSDIR}/audio/jack
USE_QT_VER= 3
MAKE_ENV= QTDIR="${QT_PREFIX}"
+USE_SCONS= yes
.include <bsd.port.pre.mk>
@@ -30,18 +31,15 @@ BROKEN= Does not compile on alpha
.endif
post-patch:
- @${CP} ${FILESDIR}/cheesetracker.pro ${WRKSRC}
-
-do-configure:
- @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} qmake \
- -spec ${LOCALBASE}/share/qt/mkspecs/freebsd-g++ cheesetracker.pro
+ @${REINPLACE_CMD} -e 's,%%CFLAGS%%,${CFLAGS},' ${WRKSRC}/SConstruct
+ @${REINPLACE_CMD} -e 's,%%QT_PREFIX%%,${QT_PREFIX},' ${WRKSRC}/detect.py
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/cheesetracker ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/cheesetracker/program__QT/cheesetracker_qt ${PREFIX}/bin
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/examples/*.it ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/examples/*.xm ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/cheesetracker/examples/*.it ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/cheesetracker/examples/*.xm ${EXAMPLESDIR}
.endif
.include <bsd.port.post.mk>
diff --git a/audio/cheesetracker/distinfo b/audio/cheesetracker/distinfo
index c35b82f55d77..5f24e2268c53 100644
--- a/audio/cheesetracker/distinfo
+++ b/audio/cheesetracker/distinfo
@@ -1,3 +1,3 @@
-MD5 (cheesetracker-0.9.1.tar.gz) = 3bf109b9733485ad760b636e4791e0c5
-SHA256 (cheesetracker-0.9.1.tar.gz) = c3567c964b795213d515fb6965955ffb8a816ccd9870c192103e69906f1fede8
-SIZE (cheesetracker-0.9.1.tar.gz) = 960168
+MD5 (cheesetracker-0.9.9.tar.gz) = d2cb55cd35eaaaef48454a5aad41a08d
+SHA256 (cheesetracker-0.9.9.tar.gz) = 97ddb3a7e6959400c1f042b8661a43540b3d5790db39c18bb9ce413a76d41d55
+SIZE (cheesetracker-0.9.9.tar.gz) = 842246
diff --git a/audio/cheesetracker/files/cheesetracker.pro b/audio/cheesetracker/files/cheesetracker.pro
deleted file mode 100644
index ca2ce7354c1a..000000000000
--- a/audio/cheesetracker/files/cheesetracker.pro
+++ /dev/null
@@ -1,202 +0,0 @@
-TEMPLATE = app
-CONFIG = qt warn_on thread release
-TERGET = cheesetracker
-
-DEFINES = POSIX_ENABLED OSS_ENABLED LADSPA_ENABLED
-LIBS = -L${LOCALBASE}/lib -lsigc-1.2
-INCLUDEPATH = common \
- common/components/audio \
- common/components/data \
- common/components/midi \
- common/defines \
- trackercore \
- loaders \
- savers \
- ${LOCALBASE}/lib/sigc++-1.2/include \
- ${LOCALBASE}/include/sigc++-1.2 \
- ${LOCALBASE}/include
-
-HEADERS = \
- common/interface__QT/helpers/property_bridge_edit.h \
- common/interface__QT/helpers/cspinbutton.h \
- common/interface__QT/helpers/ccolor_bridge.h \
- common/interface__QT/helpers/ccolor_list.h \
- common/interface__QT/helpers/font_bridge.h \
- common/interface__QT/helpers/keyboard_input_config.h \
- common/interface__QT/audio/audio_config.h \
- common/interface__QT/audio/sample_editor.h \
- common/interface__QT/audio/sample_editor_format.h \
- common/interface__QT/audio/sample_viewer.h \
- common/interface__QT/audio/sample_viewer_zoom.h \
- common/interface__QT/audio/envelope_point_editor.h \
- common/interface__QT/audio/envelope_editor.h \
- common/interface__QT/audio/resampler_config.h \
- common/interface__QT/audio/note_bridge.h \
- common/interface__QT/audio/sample_editor_clipboard.h \
- common/interface__QT/audio/sample_editor_effects.h \
- common/interface__QT/audio/mixer_effects_manager.h \
- common/interface__QT/audio/effect_chain_editor.h \
- common/interface__QT/popups/effect_select_popup.h \
- interface__QT/pattern_edit.h \
- interface__QT/pattern_edit_widget.h \
- interface__QT/sample_edit.h \
- interface__QT/instrument_edit.h \
- interface__QT/interface.h \
- interface__QT/order_and_defaults_editor.h \
- interface__QT/variables_edit.h \
- interface__QT/mdi_main_window.h \
- interface__QT/sample_player_fdialog.h
-
-SOURCES = \
- common/plugins/effects/custom/dummy_effect.cpp \
- common/plugins/effects/custom/chorus_effect.cpp \
- common/plugins/effects/custom/freeverb_effect.cpp \
- common/plugins/effects/custom/effect_amp.cpp \
- common/plugins/effects/custom/effect_distort.cpp \
- common/plugins/effects/custom/effect_echo.cpp \
- common/plugins/effects/custom/effect_stereo_enhancer.cpp \
- common/plugins/effects/freeverb/allpass.cpp \
- common/plugins/effects/freeverb/comb.cpp \
- common/plugins/effects/freeverb/revmodel.cpp \
- common/plugins/effects/ladspa/ladspa_effect_source.cpp \
- common/plugins/effects/ladspa/ladspa_effect.cpp \
- common/plugins/edit_effects/simple_edit_effects.cpp \
- common/plugins/resamplers/resampler_raw.cpp \
- common/plugins/resamplers/resampler_linear.cpp \
- common/plugins/resamplers/resampler_dummy.cpp \
- common/os/mutex_lock.cpp \
- common/os/threaded_class.cpp \
- common/os/path_data.cpp \
- common/os/timer.cpp \
- common/components/audio/sound_driver_manager.cpp \
- common/components/audio/effect.cpp \
- common/components/audio/sound_driver.cpp \
- common/components/audio/mixer.cpp \
- common/components/audio/voice.cpp \
- common/components/audio/lfo.cpp \
- common/components/audio/envelope.cpp \
- common/components/audio/midi_voice.cpp \
- common/components/audio/resampler.cpp \
- common/components/audio/resampler_manager.cpp \
- common/components/audio/resampler_instance.cpp \
- common/components/audio/sample_data.cpp \
- common/components/audio/sample_conversion.cpp \
- common/components/audio/mixer_base.cpp \
- common/components/audio/mixer__buffers.cpp \
- common/components/audio/ring_buffer.cpp \
- common/components/audio/tables.cpp \
- common/components/audio/edit_effect.cpp \
- common/components/audio/effect_source_internal.cpp \
- common/components/audio/effect_source_manager.cpp \
- common/components/audio/effect_chain.cpp \
- common/components/audio/sound_driver_dummy.cpp \
- common/components/audio/dds_helpers.cpp \
- common/components/midi/midi_client.cpp \
- common/components/midi/midi_out_device.cpp \
- common/components/midi/midioutdevicemanager.cpp \
- common/components/midi/engine.cpp \
- common/components/midi/engine_manager.cpp \
- common/components/midi/midi_control.cpp \
- common/components/midi/midi_control_base.cpp \
- common/components/file/file_access.cpp \
- common/components/file/file_browser.cpp \
- common/components/data/property_bridges.cpp \
- common/components/data/config_handler.cpp \
- common/components/data/keyboard_input.cpp \
- common/components/data/selection.cpp \
- common/components/data/dds.cpp \
- common/components/data/dds_packer.cpp \
- common/drivers/posix/timer_rtc.cpp \
- common/drivers/posix/timer_sigalarm.cpp \
- common/drivers/posix/sound_driver_jack.cpp \
- common/drivers/posix/sound_driver_oss.cpp \
- common/drivers/posix/midi_out_device_alsa.cpp \
- common/drivers/posix/midi_out_device_oss.cpp \
- common/drivers/rtaudio/rt_audio.cpp \
- common/drivers/rtaudio/sound_driver_rtaudio.cpp \
- common/interface__QT/helpers/property_bridge_edit.cpp \
- common/interface__QT/helpers/cspinbutton.cpp \
- common/interface__QT/helpers/clist_manager.cpp \
- common/interface__QT/helpers/vertical_scrolled_window.cpp \
- common/interface__QT/helpers/ccolor_panel.cpp \
- common/interface__QT/helpers/ccolor_bridge.cpp \
- common/interface__QT/helpers/ccolor_list.cpp \
- common/interface__QT/helpers/font_bridge.cpp \
- common/interface__QT/helpers/keyboard_input_config.cpp \
- common/interface__QT/helpers/property_bridge_edit_list.cpp \
- common/interface__QT/audio/audio_config.cpp \
- common/interface__QT/audio/sample_viewer.cpp \
- common/interface__QT/audio/sample_viewer_zoom.cpp \
- common/interface__QT/audio/sample_editor.cpp \
- common/interface__QT/audio/sample_editor_format.cpp \
- common/interface__QT/audio/envelope_point_editor.cpp \
- common/interface__QT/audio/envelope_editor.cpp \
- common/interface__QT/audio/resampler_config.cpp \
- common/interface__QT/audio/note_bridge.cpp \
- common/interface__QT/audio/sample_editor_clipboard.cpp \
- common/interface__QT/audio/sample_editor_effects.cpp \
- common/interface__QT/audio/mixer_effects_manager.cpp \
- common/interface__QT/audio/effect_chain_editor.cpp \
- common/interface__QT/popups/cspindialog.cpp \
- common/interface__QT/popups/text_area_popup.cpp \
- common/interface__QT/popups/effect_select_popup.cpp \
- trackercore/file_format_manager.cpp \
- trackercore/file_reader.cpp \
- trackercore/file_writer.cpp \
- trackercore/instrument.cpp \
- trackercore/loader.cpp \
- trackercore/pattern.cpp \
- trackercore/player_data.cpp \
- trackercore/player_data_control.cpp \
- trackercore/player_data_effects.cpp \
- trackercore/player_data_envelopes.cpp \
- trackercore/player_data_events.cpp \
- trackercore/player_data_nna.cpp \
- trackercore/player_data_notes.cpp \
- trackercore/player_data_reserved.cpp \
- trackercore/player_data_utils.cpp \
- trackercore/sample.cpp \
- trackercore/saver.cpp \
- trackercore/song.cpp \
- trackercore/player_data_filter.cpp \
- trackercore/tracker_voice.cpp \
- trackercore/voice_control.cpp \
- trackercore/freq_conversion.cpp \
- trackercore/channel_control.cpp \
- loaders/loader_it.cpp \
- loaders/loader_it_info.cpp \
- loaders/loader_it_instruments.cpp \
- loaders/loader_it_patterns.cpp \
- loaders/loader_it_samples.cpp \
- loaders/loader_s3m.cpp \
- loaders/loader_wav.cpp \
- loaders/loader_xm.cpp \
- loaders/loader_ct.cpp \
- savers/saver_ct.cpp \
- savers/saver_it.cpp \
- savers/saver_raw.cpp \
- savers/saver_wav.cpp \
- interface_binds/editor_commands.cpp \
- interface_binds/editor.cpp \
- interface_binds/editor_insertion.cpp \
- interface_binds/editor_orderlist.cpp \
- interface_binds/editor_selection.cpp \
- interface_binds/editor_undo.cpp \
- interface_binds/tracker_instance.cpp \
- interface_binds/player_rt_keyboard.cpp \
- interface__QT/sample_edit.cpp \
- interface__QT/instrument_edit.cpp \
- interface__QT/interface.cpp \
- interface__QT/variables_edit.cpp \
- interface__QT/order_and_defaults_editor.cpp \
- interface__QT/mdi_main_window.cpp \
- interface__QT/settings_window.cpp \
- interface__QT/pattern_edit.cpp \
- interface__QT/pattern_edit__keys.cpp \
- interface__QT/orderlist_edit.cpp \
- interface__QT/sample_instrument_table.cpp \
- interface__QT/pattern_edit_widget.cpp \
- interface__QT/table_base.cpp \
- interface__QT/sample_player_fdialog.cpp \
- program__QT/cheesetracker_qt.cpp
-
diff --git a/audio/cheesetracker/files/patch-SConstruct b/audio/cheesetracker/files/patch-SConstruct
new file mode 100644
index 000000000000..b7c6fcaf5a7b
--- /dev/null
+++ b/audio/cheesetracker/files/patch-SConstruct
@@ -0,0 +1,11 @@
+--- SConstruct.orig Tue Mar 27 22:35:53 2007
++++ SConstruct Tue Mar 27 22:36:54 2007
+@@ -87,7 +87,7 @@
+ env.optimize_resampler_hack=0
+
+ if (env['optimize']):
+- env.Append(CXXFLAGS=['-O3','-ffast-math']);
++ env.Append(CXXFLAGS="%%CFLAGS%%");
+ env.optimize_resampler_hack=0
+
+ profile=0;
diff --git a/audio/cheesetracker/files/patch-common::components::audio::sample_data.cpp b/audio/cheesetracker/files/patch-common::components::audio::sample_data.cpp
deleted file mode 100644
index 3f01b0ed2a8b..000000000000
--- a/audio/cheesetracker/files/patch-common::components::audio::sample_data.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- common/components/audio/sample_data.cpp.orig Thu Sep 16 18:34:33 2004
-+++ common/components/audio/sample_data.cpp Thu Sep 16 18:40:05 2004
-@@ -325,7 +325,7 @@
-
- if (is_16bits) {
-
-- (void*)new_sample_8bits=malloc(size);
-+ new_sample_8bits=(Sint8*)malloc(size);
- if (new_sample_8bits==NULL) {
-
- ERROR("Cannot convert sample! not enough memory?");
-@@ -339,7 +339,7 @@
- } else {
-
- Sint8 *sample_8bits_ptr=(Sint8*)data_ptr;
-- (void*)new_sample_16bits=malloc(size*2);
-+ new_sample_16bits=(Sint16*)malloc(size*2);
- if (new_sample_16bits==NULL) {
-
- ERROR("Cannot convert sample! not enough memory?");
diff --git a/audio/cheesetracker/files/patch-common::components::file::file_access.cpp b/audio/cheesetracker/files/patch-common::components::file::file_access.cpp
deleted file mode 100644
index bafe440d5e2f..000000000000
--- a/audio/cheesetracker/files/patch-common::components::file::file_access.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- common/components/file/file_access.cpp.orig Fri Sep 17 10:37:01 2004
-+++ common/components/file/file_access.cpp Fri Sep 17 10:37:23 2004
-@@ -164,7 +164,7 @@
-
- for (i=0;i<length;i++) {
-
-- get_byte((Uint8)aux_char);
-+ get_byte((Uint8&)aux_char);
- aux_string=aux_string+aux_char;
- }
-
diff --git a/audio/cheesetracker/files/patch-common::drivers::posix::mutex_lock_pthread.h b/audio/cheesetracker/files/patch-common::drivers::posix::mutex_lock_pthread.h
deleted file mode 100644
index 31a858e7ea3e..000000000000
--- a/audio/cheesetracker/files/patch-common::drivers::posix::mutex_lock_pthread.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- common/drivers/posix/mutex_lock_pthreads.h.orig Tue Oct 28 12:21:45 2003
-+++ common/drivers/posix/mutex_lock_pthreads.h Thu Oct 30 00:30:26 2003
-@@ -37,6 +37,7 @@
-
- #include "os/mutex_lock.h"
- #include <pthread.h>
-+#include <errno.h>
-
- /**
- *@author Juan Linietsky
diff --git a/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_jack.cpp b/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_jack.cpp
new file mode 100644
index 000000000000..21207be23d07
--- /dev/null
+++ b/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_jack.cpp
@@ -0,0 +1,17 @@
+--- common/drivers/posix/sound_driver_jack.cpp.orig Wed Mar 28 00:43:48 2007
++++ common/drivers/posix/sound_driver_jack.cpp Wed Mar 28 00:44:18 2007
+@@ -225,12 +225,12 @@
+
+ //printf("JACK: Connect Ports...\n");
+
+- if (jack_connect (client, jack_port_name (output_port_l), "alsa_pcm:playback_1")) {
++ if (jack_connect (client, jack_port_name (output_port_l), "oss:playback_1")) {
+ ERROR("cannot connect output ports\n");
+ //jack_client_close (client);
+ //return FUNCTION_FAILED;
+ }
+- if (jack_connect (client, jack_port_name (output_port_r), "alsa_pcm:playback_2")) {
++ if (jack_connect (client, jack_port_name (output_port_r), "oss:playback_2")) {
+ ERROR("cannot connect output ports\n");
+ //jack_client_close (client);
+ //return FUNCTION_FAILED;
diff --git a/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_oss.cpp b/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_oss.cpp
index de0efadc85d9..1eb58e78630c 100644
--- a/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_oss.cpp
+++ b/audio/cheesetracker/files/patch-common::drivers::posix::sound_driver_oss.cpp
@@ -15,12 +15,3 @@
bool Sound_Driver_OSS::does_perform_disk_write() {
-@@ -154,7 +162,7 @@
-
-
-
-- (void*)audiobuffer=calloc(1,buffinf.fragsize);
-+ audiobuffer=(Sint8*)calloc(1,buffinf.fragsize);
-
- if ( audiobuffer==NULL ) {
-
diff --git a/audio/cheesetracker/files/patch-common::drivers::posix::timer_sigalarm.cpp b/audio/cheesetracker/files/patch-common::drivers::posix::timer_sigalarm.cpp
deleted file mode 100644
index c7e5931031dc..000000000000
--- a/audio/cheesetracker/files/patch-common::drivers::posix::timer_sigalarm.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- common/drivers/posix/timer_sigalarm.cpp.orig Fri Sep 17 10:49:31 2004
-+++ common/drivers/posix/timer_sigalarm.cpp Fri Sep 17 10:50:25 2004
-@@ -67,7 +67,7 @@
-
- Timer_SigAlarm *dangit;
-
-- (void*)dangit=data;
-+ dangit=(Timer_SigAlarm*)data;
-
- dangit->callback();
-
diff --git a/audio/cheesetracker/files/patch-common::interface__QT::audio::sample_editor_format.cpp b/audio/cheesetracker/files/patch-common::interface__QT::audio::sample_editor_format.cpp
index 5f26436a5b87..55f519c69d57 100644
--- a/audio/cheesetracker/files/patch-common::interface__QT::audio::sample_editor_format.cpp
+++ b/audio/cheesetracker/files/patch-common::interface__QT::audio::sample_editor_format.cpp
@@ -1,14 +1,10 @@
--- common/interface__QT/audio/sample_editor_format.cpp.orig Fri Oct 24 06:29:26 2003
+++ common/interface__QT/audio/sample_editor_format.cpp Thu Oct 30 12:05:50 2003
-@@ -36,6 +36,11 @@
+@@ -36,6 +36,7 @@
#include "interface__QT/icons/transp_semitone_up.xpm"
#include <qpushbutton.h>
#include <qhbox.h>
+#include <math.h>
-+
-+#if defined(__FreeBSD__)
-+ #define round(c) rint(c)
-+#endif
void Sample_Editor_Format::transpose_up_1_4_cbk() {
diff --git a/audio/cheesetracker/files/patch-common::plugins::effects::custom::chorus_effect.cpp b/audio/cheesetracker/files/patch-common::plugins::effects::custom::chorus_effect.cpp
index 4d991ac9587d..c98c02e702fb 100644
--- a/audio/cheesetracker/files/patch-common::plugins::effects::custom::chorus_effect.cpp
+++ b/audio/cheesetracker/files/patch-common::plugins::effects::custom::chorus_effect.cpp
@@ -1,19 +1,11 @@
---- common/plugins/effects/custom/chorus_effect.cpp.orig Sun Oct 26 05:07:38 2003
-+++ common/plugins/effects/custom/chorus_effect.cpp Thu Oct 30 12:00:04 2003
-@@ -10,10 +10,16 @@
+--- common/plugins/effects/custom/chorus_effect.cpp.orig Fri Apr 23 05:21:14 2004
++++ common/plugins/effects/custom/chorus_effect.cpp Tue Mar 27 20:51:01 2007
+@@ -10,7 +10,7 @@
//
//
#include "chorus_effect.h"
+-
+#include <math.h>
-
- #define FRACTIONAL_BITS 13
#define MIX_CALCULATE_INCREMENT_INTERVAL 8
-+
-+#if defined(__FreeBSD__)
-+ #define lrint(flt) ((int) (flt))
-+ #define lrintf(flt) ((int) (flt))
-+#endif
-
- inline static double get_msecs_from_samples(double p_samples,double p_mixfreq) {
diff --git a/audio/cheesetracker/files/patch-common::plugins::effects::custom::freeverb_effect.cpp b/audio/cheesetracker/files/patch-common::plugins::effects::custom::freeverb_effect.cpp
deleted file mode 100644
index 7edc2aa91cf8..000000000000
--- a/audio/cheesetracker/files/patch-common::plugins::effects::custom::freeverb_effect.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- common/plugins/effects/custom/freeverb_effect.cpp.orig Sun Oct 26 05:07:38 2003
-+++ common/plugins/effects/custom/freeverb_effect.cpp Thu Oct 30 12:00:43 2003
-@@ -14,6 +14,11 @@
-
- #define REVERB_SOFT_BITS 16
-
-+#if defined(__FreeBSD__)
-+ #define lrint(flt) ((int) (flt))
-+ #define lrintf(flt) ((int) (flt))
-+#endif
-+
- void Freeverb_Effect::check_params_changed() {
-
- if (
diff --git a/audio/cheesetracker/files/patch-common::plugins::effects::ladspa::ladspa_effect.cpp b/audio/cheesetracker/files/patch-common::plugins::effects::ladspa::ladspa_effect.cpp
deleted file mode 100644
index 524499aaa6a6..000000000000
--- a/audio/cheesetracker/files/patch-common::plugins::effects::ladspa::ladspa_effect.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- common/plugins/effects/ladspa/ladspa_effect.cpp.orig Sun Oct 26 05:07:38 2003
-+++ common/plugins/effects/ladspa/ladspa_effect.cpp Thu Oct 30 12:01:23 2003
-@@ -18,6 +18,11 @@
- #include <dirent.h>
- #include <dlfcn.h>
-
-+#if defined(__FreeBSD__)
-+ #define lrint(flt) ((int) (flt))
-+ #define lrintf(flt) ((int) (flt))
-+#endif
-+
-
- void LADSPA_Effect::reset() {
-
diff --git a/audio/cheesetracker/files/patch-common::plugins::resamplers::helpers.h b/audio/cheesetracker/files/patch-common::plugins::resamplers::helpers.h
deleted file mode 100644
index 5389cfe01f78..000000000000
--- a/audio/cheesetracker/files/patch-common::plugins::resamplers::helpers.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- common/plugins/resamplers/helpers.h.orig Sun Oct 26 04:16:26 2003
-+++ common/plugins/resamplers/helpers.h Thu Oct 30 12:02:04 2003
-@@ -17,6 +17,11 @@
- #define HELPERS_H
-
-
-+#if defined(__FreeBSD__)
-+ #define lrint(flt) ((int) (flt))
-+ #define lrintf(flt) ((int) (flt))
-+#endif
-+
- //hardcoded for now!
- #define FILTER_BITS 12
- #define RAMP_BITS 11
diff --git a/audio/cheesetracker/files/patch-detect.py b/audio/cheesetracker/files/patch-detect.py
new file mode 100644
index 000000000000..3c498ed45175
--- /dev/null
+++ b/audio/cheesetracker/files/patch-detect.py
@@ -0,0 +1,94 @@
+--- detect.py.orig Fri Apr 23 05:21:08 2004
++++ detect.py Wed Mar 28 22:49:07 2007
+@@ -49,35 +49,11 @@
+
+ def check_libdl(libdata):
+
+- print "Checking for libdl...";
+- dl_search_dirs=[ \
+- "/sw", \
+- "/usr", \
+- "/usr/local", \
+- ];
+-
+- # search for extra include dirs to add
+- for x in dl_search_dirs:
+- if (os.path.isfile(x + "/include/dlfcn.h")):
+- print "Found dlfcn.h in " + x + "/include";
+- libdata.dl_flags=["-I" + x + "/include"];
+- break;
+-
+- f=open("test.cpp","w");
+- f.write("#include <dlfcn.h>\n#include <stdio.h>\nint main() { printf(\"Testing dlfcn.\"); return 0; }\n");
+- f.close();
+-
+- for x in dl_search_dirs:
+- execline="c++ -L" + x + "/lib " + libdata.dl_flags[0] + " test.cpp -o test -ldl 2>>config_errors.log";
+- res=os.system(execline);
++ libdata.dl_libs=[''];
++ libdata.dl_flags=[''];
++ libdata.dl_link_flags=[''];
+
+- if (res == 0):
+- libdata.dl_libs=['dl'];
+- libdata.dl_link_flags=["-L" + x + "/lib"];
+- os.system("rm test.cpp");
+- os.system("rm test");
+- return 0;
+- return 1;
++ return 0;
+
+ def check_alsa(libdata):
+
+@@ -148,6 +124,7 @@
+
+ #list of dirs I can test..
+ qt_unix_library_dirs = [\
++ "%%QT_PREFIX%%/lib",\
+ "",\
+ "/usr/lib",\
+ "/usr/X11R6/lib",\
+@@ -158,6 +135,7 @@
+ ];
+
+ qt_unix_bin_dirs = [\
++ "%%QT_PREFIX%%/bin",\
+ "",\
+ "/usr/bin",\
+ "/usr/X11R6/bin",\
+@@ -168,6 +146,7 @@
+ ];
+
+ qt_unix_include_dirs = [\
++ "%%QT_PREFIX%%/include",\
+ "/usr/include",\
+ "/usr/include/qt3",\
+ "/usr/X11R6/include",\
+@@ -271,7 +250,10 @@
+
+ print "Looking for QT 3.x 'moc' Binary:";
+
+- qt_found=0;
++ qt_found=1;
++ libdata.qt_link_flags="-L%%QT_PREFIX%%/lib"
++ libdata.qt_libs=['qt-mt'];
++ libdata.moc_bin="%%QT_PREFIX%%/bin/moc"
+
+ for x in qt_unix_bin_dirs:
+ if (not qt_lib_found):
+@@ -299,7 +281,6 @@
+ libdata.moc_bin=command;
+ break;
+
+-
+ if (not qt_found):
+ print("I Couldnt find QT in your system :(\n");
+ print("If you think it is actually installed, you could try the following:\n");
+@@ -312,7 +293,6 @@
+ else:
+ print("QT was found!\n");
+ return 0;
+-
+
+
+ def check_system(libdata):
diff --git a/audio/cheesetracker/files/patch-interface_binds::editor.cpp b/audio/cheesetracker/files/patch-interface_binds::editor.cpp
deleted file mode 100644
index 09b71b55a2fa..000000000000
--- a/audio/cheesetracker/files/patch-interface_binds::editor.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- interface_binds/editor.cpp.orig Fri Sep 17 11:15:06 2004
-+++ interface_binds/editor.cpp Fri Sep 17 11:30:35 2004
-@@ -358,7 +358,7 @@
-
- void Editor::set_note_increment_table(Uint8* p_table) {
-
-- (Uint8*)note_increments=p_table;
-+ note_increments=(char*)p_table;
-
- }
-
diff --git a/audio/cheesetracker/files/patch-trackercore::tracker_voice.cpp b/audio/cheesetracker/files/patch-trackercore::tracker_voice.cpp
deleted file mode 100644
index 67ee20472fb0..000000000000
--- a/audio/cheesetracker/files/patch-trackercore::tracker_voice.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- trackercore/tracker_voice.cpp.orig Sun Oct 26 05:00:37 2003
-+++ trackercore/tracker_voice.cpp Thu Oct 30 12:02:37 2003
-@@ -16,6 +16,11 @@
-
- #include "tracker_voice.h"
-
-+#if defined(__FreeBSD__)
-+ #define lrint(flt) ((int) (flt))
-+ #define lrintf(flt) ((int) (flt))
-+#endif
-+
-
- int Tracker_Voice::get_current_freq() {
-
diff --git a/audio/cheesetracker/pkg-plist b/audio/cheesetracker/pkg-plist
index 6da8b934370f..11a1d495eedd 100644
--- a/audio/cheesetracker/pkg-plist
+++ b/audio/cheesetracker/pkg-plist
@@ -1,4 +1,4 @@
-bin/cheesetracker
+bin/cheesetracker_qt
%%PORTDOCS%%%%EXAMPLESDIR%%/beek-dolphinisland.it
%%PORTDOCS%%%%EXAMPLESDIR%%/ll-globule.it
%%PORTDOCS%%%%EXAMPLESDIR%%/reduz-maschizo.it