Want more features on Pastebin? Sign Up, it's FREE!
Guest

freeimage-pkgbuild

By: a guest on Jul 4th, 2013  |  syntax: Bash  |  size: 3.14 KB  |  views: 15  |  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: Daniel Kirchner <daniel AT ekpyron DOT org>
  2. # Contributor: Davorin Učakar <davorin.ucakar@gmail.com>
  3. # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
  4. # Contributor: Stefan Husmann <stefan-husmann@t-online.de>
  5. # Contributor: Mihai Militaru <mihai.militaru@gmx.com>
  6. # Contributor: scippio <scippio@berounet.cz>
  7.  
  8. pkgname=mingw-w64-freeimage
  9. pkgver=3.15.4
  10. pkgrel=1
  11. pkgdesc="Library project for developers who would like to support popular graphics image formats (mingw-w64)."
  12. arch=(any)
  13. license=('GPL' 'custom:FIPL')
  14. url="http://freeimage.sourceforge.net/"
  15. depends=('mingw-w64-gcc')
  16. options=(!strip !buildflags)
  17. source=("http://downloads.sourceforge.net/sourceforge/freeimage/FreeImage${pkgver//./}.zip" 'mingw64.patch')
  18. md5sums=('9f9a3b2c3c1b4fd24fe479e8aaee86b1'
  19.          '1482fbf6046cf25feaba5df7c61dd509')
  20.  
  21. build() {
  22.   cd ${srcdir}
  23.  
  24.   cd FreeImage
  25.   patch -Np0 < ${srcdir}/mingw64.patch
  26.   cd ..
  27.  
  28.   rm -rf FreeImage-build32 FreeImage-build64
  29.   cp -r FreeImage FreeImage-build32
  30.   cp -r FreeImage FreeImage-build64
  31.  
  32.   cd FreeImage-build32
  33.  
  34.   make \
  35.     CC="i686-w64-mingw32-gcc --prefix=/usr/i686-w64-mingw32" \
  36.     CXX="i686-w64-mingw32-g++" \
  37.     LD="i686-w64-mingw32-g++" \
  38.     RC="i686-w64-mingw32-windres" \
  39.     AR="i686-w64-mingw32-ar" \
  40.     DLLTOOL="i686-w64-mingw32-dlltool" \
  41.     FREEIMAGE_LIBRARY_TYPE="STATIC" \
  42.     -f Makefile.mingw
  43.  
  44.   make \
  45.     CC="i686-w64-mingw32-gcc --prefix=/usr/i686-w64-mingw32" \
  46.     CXX="i686-w64-mingw32-g++" \
  47.     LD="i686-w64-mingw32-g++" \
  48.     RC="i686-w64-mingw32-windres" \
  49.     AR="i686-w64-mingw32-ar" \
  50.     DLLTOOL="i686-w64-mingw32-dlltool" \
  51.     FREEIMAGE_LIBRARY_TYPE="SHARED" \
  52.     -f Makefile.mingw
  53.  
  54.   cd ../FreeImage-build64
  55.  
  56.   make \
  57.     CC="x86_64-w64-mingw32-gcc --prefix=/usr/x86_64-w64-mingw32" \
  58.     CXX="x86_64-w64-mingw32-g++" \
  59.     LD="x86_64-w64-mingw32-g++" \
  60.     RC="x86_64-w64-mingw32-windres" \
  61.     AR="x86_64-w64-mingw32-ar" \
  62.     DLLTOOL="x86_64-w64-mingw32-dlltool" \
  63.     FREEIMAGE_LIBRARY_TYPE="STATIC" \
  64.     -f Makefile.mingw
  65.  
  66.   make \
  67.     CC="x86_64-w64-mingw32-gcc --prefix=/usr/x86_64-w64-mingw32" \
  68.     CXX="x86_64-w64-mingw32-g++" \
  69.     LD="x86_64-w64-mingw32-g++" \
  70.     RC="x86_64-w64-mingw32-windres" \
  71.     AR="x86_64-w64-mingw32-ar" \
  72.     DLLTOOL="x86_64-w64-mingw32-dlltool" \
  73.     FREEIMAGE_LIBRARY_TYPE="SHARED" \
  74.     -f Makefile.mingw
  75.  
  76. }
  77.  
  78. package() {
  79.   cd ${srcdir}/FreeImage-build32
  80.  
  81.   install -Dm644 Dist/FreeImage.dll ${pkgdir}/usr/i686-w64-mingw32/bin/FreeImage.dll
  82.   install -Dm644 Dist/FreeImage.lib ${pkgdir}/usr/i686-w64-mingw32/lib/FreeImage.lib
  83.   install -Dm644 Dist/libFreeImage.a ${pkgdir}/usr/i686-w64-mingw32/lib/libFreeImage.a
  84.   install -Dm644 Dist/FreeImage.h   ${pkgdir}/usr/i686-w64-mingw32/include/FreeImage.h
  85.  
  86.   cd ${srcdir}/FreeImage-build64
  87.  
  88.   install -Dm644 Dist/FreeImage.dll ${pkgdir}/usr/x86_64-w64-mingw32/bin/FreeImage.dll
  89.   install -Dm644 Dist/FreeImage.lib ${pkgdir}/usr/x86_64-w64-mingw32/lib/FreeImage.lib
  90.   install -Dm644 Dist/libFreeImage.a ${pkgdir}/usr/x86_64-w64-mingw32/lib/libFreeImage.a
  91.   install -Dm644 Dist/FreeImage.h   ${pkgdir}/usr/x86_64-w64-mingw32/include/FreeImage.h
  92. }
clone this paste RAW Paste Data