aboutsummaryrefslogtreecommitdiff
path: root/lang/lua51
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-05-26 15:28:28 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-05-26 15:28:28 +0000
commite836ab008ac38916a93472f2840e03e2e8470ef5 (patch)
tree1485083919fd5b153bf056ea17ac895ea758a8a9 /lang/lua51
parent35d8b48dff5490ff5d7232109c287da637b58811 (diff)
downloadports-e836ab008ac38916a93472f2840e03e2e8470ef5.tar.gz
ports-e836ab008ac38916a93472f2840e03e2e8470ef5.zip
Replace lang/lua with the new lang/lua51
lang/lua51 is working the same way lang/lua52, chase ports using lua 5.1 Make the default lua lua52 Make all lua ports using USES=lua Approved by: portmgr (implicit)
Notes
Notes: svn path=/head/; revision=355360
Diffstat (limited to 'lang/lua51')
-rw-r--r--lang/lua51/Makefile82
-rw-r--r--lang/lua51/distinfo2
-rw-r--r--lang/lua51/pkg-descr21
-rw-r--r--lang/lua51/pkg-plist17
4 files changed, 122 insertions, 0 deletions
diff --git a/lang/lua51/Makefile b/lang/lua51/Makefile
new file mode 100644
index 000000000000..32e07597e9cd
--- /dev/null
+++ b/lang/lua51/Makefile
@@ -0,0 +1,82 @@
+# Created by: GreenDog <fiziologus@gmail.com>
+# $FreeBSD$
+
+PORTNAME= lua
+PORTVERSION= 5.1.5
+PORTREVISION= 7
+CATEGORIES= lang
+MASTER_SITES= http://www.lua.org/ftp/
+PKGNAMESUFFIX= 51
+
+MAINTAINER= lua@FreeBSD.org
+COMMENT= Small, compilable scripting language providing easy access to C code
+
+LICENSE= MIT
+
+LUA_VER= 5.1
+USES= readline
+USE_LDCONFIG= yes
+
+# Overriding __MAKE_CONF makes sure that we don't re-parse
+# /etc/make.conf during do-build, which would jeopardize the build
+# if, for instance, the user set CFLAGS=mumble
+# NOTE: /etc/make.conf is read BEFORE Makefile, so we already
+# have its settings when we get here.
+# See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt
+MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
+# liblua.so requires libm, so make sure it has an explicit dependency
+# so that applications need not second-guess lua's dependencies.
+LDFLAGS+= -lm -pthread
+BUILD_WRKSRC= ${WRKSRC}/src
+MAKE_ARGS+= MYCFLAGS="${CFLAGS} -DLUA_USE_LINUX" \
+ MYLDFLAGS="${LDFLAGS} -Wl,-E -lreadline" \
+ CC="${CC}" \
+ LUA_T=lua51 \
+ LUAC_T=luac51 \
+ LUA_A=liblua-${LUA_VER}.a \
+ LUA_SO=liblua-${LUA_VER}.so \
+ LUA_SONAME=liblua-${LUA_VER}.so \
+ TO_BIN="lua51 luac51" \
+ TO_LIB="liblua-${LUA_VER}.a liblua-${LUA_VER}.so" \
+ INSTALL_TOP=${STAGEDIR}${PREFIX} \
+ INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua51 \
+ INSTALL_EXEC="${INSTALL_PROGRAM}"
+
+# Cope with the lack of support for Lua 5.2 in bsd.lua.mk. These
+# overrides, which are required below, should be removed once bsd.lua.mk
+# understands this lua version.
+LUA_PREFIX?= ${PREFIX}
+LUA_SUBDIR?= lua${PKGNAMESUFFIX}
+LUA_INCDIR?= ${LUA_PREFIX}/include/${LUA_SUBDIR}
+LUA_LIBDIR?= ${LUA_PREFIX}/lib
+
+CFLAGS_amd64= -fPIC
+CFLAGS_powerpc= -fPIC
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,rand *(,random(,g' \
+ ${WRKSRC}/src/lmathlib.c
+ @${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}|" \
+ ${WRKSRC}/src/luaconf.h
+ @${REINPLACE_CMD} -i '' -Ee \
+ 's|^(prefix=).*|\1 ${PREFIX}| ; \
+ s|^(libdir=).*|\1 ${LUA_LIBDIR}| ; \
+ s|^(includedir=).*|\1 ${LUA_INCDIR}| ; \
+ s|^(INSTALL_BIN=).*|\1 ${LUA_BINDIR}| ; \
+ s|^(INSTALL_INC=).*|\1 ${LUA_INCDIR}| ; \
+ s|^(INSTALL_LIB=).*|\1 ${LUA_LIBDIR}| ; \
+ s|^(INSTALL_CMOD=).*|\1 ${LUA_MODLIBDIR}| ; \
+ s|^(INSTALL_LMOD=).*|\1 ${LUA_MODSHAREDIR}| ; \
+ s|llua|llua-${LUA_VER}|' \
+ ${WRKSRC}/etc/lua.pc
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblua-${LUA_VER}.so
+ @${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
+ ${STAGEDIR}${PREFIX}/man/man1/lua51.1
+ @${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
+ ${STAGEDIR}${PREFIX}/man/man1/luac51.1
+ ${INSTALL_DATA} ${WRKSRC}/etc/lua.pc \
+ ${STAGEDIR}${PREFIX}/libdata/pkgconfig/lua-${LUA_VER}.pc
+
+.include <bsd.port.mk>
diff --git a/lang/lua51/distinfo b/lang/lua51/distinfo
new file mode 100644
index 000000000000..702e643a2cfc
--- /dev/null
+++ b/lang/lua51/distinfo
@@ -0,0 +1,2 @@
+SHA256 (lua-5.1.5.tar.gz) = 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
+SIZE (lua-5.1.5.tar.gz) = 221213
diff --git a/lang/lua51/pkg-descr b/lang/lua51/pkg-descr
new file mode 100644
index 000000000000..d0ed8afbd09c
--- /dev/null
+++ b/lang/lua51/pkg-descr
@@ -0,0 +1,21 @@
+Lua is a programming language originally designed for extending applications,
+but also frequently used as a general-purpose, stand-alone language. Lua
+combines simple procedural syntax (similar to Pascal) with powerful data
+description constructs based on associative arrays and extensible semantics.
+Lua is dynamically typed, interpreted from bytecodes, and has automatic memory
+management with garbage collection, making it ideal for configuration,
+scripting, and rapid prototyping.
+
+A fundamental concept in the design of Lua is to provide meta-mechanisms for
+implementing features, instead of providing a host of features directly in
+the language. For example, although Lua is not a pure object-oriented
+language, it does provide meta-mechanisms for implementing classes and
+inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the
+language small, while allowing the semantics to be extended in unconventional
+ways. Extensible semantics is a distinguishing feature of Lua.
+
+Lua is implemented as a small library of C functions, written in ANSI C, and
+compiles unmodified in all known platforms. The implementation goals are
+simplicity, efficiency, portability, and low embedding cost.
+
+WWW: http://www.lua.org/
diff --git a/lang/lua51/pkg-plist b/lang/lua51/pkg-plist
new file mode 100644
index 000000000000..85fb5442ed5a
--- /dev/null
+++ b/lang/lua51/pkg-plist
@@ -0,0 +1,17 @@
+bin/lua51
+bin/luac51
+include/lua51/lauxlib.h
+include/lua51/lua.h
+include/lua51/lua.hpp
+include/lua51/luaconf.h
+include/lua51/lualib.h
+lib/liblua-5.1.a
+lib/liblua-5.1.so
+libdata/pkgconfig/lua-5.1.pc
+man/man1/lua51.1.gz
+man/man1/luac51.1.gz
+@dirrmtry %%DATADIR%%/5.1
+@dirrmtry %%DATADIR%%
+@dirrmtry lib/lua/5.1
+@dirrmtry lib/lua
+@dirrmtry include/lua51