aboutsummaryrefslogtreecommitdiff
path: root/net/luasocket
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2006-09-15 10:58:52 +0000
committerMark Linimon <linimon@FreeBSD.org>2006-09-15 10:58:52 +0000
commit340400ffaf677d5d9c9a2e607dd5e362edd57cb2 (patch)
treef6f6930e7a2830cbe248e3087413df9d73df8204 /net/luasocket
parent8e14c1122788455715895371b9272f605321889c (diff)
downloadports-340400ffaf677d5d9c9a2e607dd5e362edd57cb2.tar.gz
ports-340400ffaf677d5d9c9a2e607dd5e362edd57cb2.zip
Notes
Diffstat (limited to 'net/luasocket')
-rw-r--r--net/luasocket/Makefile31
-rw-r--r--net/luasocket/files/patch-config31
-rw-r--r--net/luasocket/pkg-plist30
3 files changed, 41 insertions, 51 deletions
diff --git a/net/luasocket/Makefile b/net/luasocket/Makefile
index e780e68ede3a..f0121466738e 100644
--- a/net/luasocket/Makefile
+++ b/net/luasocket/Makefile
@@ -14,35 +14,22 @@ MASTER_SITES= http://luaforge.net/frs/download.php/1097/
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= IPv4 Sockets support for the Lua language
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${LOCALBASE}/share/lua/5.0/compat-5.1.lua:${PORTSDIR}/devel/lua50-compat51
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
USE_GMAKE= yes
+USE_LUA= 5.0
+LUA_COMPS= lua compat51
+
+COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
+MAKE_ENV= COMPATDIR="${COMPAT_SRC}"
post-extract:
- @ ${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
- @ ${RM} ${WRKSRC}/src/compat-5.1r4/compat-5.1.o
+ @${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
post-install:
.if !defined(NOPORTDOCS)
- @${MKDIR} ${PREFIX}/share/doc/luasocket
- @${INSTALL_DATA} ${WRKSRC}/doc/dns.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/ftp.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/home.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/http.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/installation.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/introduction.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/ltn12.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/luasocket.png ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/mime.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/reference.css ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/reference.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/smtp.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/socket.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/tcp.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/udp.html ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/url.html ${DOCSDIR}
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif
.include <bsd.port.mk>
diff --git a/net/luasocket/files/patch-config b/net/luasocket/files/patch-config
index 983046625a1f..28ccac908120 100644
--- a/net/luasocket/files/patch-config
+++ b/net/luasocket/files/patch-config
@@ -1,28 +1,35 @@
---- config.orig Fri Nov 25 09:29:38 2005
-+++ config Mon Mar 6 19:46:29 2006
-@@ -15,8 +15,8 @@
+--- config.orig Thu Nov 24 17:29:38 2005
++++ config Mon Aug 7 13:36:23 2006
+@@ -15,42 +15,42 @@
#------
# Lua includes and libraries
#
-LUAINC=-Ilua-5.0.2/include
-LUALIB=-Llua-5.0.2/lib
-+LUAINC=-I$(PREFIX)/include
-+LUALIB=-L$(PREFIX)/lib
++LUAINC=-I$(LUA_INCDIR)
++LUALIB=-L$(LUA_LIBDIR)
#------
# Compat-5.1 directory
-@@ -27,8 +27,8 @@
+ #
+-COMPAT=compat-5.1r4
++COMPAT=${COMPATDIR}
+
+ #------
# Top of your Lua installation
# Relative paths will be inside the src tree
#
-INSTALL_TOP_SHARE=share
-INSTALL_TOP_LIB=lib
-+INSTALL_TOP_SHARE=${PREFIX}/share/lua/5.0
-+INSTALL_TOP_LIB=${PREFIX}/lib/lua/5.0
++INSTALL_TOP_SHARE=${LUA_MODSHAREDIR}
++INSTALL_TOP_LIB=${LUA_MODLIBDIR}
- INSTALL_DATA=cp
- INSTALL_EXEC=cp
-@@ -37,20 +37,20 @@
+-INSTALL_DATA=cp
+-INSTALL_EXEC=cp
++INSTALL_DATA=${BSD_INSTALL_DATA}
++INSTALL_EXEC=${BSD_INSTALL_PROGRAM}
+
+ #------
# Compiler and linker settings
# for Mac OS X
#
@@ -48,7 +55,7 @@
-#LD=gcc
+CFLAGS+= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -fpic
+LDFLAGS=-O -shared
-+LD=gcc
++LD=${CC}
#------
# End of makefile configuration
diff --git a/net/luasocket/pkg-plist b/net/luasocket/pkg-plist
index 3f6613797661..bd812f8bf4fd 100644
--- a/net/luasocket/pkg-plist
+++ b/net/luasocket/pkg-plist
@@ -1,13 +1,13 @@
-share/lua/5.0/mime.lua
-share/lua/5.0/socket.lua
-share/lua/5.0/ltn12.lua
-share/lua/5.0/socket/smtp.lua
-share/lua/5.0/socket/ftp.lua
-share/lua/5.0/socket/tp.lua
-share/lua/5.0/socket/url.lua
-share/lua/5.0/socket/http.lua
-lib/lua/5.0/socket/core.so
-lib/lua/5.0/mime/core.so
+%%LUA_MODSHAREDIR%%/mime.lua
+%%LUA_MODSHAREDIR%%/socket.lua
+%%LUA_MODSHAREDIR%%/ltn12.lua
+%%LUA_MODSHAREDIR%%/socket/smtp.lua
+%%LUA_MODSHAREDIR%%/socket/ftp.lua
+%%LUA_MODSHAREDIR%%/socket/tp.lua
+%%LUA_MODSHAREDIR%%/socket/url.lua
+%%LUA_MODSHAREDIR%%/socket/http.lua
+%%LUA_MODLIBDIR%%/socket/core.so
+%%LUA_MODLIBDIR%%/mime/core.so
%%PORTDOCS%%%%DOCSDIR%%/dns.html
%%PORTDOCS%%%%DOCSDIR%%/ftp.html
%%PORTDOCS%%%%DOCSDIR%%/home.html
@@ -25,10 +25,6 @@ lib/lua/5.0/mime/core.so
%%PORTDOCS%%%%DOCSDIR%%/udp.html
%%PORTDOCS%%%%DOCSDIR%%/url.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm share/lua/5.0/socket
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
-@dirrm lib/lua/5.0/socket
-@dirrm lib/lua/5.0/mime
-@dirrmtry lib/lua/5.0
-@dirrmtry lib/lua
+@dirrm %%LUA_MODSHAREDIR%%/socket
+@dirrm %%LUA_MODLIBDIR%%/socket
+@dirrm %%LUA_MODLIBDIR%%/mime