svn commit: r477276 - in head/devel/lua-bitop: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Wed Aug 15 19:34:25 UTC 2018
Author: sunpoet
Date: Wed Aug 15 19:34:18 2018
New Revision: 477276
URL: https://svnweb.freebsd.org/changeset/ports/477276
Log:
Fix CFLAGS and test
- Bump PORTREVISION for package change
PR: 230205
Submitted by: Andrew Gierth <andrew at tao11.riddles.org.uk>
Added:
head/devel/lua-bitop/files/
head/devel/lua-bitop/files/extra-patch-bittest.lua (contents, props changed)
Modified:
head/devel/lua-bitop/Makefile
Modified: head/devel/lua-bitop/Makefile
==============================================================================
--- head/devel/lua-bitop/Makefile Wed Aug 15 19:34:12 2018 (r477275)
+++ head/devel/lua-bitop/Makefile Wed Aug 15 19:34:18 2018 (r477276)
@@ -3,26 +3,34 @@
PORTNAME= bitop
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://bitop.luajit.org/download/ \
LOCAL/sunpoet
-DISTNAME= LuaBitOp-${PORTVERSION}
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
+DISTNAME= LuaBitOp-${PORTVERSION}
MAINTAINER= sunpoet at FreeBSD.org
COMMENT= Bitwise operations on numbers
LICENSE= MIT
-CFLAGS+= -DLUA_NUMBER_LONG_LONG -I${LUA_INCDIR}
+CFLAGS+= -I${LUA_INCDIR}
MAKE_ARGS= CC=${CC} LUA=${LUA_CMD}
TEST_TARGET= test
USES?= gmake lua
-PLIST_FILES= %%LUA_MODLIBDIR%%/bit.so
+PLIST_FILES= ${LUA_MODLIBDIR}/bit.so
+.include <bsd.port.pre.mk>
+
+.if ${LUA_VER_STR} >= 53
+CFLAGS+= -DLUA_NUMBER_DOUBLE
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-bittest.lua
+.endif
+
do-install:
${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}/
${INSTALL_LIB} ${WRKSRC}/bit.so ${STAGEDIR}${LUA_MODLIBDIR}/
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Added: head/devel/lua-bitop/files/extra-patch-bittest.lua
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/lua-bitop/files/extra-patch-bittest.lua Wed Aug 15 19:34:18 2018 (r477276)
@@ -0,0 +1,13 @@
+--- bittest.lua.orig 2012-05-08 19:15:00 UTC
++++ bittest.lua
+@@ -8,6 +8,10 @@ local vb = {
+ 0x7fffffff, 0x80000000, 0xffffffff
+ }
+
++local function tostring(n)
++ return type(n) == "string" and n or string.format("%.11g", n)
++end
++
+ local function cksum(name, s, r)
+ local z = 0
+ for i=1,#s do z = (z + string.byte(s, i)*i) % 2147483629 end
More information about the svn-ports-head
mailing list