This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

mingw32-libpng PKGBUILD using cmake

By: a guest on Jul 27th, 2010  |  syntax: Bash  |  size: 1.39 KB  |  views: 129  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
  2. # Contributor: Andreas Krinke <andreas krinke gmx de>
  3.  
  4. pkgname=mingw32-libpng
  5. pkgver=1.4.3
  6. pkgrel=1
  7. arch=('any')
  8. pkgdesc="A collection of routines used to create PNG format graphics (mingw32)"
  9. depends=('mingw32-runtime' 'mingw32-zlib')
  10. makedepends=('mingw32-gcc')
  11. license=('LGPL')
  12. url="http://www.libpng.org/pub/png/libpng.html"
  13. source=("http://downloads.sourceforge.net/sourceforge/libpng/libpng-$pkgver.tar.bz2"
  14.         "http://downloads.sourceforge.net/project/libpng-apng/libpng-master/$pkgver/libpng-$pkgver-apng.patch.gz"
  15.         win32.cmake)
  16. md5sums=('9347eeda4241401f7da4dc9ba7f6a416'
  17.          'faa3daaeafc0709c267374ca90cd8482'
  18.          'f6be7e20150164e8bd342e571d37db51')
  19.  
  20. build() {
  21.   cd "${srcdir}/libpng-${pkgver}"
  22.   cp "${srcdir}/win32.cmake" .
  23.  
  24.   unset LDFLAGS # mingw-ld chokes on --hash-style=gnu
  25.  
  26.   # Add animated PNG (apng) support
  27.   # see http://sourceforge.net/projects/libpng-apng/
  28.   patch -p1 -i "${srcdir}/libpng-${pkgver}-apng.patch" || return 1
  29.  
  30.   cmake . \
  31.     -DCMAKE_TOOLCHAIN_FILE=win32.cmake \
  32.     -DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32
  33.   make all
  34. }
  35.  
  36. package() {
  37.   cd "${srcdir}/libpng-${pkgver}"
  38.   make DESTDIR="${pkgdir}" install
  39.   cd "${pkgdir}/usr/i486-mingw32/lib"
  40.   mv libpng14_static.a libpng14.a
  41.   ln -s libpng14.dll.a libpng.dll.a
  42.   ln -s libpng14.a libpng.a
  43. }
  44.  
  45. # vim:set ts=2 sw=2 et:
clone this paste RAW Paste Data