PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Maintainer: Sébastien Luttringer <seblu@archlinux.org>
  2. # Contributor: Allan McRae <allan@archlinux.org>
  3. # Contributor: judd <jvinet@zeroflux.org>
  4. pkgname=patch
  5. pkgver=2.7.6
  6. pkgrel=3
  7. pkgdesc='A utility to apply patch files to original sources'
  8. arch=('x86_64' 'ppc64le')
  9. url='https://www.gnu.org/software/patch/'
  10. license=('GPL')
  11. groups=('base-devel')
  12. depends=('glibc' 'attr')
  13. makedepends=('ed')
  14. optdepends=('ed: for patch -e functionality')
  15. validpgpkeys=('259B3792B3D6D319212CC4DCD5BF9FEB0313653A') # Andreas Gruenbacher
  16. source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig}
  17. "https://github.com/mirror/patch/commit/f290f48a621867084884bfff87f8093c15195e6a.patch" # CVE-2018-6951
  18. "CVE-2018-1000156.patch" # CVE-2018-1000156
  19. "https://github.com/mirror/patch/commit/9c986353e420ead6e706262bf204d6e03322c300.patch" # CVE-2018-6952
  20. "http://git.savannah.gnu.org/cgit/patch.git/patch/?id=19599883ffb6a450d2884f081f8ecf68edbed7ee" # Fix memory leaks introduced in CVE-2018-1000165
  21. "http://git.savannah.gnu.org/cgit/patch.git/patch/?id=369dcccdfa6336e5a873d6d63705cfbe04c55727"
  22. )
  23. md5sums=('78ad9937e4caadcba1526ef1853730d5'
  24. 'SKIP'
  25. '7e34fc859ccc07b235a8b01b043ff456'
  26. 'fb16655d092f251316715e792636b48d'
  27. 'aa8ac1e3dccbd523143b01e9f60b06e8'
  28. 'bba3e65611813a4467cdd73219a5059d'
  29. '5eb2c88e30fa8775deaf0b29287bf6bd')
  30. prepare() {
  31. cd $pkgname-$pkgver
  32. # apply patch from the source array (should be a pacman feature)
  33. local filename
  34. for filename in "${source[@]}"; do
  35. if [[ "$filename" =~ \.patch$ ]]; then
  36. echo "Applying patch ${filename##*/}"
  37. patch -p1 -N -i "$srcdir/${filename##*/}"
  38. fi
  39. done
  40. :
  41. }
  42. build() {
  43. cd $pkgname-$pkgver
  44. ./configure --prefix=/usr
  45. make
  46. }
  47. check() {
  48. cd $pkgname-$pkgver
  49. make check
  50. }
  51. package() {
  52. cd $pkgname-$pkgver
  53. make DESTDIR="$pkgdir" install
  54. }
  55. # vim:set ts=2 sw=2 et: