updated on Tue Jan 10 16:09:17 UTC 2012
[aur-mirror.git] / lib32-physfs / PKGBUILD
blobbc7d5bb2527d25efa252e2bc0b888b754eff20e0
1 _pkgbasename=physfs
2 pkgname=lib32-$_pkgbasename
3 pkgver=2.0.2
4 pkgrel=2
5 pkgdesc="A library to provide abstract access to various archives (32 bit)"
6 arch=('x86_64')
7 url="http://icculus.org/physfs/"
8 license=('custom:physfs')
9 depends=('lib32-zlib' "${_pkgbasename}")
10 makedepends=('cmake' 'doxygen' 'gcc-multilib' 'lib32-readline')
11 source=("http://icculus.org/physfs/downloads/${_pkgbasename}-${pkgver}.tar.gz"
12         'physfs-2.0.2-gcc46.patch')
13 md5sums=('4e8927c3d30279b03e2592106eb9184a'
14          '0c609d5026142a68cf8da78af1f30995')
15 sha1sums=('2d3d3cc819ad26542d34451f44050b85635344d0'
16           'dbd437e0e960bfe6adf17ec32138f98b6b108252')
18 build() {
19   cd "${srcdir}/${_pkgbasename}-${pkgver}"
21   # http://www.mail-archive.com/opensuse-commit@opensuse.org/msg01328.html
22   patch -p0 < "${srcdir}/physfs-2.0.2-gcc46.patch"
23   
24   rm -rf build
25   mkdir build && cd build 
26   export CFLAGS="$CFLAGS -m32 -fno-strict-aliasing"
27   export CXXFLAGS="$CXXFLAGS -m32 -fno-strict-aliasing"
28   cmake .. \
29         -DCMAKE_INSTALL_PREFIX=/usr \
30         -DLIB_SUFFIX=32 \
31         -DPHYSFS_BUILD_WX_TEST=no       
32   make
35 package() {
36   cd "${srcdir}/${_pkgbasename}-${pkgver}/build"  
37   make DESTDIR="${pkgdir}" install
38   rm -rf ${pkgdir}/usr/{bin,include}
39   install -Dm644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"