pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/lua-compat53



Module Name:    pkgsrc
Committed By:   nia
Date:           Wed Jul  8 14:25:38 UTC 2020

Added Files:
        pkgsrc/devel/lua-compat53: DESCR Makefile PLIST buildlink3.mk distinfo
        pkgsrc/devel/lua-compat53/files: Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/lua-compat53/DESCR \
    pkgsrc/devel/lua-compat53/Makefile pkgsrc/devel/lua-compat53/PLIST \
    pkgsrc/devel/lua-compat53/buildlink3.mk \
    pkgsrc/devel/lua-compat53/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/lua-compat53/files/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/lua-compat53/DESCR
diff -u /dev/null pkgsrc/devel/lua-compat53/DESCR:1.1
--- /dev/null   Wed Jul  8 14:25:38 2020
+++ pkgsrc/devel/lua-compat53/DESCR     Wed Jul  8 14:25:38 2020
@@ -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.
Index: pkgsrc/devel/lua-compat53/Makefile
diff -u /dev/null pkgsrc/devel/lua-compat53/Makefile:1.1
--- /dev/null   Wed Jul  8 14:25:38 2020
+++ pkgsrc/devel/lua-compat53/Makefile  Wed Jul  8 14:25:38 2020
@@ -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"
Index: pkgsrc/devel/lua-compat53/PLIST
diff -u /dev/null pkgsrc/devel/lua-compat53/PLIST:1.1
--- /dev/null   Wed Jul  8 14:25:38 2020
+++ pkgsrc/devel/lua-compat53/PLIST     Wed Jul  8 14:25:38 2020
@@ -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
Index: pkgsrc/devel/lua-compat53/buildlink3.mk
diff -u /dev/null pkgsrc/devel/lua-compat53/buildlink3.mk:1.1
--- /dev/null   Wed Jul  8 14:25:38 2020
+++ pkgsrc/devel/lua-compat53/buildlink3.mk     Wed Jul  8 14:25:38 2020
@@ -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
Index: pkgsrc/devel/lua-compat53/distinfo
diff -u /dev/null pkgsrc/devel/lua-compat53/distinfo:1.1
--- /dev/null   Wed Jul  8 14:25:38 2020
+++ pkgsrc/devel/lua-compat53/distinfo  Wed Jul  8 14:25:38 2020
@@ -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

Index: pkgsrc/devel/lua-compat53/files/Makefile
diff -u /dev/null pkgsrc/devel/lua-compat53/files/Makefile:1.1
--- /dev/null   Wed Jul  8 14:25:38 2020
+++ pkgsrc/devel/lua-compat53/files/Makefile    Wed Jul  8 14:25:38 2020
@@ -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