updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / lua-c++ / PKGBUILD
blob10bc044092a74e51fdb8cd4094b6d836eedb2d3a
1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
3 # Contributor: Juergen Hoetzel <juergen@archlinux.org>
4 # Contributor: Damir Perisa <damir.perisa@bluewin.ch>
6 pkgname=lua-c++
7 pkgver=5.1.4
8 pkgrel=1
9 pkgdesc="A powerful, lightweight programming language for extending applications, compiled as C++ instead of C" 
10 arch=('i686' 'x86_64')
11 url="http://www.lua.org/"  
12 license=('MIT')
13 depends=('readline' 'gcc-libs')
14 provides=('lua')
15 conflicts=('lua')
16 source=($url/ftp/lua-$pkgver.tar.gz \
17         lua-arch.patch \
18         lua-5.1-cflags.diff)
19 md5sums=('d0870f2de55d59c1c8419f36e8fac150'
20          '1bd1164a19abf9165e231ba0d8a0bbc7'
21          '249582bf1fd861ccf492d2c35a9fe732')
23 build() { 
24   cd lua-$pkgver
26   patch -Np1 -i ../lua-arch.patch || return 1
27   export CFLAGS="${CXXFLAGS}"
29   [ "$CARCH" = "x86_64" ] && {
30                 patch -Np1 -i ../lua-5.1-cflags.diff || return 1
31                 export CFLAGS+=" -fPIC"
32   }
34   rm -f src/liblua.so
36   make  CC=c++ \
37         LUA_SO=liblua.so \
38         linux || return 1
40   make  INSTALL_DATA="cp -d" \
41         INSTALL_TOP="$pkgdir"/usr \
42         INSTALL_MAN="$pkgdir"/usr/share/man/man1 \
43         TO_LIB="liblua.a liblua.so liblua.so.5.1" \
44         linux install
46   install -Dm644 etc/lua.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc
47   install -Dm644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
50 # vim: ts=2 sw=2 et ft=sh