1 include ../../build/config.mk
3 LUAPOSIX_VERSION = 5.1.2
4 LUAPOSIX_SITE = http://luaforge.net/frs/download.php/3063/
5 LUAPOSIX_DIR = luaposix-$(LUAPOSIX_VERSION)
6 LUAPOSIX_FILE = $(LUAPOSIX_DIR).tar.gz
7 LUAPOSIX_URL = $(LUAPOSIX_SITE)/$(LUAPOSIX_FILE)
8 LUAPOSIX_PATCHDIR = patches
13 wget -O $@ $(LUAPOSIX_URL) || rm -f $@
15 $(LUAPOSIX_PATCHDIR)/series:
16 (cd $(LUAPOSIX_PATCHDIR); ls *.patch | sort > series)
18 $(LUAPOSIX_DIR)/.prepared: $(LUAPOSIX_FILE)
19 rm -rf $(LUAPOSIX_DIR)
20 tar xvfz $(LUAPOSIX_FILE)
21 ln -s ../$(LUAPOSIX_PATCHDIR) $(LUAPOSIX_DIR)/patches
24 $(LUAPOSIX_DIR)/.patched: $(LUAPOSIX_DIR)/.prepared $(LUAPOSIX_PATCHDIR)/series
25 (cd $(LUAPOSIX_DIR); \
26 if [ -x "$$(which quilt 2>/dev/null)" ]; then \
29 cat patches/*.patch | patch -p1; \
34 compile: $(LUAPOSIX_DIR)/.patched
35 $(MAKE) -C $(LUAPOSIX_DIR) CC=$(CC) CFLAGS="$(CFLAGS)" OS="$(OS)"
36 mkdir -p dist/usr/lib/lua
37 cp $(LUAPOSIX_DIR)/posix.so dist/usr/lib/lua/
42 rm -rf $(LUAPOSIX_DIR) $(LUAPOSIX_FILE)
43 rm -f $(LUAPOSIX_PATCHDIR)/series