1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
freebsd-ports/net/luasocket/Makefile
Mathieu Arnold beb1c1fe19 USES=lua gained flavors.
Ports using USES=lua:module or lua:flavors will be flavored.  A range of
supported lua versions can be set using XX-YY (or XX-, or -YY, or simply ZZ)
for ports not supporting all lua versions.

USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of
flavored lua ports, in a similar way as PHP or Python flavors.

PR:		245038
Submitted by:	andrew tao11 riddles org uk
Reviewed by:	mat, kevans, russ haley gmail com
Approved by:	mat (portmgr)
Differential Revision:	https://reviews.freebsd.org/D16494
2020-04-14 15:49:36 +00:00

49 lines
1.2 KiB
Makefile

# Created by: Jan Hornyak <pav@oook.cz>
# $FreeBSD$
PORTNAME= luasocket
DISTVERSIONPREFIX= v
DISTVERSION= 3.0-rc1
PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= net
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
MAINTAINER= lx@FreeBSD.org
COMMENT= Socket support for the Lua language
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USE_GITHUB= yes
GH_ACCOUNT= diegonehab
MAKE_ARGS= LUAV=${LUA_VER}
USES= gmake lua:module pkgconfig
INSTALL_TARGET= install-unix
CFLAGS+= `pkgconf --cflags lua-${LUA_VER}` \
-DLUA_COMPAT_APIINTCASTS
LDFLAGS+= -shared `pkgconf --libs lua-${LUA_VER}`
OPTIONS_DEFINE= DOCS
DOCSDIR= ${LUA_DOCSDIR}
post-extract:
@${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
@${MV} ${WRKSRC}/src/makefile ${WRKSRC}/src/Makefile
@${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/src/Makefile
@${REINPLACE_CMD} -e 's|CFLAGS=|CFLAGS\+=|g' ${WRKSRC}/src/Makefile
@${REINPLACE_CMD} -e 's|LDFLAGS=|LDFLAGS\+=|g' ${WRKSRC}/src/Makefile
@${REINPLACE_CMD} -e 's/prefix/PREFIX/g' ${WRKSRC}/src/Makefile
post-install:
@${STRIP_CMD} ${STAGEDIR}${LUA_MODLIBDIR:S|^${LOCALBASE}|${PREFIX}|}/*/*.so
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}/${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}/${DOCSDIR}
.include <bsd.port.mk>