From b80c45521af4a8b6717c660b7cfc03b4330d7594 Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 11 Oct 2006 21:03:24 +0000 Subject: [PATCH] luaposix-20060408, okay jolan@ --- devel/luaposix/Makefile | 25 ++++++---------- devel/luaposix/distinfo | 8 +++--- devel/luaposix/files/init.lua | 3 -- devel/luaposix/files/posix.lua | 2 -- devel/luaposix/patches/patch-Makefile | 39 ------------------------- devel/luaposix/patches/patch-lposix_c | 41 --------------------------- devel/luaposix/pkg/PFRAG.shared | 2 -- devel/luaposix/pkg/PLIST | 10 ++----- 8 files changed, 15 insertions(+), 115 deletions(-) delete mode 100644 devel/luaposix/files/init.lua delete mode 100644 devel/luaposix/files/posix.lua delete mode 100644 devel/luaposix/patches/patch-Makefile delete mode 100644 devel/luaposix/patches/patch-lposix_c delete mode 100644 devel/luaposix/pkg/PFRAG.shared diff --git a/devel/luaposix/Makefile b/devel/luaposix/Makefile index 4775e087f27..3acdea5370a 100644 --- a/devel/luaposix/Makefile +++ b/devel/luaposix/Makefile @@ -1,17 +1,11 @@ -# $OpenBSD: Makefile,v 1.5 2006/07/27 21:13:56 pedro Exp $ +# $OpenBSD: Makefile,v 1.6 2006/10/11 21:03:24 pedro Exp $ -BROKEN= "Pending update for Lua 5.1" COMMENT= "posix library for the lua language" -NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} -DISTNAME= lposix -DATE= 20041216 -PKGNAME= luaposix-${DATE}p0 -DIST_SUBDIR= luaposix-${DATE} -WRKDIST= ${WRKDIR}/posix +DISTNAME= luaposix-20060408 CATEGORIES= devel -MASTER_SITES= ${HOMEPAGE}5.0/ +MASTER_SITES= http://mirrors.protection.cx/~pedro/ HOMEPAGE= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ MAINTAINER= Pedro Martelletto @@ -23,17 +17,16 @@ PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes NO_REGRESS= Yes +SHARED_ONLY= Yes BUILD_DEPENDS= ::lang/lua RUN_DEPENDS= ${BUILD_DEPENDS} -post-extract: - @sed -e "s:@posixpath@:${PREFIX}/lua/luaposix/?.lua:g" \ - ${FILESDIR}/init.lua > ${WRKSRC}/init.lua +do-build: + ${CC} ${CFLAGS} -fPIC -I${LOCALBASE}/include -shared\ + ${WRKDIST}/luaposix.c -o ${WRKDIST}/posix.so do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/lua/luaposix - ${INSTALL_DATA} ${WRKSRC}/luaposix.so ${PREFIX}/lib - ${INSTALL_DATA} ${FILESDIR}/posix.lua ${PREFIX}/lua/luaposix - ${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/luaposix + ${INSTALL_DATA_DIR} ${PREFIX}/lib/lua/5.1 + ${INSTALL_DATA} ${WRKSRC}/posix.so ${PREFIX}/lib/lua/5.1 .include diff --git a/devel/luaposix/distinfo b/devel/luaposix/distinfo index da0c3a1f8fc..b4187a0bbb9 100644 --- a/devel/luaposix/distinfo +++ b/devel/luaposix/distinfo @@ -1,4 +1,4 @@ -MD5 (luaposix-20041216/lposix.tar.gz) = f22871247e444412a901d179028a0d82 -RMD160 (luaposix-20041216/lposix.tar.gz) = c5c2366b9864773b350c02e032a1c6a433dcdbe5 -SHA1 (luaposix-20041216/lposix.tar.gz) = 85b58f90e225c15f512bd2f341086580f8c7e09c -SIZE (luaposix-20041216/lposix.tar.gz) = 9651 +MD5 (luaposix-20060408.tar.gz) = 6f891a11b5a8d22c63ccec8fd1678322 +RMD160 (luaposix-20060408.tar.gz) = b003cb0df836ad1696b037b540ac421e7674a1bf +SHA1 (luaposix-20060408.tar.gz) = 51fff9fdd988c28935ff89e0242f89fbea69d339 +SIZE (luaposix-20060408.tar.gz) = 5868 diff --git a/devel/luaposix/files/init.lua b/devel/luaposix/files/init.lua deleted file mode 100644 index 73283eaf20e..00000000000 --- a/devel/luaposix/files/init.lua +++ /dev/null @@ -1,3 +0,0 @@ --- $OpenBSD: init.lua,v 1.2 2005/04/19 14:31:27 pedro Exp $ --- luaposix's initialization steps -lua_addpath("@posixpath@") diff --git a/devel/luaposix/files/posix.lua b/devel/luaposix/files/posix.lua deleted file mode 100644 index 7d4a85c4e50..00000000000 --- a/devel/luaposix/files/posix.lua +++ /dev/null @@ -1,2 +0,0 @@ --- $OpenBSD: posix.lua,v 1.1.1.1 2004/12/16 21:21:14 pedro Exp $ -assert(loadlib("luaposix.so","luaopen_posix"))() diff --git a/devel/luaposix/patches/patch-Makefile b/devel/luaposix/patches/patch-Makefile deleted file mode 100644 index 4c6a93d8f17..00000000000 --- a/devel/luaposix/patches/patch-Makefile +++ /dev/null @@ -1,39 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.2 2005/01/10 20:17:07 jolan Exp $ ---- Makefile.orig Wed Nov 5 18:26:49 2003 -+++ Makefile Mon Jan 10 12:45:02 2005 -@@ -7,29 +7,23 @@ LUALIB= $(LUA)/lib - LUABIN= $(LUA)/bin - - # no need to change anything below here --CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G --WARN= -pedantic -Wall --INCS= -I$(LUAINC) -- -+CFLAGS+= -I$(LOCALBASE)/include -fPIC -DPIC - MYNAME= posix --MYLIB= l$(MYNAME) -+MYLIB= lua$(MYNAME) - --OBJS= $(MYLIB).o -+OBJS= l$(MYNAME).o - - T= $(MYLIB).so - --all: test -+all: $T - --test: $T -- $(LUABIN)/lua -l$(MYNAME) test.lua -- - $T: $(OBJS) -- $(CC) -o $@ -shared $(OBJS) -+ $(CC) -o $@ -shared -fPIC $(OBJS) - - $(OBJS): modemuncher.c - - tree: $T -- $(LUABIN)/lua -l$(MYNAME) tree.lua . -+ lua -l$(MYNAME) tree.lua . - - clean: - rm -f $(OBJS) $T core core.* a.out diff --git a/devel/luaposix/patches/patch-lposix_c b/devel/luaposix/patches/patch-lposix_c deleted file mode 100644 index 512c43a993e..00000000000 --- a/devel/luaposix/patches/patch-lposix_c +++ /dev/null @@ -1,41 +0,0 @@ -$OpenBSD: patch-lposix_c,v 1.1.1.1 2004/12/16 21:21:14 pedro Exp $ ---- lposix.c.orig Thu Dec 16 16:10:37 2004 -+++ lposix.c Thu Dec 16 16:12:57 2004 -@@ -16,7 +16,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -29,10 +29,6 @@ - #include "lua.h" - #include "lauxlib.h" - --#ifndef MYBUFSIZ --#define MYBUFSIZ 512 --#endif -- - #include "modemuncher.c" - - static const char *filetype(mode_t m) -@@ -220,7 +216,7 @@ static int Pfiles(lua_State *L) /** fi - - static int Pgetcwd(lua_State *L) /** getcwd() */ - { -- char buf[MYBUFSIZ]; -+ char buf[MAXPATHLEN]; - if (getcwd(buf, sizeof(buf)) == NULL) - return pusherror(L, "."); - else -@@ -277,7 +273,7 @@ static int Psymlink(lua_State *L) /** s - - static int Preadlink(lua_State *L) /** readlink(path) */ - { -- char buf[MYBUFSIZ]; -+ char buf[MAXPATHLEN]; - const char *path = luaL_checkstring(L, 1); - int n = readlink(path, buf, sizeof(buf)); - if (n==-1) return pusherror(L, path); diff --git a/devel/luaposix/pkg/PFRAG.shared b/devel/luaposix/pkg/PFRAG.shared deleted file mode 100644 index f5246f04460..00000000000 --- a/devel/luaposix/pkg/PFRAG.shared +++ /dev/null @@ -1,2 +0,0 @@ -@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2004/12/16 21:21:14 pedro Exp $ -lib/luaposix.so diff --git a/devel/luaposix/pkg/PLIST b/devel/luaposix/pkg/PLIST index 388db0f654d..e2c271a9272 100644 --- a/devel/luaposix/pkg/PLIST +++ b/devel/luaposix/pkg/PLIST @@ -1,8 +1,2 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2004/12/16 21:21:14 pedro Exp $ -@unexec lua ${SYSCONFDIR}/lua/luapkg.lua del luaposix -%%SHARED%% -lua/ -lua/luaposix/ -lua/luaposix/init.lua -lua/luaposix/posix.lua -@exec lua ${SYSCONFDIR}/lua/luapkg.lua add luaposix ${PREFIX}/lua/luaposix/init.lua +@comment $OpenBSD: PLIST,v 1.2 2006/10/11 21:03:24 pedro Exp $ +lib/lua/5.1/posix.so