- Update to 1.0
- Get source rom github - Pass maintainership to lua@
This commit is contained in:
parent
a32d51f3c4
commit
2cc867a57e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=315233
4 changed files with 10 additions and 66 deletions
|
@ -1,28 +1,28 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= lua-sysctl
|
||||
PORTVERSION= 0.2
|
||||
PORTVERSION= 1.0
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://files.kaworu.ch/
|
||||
|
||||
MAINTAINER= garga@FreeBSD.org
|
||||
MAINTAINER= lua@FreeBSD.org
|
||||
COMMENT= A small sysctl(3) interface for lua
|
||||
|
||||
USE_GITHUB= yes
|
||||
USE_PKGCONFIG= build
|
||||
USE_LUA= yes
|
||||
PLIST_FILES= %%LUA_MODSHAREDIR%%/sysctl.lua \
|
||||
%%LUA_MODLIBDIR%%/sysctl/core.so
|
||||
PLIST_DIRS= %%LUA_MODLIBDIR%%/sysctl
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
GH_ACCOUNT= kAworu
|
||||
GH_PROJECT= ${PORTNAME}
|
||||
GH_COMMIT= 345dc69
|
||||
|
||||
.if ${OSVERSION} >= 900030
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src__lua_sysctl.c
|
||||
.endif
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${LUA_MODLIBDIR}/sysctl
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/sysctl.lua ${LUA_MODSHAREDIR}/sysctl.lua
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/sysctl/core.so ${LUA_MODLIBDIR}/sysctl/core.so
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/build/core.so ${LUA_MODLIBDIR}/sysctl/core.so
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (lua-sysctl-0.2.tar.gz) = 76555832afb6f905f1df929ce475aee2acfbc795aac57d24f1b0b7c760d5b789
|
||||
SIZE (lua-sysctl-0.2.tar.gz) = 6472
|
||||
SHA256 (lua-sysctl-1.0.tar.gz) = 00fce554dc5a59160d16defb01f3316a9528172e0ac676e3d01e5d9e5eddbcaf
|
||||
SIZE (lua-sysctl-1.0.tar.gz) = 7751
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
--- src/lua_sysctl.c.orig 2011-12-05 09:47:49.000000000 +0900
|
||||
+++ src/lua_sysctl.c 2011-12-05 09:57:48.000000000 +0900
|
||||
@@ -257,6 +257,7 @@
|
||||
long longval;
|
||||
unsigned long ulongval;
|
||||
quad_t quadval;
|
||||
+ u_quad_t uquadval;
|
||||
size_t s, newsize = 0;
|
||||
u_int kind;
|
||||
char fmt[BUFSIZ], key[BUFSIZ], nvalbuf[BUFSIZ];
|
||||
@@ -293,7 +294,8 @@
|
||||
(kind & CTLTYPE) == CTLTYPE_UINT ||
|
||||
(kind & CTLTYPE) == CTLTYPE_LONG ||
|
||||
(kind & CTLTYPE) == CTLTYPE_ULONG ||
|
||||
- (kind & CTLTYPE) == CTLTYPE_QUAD) {
|
||||
+ (kind & CTLTYPE) == CTLTYPE_S64 ||
|
||||
+ (kind & CTLTYPE) == CTLTYPE_U64) {
|
||||
if (strlen(newval) == 0)
|
||||
return (luaL_error(L, "empty numeric value"));
|
||||
}
|
||||
@@ -343,7 +345,7 @@
|
||||
break;
|
||||
case CTLTYPE_STRING:
|
||||
break;
|
||||
- case CTLTYPE_QUAD:
|
||||
+ case CTLTYPE_S64:
|
||||
quadval = (quad_t)strtonum(newval, LLONG_MIN, LLONG_MAX, &errmsg);
|
||||
if (errmsg) {
|
||||
return (luaL_error(L, "bad quad_t integer: %s (%s)",
|
||||
@@ -352,6 +354,15 @@
|
||||
newval = &quadval;
|
||||
newsize = sizeof(quadval);
|
||||
break;
|
||||
+ case CTLTYPE_U64:
|
||||
+ uquadval = (u_quad_t)strtonum(newval, 0, ULLONG_MAX, &errmsg);
|
||||
+ if (errmsg) {
|
||||
+ return (luaL_error(L, "bad unsigned quad_t integer: %s (%s)",
|
||||
+ (char *)newval, errmsg));
|
||||
+ }
|
||||
+ newval = &uquadval;
|
||||
+ newsize = sizeof(uquadval);
|
||||
+ break;
|
||||
case CTLTYPE_OPAQUE:
|
||||
if (strcmp(fmt, "T,dev_t") == 0) {
|
||||
set_T_dev_t(L, newval, &newval, &newsize);
|
|
@ -1,11 +0,0 @@
|
|||
--- Makefile.orig 2013-01-25 08:34:02.000000000 -0200
|
||||
+++ Makefile 2013-01-25 08:34:23.000000000 -0200
|
||||
@@ -2,7 +2,7 @@
|
||||
SODIR = sysctl
|
||||
SOLIB = ${SODIR}/core.so
|
||||
|
||||
-LDFLAGS += -shared -soname ${SONAME}
|
||||
+LDFLAGS += -shared -Wl,-soname,${SONAME}
|
||||
CFLAGS += -Wall -Wextra -fPIC `pkg-config --cflags lua-5.1`
|
||||
|
||||
all: ${SOLIB}
|
Loading…
Reference in a new issue