luafs-1.2.1, okay rui@
This commit is contained in:
parent
e474c217ec
commit
4802ddc0fc
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.6 2006/12/17 11:56:56 kili Exp $
|
||||
# $OpenBSD: Makefile,v 1.7 2007/05/10 20:23:29 pedro Exp $
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= "file system library for the lua language"
|
||||
DISTNAME= luafilesystem-1.2
|
||||
PKGNAME= luafs-1.2p1
|
||||
DISTNAME= luafilesystem-1.2.1
|
||||
PKGNAME= luafs-1.2.1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://luaforge.net/frs/download.php/1487/
|
||||
MASTER_SITES= http://luaforge.net/frs/download.php/2381/
|
||||
|
||||
HOMEPAGE= http://www.keplerproject.org/luafilesystem/
|
||||
|
||||
@ -32,4 +32,8 @@ do-install:
|
||||
${PREFIX}/share/doc/luafs
|
||||
${INSTALL_DATA} ${WRKSRC}/tests/*.lua ${PREFIX}/share/examples/luafs
|
||||
|
||||
do-regress:
|
||||
cp ${WRKDIST}/*.so ${WRKDIST}/tests
|
||||
cd ${WRKDIST}/tests && lua test.lua
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (luafilesystem-1.2.tar.gz) = 9NuhV/67LkbQ7zvrpS9vxg==
|
||||
RMD160 (luafilesystem-1.2.tar.gz) = jfzWtzmstIkv0xNTwSkQ6z3GBrU=
|
||||
SHA1 (luafilesystem-1.2.tar.gz) = PtEUMYQulcAwYqf1ozm5GsI5/rw=
|
||||
SHA256 (luafilesystem-1.2.tar.gz) = lKS47KGQAQPhnsIp5QgKXh4djv8iC20Agj5liLJHKkg=
|
||||
SIZE (luafilesystem-1.2.tar.gz) = 22013
|
||||
MD5 (luafilesystem-1.2.1.tar.gz) = ltdCW3zTtT2uRAnoyUvFPA==
|
||||
RMD160 (luafilesystem-1.2.1.tar.gz) = +vbeHm85tuohWfH2TwZlEroytvI=
|
||||
SHA1 (luafilesystem-1.2.1.tar.gz) = BVnefb18vILJAtg1tvrSbVgcDCw=
|
||||
SHA256 (luafilesystem-1.2.1.tar.gz) = Xkpg8Nz21FzueS8Vj0nbHbxFz/6+3vehpONYrSF3DH0=
|
||||
SIZE (luafilesystem-1.2.1.tar.gz) = 22165
|
||||
|
@ -1,34 +1,20 @@
|
||||
$OpenBSD: patch-Makefile,v 1.4 2006/09/24 16:56:08 pedro Exp $
|
||||
--- Makefile.orig Sun Sep 24 13:46:06 2006
|
||||
+++ Makefile Sun Sep 24 13:46:34 2006
|
||||
@@ -8,14 +8,18 @@ include $(CONFIG)
|
||||
|
||||
COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
|
||||
$OpenBSD: patch-Makefile,v 1.5 2007/05/10 20:23:29 pedro Exp $
|
||||
--- Makefile.orig Thu May 10 10:10:42 2007
|
||||
+++ Makefile Thu May 10 10:11:51 2007
|
||||
@@ -9,10 +9,15 @@ include $(CONFIG)
|
||||
SRCS= src/$T.c
|
||||
-OBJS= src/$T.o $(COMPAT_O)
|
||||
+OBJS= src/$T.o
|
||||
OBJS= src/$T.o
|
||||
|
||||
+all: lib
|
||||
|
||||
+
|
||||
lib: src/$(LIBNAME)
|
||||
|
||||
src/$(LIBNAME): $(OBJS)
|
||||
- export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) $(LIB_OPTION) lfs.o -o $(LIBNAME)
|
||||
|
||||
+
|
||||
+$(OBJS): $(SRCS)
|
||||
+ $(CC) $(CFLAGS) $(INCS) -c src/lfs.c
|
||||
+
|
||||
$(COMPAT_O): $(COMPAT_DIR)/compat-5.1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
|
||||
|
||||
@@ -26,3 +30,9 @@ install: src/$(LIBNAME)
|
||||
|
||||
clean:
|
||||
rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O)
|
||||
+
|
||||
+regress:
|
||||
+ @echo "Running test..."; \
|
||||
+ LUA_CPATH="./?.so"; \
|
||||
+ export LUA_CPATH; \
|
||||
+ $(LUA) tests/test.lua
|
||||
install: src/$(LIBNAME)
|
||||
mkdir -p $(LUA_LIBDIR)
|
||||
|
@ -1,32 +1,28 @@
|
||||
$OpenBSD: patch-config,v 1.5 2006/09/24 16:56:08 pedro Exp $
|
||||
--- config.orig Sun Sep 24 13:34:34 2006
|
||||
+++ config Sun Sep 24 13:36:22 2006
|
||||
@@ -1,20 +1,22 @@
|
||||
$OpenBSD: patch-config,v 1.6 2007/05/10 20:23:29 pedro Exp $
|
||||
--- config.orig Thu May 10 10:14:46 2007
|
||||
+++ config Thu May 10 10:15:23 2007
|
||||
@@ -1,19 +1,18 @@
|
||||
# Installation directories
|
||||
# System's libraries directory (where binary libraries are installed)
|
||||
-LUA_LIBDIR= /usr/local/lib/lua/5.0
|
||||
-LUA_LIBDIR= /usr/local/lib/lua/5.1
|
||||
+LUA_LIBDIR= $(LOCALBASE)/lib
|
||||
# Lua includes directory
|
||||
-LUA_INC= /usr/local/include
|
||||
-LUA_INC= /usr/local/include/lua51
|
||||
+LUA_INC= $(LOCALBASE)/include
|
||||
+# Location of the Lua interpreter.
|
||||
+LUA= $(PREFIX)/bin/lua
|
||||
|
||||
# OS dependent
|
||||
LIB_OPTION= -shared #for Linux
|
||||
#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
|
||||
|
||||
-LIBNAME= $T.so.$V
|
||||
+LIBNAME= lfs.so
|
||||
COMPAT_DIR= ../compat/src
|
||||
+LIBNAME= $T.so
|
||||
|
||||
# Compilation directives
|
||||
WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
|
||||
-INCS= -I$(LUA_INC) -I$(COMPAT_DIR)
|
||||
-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
|
||||
INCS= -I$(LUA_INC)
|
||||
-CFLAGS= $(WARN) $(INCS)
|
||||
-CC= gcc
|
||||
+INCS= -I$(LUA_INC)
|
||||
+CFLAGS+= -fPIC
|
||||
+CFLAGS+= -fPIC $(INCS)
|
||||
+CC= cc
|
||||
|
||||
# $Id: patch-config,v 1.5 2006/09/24 16:56:08 pedro Exp $
|
||||
# $Id: patch-config,v 1.6 2007/05/10 20:23:29 pedro Exp $
|
||||
|
@ -1,30 +1,23 @@
|
||||
$OpenBSD: patch-src_lfs_c,v 1.3 2006/07/30 04:38:39 pedro Exp $
|
||||
--- src/lfs.c.orig Tue Mar 14 13:18:30 2006
|
||||
+++ src/lfs.c Thu Jul 27 16:40:51 2006
|
||||
@@ -32,14 +32,13 @@
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
-#include <sys/types.h>
|
||||
+#include <sys/param.h>
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lualib.h"
|
||||
-#include "compat-5.1.h"
|
||||
|
||||
#include "lfs.h"
|
||||
|
||||
@@ -91,8 +90,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;
|
||||
$OpenBSD: patch-src_lfs_c,v 1.4 2007/05/10 20:23:29 pedro Exp $
|
||||
--- src/lfs.c.orig Thu May 10 10:12:15 2007
|
||||
+++ src/lfs.c Thu May 10 10:13:50 2007
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
-#include <sys/types.h>
|
||||
+#include <sys/param.h>
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
@@ -89,8 +89,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;
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-tests_test_lua,v 1.1 2006/03/26 04:56:02 pedro Exp $
|
||||
--- tests/test.lua.orig Sun Mar 26 00:16:12 2006
|
||||
+++ tests/test.lua Sun Mar 26 00:16:14 2006
|
||||
$OpenBSD: patch-tests_test_lua,v 1.2 2007/05/10 20:23:29 pedro Exp $
|
||||
--- tests/test.lua.orig Thu May 10 10:06:03 2007
|
||||
+++ tests/test.lua Thu May 10 10:06:06 2007
|
||||
@@ -1,5 +1,3 @@
|
||||
-#!/usr/local/bin/lua50
|
||||
-
|
||||
local tmp = "/tmp"
|
||||
local sep = "/"
|
||||
local upper = ".."
|
||||
-#!/usr/local/bin/lua5.1
|
||||
-
|
||||
local tmp = "/tmp"
|
||||
local sep = "/"
|
||||
local upper = ".."
|
||||
|
Loading…
Reference in New Issue
Block a user