aerc.rjarry: bump to 0.10.0, use -modcacherw
[kiss-trunc88.git] / lua51 / build
blob24064dd6e758ed629de79ce0554e25e74d6eebac
1 #!/bin/sh -e
3 #patch -Np1 < lua51.patch
4 patch -Np1 < lua-arch.patch
5 patch -Np1 < CVE-2014-5461.patch
6 patch -Np1 < lua-5.1-cflags.diff
7 sed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc
8 sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' -e '/^LUAC_T=/ s/luac/luac5.1/' -i src/Makefile
10 make MYCFLAGS="$CFLAGS -fPIC" \
11 MYLDFLAGS="$LDFLAGS" \
12 INSTALL_DATA="cp -d" LUA_SO=liblua5.1.so \
13 posix
14 #linux
15 #CC="$CC" RANLIB="$RANLIB" \
17 make INSTALL_TOP="$1/usr" \
18 INSTALL_MAN="$1/usr/share/man/man1" \
19 INSTALL_DATA="cp -d" \
20 INSTALL_INC="$1/usr/include/lua5.1" \
21 TO_BIN="lua5.1 luac5.1" \
22 TO_LIB="liblua5.1.a liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.$2" \
23 install
25 #sed lua.pc -e "s;%VER%;${2%.*};g;s;%REL%;${2};g" > lua5.1.pc
26 install -Dm644 lua.pc "$1/usr/lib/pkgconfig/lua5.1.pc"
28 #install -Dm 644 etc/lua.pc "$1/usr/lib/pkgconfig/lua5.1.pc"
29 #ln -sf lua5.1.pc "$1/usr/lib/pkgconfig/lua51.pc"
30 #ln -sf lua5.1.pc "$1/usr/lib/pkgconfig/lua-5.1.pc"
32 #ln -s liblua5.1.so "$1/usr/lib/liblua.so.5.1"
33 #ln -s liblua5.1.so "$1/usr/lib/liblua.so.$2"
35 cd "$1/usr/share/man/man1"
36 mv lua.1 lua5.1.1
37 mv luac.1 luac5.1.1