/[ports]/head/lang/lua53/Makefile
ViewVC logotype

Contents of /head/lang/lua53/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 435741 - (show annotations) (download)
Thu Mar 9 03:05:19 2017 UTC (6 years ago) by wen
File MIME type: text/plain
File size: 2494 byte(s)
- Update to 5.3.4

PR:		217461
Submitted by:	gmesalazar@gmail.com(maintainer)

1 # Created by: GreenDog <fiziologus@gmail.com>
2 # $FreeBSD$
3
4 PORTNAME= lua
5 PORTVERSION= 5.3.4
6 CATEGORIES= lang
7 MASTER_SITES= http://www.lua.org/ftp/
8 PKGNAMESUFFIX= 53
9
10 MAINTAINER= gmesalazar@gmail.com
11 COMMENT= Small, compilable scripting language providing easy access to C code
12
13 LICENSE= MIT
14
15 USES= libedit
16 LUA_VER= 5.3
17 USE_LDCONFIG= yes
18
19 # Overriding __MAKE_CONF makes sure that we don't re-parse
20 # /etc/make.conf during do-build, which would jeopardize the build
21 # if, for instance, the user set CFLAGS=mumble
22 # NOTE: /etc/make.conf is read BEFORE Makefile, so we already
23 # have its settings when we get here.
24 # See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt
25 MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
26 # liblua.so requires libm, so make sure it has an explicit dependency
27 # so that applications need not second-guess lua's dependencies.
28 CPPFLAGS+= -I${LOCALBASE}/include
29 LDFLAGS+= -lm -pthread
30 BUILD_WRKSRC= ${WRKSRC}/src
31 MAKE_ARGS+= MYCFLAGS="${CFLAGS} ${CPPFLAGS} -DLUA_USE_LINUX" \
32 MYLDFLAGS="${LDFLAGS}" \
33 MYLIBS="-Wl,-E -L${LOCALBASE}/lib -ledit" \
34 CC="${CC}" \
35 LUA_T=lua53 \
36 LUAC_T=luac53 \
37 LUA_A=liblua-${LUA_VER}.a \
38 LUA_SO=liblua-${LUA_VER}.so \
39 LUA_SONAME=liblua-${LUA_VER}.so \
40 TO_BIN="lua53 luac53" \
41 TO_LIB="liblua-${LUA_VER}.a liblua-${LUA_VER}.so" \
42 INSTALL_TOP=${STAGEDIR}${PREFIX} \
43 INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua53 \
44 INSTALL_EXEC="${INSTALL_PROGRAM}"
45
46 # Cope with the lack of support for Lua 5.2 in bsd.lua.mk. These
47 # overrides, which are required below, should be removed once bsd.lua.mk
48 # understands this lua version.
49 LUA_PREFIX?= ${PREFIX}
50 LUA_SUBDIR?= lua${PKGNAMESUFFIX}
51 LUA_INCDIR?= ${LUA_PREFIX}/include/${LUA_SUBDIR}
52 LUA_LIBDIR?= ${LUA_PREFIX}/lib
53
54 SUB_FILES= lua-${LUA_VER}.pc
55 SUB_LIST= version=${PORTVERSION} \
56 includedir=${LUA_INCDIR} \
57 libdir=${LUA_LIBDIR} \
58 soname=lua-${LUA_VER}
59
60 CFLAGS+= -fPIC
61
62 post-patch:
63 @${REINPLACE_CMD} -e 's,rand *(,random(,g' \
64 ${WRKSRC}/src/lmathlib.c
65 @${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}| ; \
66 s,readline/,editline/,g ; \
67 /history\.h/d" \
68 ${WRKSRC}/src/luaconf.h ${WRKSRC}/src/lua.c
69
70 post-install:
71 @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblua-${LUA_VER}.so
72 @${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
73 ${STAGEDIR}${PREFIX}/man/man1/lua53.1
74 @${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
75 ${STAGEDIR}${PREFIX}/man/man1/luac53.1
76 ${INSTALL_DATA} ${WRKDIR}/lua-${LUA_VER}.pc \
77 ${STAGEDIR}${PREFIX}/libdata/pkgconfig
78
79 .include <bsd.port.mk>

Properties

Name Value
svn:eol-style native
svn:keywords FreeBSD=%H
svn:mime-type text/plain

  ViewVC Help
Powered by ViewVC 1.1.27