diff options
author | Sergey A. Osokin <osa@FreeBSD.org> | 2012-01-12 09:55:37 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org> | 2012-01-12 09:55:37 +0000 |
commit | 0ee40131f33ecb9d92d65838941441282e1b126e (patch) | |
tree | a3954432ad2081fc3a4943ae78c3f6a28d0b4481 /devel/lua-cjson | |
parent | a12ce191e99b44ae1d2ffb0b641a5016811148c4 (diff) | |
download | ports-0ee40131f33ecb9d92d65838941441282e1b126e.tar.gz ports-0ee40131f33ecb9d92d65838941441282e1b126e.zip |
Notes
Diffstat (limited to 'devel/lua-cjson')
-rw-r--r-- | devel/lua-cjson/Makefile | 25 | ||||
-rw-r--r-- | devel/lua-cjson/distinfo | 2 | ||||
-rw-r--r-- | devel/lua-cjson/files/patch-Makefile | 51 | ||||
-rw-r--r-- | devel/lua-cjson/pkg-descr | 12 |
4 files changed, 90 insertions, 0 deletions
diff --git a/devel/lua-cjson/Makefile b/devel/lua-cjson/Makefile new file mode 100644 index 000000000000..710c23f5c785 --- /dev/null +++ b/devel/lua-cjson/Makefile @@ -0,0 +1,25 @@ +# New ports collection makefile for: lua-cjson +# Date created: 12 Jan 2012 +# Whom: osa +# +# $FreeBSD$ +# + +PORTNAME= cjson +PORTVERSION= 1.0.4 +CATEGORIES= devel +MASTER_SITES= http://www.kyne.com.au/~mark/software/download/ +PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX} +DISTNAME= lua-cjson-${PORTVERSION} + +MAINTAINER= osa@FreeBSD.org +COMMENT= Fast JSON parsing and encoding support for Lua + +USE_LUA?= 5.1 + +PLIST_FILES= %%LUA_MODLIBDIR%%/cjson.so + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/cjson.so ${LUA_MODLIBDIR} + +.include <bsd.port.mk> diff --git a/devel/lua-cjson/distinfo b/devel/lua-cjson/distinfo new file mode 100644 index 000000000000..176de4bab595 --- /dev/null +++ b/devel/lua-cjson/distinfo @@ -0,0 +1,2 @@ +SHA256 (lua-cjson-1.0.4.tar.gz) = 3d353821977b4aa97bbba0d2386a73172a7ef246a3f799b677225275145d0b72 +SIZE (lua-cjson-1.0.4.tar.gz) = 33336 diff --git a/devel/lua-cjson/files/patch-Makefile b/devel/lua-cjson/files/patch-Makefile new file mode 100644 index 000000000000..1ce32a469137 --- /dev/null +++ b/devel/lua-cjson/files/patch-Makefile @@ -0,0 +1,51 @@ +--- Makefile.orig 2011-11-29 17:46:33.000000000 +0400 ++++ Makefile 2012-01-12 13:50:30.000000000 +0400 +@@ -13,7 +13,7 @@ + # USE_INTERNAL_ISINF: Workaround for Solaris platforms missing isinf(). + + ## Common build defaults +-PREFIX = /usr/local ++#PREFIX = /usr/local + CFLAGS_EXTRA = -DUSE_POSIX_SETLOCALE + LDFLAGS_EXTRA = -shared + +@@ -25,10 +25,10 @@ + # specific details. + + ## Linux +-CFLAGS_EXTRA = -DUSE_POSIX_USELOCALE ++#CFLAGS_EXTRA = -DUSE_POSIX_USELOCALE + + ## FreeBSD +-#LUA_INCLUDE_DIR = $(PREFIX)/include/lua51 ++LUA_INCLUDE_DIR = $(PREFIX)/include/lua51 + + ## MacOSX (Macports) + #PREFIX = /opt/local +@@ -40,13 +40,13 @@ + + ## End platform specific section + +-LUA_INCLUDE_DIR ?= $(PREFIX)/include ++#LUA_INCLUDE_DIR ?= $(PREFIX)/include + LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) + + #CFLAGS ?= -g -Wall -pedantic -fno-inline +-CFLAGS ?= -O3 -Wall -pedantic +-override CFLAGS += $(CFLAGS_EXTRA) -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\" +-override LDFLAGS += $(LDFLAGS_EXTRA) ++#CFLAGS ?= -O3 -Wall -pedantic ++CFLAGS += $(CFLAGS_EXTRA) -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\" ++LDFLAGS += $(LDFLAGS_EXTRA) + + INSTALL ?= install + +@@ -55,7 +55,7 @@ + all: cjson.so + + cjson.so: lua_cjson.o strbuf.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC) $(LDFLAGS) -o $@ lua_cjson.o strbuf.o + + install: + $(INSTALL) -d $(DESTDIR)/$(LUA_LIB_DIR) diff --git a/devel/lua-cjson/pkg-descr b/devel/lua-cjson/pkg-descr new file mode 100644 index 000000000000..3a87bea25f5d --- /dev/null +++ b/devel/lua-cjson/pkg-descr @@ -0,0 +1,12 @@ +Lua CJSON provides fast JSON parsing and encoding support for Lua. It +has been tested under Linux, FreeBSD, OSX, Solaris and Windows. + +Features: + +- Fast, standards compliant encoding/parsing routines. +- Full support for JSON with UTF-8, including decoding surrogate pairs. +- Optional run-time support for common exceptions to the JSON specification + (NaN, Infinity,..). +- No external dependencies. + +WWW: http://www.kyne.com.au/~mark/software/lua-cjson.php |