[arch-commits] Commit in audacity/trunk (PKGBUILD audacity-1.3.13-ffmpeg.patch)

2012-03-14 Thread Eric Bélanger
Date: Wednesday, March 14, 2012 @ 13:15:15
  Author: eric
Revision: 153455

upgpkg: audacity 2.0.0-1

Upstream update, Remove old patch

Modified:
  audacity/trunk/PKGBUILD
Deleted:
  audacity/trunk/audacity-1.3.13-ffmpeg.patch

--+
 PKGBUILD |   15 -
 audacity-1.3.13-ffmpeg.patch |  404 -
 2 files changed, 6 insertions(+), 413 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2012-03-14 16:44:04 UTC (rev 153454)
+++ PKGBUILD2012-03-14 17:15:15 UTC (rev 153455)
@@ -2,8 +2,8 @@
 # Maintainer: Eric Bélanger e...@archlinux.org
 
 pkgname=audacity
-pkgver=1.3.14
-pkgrel=2
+pkgver=2.0.0
+pkgrel=1
 pkgdesc=A program that lets you manipulate digital audio waveforms
 arch=('i686' 'x86_64')
 url=http://audacity.sourceforge.net/;
@@ -12,14 +12,11 @@
 'desktop-file-utils' 'jack' 'soundtouch' 'ffmpeg')
 options=('!makeflags')
 install=audacity.install
-source=(http://audacity.googlecode.com/files/${pkgname}-minsrc-${pkgver}-beta.tar.bz2
 \
-audacity-1.3.13-ffmpeg.patch)
-sha1sums=('a0fb22a0cfbb8a72abac8bbc01b3ad8b0bb7e11e'
-  '67f209d362ece6961b154a7c62e23ac856c2fa94')
+source=(http://audacity.googlecode.com/files/${pkgname}-minsrc-${pkgver}.tar.bz2)
+sha1sums=('0175474e63c51aaa97df9b45574f7f307f1d3bc8')
 
 build() {
-  cd ${srcdir}/${pkgname}-src-${pkgver}-beta
-  patch -p0 -i ${srcdir}/audacity-1.3.13-ffmpeg.patch
+  cd ${srcdir}/${pkgname}-src-${pkgver}
   WX_CONFIG=/usr/bin/wx-config ./configure --prefix=/usr \
 --with-portaudio --with-libsamplerate \
 --without-libresample --with-libmad \
@@ -31,6 +28,6 @@
 }
 
 package() {
-  cd ${srcdir}/${pkgname}-src-${pkgver}-beta
+  cd ${srcdir}/${pkgname}-src-${pkgver}
   make DESTDIR=${pkgdir} install
 }

Deleted: audacity-1.3.13-ffmpeg.patch
===
--- audacity-1.3.13-ffmpeg.patch2012-03-14 16:44:04 UTC (rev 153454)
+++ audacity-1.3.13-ffmpeg.patch2012-03-14 17:15:15 UTC (rev 153455)
@@ -1,404 +0,0 @@
-Index: src/FFmpeg.h
-===
 src/FFmpeg.h   (revision 11286)
-+++ src/FFmpeg.h   (working copy)
-@@ -47,6 +47,21 @@
-#if LIBAVCODEC_VERSION_INT  AV_VERSION_INT(52, 94, 1)
-#define AVSampleFormat SampleFormat
-#endif
-+
-+   #if LIBAVCODEC_VERSION_INT  AV_VERSION_INT(52, 120, 0)
-+   #define CodecType AVMediaType
-+   #define CODEC_TYPE_UNKNOWNAVMEDIA_TYPE_UNKNOWN
-+   #define CODEC_TYPE_VIDEO  AVMEDIA_TYPE_VIDEO
-+   #define CODEC_TYPE_AUDIO  AVMEDIA_TYPE_AUDIO
-+   #define CODEC_TYPE_DATA   AVMEDIA_TYPE_DATA
-+   #define CODEC_TYPE_SUBTITLE   AVMEDIA_TYPE_SUBTITLE
-+   #define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
-+   #define CODEC_TYPE_NB AVMEDIA_TYPE_NB
-+   #endif
-+
-+   #ifndef PKT_FLAG_KEY
-+   #define PKT_FLAG_KEY  AV_PKT_FLAG_KEY
-+   #endif  
- }
- #endif
- 
-@@ -505,20 +520,23 @@
-   (AVCodecContext *avctx, AVCodec *codec),
-   (avctx, codec);
-);
-+#if LIBAVCODEC_VERSION_INT  AV_VERSION_INT(52, 25, 0)
-FFMPEG_FUNCTION_WITH_RETURN(
-   int,
-+  avcodec_decode_audio3,
-+  (AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket 
*avpkt),
-+  (avctx, samples, frame_size_ptr, avpkt)
-+   );
-+#else
-+   FFMPEG_FUNCTION_WITH_RETURN(
-+  int,
-   avcodec_decode_audio2,
-   (AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, const 
uint8_t *buf, int buf_size),
-   (avctx, samples, frame_size_ptr, buf, buf_size)
-);
-+#endif
-FFMPEG_FUNCTION_WITH_RETURN(
-   int,
--  avcodec_decode_audio3,
--  (AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket 
*avpkt),
--  (avctx, samples, frame_size_ptr, avpkt)
--   );
--   FFMPEG_FUNCTION_WITH_RETURN(
--  int,
-   avcodec_encode_audio,
-   (AVCodecContext *avctx, uint8_t *buf, int buf_size, const short 
*samples),
-   (avctx, buf, buf_size, samples)
-@@ -556,13 +574,22 @@
-   (void),
-   ()
-);
-+#if LIBAVCODEC_VERSION_INT  AV_VERSION_INT(53, 0, 0)
-FFMPEG_FUNCTION_WITH_RETURN(
-   void*,
-   av_fast_realloc,
-   (void *ptr, unsigned int *size, unsigned int min_size),
-   (ptr, size, min_size)
-);
-+#else
-FFMPEG_FUNCTION_WITH_RETURN(
-+  void*,
-+  av_fast_realloc,
-+  (void *ptr, unsigned int *size, size_t min_size),
-+  (ptr, size, min_size)
-+   );
-+#endif
-+   FFMPEG_FUNCTION_WITH_RETURN(
-   int,
-   av_open_input_stream,
-   (AVFormatContext **ic_ptr, AVIOContext *pb, const char *filename, 
AVInputFormat *fmt, AVFormatParameters *ap),
-@@ -744,12 +771,21 @@
-   (AVFifoBuffer *f),
-   (f)
-);
-+#if LIBAVUTIL_VERSION_INT  AV_VERSION_INT(51, 0, 0)
-FFMPEG_FUNCTION_WITH_RETURN(
-   void*,
-   av_malloc,
-   

[arch-commits] Commit in audacity/trunk (PKGBUILD audacity-1.3.13-ffmpeg.patch)

2012-01-16 Thread Eric Bélanger
Date: Tuesday, January 17, 2012 @ 00:10:44
  Author: eric
Revision: 146760

upgpkg: audacity 1.3.14-2

Fix ffmpeg support (close FS#27944)

Modified:
  audacity/trunk/PKGBUILD
  audacity/trunk/audacity-1.3.13-ffmpeg.patch

--+
 PKGBUILD |6 
 audacity-1.3.13-ffmpeg.patch |  568 +
 2 files changed, 407 insertions(+), 167 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2012-01-17 03:41:24 UTC (rev 146759)
+++ PKGBUILD2012-01-17 05:10:44 UTC (rev 146760)
@@ -3,7 +3,7 @@
 
 pkgname=audacity
 pkgver=1.3.14
-pkgrel=1
+pkgrel=2
 pkgdesc=A program that lets you manipulate digital audio waveforms
 arch=('i686' 'x86_64')
 url=http://audacity.sourceforge.net/;
@@ -15,11 +15,11 @@
 
source=(http://audacity.googlecode.com/files/${pkgname}-minsrc-${pkgver}-beta.tar.bz2
 \
 audacity-1.3.13-ffmpeg.patch)
 sha1sums=('a0fb22a0cfbb8a72abac8bbc01b3ad8b0bb7e11e'
-  '26c2ad8e611705b2762a318e66312169f59cc218')
+  '67f209d362ece6961b154a7c62e23ac856c2fa94')
 
 build() {
   cd ${srcdir}/${pkgname}-src-${pkgver}-beta
-  patch -p1 -i ${srcdir}/audacity-1.3.13-ffmpeg.patch
+  patch -p0 -i ${srcdir}/audacity-1.3.13-ffmpeg.patch
   WX_CONFIG=/usr/bin/wx-config ./configure --prefix=/usr \
 --with-portaudio --with-libsamplerate \
 --without-libresample --with-libmad \

Modified: audacity-1.3.13-ffmpeg.patch
===
--- audacity-1.3.13-ffmpeg.patch2012-01-17 03:41:24 UTC (rev 146759)
+++ audacity-1.3.13-ffmpeg.patch2012-01-17 05:10:44 UTC (rev 146760)
@@ -1,164 +1,404 @@
 audacity-src-1.3.13-beta.orig/src/export/ExportFFmpeg.cpp
-+++ audacity-src-1.3.13-beta/src/export/ExportFFmpeg.cpp
-@@ -352,7 +352,7 @@
-avcodec_get_context_defaults(mEncAudioCodecCtx);
- 
-mEncAudioCodecCtx-codec_id = 
ExportFFmpegOptions::fmts[mSubFormat].codecid;
--   mEncAudioCodecCtx-codec_type = CODEC_TYPE_AUDIO;
-+   mEncAudioCodecCtx-codec_type = AVMEDIA_TYPE_AUDIO;
-mEncAudioCodecCtx-codec_tag = av_codec_get_tag((const AVCodecTag 
**)mEncFormatCtx-oformat-codec_tag,mEncAudioCodecCtx-codec_id);
-mSampleRate = (int)project-GetRate();
-mEncAudioCodecCtx-global_quality = -9; //quality mode is off by 
default;
-@@ -403,7 +403,6 @@
-   mEncAudioCodecCtx-flags2 = 0;
-   if (gPrefs-Read(wxT(/FileFormats/FFmpegBitReservoir),true)) 
mEncAudioCodecCtx-flags2 |= CODEC_FLAG2_BIT_RESERVOIR;
-   if (gPrefs-Read(wxT(/FileFormats/FFmpegVariableBlockLen),true)) 
mEncAudioCodecCtx-flags2 |= 0x0004; //WMA only?
--  mEncAudioCodecCtx-use_lpc = 
gPrefs-Read(wxT(/FileFormats/FFmpegUseLPC),true);
-   mEncAudioCodecCtx-compression_level = 
gPrefs-Read(wxT(/FileFormats/FFmpegCompLevel),-1);
-   mEncAudioCodecCtx-frame_size = 
gPrefs-Read(wxT(/FileFormats/FFmpegFrameSize),(long)0);
-   mEncAudioCodecCtx-lpc_coeff_precision = 
gPrefs-Read(wxT(/FileFormats/FFmpegLPCCoefPrec),(long)0);
-@@ -569,7 +569,7 @@
-   pkt.stream_index = mEncAudioStream-index;
-   pkt.data = mEncAudioEncodedBuf;
-   pkt.size = nEncodedBytes;
--  pkt.flags |= PKT_FLAG_KEY;
-+  pkt.flags |= AV_PKT_FLAG_KEY;
- 
-   // Set presentation time of frame (currently in the codec's timebase) 
in the stream timebase.
-   if(mEncAudioCodecCtx-coded_frame  
mEncAudioCodecCtx-coded_frame-pts != int64_t(AV_NOPTS_VALUE))
-@@ -656,7 +656,7 @@
- 
-   pkt.stream_index = mEncAudioStream-index;
-   pkt.data = mEncAudioEncodedBuf;
--  pkt.flags |= PKT_FLAG_KEY;
-+  pkt.flags |= AV_PKT_FLAG_KEY;
- 
-   // Write the encoded audio frame to the output file.
-   if ((ret = av_interleaved_write_frame(mEncFormatCtx, pkt)) != 0)
 audacity-src-1.3.13-beta.orig/src/export/ExportFFmpegDialogs.cpp
-+++ audacity-src-1.3.13-beta/src/export/ExportFFmpegDialogs.cpp
-@@ -1288,7 +1288,7 @@
-while ((codec = av_codec_next(codec)))
-{
-   // We're only interested in audio and only in encoders
--  if (codec-type == CODEC_TYPE_AUDIO  codec-encode)
-+  if (codec-type == AVMEDIA_TYPE_AUDIO  codec-encode)
-   {
-  mCodecNames.Add(wxString::FromUTF8(codec-name));
-  mCodecLongNames.Add(wxString::Format(wxT(%s - 
%s),mCodecNames.Last().c_str(),wxString::FromUTF8(codec-long_name).c_str()));
-@@ -1528,7 +1528,7 @@
-  // Find the codec, that is claimed to be compatible
-  AVCodec *codec = avcodec_find_encoder(CompatibilityList[i].codec);
-  // If it exists, is audio and has encoder
-- if (codec != NULL  (codec-type == CODEC_TYPE_AUDIO)  
codec-encode)
-+ if (codec != NULL  (codec-type == AVMEDIA_TYPE_AUDIO)  
codec-encode)
-  {
- // If it was selected - remember it's new index
- if ((id = 0)  codec-id == id) index = 
mShownCodecNames.GetCount();
-@@ -1543,7 +1543,7 @@
-