From: Alexis Ballier Date: Thu, 15 Mar 2007 19:02:38 +0000 (+0000) Subject: Version bump, bug #170990 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=957611198817e91b00e556df40f2c1c9e99fabdd;p=gentoo.git Version bump, bug #170990 Package-Manager: portage-2.1.2.2 --- diff --git a/media-sound/sox/ChangeLog b/media-sound/sox/ChangeLog index 75ddac26073e..4dcf97712f1a 100644 --- a/media-sound/sox/ChangeLog +++ b/media-sound/sox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-sound/sox -# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/sox/ChangeLog,v 1.62 2006/11/27 20:33:34 drizzt Exp $ +# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/sox/ChangeLog,v 1.63 2007/03/15 19:02:38 aballier Exp $ + +*sox-13.0.0 (15 Mar 2007) + + 15 Mar 2007; Alexis Ballier + +files/sox-13.0.0-flac113.patch, +sox-13.0.0.ebuild: + Version bump, bug #170990 27 Nov 2006; Timothy Redaelli sox-12.18.2.ebuild: Added ~x86-fbsd keyword. diff --git a/media-sound/sox/Manifest b/media-sound/sox/Manifest index eb4bf9bdd0b9..18c08f06101a 100644 --- a/media-sound/sox/Manifest +++ b/media-sound/sox/Manifest @@ -13,8 +13,13 @@ AUX sox-12.18.2-destdir.patch 4812 RMD160 87ed00c4e9f0536478103d06de472b2fef3336 MD5 d55d2fb2e25d289eaffedc5e29d9d168 files/sox-12.18.2-destdir.patch 4812 RMD160 87ed00c4e9f0536478103d06de472b2fef3336dd files/sox-12.18.2-destdir.patch 4812 SHA256 c16e0f2ea1ae8df5453e454b8d671a1091e478d73da3d15ef59d8fafad09690b files/sox-12.18.2-destdir.patch 4812 +AUX sox-13.0.0-flac113.patch 19319 RMD160 952b00a3f12c01b9f36f703eeebad3852bc7f34e SHA1 e25b6e87131e21d4e75ac54154ceb7037a320010 SHA256 71898675ddf57d04638cf28336b929636f09eef019d3e57593934efc5a942053 +MD5 9563d79cd1aa4392dbe3fe4c49d5b144 files/sox-13.0.0-flac113.patch 19319 +RMD160 952b00a3f12c01b9f36f703eeebad3852bc7f34e files/sox-13.0.0-flac113.patch 19319 +SHA256 71898675ddf57d04638cf28336b929636f09eef019d3e57593934efc5a942053 files/sox-13.0.0-flac113.patch 19319 DIST sox-12.17.9.tar.gz 468174 RMD160 1ba76bf5329daafe75158757b7074f8385788353 SHA1 1c20f73a38cc5dfe15102df0565c7f2cea7e0bd8 SHA256 1f0a5495634b3156673111e0ac93084985f5dbac9bd1974630d07c97ac4ddccf DIST sox-12.18.2.tar.gz 486814 RMD160 cf85ec4058a66687ad0a39bb85ff062d7c48e7bf SHA1 3f5742cbed98deafbcf80251c29224c9a9ef5c89 SHA256 832bf98c95580af879fe51311c861ba7c57f07a5791628108ef29a027f0271ff +DIST sox-13.0.0.tar.gz 725259 RMD160 84e7c8dea4f3a9145f9b42f7f03ac2329f3b83f2 SHA1 db0e6a7356b8fcbc72cf0dca1d81782fc3fa48f4 SHA256 c66c52cfa42fe126592563c3d8974007a9858bd35d2c1136389a721eeebb9f8e EBUILD sox-12.17.9.ebuild 1331 RMD160 712f913f910b3b19b6cf4a4ffc73ee7ba45e8d3d SHA1 cec6db19220e7ea9b481d8fcf941c3ea028484de SHA256 74ec0c64c2c41799049e9a57e78c29aadcba3efd0de96b1028dc36e587b9891c MD5 f4b9e8b683341a298e39d52560ba819a sox-12.17.9.ebuild 1331 RMD160 712f913f910b3b19b6cf4a4ffc73ee7ba45e8d3d sox-12.17.9.ebuild 1331 @@ -23,10 +28,14 @@ EBUILD sox-12.18.2.ebuild 1357 RMD160 caa25293c962dbb59557de8d0e3758e09d1bded4 S MD5 7f09cb5ce40a323da5f90929e7e5ab40 sox-12.18.2.ebuild 1357 RMD160 caa25293c962dbb59557de8d0e3758e09d1bded4 sox-12.18.2.ebuild 1357 SHA256 42f3f2b797e84d631dbf8f89066d627823974d2bd6687a317d09fd32d779fcb8 sox-12.18.2.ebuild 1357 -MISC ChangeLog 8510 RMD160 41656d8184b28768d2f2260eb4e2f31186ef52f0 SHA1 27509be35a3dbb80f2ce83e85cdf5cb36b3c1588 SHA256 abee663bdd0d182688649bf28966d114bb624f7db3fbc5b5a951d500a3522fcd -MD5 1ac73d857647a712316096adedc3ea7f ChangeLog 8510 -RMD160 41656d8184b28768d2f2260eb4e2f31186ef52f0 ChangeLog 8510 -SHA256 abee663bdd0d182688649bf28966d114bb624f7db3fbc5b5a951d500a3522fcd ChangeLog 8510 +EBUILD sox-13.0.0.ebuild 1546 RMD160 1d67e887dc2cfaaf9bbd76e4362e45b1a4cd5d40 SHA1 cf32ce6623c38df8d7be561e9b9f28a711b4c377 SHA256 756bb2f70ca2b02bad55b0093a3f8cc9c208e8867c3a9fbf9cafcc1acd45f0c7 +MD5 46c84a4c61a5de2bc69959a1d132d718 sox-13.0.0.ebuild 1546 +RMD160 1d67e887dc2cfaaf9bbd76e4362e45b1a4cd5d40 sox-13.0.0.ebuild 1546 +SHA256 756bb2f70ca2b02bad55b0093a3f8cc9c208e8867c3a9fbf9cafcc1acd45f0c7 sox-13.0.0.ebuild 1546 +MISC ChangeLog 8675 RMD160 e828e71127d2271baa58fd192fd83eef3e7d4685 SHA1 38c2edd92f0d89bc78f6bc03f05c385ed827c653 SHA256 0374c07aae60167d87f5976acecd32f3b4282572e57e462819cd190050ab5a39 +MD5 1634a5e10f138ac217506b593297a049 ChangeLog 8675 +RMD160 e828e71127d2271baa58fd192fd83eef3e7d4685 ChangeLog 8675 +SHA256 0374c07aae60167d87f5976acecd32f3b4282572e57e462819cd190050ab5a39 ChangeLog 8675 MISC metadata.xml 158 RMD160 6842e2189a50bd8a98e84802c38180ac1421c00e SHA1 703cea5a2109d41f7c87993c1f01d418a4c85174 SHA256 dfb5b47e6836db39fb187301dfcff1c2605e91d13d21db160806a563d8c75f9b MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 RMD160 6842e2189a50bd8a98e84802c38180ac1421c00e metadata.xml 158 @@ -37,10 +46,13 @@ SHA256 3bc8f937789bf4215ab7d1f5f61caa82d906d3ffa898d4f76ec69dedfa22ce40 files/di MD5 187e4f8e3857c4582a7800f8572937f7 files/digest-sox-12.18.2 235 RMD160 e974fe75ac263b8800fb736784cdbb8a8b632a58 files/digest-sox-12.18.2 235 SHA256 287bdfb248157a229b03f64efb9b4b69126ae0b580890ff779c359ef96751de1 files/digest-sox-12.18.2 235 +MD5 3112fd1d51c75c7aa5c4a480050a5752 files/digest-sox-13.0.0 232 +RMD160 e8162481db6ef441e1bcd0d83fab267e5560bacd files/digest-sox-13.0.0 232 +SHA256 a7ff72f151e4a8367ebc6e623d0581a211a31536d45446c6b4d24925247604f7 files/digest-sox-13.0.0 232 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.5 (GNU/Linux) +Version: GnuPG v2.0.3 (GNU/Linux) -iD8DBQFFa0vDGDyatLGpTbYRAsmlAJ95qvRE8mcaBlh+11ddX4HGlIBthgCcCoHT -SzHLKqtG6R8nXO+f+2VmJZU= -=veIr +iD8DBQFF+ZghvFcC4BYPU0oRAixeAKC9IP6HnnbJgO383uw5daHCbLLeXgCeOjlO +WZfSb7lgSrb9X2+yZe7HBuM= +=W4RX -----END PGP SIGNATURE----- diff --git a/media-sound/sox/files/digest-sox-13.0.0 b/media-sound/sox/files/digest-sox-13.0.0 new file mode 100644 index 000000000000..d5d3700c9976 --- /dev/null +++ b/media-sound/sox/files/digest-sox-13.0.0 @@ -0,0 +1,3 @@ +MD5 0243d62895caee558b5294d5b78cfbcb sox-13.0.0.tar.gz 725259 +RMD160 84e7c8dea4f3a9145f9b42f7f03ac2329f3b83f2 sox-13.0.0.tar.gz 725259 +SHA256 c66c52cfa42fe126592563c3d8974007a9858bd35d2c1136389a721eeebb9f8e sox-13.0.0.tar.gz 725259 diff --git a/media-sound/sox/files/sox-13.0.0-flac113.patch b/media-sound/sox/files/sox-13.0.0-flac113.patch new file mode 100644 index 000000000000..68705adbc15b --- /dev/null +++ b/media-sound/sox/files/sox-13.0.0-flac113.patch @@ -0,0 +1,527 @@ +Index: sox-13.0.0/configure.ac +=================================================================== +--- sox-13.0.0.orig/configure.ac ++++ sox-13.0.0/configure.ac +@@ -134,8 +134,8 @@ AC_ARG_WITH(flac, + [with_flac=$withval], + [with_flac=yes]) + if test "$with_flac" = yes; then +- AC_CHECK_HEADER(FLAC/file_encoder.h, +- [AC_CHECK_LIB(FLAC, FLAC__file_encoder_new,,with_flac=no)], ++ AC_CHECK_HEADER(FLAC/all.h, ++ [AC_CHECK_LIB(FLAC, FLAC__stream_encoder_new,,with_flac=no)], + with_flac=no) + fi + +Index: sox-13.0.0/src/flac.c +=================================================================== +--- sox-13.0.0.orig/src/flac.c ++++ sox-13.0.0/src/flac.c +@@ -1,18 +1,17 @@ + /* +- * This library is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as +- * published by the Free Software Foundation; either version 2 of the +- * License, or (at your option) any later version. ++ * This library is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU Lesser General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or (at ++ * your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser ++ * General Public License for more details. + * +- * You should have received a copy of the GNU Lesser General Public +- * License along with this library. If not, write to the Free Software +- * Foundation, Fifth Floor, 51 Franklin Street, Boston, MA 02111-1301, +- * USA. ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this library. If not, write to the Free Software Foundation, ++ * Fifth Floor, 51 Franklin Street, Boston, MA 02111-1301, USA. + */ + + /* File format: FLAC (c) 2006 robs@users.sourceforge.net */ +@@ -28,14 +27,24 @@ + + #include + +-/* Workaround for older flac versions */ ++/* Workaround for flac versions < 1.1.2 */ + #define FLAC__metadata_object_vorbiscomment_append_comment(object, entry, copy)\ + FLAC__metadata_object_vorbiscomment_insert_comment(object, object->data.vorbis_comment.num_comments, entry, copy) + ++#if !defined(FLAC_API_VERSION_CURRENT) ++#define FLAC_API_VERSION_CURRENT 7 ++#define FLAC__StreamDecoder FLAC__FileDecoder ++#define FLAC__stream_decoder_new FLAC__file_decoder_new ++#define FLAC__stream_decoder_set_metadata_respond_all FLAC__file_decoder_set_metadata_respond_all ++#define FLAC__stream_decoder_set_md5_checking FLAC__file_decoder_set_md5_checking ++#define FLAC__stream_decoder_process_until_end_of_metadata FLAC__file_decoder_process_until_end_of_metadata ++#define FLAC__stream_decoder_process_single FLAC__file_decoder_process_single ++#define FLAC__stream_decoder_finish FLAC__file_decoder_finish ++#define FLAC__stream_decoder_delete FLAC__file_decoder_delete ++#endif + + +-typedef struct +-{ ++typedef struct { + /* Info: */ + unsigned bits_per_sample; + unsigned channels; +@@ -47,7 +56,7 @@ typedef struct + unsigned number_of_wide_samples; + unsigned wide_sample_number; + +- FLAC__FileDecoder * flac; ++ FLAC__StreamDecoder * flac; + FLAC__bool eof; + } Decoder; + +@@ -57,56 +66,46 @@ assert_static(sizeof(Decoder) <= ST_MAX_ + + + +-static void FLAC__decoder_metadata_callback(FLAC__FileDecoder const * const flac, FLAC__StreamMetadata const * const metadata, void * const client_data) ++static void FLAC__decoder_metadata_callback(FLAC__StreamDecoder const * const flac, FLAC__StreamMetadata const * const metadata, void * const client_data) + { + ft_t format = (ft_t) client_data; + Decoder * decoder = (Decoder *) format->priv; + + (void) flac; + +- if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) +- { ++ if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) { + decoder->bits_per_sample = metadata->data.stream_info.bits_per_sample; + decoder->channels = metadata->data.stream_info.channels; + decoder->sample_rate = metadata->data.stream_info.sample_rate; + decoder->total_samples = metadata->data.stream_info.total_samples; + } +- else if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) +- { ++ else if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) { + size_t i, comment_size = 0; + + if (metadata->data.vorbis_comment.num_comments == 0) +- { + return; +- } + +- if (format->comment != NULL) +- { ++ if (format->comment != NULL) { + st_warn("FLAC: multiple Vorbis comment block ignored"); + return; + } + + for (i = 0; i < metadata->data.vorbis_comment.num_comments; ++i) +- { + comment_size += metadata->data.vorbis_comment.comments[i].length + 1; +- } + + format->comment = (char *) xcalloc(comment_size, sizeof(char)); + +- for (i = 0; i < metadata->data.vorbis_comment.num_comments; ++i) +- { ++ for (i = 0; i < metadata->data.vorbis_comment.num_comments; ++i) { + strcat(format->comment, (char const *) metadata->data.vorbis_comment.comments[i].entry); + if (i != metadata->data.vorbis_comment.num_comments - 1) +- { + strcat(format->comment, "\n"); +- } + } + } + } + + + +-static void FLAC__decoder_error_callback(FLAC__FileDecoder const * const flac, FLAC__StreamDecoderErrorStatus const status, void * const client_data) ++static void FLAC__decoder_error_callback(FLAC__StreamDecoder const * const flac, FLAC__StreamDecoderErrorStatus const status, void * const client_data) + { + ft_t format = (ft_t) client_data; + +@@ -117,15 +116,14 @@ static void FLAC__decoder_error_callback + + + +-static FLAC__StreamDecoderWriteStatus FLAC__frame_decode_callback(FLAC__FileDecoder const * const flac, FLAC__Frame const * const frame, FLAC__int32 const * const buffer[], void * const client_data) ++static FLAC__StreamDecoderWriteStatus FLAC__frame_decode_callback(FLAC__StreamDecoder const * const flac, FLAC__Frame const * const frame, FLAC__int32 const * const buffer[], void * const client_data) + { + ft_t format = (ft_t) client_data; + Decoder * decoder = (Decoder *) format->priv; + + (void) flac; + +- if (frame->header.bits_per_sample != decoder->bits_per_sample || frame->header.channels != decoder->channels || frame->header.sample_rate != decoder->sample_rate) +- { ++ if (frame->header.bits_per_sample != decoder->bits_per_sample || frame->header.channels != decoder->channels || frame->header.sample_rate != decoder->sample_rate) { + st_fail_errno(format, ST_EINVAL, "FLAC ERROR: parameters differ between frame and header"); + return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; + } +@@ -138,40 +136,50 @@ static FLAC__StreamDecoderWriteStatus FL + + + +-static int st_format_start_read(ft_t const format) ++static int start_read(ft_t const format) + { + Decoder * decoder = (Decoder *) format->priv; + + memset(decoder, 0, sizeof(*decoder)); +- decoder->flac = FLAC__file_decoder_new(); +- if (decoder->flac == NULL) +- { ++ decoder->flac = FLAC__stream_decoder_new(); ++ if (decoder->flac == NULL) { + st_fail_errno(format, ST_ENOMEM, "FLAC ERROR creating the decoder instance"); + return ST_EOF; + } + +- FLAC__file_decoder_set_md5_checking(decoder->flac, st_true); ++ FLAC__stream_decoder_set_md5_checking(decoder->flac, st_true); ++ FLAC__stream_decoder_set_metadata_respond_all(decoder->flac); ++#if FLAC_API_VERSION_CURRENT <= 7 + FLAC__file_decoder_set_filename(decoder->flac, format->filename); + FLAC__file_decoder_set_write_callback(decoder->flac, FLAC__frame_decode_callback); + FLAC__file_decoder_set_metadata_callback(decoder->flac, FLAC__decoder_metadata_callback); + FLAC__file_decoder_set_error_callback(decoder->flac, FLAC__decoder_error_callback); +- FLAC__file_decoder_set_metadata_respond_all(decoder->flac); + FLAC__file_decoder_set_client_data(decoder->flac, format); +- +- if (FLAC__file_decoder_init(decoder->flac) != FLAC__FILE_DECODER_OK) +- { ++ if (FLAC__file_decoder_init(decoder->flac) != FLAC__FILE_DECODER_OK) { ++#else ++ if (FLAC__stream_decoder_init_file( ++ decoder->flac, ++ format->filename, ++ FLAC__frame_decode_callback, ++ FLAC__decoder_metadata_callback, ++ FLAC__decoder_error_callback, ++ format) != FLAC__STREAM_DECODER_INIT_STATUS_OK) { ++#endif + st_fail_errno(format, ST_EHDR, "FLAC ERROR initialising decoder"); + return ST_EOF; + } + +- if (!FLAC__file_decoder_process_until_end_of_metadata(decoder->flac)) +- { ++ ++ if (!FLAC__stream_decoder_process_until_end_of_metadata(decoder->flac)) { + st_fail_errno(format, ST_EHDR, "FLAC ERROR whilst decoding metadata"); + return ST_EOF; + } + +- if (FLAC__file_decoder_get_state(decoder->flac) != FLAC__FILE_DECODER_OK && FLAC__file_decoder_get_state(decoder->flac) != FLAC__FILE_DECODER_END_OF_FILE) +- { ++#if FLAC_API_VERSION_CURRENT <= 7 ++ if (FLAC__file_decoder_get_state(decoder->flac) != FLAC__FILE_DECODER_OK && FLAC__file_decoder_get_state(decoder->flac) != FLAC__FILE_DECODER_END_OF_FILE) { ++#else ++ if (FLAC__stream_decoder_get_state(decoder->flac) > FLAC__STREAM_DECODER_END_OF_STREAM) { ++#endif + st_fail_errno(format, ST_EHDR, "FLAC ERROR during metadata decoding"); + return ST_EOF; + } +@@ -185,15 +193,14 @@ static int st_format_start_read(ft_t con + } + + +-static st_size_t st_format_read(ft_t const format, st_sample_t * sampleBuffer, st_size_t const requested) ++static st_size_t read(ft_t const format, st_sample_t * sampleBuffer, st_size_t const requested) + { + Decoder * decoder = (Decoder *) format->priv; + size_t actual = 0; + +- while (!decoder->eof && actual < requested) +- { ++ while (!decoder->eof && actual < requested) { + if (decoder->wide_sample_number >= decoder->number_of_wide_samples) +- FLAC__file_decoder_process_single(decoder->flac); ++ FLAC__stream_decoder_process_single(decoder->flac); + if (decoder->wide_sample_number >= decoder->number_of_wide_samples) + decoder->eof = st_true; + else { +@@ -216,22 +223,19 @@ static st_size_t st_format_read(ft_t con + + + +-static int st_format_stop_read(ft_t const format) ++static int stop_read(ft_t const format) + { + Decoder * decoder = (Decoder *) format->priv; + +- if (!FLAC__file_decoder_finish(decoder->flac) && decoder->eof) +- { ++ if (!FLAC__stream_decoder_finish(decoder->flac) && decoder->eof) + st_warn("FLAC decoder MD5 checksum mismatch."); +- } +- FLAC__file_decoder_delete(decoder->flac); ++ FLAC__stream_decoder_delete(decoder->flac); + return ST_SUCCESS; + } + + + +-typedef struct +-{ ++typedef struct { + /* Info: */ + unsigned bits_per_sample; + +@@ -266,30 +270,61 @@ static void flac_stream_encoder_metadata + + + +-static int st_format_start_write(ft_t const format) ++#if FLAC_API_VERSION_CURRENT >= 8 ++static FLAC__StreamEncoderSeekStatus flac_stream_encoder_seek_callback(FLAC__StreamEncoder const * encoder, FLAC__uint64 absolute_byte_offset, void * client_data) ++{ ++ ft_t const format = (ft_t) client_data; ++ (void) encoder; ++ if (!format->seekable) ++ return FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED; ++ else if (st_seeki(format, (st_size_t)absolute_byte_offset, SEEK_SET) != ST_SUCCESS) ++ return FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR; ++ else ++ return FLAC__STREAM_ENCODER_SEEK_STATUS_OK; ++} ++ ++ ++ ++static FLAC__StreamEncoderTellStatus flac_stream_encoder_tell_callback(FLAC__StreamEncoder const * encoder, FLAC__uint64 * absolute_byte_offset, void * client_data) ++{ ++ ft_t const format = (ft_t) client_data; ++ off_t pos; ++ (void) encoder; ++ if (!format->seekable) ++ return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED; ++ else if ((pos = ftello(format->fp)) < 0) ++ return FLAC__STREAM_ENCODER_TELL_STATUS_ERROR; ++ else { ++ *absolute_byte_offset = (FLAC__uint64)pos; ++ return FLAC__STREAM_ENCODER_TELL_STATUS_OK; ++ } ++} ++#endif ++ ++ ++ ++static int start_write(ft_t const format) + { + Encoder * encoder = (Encoder *) format->priv; + FLAC__StreamEncoderState status; + + memset(encoder, 0, sizeof(*encoder)); + encoder->flac = FLAC__stream_encoder_new(); +- if (encoder->flac == NULL) +- { ++ if (encoder->flac == NULL) { + st_fail_errno(format, ST_ENOMEM, "FLAC ERROR creating the encoder instance"); + return ST_EOF; + } + encoder->decoded_samples = xmalloc(ST_BUFSIZ * sizeof(FLAC__int32)); + + { /* Select and set FLAC encoder options: */ +- static struct +- { +- int blocksize; ++ static struct { ++ unsigned blocksize; + FLAC__bool do_exhaustive_model_search; + FLAC__bool do_mid_side_stereo; + FLAC__bool loose_mid_side_stereo; + unsigned max_lpc_order; +- int max_residual_partition_order; +- int min_residual_partition_order; ++ unsigned max_residual_partition_order; ++ unsigned min_residual_partition_order; + } const options[] = { + {1152, st_false, st_false, st_false, 0, 2, 2}, + {1152, st_false, st_true, st_true, 0, 2, 2}, +@@ -303,12 +338,10 @@ static int st_format_start_write(ft_t co + }; + unsigned compression_level = array_length(options) - 1; /* Default to "best" */ + +- if (format->signal.compression != HUGE_VAL) +- { ++ if (format->signal.compression != HUGE_VAL) { + compression_level = format->signal.compression; + if (compression_level != format->signal.compression || +- compression_level >= array_length(options)) +- { ++ compression_level >= array_length(options)) { + st_fail_errno(format, ST_EINVAL, + "FLAC compression level must be a whole number from 0 to %i", + array_length(options) - 1); +@@ -325,8 +358,7 @@ static int st_format_start_write(ft_t co + SET_OPTION(max_lpc_order); + SET_OPTION(max_residual_partition_order); + SET_OPTION(min_residual_partition_order); +- if (format->signal.channels == 2) +- { ++ if (format->signal.channels == 2) { + SET_OPTION(do_mid_side_stereo); + SET_OPTION(loose_mid_side_stereo); + } +@@ -351,23 +383,17 @@ static int st_format_start_write(ft_t co + size_t i; + st_bool streamable = st_false; + for (i = 0; !streamable && i < array_length(streamable_rates); ++i) +- { + streamable = (streamable_rates[i] == format->signal.rate); +- } +- if (!streamable) +- { ++ if (!streamable) { + st_report("FLAC: non-standard rate; output may not be streamable"); + FLAC__stream_encoder_set_streamable_subset(encoder->flac, st_false); + } + } + + if (format->length != 0) +- { + FLAC__stream_encoder_set_total_samples_estimate(encoder->flac, (FLAC__uint64)format->length); +- } + +- if (format->comment != NULL && * format->comment != '\0') +- { ++ if (format->comment != NULL && * format->comment != '\0') { + FLAC__StreamMetadata * metadata[1]; + FLAC__StreamMetadata_VorbisComment_Entry entry; + char * comments, * comment, * end_of_comment; +@@ -375,8 +401,7 @@ static int st_format_start_write(ft_t co + encoder->metadata = metadata[0] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); + + /* Check if there is a FIELD=value pair already in the comment; if not, add one */ +- if (strchr(format->comment, '=') == NULL) +- { ++ if (strchr(format->comment, '=') == NULL) { + static const char prepend[] = "COMMENT="; + comments = xmalloc(strlen(format->comment) + sizeof(prepend)); + strcpy(comments, prepend); +@@ -387,12 +412,10 @@ static int st_format_start_write(ft_t co + + comment = comments; + +- do +- { ++ do { + entry.entry = (FLAC__byte *) comment; + end_of_comment = strchr(comment, '\n'); +- if (end_of_comment != NULL) +- { ++ if (end_of_comment != NULL) { + *end_of_comment = '\0'; + comment = end_of_comment + 1; + } +@@ -405,13 +428,17 @@ static int st_format_start_write(ft_t co + free(comments); + } + ++#if FLAC_API_VERSION_CURRENT <= 7 + FLAC__stream_encoder_set_write_callback(encoder->flac, flac_stream_encoder_write_callback); + FLAC__stream_encoder_set_metadata_callback(encoder->flac, flac_stream_encoder_metadata_callback); + FLAC__stream_encoder_set_client_data(encoder->flac, format); +- + status = FLAC__stream_encoder_init(encoder->flac); +- if (status != FLAC__STREAM_ENCODER_OK) +- { ++#else ++ status = FLAC__stream_encoder_init_stream(encoder->flac, flac_stream_encoder_write_callback, ++ flac_stream_encoder_seek_callback, flac_stream_encoder_tell_callback, flac_stream_encoder_metadata_callback, format); ++#endif ++ ++ if (status != FLAC__STREAM_ENCODER_OK) { + st_fail_errno(format, ST_EINVAL, "%s", FLAC__StreamEncoderStateString[status]); + return ST_EOF; + } +@@ -420,19 +447,17 @@ static int st_format_start_write(ft_t co + + + +-static st_size_t st_format_write(ft_t const format, st_sample_t const * const sampleBuffer, st_size_t const len) ++static st_size_t write(ft_t const format, st_sample_t const * const sampleBuffer, st_size_t const len) + { + Encoder * encoder = (Encoder *) format->priv; + unsigned i; + +- for (i = 0; i < len; ++i) +- { +- switch (encoder->bits_per_sample) +- { ++ for (i = 0; i < len; ++i) { ++ switch (encoder->bits_per_sample) { + case 8: encoder->decoded_samples[i] = ST_SAMPLE_TO_SIGNED_BYTE(sampleBuffer[i], format->clips); break; + case 16: encoder->decoded_samples[i] = ST_SAMPLE_TO_SIGNED_WORD(sampleBuffer[i], format->clips); break; + case 24: encoder->decoded_samples[i] = ST_SAMPLE_TO_SIGNED_24BIT(sampleBuffer[i],format->clips); break; +- case 32: encoder->decoded_samples[i] = ST_SAMPLE_TO_SIGNED_DWORD(sampleBuffer[i],); break; ++ case 32: encoder->decoded_samples[i] = ST_SAMPLE_TO_SIGNED_DWORD(sampleBuffer[i],format->clips); break; + } + } + FLAC__stream_encoder_process_interleaved(encoder->flac, encoder->decoded_samples, len / format->signal.channels); +@@ -441,7 +466,7 @@ static st_size_t st_format_write(ft_t co + + + +-static int st_format_stop_write(ft_t const format) ++static int stop_write(ft_t const format) + { + Encoder * encoder = (Encoder *) format->priv; + FLAC__StreamEncoderState state = FLAC__stream_encoder_get_state(encoder->flac); +@@ -450,8 +475,7 @@ static int st_format_stop_write(ft_t con + FLAC__stream_encoder_finish(encoder->flac); + FLAC__stream_encoder_delete(encoder->flac); + free(encoder->decoded_samples); +- if (state != FLAC__STREAM_ENCODER_OK) +- { ++ if (state != FLAC__STREAM_ENCODER_OK) { + st_fail_errno(format, ST_EINVAL, "FLAC ERROR: failed to encode to end of stream"); + return ST_EOF; + } +@@ -460,33 +484,16 @@ static int st_format_stop_write(ft_t con + + + +-static char const * const st_format_names[] = +-{ +- "flac", +- NULL +-}; +- +- +- +-static st_format_t const st_format = +-{ +- st_format_names, +- NULL, +- 0, +- st_format_start_read, +- st_format_read, +- st_format_stop_read, +- st_format_start_write, +- st_format_write, +- st_format_stop_write, +- st_format_nothing_seek +-}; +- +- +- + st_format_t const * st_flac_format_fn(void) + { +- return &st_format; ++ static char const * const names[] = {"flac", NULL}; ++ static st_format_t const driver = { ++ names, NULL, 0, ++ start_read, read, stop_read, ++ start_write, write, stop_write, ++ 0 ++ }; ++ return &driver; + } + + diff --git a/media-sound/sox/sox-13.0.0.ebuild b/media-sound/sox/sox-13.0.0.ebuild new file mode 100644 index 000000000000..d49481177ba7 --- /dev/null +++ b/media-sound/sox/sox-13.0.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/sox/sox-13.0.0.ebuild,v 1.1 2007/03/15 19:02:38 aballier Exp $ + +inherit flag-o-matic eutils autotools + +DESCRIPTION="The swiss army knife of sound processing programs" +HOMEPAGE="http://sox.sourceforge.net" +SRC_URI="mirror://sourceforge/sox/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="alsa debug flac encode mad ogg libsamplerate sndfile" + +DEPEND="virtual/libc + alsa? ( media-libs/alsa-lib ) + encode? ( media-sound/lame ) + flac? ( media-libs/flac ) + mad? ( media-libs/libmad ) + sndfile? ( media-libs/libsndfile ) + libsamplerate? ( media-libs/libsamplerate ) + media-libs/libvorbis + media-libs/libogg" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-flac113.patch" + AT_M4DIR="m4" eautoreconf +} + +src_compile () { + # Fixes wav segfaults. See Bug #35745. + append-flags -fsigned-char + + econf $(use_enable alsa alsa-dsp) \ + $(use_with encode lame) \ + $(use_with mad) \ + $(use_enable debug) \ + $(use_with sndfile) \ + $(use_with flac) \ + $(use_with libsamplerate samplerate) \ + --enable-oss-dsp \ + --enable-fast-ulaw \ + --enable-fast-alaw \ + || die "configure failed" + + #workaround for flac, it wants to include a damn config.h file + touch src/config.h + emake || die "make failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + dodoc NEWS ChangeLog README AUTHORS +}