pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/lua-compat53: import lua52-compat53-0.7
Module Name: pkgsrc-wip
Committed By: Jonathan Buschmann <jonthn+pkgsrc%pinacea.com@localhost>
Pushed By: jonthn
Date: Wed Jan 1 23:08:34 2020 +0800
Changeset: 0e805330ac1b63905dc8111778b88b7ab387591d
Added Files:
lua-compat53/DESCR
lua-compat53/Makefile
lua-compat53/PLIST
lua-compat53/buildlink3.mk
lua-compat53/distinfo
Log Message:
wip/lua-compat53: import lua52-compat53-0.7
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 see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0e805330ac1b63905dc8111778b88b7ab387591d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lua-compat53/DESCR | 4 ++++
lua-compat53/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++++
lua-compat53/PLIST | 8 ++++++++
lua-compat53/buildlink3.mk | 14 +++++++++++++
lua-compat53/distinfo | 6 ++++++
5 files changed, 82 insertions(+)
diffs:
diff --git a/lua-compat53/DESCR b/lua-compat53/DESCR
new file mode 100644
index 0000000000..99f8e0707f
--- /dev/null
+++ b/lua-compat53/DESCR
@@ -0,0 +1,4 @@
+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 --git a/lua-compat53/Makefile b/lua-compat53/Makefile
new file mode 100644
index 0000000000..0ca214eced
--- /dev/null
+++ b/lua-compat53/Makefile
@@ -0,0 +1,50 @@
+# $NetBSD$
+# $NetBSD $
+
+DISTNAME= lua-compat53-0.7
+PKGNAME= ${DISTNAME:S/lua/${LUA_PKGPREFIX}/}
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=keplerproject/}
+GITHUB_PROJECT= lua-compat-5.3
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+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
+
+LUA_VERSIONS_ACCEPTED= 52 51
+INSTALLATION_DIRS+= ${LUA_LDIR} ${LUA_CDIR}
+INSTALLATION_DIRS+= ${LUA_LDIR}/compat53
+INSTALLATION_DIRS+= ${LUA_LDIR}/compat53/c-api
+INSTALLATION_DIRS+= ${LUA_CDIR}/compat53
+
+.include "../../mk/bsd.prefs.mk"
+
+COMMON_FLAGS_COMPILER= -O2 -fPIC -I${PREFIX}/${LUA_INCDIR}
+COMMON_FLAGS_LINKER= -shared -fPIC
+
+do-build:
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_COMPILER} -c lutf8lib.c -o lutf8lib.o
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_COMPILER} -c ltablib.c -o ltablib.o
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_COMPILER} -c lstrlib.c -o lstrlib.o
+.if ${_OPSYS_SHLIB_TYPE} == "dylib"
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_LINKER} -undefined dynamic_lookup -install_name ${PREFIX}/${LUA_CDIR}/compat53/utf8.so lutf8lib.o -o utf8.so
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_LINKER} -undefined dynamic_lookup -install_name ${PREFIX}/${LUA_CDIR}/compat53/table.so ltablib.o -o table.so
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_LINKER} -undefined dynamic_lookup -install_name ${PREFIX}/${LUA_CDIR}/compat53/string.so lstrlib.o -o string.so
+.else
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_LINKER} lutf8lib.o -o utf8.so
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_LINKER} ltablib.o -o table.so
+ cd ${WRKSRC} && ${CC} ${COMMON_FLAGS_LINKER} lstrlib.o -o string.so
+.endif
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/utf8.so ${DESTDIR}${PREFIX}/${LUA_CDIR}/compat53/
+ ${INSTALL_LIB} ${WRKSRC}/table.so ${DESTDIR}${PREFIX}/${LUA_CDIR}/compat53/
+ ${INSTALL_LIB} ${WRKSRC}/string.so ${DESTDIR}${PREFIX}/${LUA_CDIR}/compat53/
+ ${INSTALL_DATA} ${WRKSRC}/compat53/init.lua ${DESTDIR}${PREFIX}/${LUA_LDIR}/compat53/
+ ${INSTALL_DATA} ${WRKSRC}/compat53/module.lua ${DESTDIR}${PREFIX}/${LUA_LDIR}/compat53/
+ ${INSTALL_DATA} ${WRKSRC}/c-api/compat-5.3.c ${DESTDIR}${PREFIX}/${LUA_LDIR}/compat53/c-api/
+ ${INSTALL_DATA} ${WRKSRC}/c-api/compat-5.3.h ${DESTDIR}${PREFIX}/${LUA_LDIR}/compat53/c-api/
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lua-compat53/PLIST b/lua-compat53/PLIST
new file mode 100644
index 0000000000..cb7d74717f
--- /dev/null
+++ b/lua-compat53/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD$
+${LUA_CDIR}/compat53/string.so
+${LUA_CDIR}/compat53/table.so
+${LUA_CDIR}/compat53/utf8.so
+${LUA_LDIR}/compat53/c-api/compat-5.3.c
+${LUA_LDIR}/compat53/c-api/compat-5.3.h
+${LUA_LDIR}/compat53/init.lua
+${LUA_LDIR}/compat53/module.lua
diff --git a/lua-compat53/buildlink3.mk b/lua-compat53/buildlink3.mk
new file mode 100644
index 0000000000..806ca54ed0
--- /dev/null
+++ b/lua-compat53/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+#BUILDLINK_DEPMETHOD.lua-compat53?= build
+
+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?= ../../wip/lua-compat53
+BUILDLINK_CONTENTS_FILTER.lua-compat53?= ${EGREP} '(\.c$$|\.h$$)'
+.endif # LUA_COMPAT53_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -lua-compat53
diff --git a/lua-compat53/distinfo b/lua-compat53/distinfo
new file mode 100644
index 0000000000..33224268cf
--- /dev/null
+++ b/lua-compat53/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.5 2015/08/10 22:59:31 jonthn 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
Home |
Main Index |
Thread Index |
Old Index