_pkgbasename=sdl2 pkgname=lib32-$_pkgbasename pkgver=2.0.3 pkgrel=2 pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2.0, 32-bit)." arch=('i686' 'x86_64') url="http://www.libsdl.org" license=('MIT') depends=('lib32-glibc' 'lib32-libxext' 'lib32-libxrender' 'lib32-libx11' 'lib32-libgl' $_pkgbasename=$pkgver) makedepends=('lib32-alsa-lib' 'lib32-mesa' 'lib32-libpulse' 'cmake' 'lib32-libxrandr' 'lib32-libxinerama' 'gcc-multilib') optdepends=('lib32-alsa-lib: ALSA audio driver' 'lib32-libpulse: PulseAudio audio driver') source=("http://www.libsdl.org/release/SDL2-${pkgver}.tar.gz") md5sums=('fe6c61d2e9df9ef570e7e80c6e822537') build() { cd "${srcdir}/SDL2-${pkgver}" export CC="gcc -m32" export CXX="g++ -m32" export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ -DSDL_STATIC=OFF \ -DRPATH=OFF \ -DLIB_SUFFIX=32 make } package() { cd "${srcdir}/SDL2-${pkgver}/build" make DESTDIR="${pkgdir}/" install rm -rf "${pkgdir}"/usr/{include,share,bin} }