updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / mingw32-physfs / PKGBUILD
blobb3793f326ada8a776c5a4949259cc5e3aa4ee365
1 # Maintainer: Andreas Krinke <andreas krinke gmx de>
2 # based on the PKGBUILD for physfs by:
3 #   Eric Belanger <eric@archlinux.org>
4 #   Bjorn Lindeijer <bjorn lindeijer nl>
6 pkgname=mingw32-physfs
7 pkgver=2.0.2
8 pkgrel=1
9 pkgdesc="A library to provide abstract access to various archives (mingw32)"
10 arch=('any')
11 url="http://icculus.org/physfs/"
12 license=('ZLIB')
13 makedepends=('mingw32-gcc' 'cmake')
14 depends=('mingw32-runtime' 'mingw32-zlib')
15 options=('!strip' '!buildflags')
16 source=(http://icculus.org/physfs/downloads/physfs-${pkgver}.tar.gz
17         win32.cmake)
18 md5sums=('4e8927c3d30279b03e2592106eb9184a'
19          'ed1e275cf67dc9322f3a6e50e8ddc40c')
21 build() {
22   cd "${srcdir}/physfs-${pkgver}"
24   # fix compiler error due to an unused variable
25   sed -i "/lastDirectory/d" archivers/wad.c
27   unset LDFLAGS
29   export CFLAGS="$CFLAGS -fno-strict-aliasing"
30   export CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
31   cmake . \
32     -DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32 \
33     -DPHYSFS_BUILD_TEST=OFF \
34     -DPHYSFS_BUILD_WX_TEST=OFF \
35     -DCMAKE_TOOLCHAIN_FILE=${srcdir}/win32.cmake
36   make all
39 package() {
40   cd "${srcdir}/physfs-${pkgver}"
42   make DESTDIR="${pkgdir}" install
43   
44   install -D -m644 LICENSE.txt "${pkgdir}/usr/i486-mingw32/share/licenses/${pkgname}/LICENSE"