pkgsrc-WIP-changes archive

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

wip/lua-system: import lua52-system-0.2.1



Module Name:	pkgsrc-wip
Committed By:	Jonathan Buschmann <jonthn+pkgsrc%pinacea.com@localhost>
Pushed By:	jonthn
Date:		Sat Jan 4 00:19:39 2020 +0800
Changeset:	0ada4ad5468dd40cbae3bb5d048ba2972b5935aa

Added Files:
	lua-system/DESCR
	lua-system/Makefile
	lua-system/PLIST
	lua-system/distinfo
	lua-system/patches/patch-src_Makefile

Log Message:
wip/lua-system: import lua52-system-0.2.1

luasystem is a platform independent system call library for Lua.
Supports Lua >= 5.1 and luajit >= 2.0.0.

Currently the following functions are supported:

    gettime
    monotime
    sleep

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0ada4ad5468dd40cbae3bb5d048ba2972b5935aa

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

diffstat:
 lua-system/DESCR                      |  8 +++++++
 lua-system/Makefile                   | 42 +++++++++++++++++++++++++++++++++++
 lua-system/PLIST                      |  3 +++
 lua-system/distinfo                   |  7 ++++++
 lua-system/patches/patch-src_Makefile | 28 +++++++++++++++++++++++
 5 files changed, 88 insertions(+)

diffs:
diff --git a/lua-system/DESCR b/lua-system/DESCR
new file mode 100644
index 0000000000..3c3b74be17
--- /dev/null
+++ b/lua-system/DESCR
@@ -0,0 +1,8 @@
+luasystem is a platform independent system call library for Lua.
+Supports Lua >= 5.1 and luajit >= 2.0.0.
+
+Currently the following functions are supported:
+
+    gettime
+    monotime
+    sleep
diff --git a/lua-system/Makefile b/lua-system/Makefile
new file mode 100644
index 0000000000..ddaf7ac662
--- /dev/null
+++ b/lua-system/Makefile
@@ -0,0 +1,42 @@
+# $NetBSD$
+
+DISTNAME=	lua-system-0.2.1
+PKGNAME=	${DISTNAME:S/lua/${LUA_PKGPREFIX}/}
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=LuaDist2/}
+GITHUB_PROJECT=	luasystem
+GITHUB_TAG=	${PKGVERSION_NOREV}-0
+
+HOMEPAGE=	https://github.com/LuaDist2/luasystem
+COMMENT=	Platform independent system call library for Lua
+LICENSE=	mit
+
+INSTALLATION_DIRS+=	${LUA_LDIR} ${LUA_CDIR} ${LUA_LDIR}/system
+
+USE_TOOLS+=	gmake pkg-config
+# WRKSRC=		${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}/src
+BUILD_DIRS=	src
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Linux"
+MAKE_ENV+=	PLAT=linux
+MAKE_ENV+=	LUAINC_linux=${PREFIX}/${LUA_INCDIR}
+.elif ${OPSYS} == "Darwin"
+MAKE_ENV+=	PLAT=macosx
+MAKE_ENV+=	LUAINC_macosx=${PREFIX}/${LUA_INCDIR}
+.else
+MAKE_ENV+=	PLAT=freebsd
+MAKE_ENV+=	LUAINC_freebsd=${PREFIX}/${LUA_INCDIR}
+.endif
+
+MAKE_ENV+=	prefix=${PREFIX}
+MAKE_ENV+=	LUA_VERSION=${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
+MAKE_ENV+=	CDIR=${LUA_CDIR}
+MAKE_ENV+=	LDIR=${LUA_LDIR}
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/system/*.lua ${DESTDIR}${PREFIX}/${LUA_LDIR}/system
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lua-system/PLIST b/lua-system/PLIST
new file mode 100644
index 0000000000..e2111ad498
--- /dev/null
+++ b/lua-system/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+${LUA_CDIR}/system/core.so
+${LUA_LDIR}/system/init.lua
diff --git a/lua-system/distinfo b/lua-system/distinfo
new file mode 100644
index 0000000000..0c35d1a3a9
--- /dev/null
+++ b/lua-system/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.3 2015/08/10 22:13:59 jonthn Exp $
+
+SHA1 (lua-system-0.2.1.tar.gz) = dff6427ca886b126ee9380c32563e16c4bea81bd
+RMD160 (lua-system-0.2.1.tar.gz) = 4698690d8da57bb473e9ceb5c20e0d499e613b67
+SHA512 (lua-system-0.2.1.tar.gz) = 9dc323d4d1914cfa4f278a49ef22e58569d5cd7e369fa17fa6006cd47f9d90c6dfd4404067ea2436aa46a27cfbdf91e4aa26e20b89aeeefdf2aa7252c51fb32b
+Size (lua-system-0.2.1.tar.gz) = 8162 bytes
+SHA1 (patch-src_Makefile) = 1c4fdf7b05dcba114dca15b5ae8486724fa03007
diff --git a/lua-system/patches/patch-src_Makefile b/lua-system/patches/patch-src_Makefile
new file mode 100644
index 0000000000..bd5e2db957
--- /dev/null
+++ b/lua-system/patches/patch-src_Makefile
@@ -0,0 +1,28 @@
+$NetBSD$
+
+macOS proper link flags for pkgsrc integration
+
+--- src/Makefile.orig	2016-10-03 16:43:26.000000000 +0000
++++ src/Makefile
+@@ -132,9 +132,9 @@ 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
++	-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
+@@ -209,7 +209,7 @@ SOLIB=core.$(SO)
+ CC=$(CC_$(PLAT))
+ DEF=$(DEF_$(PLAT))
+ CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
+-LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
++LDFLAGS=$(MYLDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(PLAT))
+ LD=$(LD_$(PLAT))
+ LUAINC= $(LUAINC_$(PLAT))
+ LUALIB= $(LUALIB_$(PLAT))


Home | Main Index | Thread Index | Old Index