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

2014-02-06 Thread Eric Bélanger
Date: Thursday, February 6, 2014 @ 20:58:04
  Author: eric
Revision: 205534

upgpkg: moc 1:2.5.0beta2-1

Upstream update, Remove unneeded popt depends, Remove old patch

Modified:
  moc/trunk/PKGBUILD
Deleted:
  moc/trunk/moc-ffmpeg.patch

--+
 PKGBUILD |   33 +--
 moc-ffmpeg.patch |  557 -
 2 files changed, 13 insertions(+), 577 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2014-02-06 19:32:21 UTC (rev 205533)
+++ PKGBUILD2014-02-06 19:58:04 UTC (rev 205534)
@@ -2,27 +2,25 @@
 # Maintainer: Eric Bélanger e...@archlinux.org
 
 pkgname=moc
-pkgver=2.5beta1
-pkgrel=5
+pkgver=2.5.0beta2
+pkgrel=1
 epoch=1
 pkgdesc=An ncurses console audio player designed to be powerful and easy to 
use
 arch=('i686' 'x86_64')
 url=http://moc.daper.net/;
 license=('GPL')
-depends=('libmad' 'libid3tag' 'jack' 'curl' 'libltdl' 'file' 'popt')
+depends=('libmad' 'libid3tag' 'jack' 'curl' 'libltdl' 'file')
 makedepends=('speex' 'ffmpeg' 'taglib' 'libmpcdec' 'wavpack' 'libmodplug' 
'faad2')
-optdepends=('speex: for using the speex plugin' 
+optdepends=('speex: for using the speex plugin'
'ffmpeg: for using the ffmpeg plugin'
-   'taglib: for using the musepack plugin' 
-   'libmpcdec: for using the musepack plugin' 
-'wavpack: for using the wavpack plugin' 
-'faad2: for using the aac plugin' 
+   'taglib: for using the musepack plugin'
+   'libmpcdec: for using the musepack plugin'
+'wavpack: for using the wavpack plugin'
+'faad2: for using the aac plugin'
'libmodplug: for using the modplug plugin')
-source=(ftp://ftp.daper.net/pub/soft/moc/unstable/moc-2.5.0-beta1.tar.bz2{,.sig}
 \
-moc-ffmpeg.patch)
-sha1sums=('4030a1fa5c7cfef06909c54d8c7a1fbb93f23caa'
-  '29c232c37e1f3737c3b670372732446e9c0786a8'
-  'f3b8b327dd27d50422b1ad8c9ef89a7366529307')
+source=(http://ftp.daper.net/pub/soft/moc/unstable/moc-${pkgver%b*}-${pkgver#*.*.?}.tar.bz2{,.sig})
+sha1sums=('bf786d719c853c22dec74bc2ee565aae4596fbe7'
+  'SKIP')
 
 # source PKGBUILD  mksource
 mksource() {
@@ -40,13 +38,8 @@
   gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${pkgver}.tar.xz
 }
 
-prepare() {
-  cd ${pkgname}-2.5.0-beta1
-  patch -p0 -i ${srcdir}/moc-ffmpeg.patch
-}
-
 build() {
-  cd ${pkgname}-2.5.0-beta1
+  cd ${pkgname}-${pkgver%b*}-${pkgver#*.*.?}
   ./configure --prefix=/usr --without-rcc \
 --with-oss --with-alsa --with-jack --with-aac --with-mp3 \
 --with-musepack --with-vorbis --with-flac --with-wavpack \
@@ -56,6 +49,6 @@
 }
 
 package() {
-  cd ${pkgname}-2.5.0-beta1
+  cd ${pkgname}-${pkgver%b*}-${pkgver#*.*.?}
   make DESTDIR=${pkgdir} install
 }

Deleted: moc-ffmpeg.patch
===
--- moc-ffmpeg.patch2014-02-06 19:32:21 UTC (rev 205533)
+++ moc-ffmpeg.patch2014-02-06 19:58:04 UTC (rev 205534)
@@ -1,557 +0,0 @@
-Index: menu.c
-===
 menu.c (revision 2516)
-+++ menu.c (working copy)
-@@ -90,9 +90,14 @@
-   getyx (menu-win, y, x);
-   if (title_width = title_space || mi-align == MENU_ALIGN_LEFT)
-   xwaddnstr (menu-win, mi-title, title_space);
--  else
--  xwaddstr (menu-win, mi-title + title_width - title_space);
-+  else {
-+  char *ptr;
- 
-+  ptr = xstrtail (mi-title, title_space);
-+  xwaddstr (menu-win, ptr);
-+  free (ptr);
-+  }
-+
-   /* Fill the remainder of the title field with spaces. */
-   if (mi == menu-selected) {
-   getyx (menu-win, y, ix);
-Index: utf8.c
-===
 utf8.c (revision 2516)
-+++ utf8.c (working copy)
-@@ -199,47 +199,50 @@
- 
- int xwaddnstr (WINDOW *win, const char *str, const int n)
- {
--  int res;
-+  int res, width, inv_char;
-+  wchar_t *ucs;
-+  char *mstr, *lstr;
-+  size_t size, num_chars;
- 
-   assert (n  0);
-   assert (str != NULL);
- 
--  if (using_utf8) {
-+  mstr = iconv_str (iconv_desc, str);
- 
--  /* This nasty hack is because we need to count n in chars, but
--   * [w]addnstr() takes arguments in bytes (in UTF-8 a char can be
--   * longer than 1 byte).  There are also problems with 
[w]addnwstr()
--   * (screen garbled).  I have no better idea. */
-+  size = xmbstowcs (NULL, mstr, -1, NULL) + 1;
-+  ucs = (wchar_t *)xmalloc (sizeof(wchar_t) * size);
-+  xmbstowcs (ucs, mstr, size, inv_char);
-+  width = wcswidth (ucs, WIDTH_MAX);
- 
--  wchar_t *ucs;
--  size_t size;
--  size_t utf_num_chars;
--  int inv_char;
--
--  size = 

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

2013-02-19 Thread Eric Bélanger
Date: Wednesday, February 20, 2013 @ 06:18:26
  Author: eric
Revision: 178317

upgpkg: moc 1:2.5beta1-3

Add ffmpeg patch (close FS#33942 )

Added:
  moc/trunk/moc-ffmpeg.patch
Modified:
  moc/trunk/PKGBUILD

--+
 PKGBUILD |9 
 moc-ffmpeg.patch |  557 +
 2 files changed, 563 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-02-20 02:27:38 UTC (rev 178316)
+++ PKGBUILD2013-02-20 05:18:26 UTC (rev 178317)
@@ -3,7 +3,7 @@
 
 pkgname=moc
 pkgver=2.5beta1
-pkgrel=2
+pkgrel=3
 epoch=1
 pkgdesc=An ncurses console audio player designed to be powerful and easy to 
use
 arch=('i686' 'x86_64')
@@ -19,9 +19,11 @@
 'faad2: for using the aac plugin' 
'libmodplug: for using the modplug plugin')
 options=('!libtool')
-source=(ftp://ftp.daper.net/pub/soft/moc/unstable/moc-2.5.0-beta1.tar.bz2{,.sig})
+source=(ftp://ftp.daper.net/pub/soft/moc/unstable/moc-2.5.0-beta1.tar.bz2{,.sig}
 \
+moc-ffmpeg.patch)
 sha1sums=('4030a1fa5c7cfef06909c54d8c7a1fbb93f23caa'
-  '29c232c37e1f3737c3b670372732446e9c0786a8')
+  '29c232c37e1f3737c3b670372732446e9c0786a8'
+  'f3b8b327dd27d50422b1ad8c9ef89a7366529307')
 
 # source PKGBUILD  mksource
 mksource() {
@@ -41,6 +43,7 @@
 
 build() {
   cd ${srcdir}/${pkgname}-2.5.0-beta1
+  patch -p0 -i ${srcdir}/moc-ffmpeg.patch
   ./configure --prefix=/usr --without-rcc \
 --with-oss --with-alsa --with-jack --with-aac --with-mp3 \
 --with-musepack --with-vorbis --with-flac --with-wavpack \

Added: moc-ffmpeg.patch
===
--- moc-ffmpeg.patch(rev 0)
+++ moc-ffmpeg.patch2013-02-20 05:18:26 UTC (rev 178317)
@@ -0,0 +1,557 @@
+Index: menu.c
+===
+--- menu.c (revision 2516)
 menu.c (working copy)
+@@ -90,9 +90,14 @@
+   getyx (menu-win, y, x);
+   if (title_width = title_space || mi-align == MENU_ALIGN_LEFT)
+   xwaddnstr (menu-win, mi-title, title_space);
+-  else
+-  xwaddstr (menu-win, mi-title + title_width - title_space);
++  else {
++  char *ptr;
+ 
++  ptr = xstrtail (mi-title, title_space);
++  xwaddstr (menu-win, ptr);
++  free (ptr);
++  }
++
+   /* Fill the remainder of the title field with spaces. */
+   if (mi == menu-selected) {
+   getyx (menu-win, y, ix);
+Index: utf8.c
+===
+--- utf8.c (revision 2516)
 utf8.c (working copy)
+@@ -199,47 +199,50 @@
+ 
+ int xwaddnstr (WINDOW *win, const char *str, const int n)
+ {
+-  int res;
++  int res, width, inv_char;
++  wchar_t *ucs;
++  char *mstr, *lstr;
++  size_t size, num_chars;
+ 
+   assert (n  0);
+   assert (str != NULL);
+ 
+-  if (using_utf8) {
++  mstr = iconv_str (iconv_desc, str);
+ 
+-  /* This nasty hack is because we need to count n in chars, but
+-   * [w]addnstr() takes arguments in bytes (in UTF-8 a char can be
+-   * longer than 1 byte).  There are also problems with 
[w]addnwstr()
+-   * (screen garbled).  I have no better idea. */
++  size = xmbstowcs (NULL, mstr, -1, NULL) + 1;
++  ucs = (wchar_t *)xmalloc (sizeof(wchar_t) * size);
++  xmbstowcs (ucs, mstr, size, inv_char);
++  width = wcswidth (ucs, WIDTH_MAX);
+ 
+-  wchar_t *ucs;
+-  size_t size;
+-  size_t utf_num_chars;
+-  int inv_char;
+-
+-  size = xmbstowcs (NULL, str, -1, NULL) + 1;
+-  ucs = (wchar_t *)xmalloc (sizeof(wchar_t) * size);
+-  xmbstowcs (ucs, str, size, inv_char);
+-  if ((size_t)n  size - 1)
+-  ucs[n] = L'\0';
+-  utf_num_chars = wcstombs (NULL, ucs, 0);
+-  if (inv_char) {
+-  char *utf8 = (char *)xmalloc (utf_num_chars + 1);
+-
+-  wcstombs (utf8, ucs, utf_num_chars + 1);
+-  res = waddstr (win, utf8);
+-  free (utf8);
++  if (width == -1) {
++  size_t clidx;
++  for (clidx = 0; clidx  size - 1; clidx++) {
++  if (wcwidth (ucs[clidx]) == -1)
++  ucs[clidx] = L'?';
+   }
+-  else
+-  res = waddnstr (win, str, utf_num_chars);
+-  free (ucs);
++  width = wcswidth (ucs, WIDTH_MAX);
++  inv_char = 1;
+   }
+-  else {
+-  char *lstr = iconv_str (iconv_desc, str);
+ 
+-  res = waddnstr (win, lstr, n);
+-  free (lstr);
++  if (width  n) {
++  while 

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

2011-10-31 Thread Eric Bélanger
Date: Monday, October 31, 2011 @ 20:21:52
  Author: eric
Revision: 141628

upgpkg: moc 20110528-4

Rebuild against ffmpeg 20111030, Clean up depends

Added:
  moc/trunk/moc-ffmpeg.patch
Modified:
  moc/trunk/PKGBUILD

--+
 PKGBUILD |   12 ++--
 moc-ffmpeg.patch |   26 ++
 2 files changed, 32 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-10-31 22:51:23 UTC (rev 141627)
+++ PKGBUILD2011-11-01 00:21:52 UTC (rev 141628)
@@ -3,12 +3,12 @@
 
 pkgname=moc
 pkgver=20110528
-pkgrel=3
+pkgrel=4
 pkgdesc=An ncurses console audio player with support for the mp3, ogg, and 
wave formats
 arch=('i686' 'x86_64')
 url=http://moc.daper.net/;
 license=('GPL')
-depends=('libmad' 'libid3tag' 'jack' 'curl' 'libsamplerate' 'libtool' 'file')
+depends=('libmad' 'libid3tag' 'jack' 'curl' 'libltdl' 'file')
 makedepends=('speex' 'ffmpeg' 'taglib' 'libmpcdec' 'wavpack' 'libmodplug')
 optdepends=('speex: for using the speex plugin' 
'ffmpeg: for using the ffmpeg plugin'
@@ -18,15 +18,15 @@
'libmodplug: for using the modplug plugin')
 options=('!libtool')
 source=(ftp://ftp.archlinux.org/other/moc/${pkgname}-${pkgver}.tar.xz \
-gcc-undefined-symbols.diff)
-md5sums=('003fd01af2165264eb666040e4f586cd'
- 'efacb8559e9145e15b0c25f8fa2a9d79')
+gcc-undefined-symbols.diff moc-ffmpeg.patch)
 sha1sums=('f79049136ce6616bfd6af2f5e08246a5921441cf'
-  'a811a4ac7e049914aab528d3f06a6be6634c2720')
+  'a811a4ac7e049914aab528d3f06a6be6634c2720'
+  'f7e8eb17a89fea1c08c8a68f5afd1ffdc641ce9d')
 
 build() {
   cd ${srcdir}/${pkgname}
   patch -p0 -i ../gcc-undefined-symbols.diff
+  patch -p0 -i ../moc-ffmpeg.patch
 
 # Disabling aac to use the external ffmpeg to play them (FS#13164)
   ./autogen.sh

Added: moc-ffmpeg.patch
===
--- moc-ffmpeg.patch(rev 0)
+++ moc-ffmpeg.patch2011-11-01 00:21:52 UTC (rev 141628)
@@ -0,0 +1,26 @@
+Index: decoder_plugins/ffmpeg/ffmpeg.c
+===
+--- decoder_plugins/ffmpeg/ffmpeg.c(revision 2307)
 decoder_plugins/ffmpeg/ffmpeg.c(working copy)
+@@ -28,12 +28,6 @@
+ #include ffmpeg/avformat.h
+ #endif
+ 
+-/* libavformat's API will be changing at version 53, but at present there
+- * appears to be no guidance on what will replace the deprecated fields. */
+-#ifndef FF_API_OLD_METADATA
+-#define FF_API_OLD_METADATA(LIBAVFORMAT_VERSION_MAJOR  53)
+-#endif
+-
+ /* FFmpeg also likes common names, without that, our common.h and log.h
+  * would not be included. */
+ #undef COMMON_H
+@@ -137,7 +131,7 @@
+   av_read_play (data-ic);
+   for (i = 0; i  data-ic-nb_streams; i++) {
+   data-enc = data-ic-streams[i]-codec;
+-  if (data-enc-codec_type == CODEC_TYPE_AUDIO) {
++  if (data-enc-codec_type == AVMEDIA_TYPE_AUDIO) {
+   audio_index = i;
+   break;
+   }