blob: 4bc6bd7a0420d8fe552ad2412e0d75edfdd60006 (
plain)
1 # Description: A programming language designed for extending applications.
2 # URL: http://www.lua.org/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: readline
5
6 name=lua52
7 version=5.2.4
8 release=3
9 source=(http://www.lua.org/ftp/lua-$version.tar.gz
10 lua.diff lua-5.2-cflags.diff lua.pc)
11
12 build() {
13 cd lua-$version
14
15 patch -p1 -i $SRC/lua.diff
16 patch -p1 -i $SRC/lua-5.2-cflags.diff
17
18 sed -e "s/%VER%/${version%.*}/g;s/%REL%/$version/g" $SRC/lua.pc > lua.pc
19 sed -e 's:llua:llua5.2:' -e 's:/include:/include/lua5.2:' -i lua.pc
20
21 sed -r \
22 -e '/^LUA_(SO|A|T)=/ s/lua/lua5.2/' \
23 -e '/^LUAC_T=/ s/luac/luac5.2/' \
24 -i src/Makefile
25
26 make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux
27
28 install -d $PKG/usr/include/lua5.2 $PKG/usr/share/man/man1 $PKG/usr/lib
29
30 make \
31 TO_BIN="lua5.2 luac5.2" \
32 TO_LIB="liblua5.2.a liblua5.2.so liblua5.2.so.5.2 liblua5.2.so.$version" \
33 INSTALL_DATA='cp -d' \
34 INSTALL_TOP="$PKG/usr" \
35 INSTALL_INC="$PKG/usr/include/lua5.2" \
36 INSTALL_MAN="$PKG/usr/share/man/man1" \
37 install
38
39 install -m 0644 -D lua.pc $PKG/usr/lib/pkgconfig/lua5.2.pc
40
41 # fixups
42 ln -s liblua5.2.so $PKG/usr/lib/liblua.so.5.2
43 ln -s liblua5.2.so $PKG/usr/lib/liblua.so.$version
44 cd $PKG/usr/share/man/man1
45 mv lua.1 lua5.2.1
46 mv luac.1 luac5.2.1
47 }
|