Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/lua-compat53 devel: Add lua-compat53. Based on w...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e33e8b99ec39
branches:  trunk
changeset: 435494:e33e8b99ec39
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Jul 08 14:25:38 2020 +0000

description:
devel: Add lua-compat53. Based on work by Jonathan Buschmann in wip.

This is a small module that aims to make it easier to write Lua
code in a Lua-5.3-style that runs on Lua 5.3, 5.2, and 5.1.

It does *not* make Lua 5.2 (or even 5.1) entirely compatible
with Lua 5.3, but it brings the API closer to that of Lua 5.3.

diffstat:

 devel/lua-compat53/DESCR          |   5 +++++
 devel/lua-compat53/Makefile       |  36 ++++++++++++++++++++++++++++++++++++
 devel/lua-compat53/PLIST          |   8 ++++++++
 devel/lua-compat53/buildlink3.mk  |  13 +++++++++++++
 devel/lua-compat53/distinfo       |   6 ++++++
 devel/lua-compat53/files/Makefile |  18 ++++++++++++++++++
 6 files changed, 86 insertions(+), 0 deletions(-)

diffs (110 lines):

diff -r 09fcfcd7f066 -r e33e8b99ec39 devel/lua-compat53/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-compat53/DESCR  Wed Jul 08 14:25:38 2020 +0000
@@ -0,0 +1,5 @@
+This is a small module that aims to make it easier to write Lua
+code in a Lua-5.3-style that runs on Lua 5.3, 5.2, and 5.1.
+
+It does *not* make Lua 5.2 (or even 5.1) entirely compatible
+with Lua 5.3, but it brings the API closer to that of Lua 5.3.
diff -r 09fcfcd7f066 -r e33e8b99ec39 devel/lua-compat53/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-compat53/Makefile       Wed Jul 08 14:25:38 2020 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2020/07/08 14:25:38 nia Exp $
+
+DISTNAME=      lua-compat53-0.7
+PKGNAME=       ${LUA_PKGPREFIX}-${DISTNAME:S/^lua-//1}
+CATEGORIES=    devel lua
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=keplerproject/}
+GITHUB_PROJECT=        lua-compat-5.3
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/keplerproject/lua-compat-5.3
+COMMENT=       Compatibility module providing Lua-5.3-style APIs for Lua 5.2 and 5.1
+LICENSE=       mit
+
+PLIST_SUBST+=  LUA_INCDIR=${LUA_INCDIR}
+
+PRINT_PLIST_AWK+=      /^${LUA_INCDIR:S|/|\\/|g}/ \
+                       { gsub(/${LUA_INCDIR:S|/|\\/|g}/, "$${LUA_INCDIR}") }
+
+INSTALLATION_DIRS+=    ${LUA_LDIR} ${LUA_CDIR} ${LUA_INCDIR}
+INSTALLATION_DIRS+=    ${LUA_LDIR}/compat53
+INSTALLATION_DIRS+=    ${LUA_CDIR}/compat53
+
+# Does not make sense to use this with newer Lua versions.
+LUA_VERSIONS_ACCEPTED= 52 51
+
+pre-build:
+       ${CP} -f ${FILESDIR}/Makefile ${WRKSRC}/Makefile
+
+do-install:
+       ${INSTALL_LIB} ${WRKSRC}/*.so ${DESTDIR}${PREFIX}/${LUA_CDIR}/compat53
+       ${INSTALL_DATA} ${WRKSRC}/compat53/*.lua ${DESTDIR}${PREFIX}/${LUA_LDIR}/compat53
+       ${INSTALL_DATA} ${WRKSRC}/c-api/* ${DESTDIR}${PREFIX}/${LUA_INCDIR}
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 09fcfcd7f066 -r e33e8b99ec39 devel/lua-compat53/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-compat53/PLIST  Wed Jul 08 14:25:38 2020 +0000
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1 2020/07/08 14:25:38 nia Exp $
+${LUA_INCDIR}/compat-5.3.c
+${LUA_INCDIR}/compat-5.3.h
+${LUA_CDIR}/compat53/string.so
+${LUA_CDIR}/compat53/table.so
+${LUA_CDIR}/compat53/utf8.so
+${LUA_LDIR}/compat53/init.lua
+${LUA_LDIR}/compat53/module.lua
diff -r 09fcfcd7f066 -r e33e8b99ec39 devel/lua-compat53/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-compat53/buildlink3.mk  Wed Jul 08 14:25:38 2020 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/07/08 14:25:38 nia Exp $
+
+BUILDLINK_TREE+=       lua-compat53
+
+.if !defined(LUA_COMPAT53_BUILDLINK3_MK)
+LUA_COMPAT53_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.lua-compat53+=           ${LUA_PKGPREFIX}-compat53>=0.7
+BUILDLINK_PKGSRCDIR.lua-compat53?=             ../../devel/lua-compat53
+BUILDLINK_CONTENTS_FILTER.lua-compat53?=       ${EGREP} '(\.c$$|\.h$$)'
+.endif # LUA_COMPAT53_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -lua-compat53
diff -r 09fcfcd7f066 -r e33e8b99ec39 devel/lua-compat53/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-compat53/distinfo       Wed Jul 08 14:25:38 2020 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/07/08 14:25:38 nia Exp $
+
+SHA1 (lua-compat53-0.7.tar.gz) = b93fcbfe10e1c6f410dba4db9450f7c217695f43
+RMD160 (lua-compat53-0.7.tar.gz) = b0c5b6cb1c7c69055e42ff49ef91d5e2b99fe836
+SHA512 (lua-compat53-0.7.tar.gz) = 665ece98422a105b818cffd96eea5788696fbb854d2ba41d2d387e8bd25c1fa9de601468e55e22e9e749979a66d4d2e0f7dfd656e5bf27b489d37bb07c96f48d
+Size (lua-compat53-0.7.tar.gz) = 51383 bytes
diff -r 09fcfcd7f066 -r e33e8b99ec39 devel/lua-compat53/files/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-compat53/files/Makefile Wed Jul 08 14:25:38 2020 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2020/07/08 14:25:38 nia Exp $
+
+CFLAGS+=       -fPIC -Wall
+LDFLAGS+=      -shared
+
+all: utf8.so table.so string.so
+
+.c.o:
+       $(CC) $(CFLAGS) -c $<
+
+utf8.so: lutf8lib.o
+       $(CC) $(LDFLAGS) -o $@ lutf8lib.o
+
+table.so: ltablib.o
+       $(CC) $(LDFLAGS) -o $@ ltablib.o
+
+string.so: lstrlib.o
+       $(CC) $(LDFLAGS) -o $@ lstrlib.o



Home | Main Index | Thread Index | Old Index