Changeset View
Changeset View
Standalone View
Standalone View
Makefile
- This file was added.
# Created by: Russell Haley <russ.haley@gmail.com>, Andrew Gierth <andrew@tao11.riddles.org.uk> | |||||
# Original port by: GreenDog <fiziologus@gmail.com> | |||||
# Date: 2018-03-14 | |||||
# $FreeBSD$ | |||||
mat: This should probably be:
```
DISTVERSION= 5.4.0-work2
``` | |||||
PORTNAME= lua | |||||
Not Done Inline ActionsPlease remove all this. mat: Please remove all this. | |||||
PORTVERSION= 5.4.0 | |||||
PORTREVISION= 2 | |||||
CATEGORIES= lang | |||||
MASTER_SITES= https://www.lua.org/work/ | |||||
DISTVERSIONSUFFIX=-work2 | |||||
Not Done Inline ActionsRemove. mat: Remove. | |||||
PKGNAMESUFFIX= 54 | |||||
MAINTAINER= russ.haley@gmail.com | |||||
COMMENT= Small, embeddable scripting language providing easy access to C code | |||||
LICENSE= MIT | |||||
LUA_VER= 5.4 | |||||
USE_LDCONFIG= yes | |||||
# Overriding __MAKE_CONF makes sure that we don't re-parse | |||||
# /etc/make.conf during do-build, which would jeopardize the build | |||||
# if, for instance, the user set CFLAGS=mumble | |||||
# NOTE: /etc/make.conf is read BEFORE Makefile, so we already | |||||
# have its settings when we get here. | |||||
# See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt | |||||
MAKE_ARGS= __MAKE_CONF=${NONEXISTENT} | |||||
BUILD_WRKSRC= ${WRKSRC}/src | |||||
# Source, destination, and filenames to copy for the DOCS option | |||||
# (automatically added to pkg-plist if DOCS is set) | |||||
# We override DOCSDIR to get a per-version subdir. | |||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} | |||||
PORTDOCS= *.html *.css *.gif *.png | |||||
BUILD_WRKDOC= ${WRKSRC}/doc | |||||
LUA_PREFIX?= ${PREFIX} | |||||
# 2018-03-17: AG - These should match lua.mk, but we can't include that here | |||||
LUA_CMD?= ${PORTNAME}${PKGNAMESUFFIX} | |||||
LUAC_CMD?= ${PORTNAME}c${PKGNAMESUFFIX} | |||||
LUA_INCDIR?= ${LUA_PREFIX}/include/${PORTNAME}${PKGNAMESUFFIX} | |||||
LUA_LIBDIR?= ${LUA_PREFIX}/lib | |||||
LUA_LIB_STATIC=lib${PORTNAME}-${LUA_VER}.a | |||||
LUA_LIB_SHARED=lib${PORTNAME}-${LUA_VER}.so | |||||
LUA_PC_FILE=${PORTNAME}-${LUA_VER}.pc | |||||
# using the "bsd" target rather than "freebsd" saves patching out the | |||||
# assumption of using base libedit in order to make it configurable. "bsd" | |||||
# is "generic" plus the POSIX and DLOPEN options, plus -Wl,-E at link time; | |||||
# it doesn't set CC either, which makes it easier for us to control that too. | |||||
ALL_TARGET=bsd | |||||
russ.haley_gmail.comAuthorUnsubmitted Not Done Inline Actions+1 russ.haley_gmail.com: +1 | |||||
OPTIONS_DEFAULT+= LIBEDIT DOCS | |||||
OPTIONS_GROUP= DOCSGROUP | |||||
OPTIONS_GROUP_DOCSGROUP= DOCS | |||||
DOCSGROUP_DESC= Documentation options | |||||
DOCS_DESC= Install language and API reference (HTML, ~400kB) | |||||
russ.haley_gmail.comAuthorUnsubmitted Not Done Inline ActionsWould it be wrong of me to add a lua-docs shell script to /usr/local/bin that looks for firefox or chromium and opens readme.html? russ.haley_gmail.com: Would it be wrong of me to add a lua-docs shell script to /usr/local/bin that looks for firefox… | |||||
andrew_tao173.riddles.org.ukUnsubmitted Not Done Inline ActionsIt ... doesn't seem to be common style as far as I can see. I'm not keen on the idea. andrew_tao173.riddles.org.uk: It ... doesn't seem to be common style as far as I can see. I'm not keen on the idea. | |||||
OPTIONS_SINGLE= EDIT | |||||
EDIT_DESC= Interactive command-line editing | |||||
OPTIONS_SINGLE_EDIT=EDITNONE LIBEDIT LIBEDIT_PORT READLINE | |||||
EDITNONE_DESC= No command-line editing | |||||
LIBEDIT_DESC= Use base system libedit (recommended) | |||||
LIBEDIT_PORT_DESC=Use libedit from ports | |||||
READLINE_DESC= Use GNU Readline from ports | |||||
LIBEDIT_CPPFLAGS=-DLUA_USE_READLINE -I/usr/include/edit | |||||
LIBEDIT_LIBS=-ledit | |||||
LIBEDIT_PORT_USES=libedit | |||||
# USES=libedit adds -I/usr/local/include -L/usr/local/lib itself | |||||
LIBEDIT_PORT_CPPFLAGS=-DLUA_USE_READLINE | |||||
LIBEDIT_PORT_LIBS=-ledit | |||||
READLINE_USES=readline | |||||
# USES=readline adds -I/usr/local/include -L/usr/local/lib itself | |||||
READLINE_CPPFLAGS=-DLUA_USE_READLINE | |||||
READLINE_LIBS=-lreadline | |||||
CFLAGS+= -fPIC | |||||
WITHOUT_NO_STRICT_ALIASING=yes | |||||
MAKE_ARGS += CC="${CC}" \ | |||||
MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \ | |||||
MYLDFLAGS="${LDFLAGS}" \ | |||||
MYLIBS="${LIBS}" \ | |||||
LUA_T=${LUA_CMD} \ | |||||
LUAC_T=${LUAC_CMD} \ | |||||
LUA_A=${LUA_LIB_STATIC} \ | |||||
LUA_SO=${LUA_LIB_SHARED} \ | |||||
LUA_SONAME=${LUA_LIB_SHARED} \ | |||||
TO_BIN="${LUA_CMD} ${LUAC_CMD}" \ | |||||
TO_LIB="${LUA_LIB_SHARED} ${LUA_LIB_STATIC}" \ | |||||
INSTALL_TOP=${STAGEDIR}${PREFIX} \ | |||||
INSTALL_INC=${STAGEDIR}${LUA_INCDIR} \ | |||||
INSTALL_EXEC="${INSTALL_PROGRAM}" | |||||
SUB_FILES= ${LUA_PC_FILE} | |||||
SUB_LIST= version=${PORTVERSION} \ | |||||
includedir=${LUA_INCDIR} \ | |||||
libdir=${LUA_LIBDIR} \ | |||||
soname=${PORTNAME}-${LUA_VER} | |||||
Not Done Inline Actionsoops, typo, should be soname=${PORTNAME}-${LUA_VER}, will fix andrew_tao173.riddles.org.uk: oops, typo, should be soname=${PORTNAME}-${LUA_VER}, will fix | |||||
post-patch: | |||||
@${REINPLACE_CMD} -e "/LUA_ROOT/s,/usr/local,${LUA_PREFIX}," \ | |||||
${WRKSRC}/src/luaconf.h | |||||
post-patch-LIBEDIT_PORT-on: | |||||
@${REINPLACE_CMD} -e "s,readline/,editline/,g ; \ | |||||
/history\.h/d" ${WRKSRC}/src/lua.c | |||||
post-install: | |||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${LUA_LIB_SHARED} | |||||
${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \ | |||||
${STAGEDIR}${PREFIX}/man/man1/${LUA_CMD}.1 | |||||
${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \ | |||||
${STAGEDIR}${PREFIX}/man/man1/${LUAC_CMD}.1 | |||||
${INSTALL_DATA} ${WRKDIR}/${LUA_PC_FILE} \ | |||||
${STAGEDIR}${PREFIX}/libdata/pkgconfig | |||||
post-install-DOCS-on: | |||||
${MKDIR} ${STAGEDIR}${DOCSDIR} | |||||
${INSTALL_MAN} ${BUILD_WRKDOC}/* ${STAGEDIR}${DOCSDIR}/. | |||||
.include <bsd.port.mk> |
This should probably be: