luafilesystem-1.0, file system library for the lua language
from pedro@
This commit is contained in:
parent
d7cb870a14
commit
062b1f9125
38
devel/luafs/Makefile
Normal file
38
devel/luafs/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= "file system library for the lua language"
|
||||
DISTNAME= luafilesystem-1.0
|
||||
PKGNAME= luafs-1.0
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://luaforge.net/frs/download.php/430/
|
||||
|
||||
HOMEPAGE= http://www.keplerproject.org/luafilesystem/
|
||||
|
||||
MAINTAINER= Pedro Martelletto <pedro@openbsd.org>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
NO_REGRESS= Yes
|
||||
BUILD_DEPENDS= ::lang/lua ::devel/luacompat
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
|
||||
post-extract:
|
||||
@sed -e "s:@fspath@:${PREFIX}/lua/luafs/?.lua:g" \
|
||||
-e "s:@fscpath@:${PREFIX}/lib/?.so:g" \
|
||||
${FILESDIR}/init.lua > ${WRKSRC}/init.lua
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lua/luafs
|
||||
${INSTALL_DATA} ${WRKSRC}/*.so ${PREFIX}/lib/luafs.so
|
||||
${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/luafs
|
||||
${INSTALL_DATA} ${FILESDIR}/lfs.lua ${PREFIX}/lua/luafs
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luafs
|
||||
${INSTALL_DATA} ${WRKSRC}/*.html ${WRKSRC}/*.png \
|
||||
${PREFIX}/share/doc/luafs
|
||||
|
||||
.include <bsd.port.mk>
|
4
devel/luafs/distinfo
Normal file
4
devel/luafs/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
MD5 (luafilesystem-1.0.tar.gz) = 35eb7c97a4ca21719ea345bb81c005fc
|
||||
RMD160 (luafilesystem-1.0.tar.gz) = 7144967b6eb3c7d6f1372e68a6783e292dff41a5
|
||||
SHA1 (luafilesystem-1.0.tar.gz) = e21e9d88b5509dd16cdefd7a8edf9ba8c0556cb8
|
||||
SIZE (luafilesystem-1.0.tar.gz) = 17619
|
3
devel/luafs/files/init.lua
Normal file
3
devel/luafs/files/init.lua
Normal file
@ -0,0 +1,3 @@
|
||||
-- $OpenBSD: init.lua,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
-- luafs' initialization steps
|
||||
lua_addpath("@fspath@")
|
2
devel/luafs/files/lfs.lua
Normal file
2
devel/luafs/files/lfs.lua
Normal file
@ -0,0 +1,2 @@
|
||||
-- $OpenBSD: lfs.lua,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
assert(loadlib("luafs.so", "luaopen_lfs"))()
|
18
devel/luafs/patches/patch-Makefile
Normal file
18
devel/luafs/patches/patch-Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
--- Makefile.orig Wed Jan 19 15:20:04 2005
|
||||
+++ Makefile Sat May 14 21:11:36 2005
|
||||
@@ -8,11 +8,12 @@ V= 1.0
|
||||
DIST_DIR= luafilesystem-$V
|
||||
TAR_FILE= $(DIST_DIR).tar.gz
|
||||
ZIP_FILE= $(DIST_DIR).zip
|
||||
-LIBNAME= lib$T.$V$(LIB_EXT)
|
||||
+LIBNAME= luafs.so
|
||||
|
||||
SRCS= $T.c
|
||||
-OBJS= $T.o compat-5.1.o
|
||||
+OBJS= $T.o
|
||||
|
||||
+all: lib
|
||||
|
||||
lib: $(LIBNAME)
|
||||
|
41
devel/luafs/patches/patch-config
Normal file
41
devel/luafs/patches/patch-config
Normal file
@ -0,0 +1,41 @@
|
||||
$OpenBSD: patch-config,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
--- config.orig Wed Jan 19 15:20:04 2005
|
||||
+++ config Sat May 14 21:06:43 2005
|
||||
@@ -1,25 +1,22 @@
|
||||
# Installation directories
|
||||
# System's libraries directory (where binary libraries are installed)
|
||||
-LUA_LIBDIR= /usr/local/lib/lua/5.0
|
||||
+LUA_LIBDIR= $(LOCALBASE)/lib
|
||||
# System's lua directory (where Lua libraries are installed)
|
||||
-LUA_DIR= /usr/local/share/lua/5.0
|
||||
+#LUA_DIR= /usr/local/share/lua/5.0
|
||||
# Lua includes directory
|
||||
-LUA_INC= /usr/local/include/lua5
|
||||
+LUA_INC= $(LOCALBASE)/include
|
||||
|
||||
# OS dependent
|
||||
-LIB_EXT= .dylib
|
||||
-#LIB_EXT= .so
|
||||
-LIB_OPTION= -dynamiclib #for MacOS X
|
||||
-#LIB_OPTION= -shared #for Linux
|
||||
+#LIB_EXT= .dylib
|
||||
+LIB_EXT= .so
|
||||
+#LIB_OPTION= -dynamiclib #for MacOS X
|
||||
+LIB_OPTION= -shared #for Linux
|
||||
|
||||
-COMPAT_DIR= .
|
||||
-
|
||||
# Compilation directives
|
||||
# On FreeBSD systems, the following line should be commented
|
||||
-DLLIB= -ldl
|
||||
-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
|
||||
-INCS= -I$(LUA_INC) -I$(COMPAT_DIR)
|
||||
+#DLLIB= -ldl
|
||||
+#WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
|
||||
+INCS= -I$(LUA_INC)
|
||||
LIBS= -L$(LUA_LIBDIR) -llua -llualib -lm $(DLLIB)
|
||||
-CFLAGS= $(WARN) $(INCS)
|
||||
-CC= gcc
|
||||
-
|
||||
+CFLAGS+= $(WARN) $(INCS) -fPIC
|
||||
+#CC= gcc
|
29
devel/luafs/patches/patch-lfs_c
Normal file
29
devel/luafs/patches/patch-lfs_c
Normal file
@ -0,0 +1,29 @@
|
||||
$OpenBSD: patch-lfs_c,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
--- lfs.c.orig Wed Jan 19 15:20:04 2005
|
||||
+++ lfs.c Wed May 11 08:31:54 2005
|
||||
@@ -26,13 +26,12 @@
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
-#include <sys/types.h>
|
||||
+#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lualib.h"
|
||||
-#include "compat-5.1.h"
|
||||
|
||||
#include "lfs.h"
|
||||
|
||||
@@ -81,8 +80,8 @@ static int change_dir (lua_State *L) {
|
||||
** and a string describing the error
|
||||
*/
|
||||
static int get_dir (lua_State *L) {
|
||||
- char path[255+2];
|
||||
- if (getcwd(path, 255) == NULL) {
|
||||
+ char path[MAXPATHLEN];
|
||||
+ if (getcwd(path, sizeof(path)) == NULL) {
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, getcwd_error);
|
||||
return 2;
|
3
devel/luafs/pkg/DESCR
Normal file
3
devel/luafs/pkg/DESCR
Normal file
@ -0,0 +1,3 @@
|
||||
LuaFileSystem is a Lua library developed to complement the set of
|
||||
functions related to file systems offered by the standard Lua
|
||||
distribution.
|
2
devel/luafs/pkg/PFRAG.shared
Normal file
2
devel/luafs/pkg/PFRAG.shared
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
lib/luafs.so
|
12
devel/luafs/pkg/PLIST
Normal file
12
devel/luafs/pkg/PLIST
Normal file
@ -0,0 +1,12 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/05/15 00:42:52 jolan Exp $
|
||||
@unexec lua ${SYSCONFDIR}/lua/luapkg.lua del luafs
|
||||
%%SHARED%%
|
||||
lua/luafs/
|
||||
lua/luafs/init.lua
|
||||
lua/luafs/lfs.lua
|
||||
@exec lua ${SYSCONFDIR}/lua/luapkg.lua add luafs ${PREFIX}/lua/luafs/init.lua
|
||||
share/doc/luafs/
|
||||
share/doc/luafs/index.html
|
||||
share/doc/luafs/license.html
|
||||
share/doc/luafs/luafilesystem.png
|
||||
share/doc/luafs/manual.html
|
Loading…
Reference in New Issue
Block a user