Advertisement
quark_zju

mp3val AUR PKGBUILD

Jul 15th, 2012
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.74 KB | None | 0 0
  1. # Maintainer:  TDY <tdy@gmx.com>
  2. # Contributor: Dmitry N. Shilov <stormblast@land.ru>
  3.  
  4. pkgname=mp3val
  5. pkgver=0.1.8
  6. pkgrel=1
  7. pkgdesc="A tool for validating and repairing MPEG audio streams"
  8. arch=('i686' 'x86_64')
  9. url="http://mp3val.sourceforge.net/"
  10. license=('GPL')
  11. depends=('gcc-libs')
  12. makedeps=('hd2u')
  13. source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz
  14.         $pkgname.1)
  15. md5sums=('dc8adad909d0b8734ed22029b2de2cb4'
  16.          '0195e80d4ea32855fd15fe76e3855acd')
  17.  
  18. build() {
  19.   cd "$srcdir/$pkgname-$pkgver-src"
  20.   for i in *.cpp *.h; do
  21.     dos2unix $i
  22.   done
  23.   patch -p0 << EOF
  24. *** crossapi.cpp    2012-07-16 00:47:01.600155402 +0800
  25. --- crossapi2.cpp   2012-07-16 00:52:38.786827844 +0800
  26. ***************
  27. *** 177,182 ****
  28. --- 177,185 ----
  29.   #include <errno.h>
  30.   #include <math.h>
  31.   #include <utime.h>
  32. + #include <cstring>
  33. + #include <cstdlib>
  34. + #include <cmath>
  35.  
  36.   #define TMPBUFSIZE 8192
  37.  
  38. ***************
  39. *** 241,247 ****
  40.   //Moving failed due to different logical drives of source and destination. Let's copy:
  41.     id=open(szOldName,O_RDONLY);
  42.     if(id==-1) return 0;
  43. !   od=open(szNewName,O_WRONLY|O_CREAT|O_TRUNC);
  44.     if(od==-1) {
  45.         close(id);
  46.         return 0;
  47. --- 244,250 ----
  48.   //Moving failed due to different logical drives of source and destination. Let's copy:
  49.     id=open(szOldName,O_RDONLY);
  50.     if(id==-1) return 0;
  51. !   od=open(szNewName,O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
  52.     if(od==-1) {
  53.         close(id);
  54.         return 0;
  55. EOF
  56.   make -f Makefile.linux CXXFLAGS="$CXXFLAGS" || return 1
  57. }
  58.  
  59. package() {
  60.   cd "$srcdir/$pkgname-$pkgver-src"
  61.   install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname"
  62.   install -Dm644 ../$pkgname.1 "$pkgdir/usr/share/man/man1/$pkgname.1"
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement