Import of pkgsrc-2014Q1
This commit is contained in:
21
lang/lua52/DESCR
Normal file
21
lang/lua52/DESCR
Normal file
@@ -0,0 +1,21 @@
|
||||
Lua is a powerful, light-weight programming language designed for
|
||||
extending applications. Lua is 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, making it ideal for
|
||||
configuration, scripting, and rapid prototyping.
|
||||
|
||||
Lua is a language engine that you can embed into your application.
|
||||
This means that, besides syntax and semantics, Lua has an API that
|
||||
allows the application to exchange data with Lua programs and also to
|
||||
extend Lua with C functions. In this sense, Lua can be regarded as a
|
||||
language framework for building domain-specific languages.
|
||||
|
||||
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.
|
||||
The result is a fast language engine with small footprint, making it
|
||||
ideal in embedded systems too.
|
||||
59
lang/lua52/Makefile
Normal file
59
lang/lua52/Makefile
Normal file
@@ -0,0 +1,59 @@
|
||||
# $NetBSD: Makefile,v 1.1 2013/10/30 06:18:10 dholland Exp $
|
||||
|
||||
DISTNAME= lua-${LUA_VERSION}
|
||||
PKGNAME= lua52-${LUA_VERSION}
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= http://www.lua.org/ftp/ \
|
||||
http://www.tecgraf.puc-rio.br/lua/ftp/
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://www.lua.org/
|
||||
COMMENT= Powerful light-weight language for extending applications
|
||||
LICENSE= mit
|
||||
|
||||
.include "../../lang/lua52/version.mk"
|
||||
|
||||
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
||||
CONFLICTS+= lua-[0-9]*
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
USE_LIBTOOL= yes
|
||||
USE_TOOLS+= gmake
|
||||
MAKE_ENV+= DLLIB=${BUILDLINK_LDADD.dl:Q}
|
||||
MAKE_ENV+= INSTALL_DATA=${INSTALL_DATA:Q}
|
||||
CFLAGS+= -DLUA_ROOT=\"${PREFIX}/\"
|
||||
|
||||
PKGCONFIG_OVERRIDE= ${WRKSRC}/lua.pc
|
||||
INSTALLATION_DIRS+= lib/pkgconfig share/doc/lua
|
||||
|
||||
.if ${OPSYS} == "FreeBSD"
|
||||
BUILD_TARGET= freebsd
|
||||
.elif !empty(OPSYS:M*BSD*) || ${OPSYS} == "DragonFly"
|
||||
BUILD_TARGET= bsd
|
||||
.elif ${OPSYS} == "Linux"
|
||||
BUILD_TARGET= linux
|
||||
.elif ${OPSYS} == "Darwin"
|
||||
BUILD_TARGET= macosx
|
||||
.elif ${OPSYS} == "SunOS"
|
||||
BUILD_TARGET= solaris
|
||||
.elif ${OPSYS} == "AIX"
|
||||
BUILD_TARGET= aix
|
||||
.else
|
||||
BUILD_TARGET= generic
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
sed -e 's,@PREFIX@,${PREFIX},g' \
|
||||
-e 's,@VER@,${PKGVERSION_NOREV:R},g' \
|
||||
-e 's,@REV@,${PKGVERSION_NOREV},g' \
|
||||
${FILESDIR}/lua.pc.in > ${WRKSRC}/lua.pc
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/lua.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.??? ${DESTDIR}${PREFIX}/share/doc/lua
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.???? ${DESTDIR}${PREFIX}/share/doc/lua
|
||||
|
||||
.include "../../mk/readline.buildlink3.mk"
|
||||
.include "../../mk/dlopen.buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
21
lang/lua52/PLIST
Normal file
21
lang/lua52/PLIST
Normal file
@@ -0,0 +1,21 @@
|
||||
@comment $NetBSD: PLIST,v 1.1 2013/10/30 06:18:10 dholland Exp $
|
||||
bin/lua
|
||||
bin/luac
|
||||
include/lauxlib.h
|
||||
include/lua.h
|
||||
include/lua.hpp
|
||||
include/luaconf.h
|
||||
include/lualib.h
|
||||
lib/liblua.la
|
||||
lib/pkgconfig/lua.pc
|
||||
man/man1/lua.1
|
||||
man/man1/luac.1
|
||||
share/doc/lua/contents.html
|
||||
share/doc/lua/logo.gif
|
||||
share/doc/lua/lua.css
|
||||
share/doc/lua/manual.css
|
||||
share/doc/lua/manual.html
|
||||
share/doc/lua/osi-certified-72x60.png
|
||||
share/doc/lua/readme.html
|
||||
@pkgdir share/lua/5.2
|
||||
@pkgdir lib/lua/5.2
|
||||
14
lang/lua52/buildlink3.mk
Normal file
14
lang/lua52/buildlink3.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
# $NetBSD: buildlink3.mk,v 1.2 2013/10/30 09:02:06 obache Exp $
|
||||
|
||||
BUILDLINK_TREE+= lua52
|
||||
|
||||
.if !defined(LUA52_BUILDLINK3_MK)
|
||||
LUA52_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.lua52+= lua52>=5.2.0<5.3
|
||||
BUILDLINK_PKGSRCDIR.lua52?= ../../lang/lua52
|
||||
|
||||
.include "../../mk/readline.buildlink3.mk"
|
||||
.endif # LUA52_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -lua52
|
||||
8
lang/lua52/distinfo
Normal file
8
lang/lua52/distinfo
Normal file
@@ -0,0 +1,8 @@
|
||||
$NetBSD: distinfo,v 1.2 2014/01/02 19:57:39 wiz Exp $
|
||||
|
||||
SHA1 (lua-5.2.3.tar.gz) = 926b7907bc8d274e063d42804666b40a3f3c124c
|
||||
RMD160 (lua-5.2.3.tar.gz) = b8714669c8c0f8272104effd8a9675921ddb2fa5
|
||||
Size (lua-5.2.3.tar.gz) = 251195 bytes
|
||||
SHA1 (patch-aa) = 5fa5c7fecc7fd50dc9d88d441ad9373f59ecb841
|
||||
SHA1 (patch-ab) = 4f2f05f6a5e4cfffe8f9ef7bf4de6f054074baa4
|
||||
SHA1 (patch-ac) = b8b9c0068210795e5eb22512767ac2e98bca8cbc
|
||||
21
lang/lua52/files/lua.pc.in
Normal file
21
lang/lua52/files/lua.pc.in
Normal file
@@ -0,0 +1,21 @@
|
||||
# $NetBSD: lua.pc.in,v 1.1 2013/10/30 06:18:10 dholland Exp $
|
||||
# lua.pc is not any longer distributed, but is still required by other packages.
|
||||
|
||||
prefix= @PREFIX@
|
||||
INSTALL_BIN= ${prefix}/bin
|
||||
INSTALL_INC= ${prefix}/include
|
||||
INSTALL_LIB= ${prefix}/lib
|
||||
INSTALL_MAN= ${prefix}/man/man1
|
||||
INSTALL_LMOD= ${prefix}/share/lua/@VER@
|
||||
INSTALL_CMOD= ${prefix}/lib/lua/@VER@
|
||||
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: Lua
|
||||
Description: An Extensible Extension Language
|
||||
Version: @REV@
|
||||
Requires:
|
||||
Libs: -L${libdir} -llua -lm
|
||||
Cflags: -I${includedir}
|
||||
53
lang/lua52/patches/patch-aa
Normal file
53
lang/lua52/patches/patch-aa
Normal file
@@ -0,0 +1,53 @@
|
||||
$NetBSD: patch-aa,v 1.1 2013/10/30 06:18:10 dholland Exp $
|
||||
|
||||
--- Makefile.orig 2012-05-17 14:05:54.000000000 +0000
|
||||
+++ Makefile
|
||||
@@ -10,11 +10,11 @@ PLAT= none
|
||||
# so take care if INSTALL_TOP is not an absolute path. See the local target.
|
||||
# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
|
||||
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
|
||||
-INSTALL_TOP= /usr/local
|
||||
+INSTALL_TOP= ${PREFIX}
|
||||
INSTALL_BIN= $(INSTALL_TOP)/bin
|
||||
INSTALL_INC= $(INSTALL_TOP)/include
|
||||
INSTALL_LIB= $(INSTALL_TOP)/lib
|
||||
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
|
||||
+INSTALL_MAN= $(INSTALL_TOP)/${PKGMANDIR}/man1
|
||||
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
|
||||
INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
|
||||
|
||||
@@ -22,7 +22,7 @@ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
|
||||
# you may have to run ranlib on the installed liblua.a.
|
||||
INSTALL= install -p
|
||||
INSTALL_EXEC= $(INSTALL) -m 0755
|
||||
-INSTALL_DATA= $(INSTALL) -m 0644
|
||||
+#INSTALL_DATA= $(INSTALL) -m 0644
|
||||
#
|
||||
# If you don't have "install" you can use "cp" instead.
|
||||
# INSTALL= cp -p
|
||||
@@ -41,7 +41,7 @@ PLATS= aix ansi bsd freebsd generic linu
|
||||
# What to install.
|
||||
TO_BIN= lua luac
|
||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
||||
-TO_LIB= liblua.a
|
||||
+TO_LIB= liblua.la
|
||||
TO_MAN= lua.1 luac.1
|
||||
|
||||
# Lua version and release.
|
||||
@@ -58,11 +58,11 @@ test: dummy
|
||||
src/lua -v
|
||||
|
||||
install: dummy
|
||||
- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
||||
- cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
||||
- cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
||||
- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
||||
- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
||||
+ cd src && $(MKDIR) $(DESTDIR)$(INSTALL_BIN) $(DESTDIR)$(INSTALL_INC) $(DESTDIR)$(INSTALL_LIB) $(DESTDIR)$(INSTALL_MAN) $(DESTDIR)$(INSTALL_LMOD) $(DESTDIR)$(INSTALL_CMOD)
|
||||
+ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_PROGRAM) $(TO_BIN) $(DESTDIR)$(INSTALL_BIN)
|
||||
+ cd src && $(INSTALL_DATA) $(TO_INC) $(DESTDIR)$(INSTALL_INC)
|
||||
+ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_LIB) $(TO_LIB) $(DESTDIR)$(INSTALL_LIB)
|
||||
+ cd doc && $(INSTALL_DATA) $(TO_MAN) $(DESTDIR)$(INSTALL_MAN)
|
||||
|
||||
uninstall:
|
||||
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
|
||||
74
lang/lua52/patches/patch-ab
Normal file
74
lang/lua52/patches/patch-ab
Normal file
@@ -0,0 +1,74 @@
|
||||
$NetBSD: patch-ab,v 1.1 2013/10/30 06:18:10 dholland Exp $
|
||||
|
||||
--- src/Makefile.orig 2012-12-27 10:51:43.000000000 +0000
|
||||
+++ src/Makefile
|
||||
@@ -6,8 +6,7 @@
|
||||
# Your platform. See PLATS for possible values.
|
||||
PLAT= none
|
||||
|
||||
-CC= gcc
|
||||
-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
||||
+CFLAGS+= -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
||||
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
||||
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
||||
|
||||
@@ -24,23 +23,28 @@ MYLDFLAGS=
|
||||
MYLIBS=
|
||||
MYOBJS=
|
||||
|
||||
+.SUFFIXES: .lo
|
||||
+.c.lo:
|
||||
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c $<
|
||||
+LV= 5:2
|
||||
+
|
||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||
|
||||
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
||||
|
||||
-LUA_A= liblua.a
|
||||
+LUA_A= liblua.la
|
||||
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
|
||||
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
|
||||
ltm.o lundump.o lvm.o lzio.o
|
||||
LIB_O= lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \
|
||||
lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
|
||||
-BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
||||
+BASE_O= $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) $(MYOBJS:.o=.lo)
|
||||
|
||||
LUA_T= lua
|
||||
-LUA_O= lua.o
|
||||
+LUA_O= lua.lo
|
||||
|
||||
LUAC_T= luac
|
||||
-LUAC_O= luac.o
|
||||
+LUAC_O= luac.lo
|
||||
|
||||
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
||||
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
||||
@@ -56,14 +60,13 @@ o: $(ALL_O)
|
||||
a: $(ALL_A)
|
||||
|
||||
$(LUA_A): $(BASE_O)
|
||||
- $(AR) $@ $(BASE_O)
|
||||
- $(RANLIB) $@
|
||||
+ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LDFLAGS) -o $@ $(BASE_O) -rpath ${PREFIX}/lib -version-info ${LV} ${LIBS}
|
||||
|
||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||
+ ${LIBTOOL} --tag=CC --mode=link $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||
|
||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||
+ ${LIBTOOL} --tag=CC --mode=link $(CC) -static -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||
|
||||
clean:
|
||||
$(RM) $(ALL_T) $(ALL_O)
|
||||
@@ -95,7 +98,7 @@ ansi:
|
||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_ANSI"
|
||||
|
||||
bsd:
|
||||
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
|
||||
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -lreadline -lhistory"
|
||||
|
||||
freebsd:
|
||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
|
||||
23
lang/lua52/patches/patch-ac
Normal file
23
lang/lua52/patches/patch-ac
Normal file
@@ -0,0 +1,23 @@
|
||||
$NetBSD: patch-ac,v 1.1 2013/10/30 06:18:10 dholland Exp $
|
||||
|
||||
--- src/luaconf.h.orig 2013-03-16 21:10:18.000000000 +0000
|
||||
+++ src/luaconf.h
|
||||
@@ -100,7 +100,9 @@
|
||||
#else /* }{ */
|
||||
|
||||
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
|
||||
+#ifndef LUA_ROOT
|
||||
#define LUA_ROOT "/usr/local/"
|
||||
+#endif
|
||||
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
|
||||
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
|
||||
#define LUA_PATH_DEFAULT \
|
||||
@@ -175,7 +177,7 @@
|
||||
** default definition.
|
||||
*/
|
||||
#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
|
||||
- defined(__ELF__) /* { */
|
||||
+ defined(__ELF__) && !defined(__sun) /* { */
|
||||
#define LUAI_FUNC __attribute__((visibility("hidden"))) extern
|
||||
#define LUAI_DDEC LUAI_FUNC
|
||||
#define LUAI_DDEF /* empty */
|
||||
6
lang/lua52/version.mk
Normal file
6
lang/lua52/version.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: version.mk,v 1.2 2014/01/02 19:57:39 wiz Exp $
|
||||
|
||||
LUA_VERSION= 5.2.3
|
||||
|
||||
LUA_VERSION_MAJOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
|
||||
LUA_VERSION_MINOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
|
||||
Reference in New Issue
Block a user