Make Audacity work with the audio/flac update:

- Adjust LIB_DEPENDS,
 - fix configure checks
 - make it build with the API changes in FLAC++

ok naddy@
This commit is contained in:
mgrimm 2007-09-18 18:27:00 +00:00
parent eb946052cf
commit 1cf89e98a3
4 changed files with 126 additions and 6 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.10 2007/09/15 21:26:00 simon Exp $
# $OpenBSD: Makefile,v 1.11 2007/09/18 18:27:00 mgrimm Exp $
COMMENT= free audio editor
V= 1.3.3
DISTNAME= audacity-src-${V}
PKGNAME= audacity-${V}p0
PKGNAME= audacity-${V}p1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=audacity/}
@ -25,7 +25,7 @@ WANTLIB= c m ossaudio pthread stdc++ ogg expat sndfile glib-2.0 \
BUILD_DEPENDS= ::archivers/zip
LIB_DEPENDS= wx_base_xml,wx_base_odbc,wx_gtk2_html,wx_gtk2_adv,wx_gtk2_xrc,wx_base_net,wx_gtk2_dbgrid,wx_gtk2_qa,wx_base,wx_gtk2_core:wxWidgets-gtk2->=2.6.3:x11/wxWidgets \
samplerate.>=1::audio/libsamplerate \
FLAC.>=7,FLAC++.>=6::audio/flac \
FLAC.>=8,FLAC++.>=7::audio/flac \
vorbis.>=5,vorbisfile.>=4,vorbisenc.>=2::audio/libvorbis \
id3tag.>=2::audio/libid3tag \
mad.>=2::audio/libmad

View File

@ -1,6 +1,73 @@
$OpenBSD: patch-configure,v 1.6 2007/09/12 21:41:23 merdely Exp $
--- configure.orig Fri May 18 00:56:02 2007
+++ configure Wed Sep 12 15:29:36 2007
$OpenBSD: patch-configure,v 1.7 2007/09/18 18:27:00 mgrimm Exp $
--- configure.orig Fri May 18 06:56:02 2007
+++ configure Sun Sep 16 10:52:20 2007
@@ -4316,13 +4316,13 @@ else
fi;
- echo "$as_me:$LINENO: checking for FLAC__file_decoder_new in -lFLAC" >&5
-echo $ECHO_N "checking for FLAC__file_decoder_new in -lFLAC... $ECHO_C" >&6
-if test "${ac_cv_lib_FLAC_FLAC__file_decoder_new+set}" = set; then
+ echo "$as_me:$LINENO: checking for FLAC__stream_decoder_new in -lFLAC" >&5
+echo $ECHO_N "checking for FLAC__stream_decoder_new in -lFLAC... $ECHO_C" >&6
+if test "${ac_cv_lib_FLAC_FLAC__stream_decoder_new+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lFLAC -lFLAC++ -lFLAC $LIBS"
+LIBS="-lFLAC -lFLAC++ -lFLAC -logg $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4336,11 +4336,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char FLAC__file_decoder_new ();
+char FLAC__stream_decoder_new ();
int
main ()
{
-FLAC__file_decoder_new ();
+FLAC__stream_decoder_new ();
;
return 0;
}
@@ -4367,20 +4367,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_FLAC_FLAC__file_decoder_new=yes
+ ac_cv_lib_FLAC_FLAC__stream_decoder_new=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_FLAC_FLAC__file_decoder_new=no
+ac_cv_lib_FLAC_FLAC__stream_decoder_new=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_FLAC_FLAC__file_decoder_new" >&5
-echo "${ECHO_T}$ac_cv_lib_FLAC_FLAC__file_decoder_new" >&6
-if test $ac_cv_lib_FLAC_FLAC__file_decoder_new = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_FLAC_FLAC__stream_decoder_new" >&5
+echo "${ECHO_T}$ac_cv_lib_FLAC_FLAC__stream_decoder_new" >&6
+if test $ac_cv_lib_FLAC_FLAC__stream_decoder_new = yes; then
lib_found="yes"
else
lib_found="no"
@@ -4534,7 +4534,7 @@ fi
if test "x$lib_found" = "xyes" && test "x$header_found" = "xyes" ; then
LIBFLAC_SYSTEM_AVAILABLE="yes"
- LIBFLAC_SYSTEM_LIBS="-lFLAC++ -lFLAC"
+ LIBFLAC_SYSTEM_LIBS="-lFLAC++ -lFLAC -logg"
LIBFLAC_SYSTEM_CPPSYMBOLS="USE_LIBFLAC"
{ echo "$as_me:$LINENO: FLAC libraries are available as system libraries" >&5
echo "$as_me: FLAC libraries are available as system libraries" >&6;}
@@ -8516,7 +8516,7 @@ echo "$as_me: WARNING: no configuration information is
{ echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}

View File

@ -0,0 +1,20 @@
$ OpenBSD $
--- src/export/ExportFLAC.cpp.orig Sun Sep 16 11:28:32 2007
+++ src/export/ExportFLAC.cpp Sun Sep 16 11:33:31 2007
@@ -229,7 +229,6 @@ bool ExportFLAC::Export(AudacityProject *project,
gPrefs->Read(wxT("/FileFormats/FLACBitDepth"), wxT("16"));
FLAC::Encoder::File *encoder= new FLAC::Encoder::File();
- encoder->set_filename(OSFILENAME(fName));
encoder->set_channels(numChannels);
encoder->set_sample_rate(int(rate + 0.5));
@@ -264,7 +263,7 @@ bool ExportFLAC::Export(AudacityProject *project,
encoder->set_rice_parameter_search_dist(flacLevels[levelPref].rice_parameter_search_dist);
encoder->set_max_lpc_order(flacLevels[levelPref].max_lpc_order);
- encoder->init();
+ encoder->init(const_cast<const char *>(OSFILENAME(fName)));
int numWaveTracks;
WaveTrack **waveTracks;

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-src_import_ImportFLAC_cpp,v 1.1 2007/09/18 18:27:00 mgrimm Exp $
--- src/import/ImportFLAC.cpp.orig Sun Sep 16 11:40:41 2007
+++ src/import/ImportFLAC.cpp Sun Sep 16 11:54:55 2007
@@ -273,17 +273,12 @@ FLACImportFileHandle::FLACImportFileHandle(wxString na
bool FLACImportFileHandle::Init()
{
- bool success = mFile->set_filename(OSFILENAME(mName));
- if (!success) {
+ if (FLAC__STREAM_DECODER_INIT_STATUS_OK != mFile->init(const_cast<const char *>(OSFILENAME(mName)))) {
return false;
}
- FLAC::Decoder::File::State state = mFile->init();
- if (state != FLAC__FILE_DECODER_OK) {
- return false;
- }
mFile->process_until_end_of_metadata();
- state = mFile->get_state();
- if (state != FLAC__FILE_DECODER_OK) {
+ FLAC::Decoder::File::State state = mFile->get_state();
+ if (state != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
return false;
}
if (!mFile->is_valid() || mFile->get_was_error())
@@ -349,7 +344,7 @@ bool FLACImportFileHandle::Import(TrackFactory *trackF
mChannels[1]->SetTeamed(true);
}
- mFile->process_until_end_of_file();
+ mFile->process_until_end_of_stream();
*outTracks = new Track *[*outNumTracks];
for(c = 0; c < *outNumTracks; c++) {