Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel devel: Add lua-system, based on work by Jonathan...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7959eb62f9cf
branches: trunk
changeset: 435478:7959eb62f9cf
user: nia <nia%pkgsrc.org@localhost>
date: Wed Jul 08 12:15:08 2020 +0000
description:
devel: Add lua-system, based on work by Jonathan Buschmann in wip
luasystem is a platform independent system call library for Lua.
Currently the following functions are supported:
- gettime
- monotime
- sleep
diffstat:
devel/Makefile | 3 +-
devel/lua-system/DESCR | 7 ++++
devel/lua-system/Makefile | 44 +++++++++++++++++++++++++++++
devel/lua-system/PLIST | 3 +
devel/lua-system/distinfo | 7 ++++
devel/lua-system/patches/patch-src_Makefile | 42 +++++++++++++++++++++++++++
6 files changed, 105 insertions(+), 1 deletions(-)
diffs (140 lines):
diff -r 8d322c5fd7de -r 7959eb62f9cf devel/Makefile
--- a/devel/Makefile Wed Jul 08 11:57:36 2020 +0000
+++ b/devel/Makefile Wed Jul 08 12:15:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3157 2020/07/08 11:25:20 nia Exp $
+# $NetBSD: Makefile,v 1.3158 2020/07/08 12:15:08 nia Exp $
#
COMMENT= Development utilities
@@ -872,6 +872,7 @@
SUBDIR+= lua-std-_debug
SUBDIR+= lua-std-normalize
SUBDIR+= lua-stdlib
+SUBDIR+= lua-system
SUBDIR+= lua-term
SUBDIR+= lua-thrift
SUBDIR+= lutok
diff -r 8d322c5fd7de -r 7959eb62f9cf devel/lua-system/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-system/DESCR Wed Jul 08 12:15:08 2020 +0000
@@ -0,0 +1,7 @@
+luasystem is a platform independent system call library for Lua.
+
+Currently the following functions are supported:
+
+- gettime
+- monotime
+- sleep
diff -r 8d322c5fd7de -r 7959eb62f9cf devel/lua-system/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-system/Makefile Wed Jul 08 12:15:08 2020 +0000
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1 2020/07/08 12:15:08 nia Exp $
+
+DISTNAME= luasystem-0.2.1
+PKGNAME= ${LUA_PKGPREFIX}-${DISTNAME:S/^lua//1}
+CATEGORIES= devel lua
+MASTER_SITES= ${MASTER_SITE_GITHUB:=o-lim/}
+GITHUB_PROJECT= luasystem
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= nia%NetBSD.org@localhost
+HOMEPAGE= https://github.com/o-lim/luasystem
+COMMENT= Platform independent system call library for Lua
+LICENSE= mit
+
+USE_TOOLS+= gmake pkg-config
+BUILD_DIRS= src
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+MAKE_FLAGS+= PLAT=macosx
+.else
+MAKE_FLAGS+= PLAT=freebsd
+.endif
+
+MAKE_FLAGS+= prefix=${PREFIX}
+MAKE_FLAGS+= LUA_VERSION=${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
+MAKE_FLAGS+= CC=${CC}
+MAKE_FLAGS+= LD=${CC}
+MAKE_FLAGS+= CDIR=${LUA_CDIR}
+MAKE_FLAGS+= LDIR=${LUA_LDIR}
+MAKE_FLAGS+= LUAINC=${PREFIX}/${LUA_INCDIR}
+
+MAKE_FLAGS+= INSTALL_DIR=${INSTALL_DATA_DIR:Q}
+MAKE_FLAGS+= INSTALL_DATA=${INSTALL_DATA:Q}
+MAKE_FLAGS+= INSTALL_EXEC=${INSTALL_LIB:Q}
+
+INSTALLATION_DIRS+= ${LUA_LDIR} ${LUA_CDIR} ${LUA_LDIR}/system
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/system/*.lua ${DESTDIR}${PREFIX}/${LUA_LDIR}/system
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 8d322c5fd7de -r 7959eb62f9cf devel/lua-system/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-system/PLIST Wed Jul 08 12:15:08 2020 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2020/07/08 12:15:08 nia Exp $
+${LUA_CDIR}/system/core.so
+${LUA_LDIR}/system/init.lua
diff -r 8d322c5fd7de -r 7959eb62f9cf devel/lua-system/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-system/distinfo Wed Jul 08 12:15:08 2020 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/07/08 12:15:08 nia Exp $
+
+SHA1 (luasystem-0.2.1.tar.gz) = a6ef8b18f578ca619e0878645c6c6c1d4025b3d6
+RMD160 (luasystem-0.2.1.tar.gz) = 62ca2e0b385bd0f81f638f164153579a43ece7d9
+SHA512 (luasystem-0.2.1.tar.gz) = b8a04a83e8e39c98da23484c9eba9ff60da2fb4db3deca0d52784a6c13c7e0faf7a8b326999d88703847107e4fce739062fc04a00266140969c9f57b70064f46
+Size (luasystem-0.2.1.tar.gz) = 8058 bytes
+SHA1 (patch-src_Makefile) = 3014c3d408f815a8e4da97f8ee07b7ff41f69c15
diff -r 8d322c5fd7de -r 7959eb62f9cf devel/lua-system/patches/patch-src_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-system/patches/patch-src_Makefile Wed Jul 08 12:15:08 2020 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_Makefile,v 1.1 2020/07/08 12:15:08 nia Exp $
+
+- macOS proper link flags for pkgsrc integration
+- Respect environment variables
+
+--- src/Makefile.orig 2016-10-03 06:43:39.000000000 +0000
++++ src/Makefile
+@@ -131,10 +131,10 @@ SO_macosx=so
+ O_macosx=o
+ CC_macosx=gcc
+ DEF_macosx=
+-CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
+- -fvisibility=hidden
+-LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
+-LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
++CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -fno-common \
++ -fvisibility=hidden -fPIC
++LDFLAGS_macosx=-O -shared -undefined dynamic_lookup -install_name $(prefix)/$(CDIR)/system/$(SOLIB) -o
++LD_macosx=gcc -fvisibility=hidden -fPIC
+
+ #------
+ # Compiler and linker settings
+@@ -156,7 +156,7 @@ O_freebsd=o
+ CC_freebsd=gcc
+ DEF_freebsd=
+ CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+- -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
++ -Wimplicit -fPIC -fvisibility=hidden
+ LDFLAGS_freebsd=-O -shared -fpic -o
+ LD_freebsd=gcc
+
+@@ -208,8 +208,8 @@ SOLIB=core.$(SO)
+ #
+ CC=$(CC_$(PLAT))
+ DEF=$(DEF_$(PLAT))
+-CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
+-LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
++CFLAGS+=$(MYCFLAGS) $(CFLAGS_$(PLAT))
++LDFLAGS+=$(MYLDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(PLAT))
+ LD=$(LD_$(PLAT))
+ LUAINC= $(LUAINC_$(PLAT))
+ LUALIB= $(LUALIB_$(PLAT))
Home |
Main Index |
Thread Index |
Old Index