aboutsummaryrefslogtreecommitdiff
path: root/converters/lua-iconv
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2009-12-05 16:33:14 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2009-12-05 16:33:14 +0000
commit09e407135269aaa6929ddc399a862553fbfcde04 (patch)
treedef604ac7f44292ead4f9c778f7a67999d8fb669 /converters/lua-iconv
parent6d8fe538c94c7acfa047501d20bd10514f1687b5 (diff)
downloadports-09e407135269aaa6929ddc399a862553fbfcde04.tar.gz
ports-09e407135269aaa6929ddc399a862553fbfcde04.zip
Add lua-iconv, is a lua binding to iconv(3).
Notes
Notes: svn path=/head/; revision=245237
Diffstat (limited to 'converters/lua-iconv')
-rw-r--r--converters/lua-iconv/Makefile29
-rw-r--r--converters/lua-iconv/distinfo3
-rw-r--r--converters/lua-iconv/files/patch-Makefile14
-rw-r--r--converters/lua-iconv/files/patch-luaiconv.c11
-rw-r--r--converters/lua-iconv/patch-Makefile21
-rw-r--r--converters/lua-iconv/pkg-descr3
6 files changed, 81 insertions, 0 deletions
diff --git a/converters/lua-iconv/Makefile b/converters/lua-iconv/Makefile
new file mode 100644
index 000000000000..c9596f3c0814
--- /dev/null
+++ b/converters/lua-iconv/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for: lua-iconv
+# Date created: 04 Dec 2009
+# Whom: vanilla@
+#
+# $FreeBSD$
+#
+
+PORTNAME= iconv
+PORTVERSION= 6
+CATEGORIES= converters
+MASTER_SITES= http://luaforge.net/frs/download.php/4181/
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
+
+MAINTAINER= vanilla@FreeBSD.org
+COMMENT= Iconv binding for Lua 5
+
+WRKSRC= ${WRKDIR}/lua-${PORTNAME}-${PORTVERSION}
+USE_LUA?= 5.1
+USE_GNOME= pkgconfig
+
+PLIST_FILES= %%LUA_MODLIBDIR%%/iconv.so
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%INCDIR%%|-I${PREFIX}/include|;s|%%LIBDIR%%|-L${PREFIX}/lib|' ${WRKSRC}/Makefile
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/iconv.so ${LUA_MODLIBDIR}
+
+.include <bsd.port.mk>
diff --git a/converters/lua-iconv/distinfo b/converters/lua-iconv/distinfo
new file mode 100644
index 000000000000..6c62df201ffe
--- /dev/null
+++ b/converters/lua-iconv/distinfo
@@ -0,0 +1,3 @@
+MD5 (iconv-6.tar.gz) = 2cec334c5786d7c420a53003d6cb93d4
+SHA256 (iconv-6.tar.gz) = e3ca46cc4975d9dc496b282db217723d1b0b5277e6938be8797ea6e0ac4f77f4
+SIZE (iconv-6.tar.gz) = 6101
diff --git a/converters/lua-iconv/files/patch-Makefile b/converters/lua-iconv/files/patch-Makefile
new file mode 100644
index 000000000000..ae1eeb119222
--- /dev/null
+++ b/converters/lua-iconv/files/patch-Makefile
@@ -0,0 +1,14 @@
+--- Makefile.orig 2009-12-04 12:50:49.000000000 +0800
++++ Makefile 2009-12-04 12:54:18.000000000 +0800
+@@ -31,8 +31,9 @@
+ OMIT_FRAME_POINTER = -fomit-frame-pointer
+
+ # Name of .pc file. "lua5.1" on Debian/Ubuntu
+-LUAPKG = lua5.1
+-CFLAGS = `pkg-config $(LUAPKG) --cflags` -fPIC -O3 -Wall
++LUAPKG = lua-5.1
++CFLAGS += `pkg-config $(LUAPKG) --cflags` -fPIC %%INCDIR%%
++LIBS = `pkg-config $(LUAPKG) --libs` -liconv %%LIBDIR%%
+ LFLAGS = -shared $(OMIT_FRAME_POINTER)
+ INSTALL_PATH = `pkg-config $(LUAPKG) --variable=INSTALL_CMOD`
+
diff --git a/converters/lua-iconv/files/patch-luaiconv.c b/converters/lua-iconv/files/patch-luaiconv.c
new file mode 100644
index 000000000000..9f079728c973
--- /dev/null
+++ b/converters/lua-iconv/files/patch-luaiconv.c
@@ -0,0 +1,11 @@
+--- luaiconv.c.orig 2009-12-04 12:57:38.000000000 +0800
++++ luaiconv.c 2009-12-04 12:58:30.000000000 +0800
+@@ -102,7 +102,7 @@ static int Liconv_open(lua_State *L) {
+ static int Liconv(lua_State *L) {
+ iconv_t cd = get_iconv_t(L, 1);
+ size_t ibleft = lua_strlen(L, 2);
+- char *inbuf = (char*) luaL_checkstring(L, 2);
++ const char *inbuf = luaL_checkstring(L, 2);
+ char *outbuf;
+ char *outbufs;
+ size_t obsize = (ibleft > 256) ? ibleft : 256;
diff --git a/converters/lua-iconv/patch-Makefile b/converters/lua-iconv/patch-Makefile
new file mode 100644
index 000000000000..470cc31e5de5
--- /dev/null
+++ b/converters/lua-iconv/patch-Makefile
@@ -0,0 +1,21 @@
+--- Makefile.orig Wed Nov 5 21:26:49 2003
++++ Makefile Mon Aug 7 00:38:38 2006
+@@ -1,13 +1,13 @@
+ # makefile for POSIX library for Lua
+
+ # change these to reflect your Lua installation
+-LUA= /tmp/lhf/lua-5.0
+-LUAINC= $(LUA)/include
+-LUALIB= $(LUA)/lib
+-LUABIN= $(LUA)/bin
++LUA= ${PREFIX}
++LUAINC= $(LUA_INCDIR)
++LUALIB= $(LUA_LIBDIR)
++LUABIN= $(LUA_BINDIR)
+
+ # no need to change anything below here
+-CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
++CFLAGS+= -fPIC $(INCS) $(WARN) -O2 $G
+ WARN= -pedantic -Wall
+ INCS= -I$(LUAINC)
+
diff --git a/converters/lua-iconv/pkg-descr b/converters/lua-iconv/pkg-descr
new file mode 100644
index 000000000000..e521ca40c1cc
--- /dev/null
+++ b/converters/lua-iconv/pkg-descr
@@ -0,0 +1,3 @@
+LuaIconv is a Lua binding to iconv library.
+
+WWW: http://luaforge.net/projects/lua-iconv/