mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Update to version 7 to allow using lua 5.2
While here switch MASTER_SITES to github cloud Use MAKE_ARGS do avoid patching With hat: lua@
This commit is contained in:
parent
c7617a10fb
commit
d7fab97d19
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339574
@ -2,27 +2,30 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= iconv
|
||||
PORTVERSION= 6
|
||||
PORTVERSION= 7
|
||||
CATEGORIES= converters
|
||||
MASTER_SITES= http://luaforge.net/frs/download.php/4181/
|
||||
MASTER_SITES= GHC
|
||||
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
|
||||
DISTNAME= lua-${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= vanilla@FreeBSD.org
|
||||
COMMENT= Iconv binding for Lua 5
|
||||
|
||||
WRKSRC= ${WRKDIR}/lua-${PORTNAME}-${PORTVERSION}
|
||||
USE_LUA?= 5.1
|
||||
USES= pkgconfig iconv
|
||||
USES= pkgconfig iconv lua
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ittner
|
||||
GH_PROJECT= lua-${PORTNAME}
|
||||
|
||||
PLIST_FILES= %%LUA_MODLIBDIR%%/iconv.so
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%INCDIR%%|-I${PREFIX}/include| ; \
|
||||
s|%%LIBDIR%%|-L${PREFIX}/lib|; \
|
||||
s|%%ICONV_LIB%%|${ICONV_LIB}|' ${WRKSRC}/Makefile
|
||||
CFLAGS+= `pkgconf --cflags lua-${LUA_VER}` -I${LOCALBASE}/include
|
||||
MAKE_ARGS= LUABIN=${LUA_CMD} CFLAGS="${CFLAGS}"
|
||||
LDFLAGS= -shared ${ICONV_LIB} -L${LOCALBASE}/lib
|
||||
CFLAGS_amd64= -fPIC
|
||||
|
||||
do-install:
|
||||
@if [ ! -d ${STAGEDIR}${LUA_MODLIBDIR} ]; then ${MKDIR} ${STAGEDIR}/${LUA_MODLIBDIR}; fi
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/iconv.so ${STAGEDIR}/${LUA_MODLIBDIR}
|
||||
@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
|
||||
${INSTALL_LIB} ${WRKSRC}/iconv.so ${STAGEDIR}${LUA_MODLIBDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (iconv-6.tar.gz) = e3ca46cc4975d9dc496b282db217723d1b0b5277e6938be8797ea6e0ac4f77f4
|
||||
SIZE (iconv-6.tar.gz) = 6101
|
||||
SHA256 (lua-iconv-7.tar.gz) = c1db1915c754b5cfe7e45af61467bc6dfa4f0037d281ccbce6b53c974e2faf09
|
||||
SIZE (lua-iconv-7.tar.gz) = 7693
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- 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` %%ICONV_LIB%% %%LIBDIR%%
|
||||
LFLAGS = -shared $(OMIT_FRAME_POINTER)
|
||||
INSTALL_PATH = `pkg-config $(LUAPKG) --variable=INSTALL_CMOD`
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- 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;
|
Loading…
Reference in New Issue
Block a user