Update to 5.2.3
Pass maintainership to lua@ Lots of cleanup in the Makefile Reduce patching Support stage
This commit is contained in:
parent
6e6d1759d2
commit
99db4b1c3a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336503
4 changed files with 41 additions and 112 deletions
|
@ -2,74 +2,60 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= lua
|
||||
PORTVERSION= 5.2.2
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 5.2.3
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= http://www.lua.org/ftp/
|
||||
PKGNAMESUFFIX= ${LUA_VER_STR}
|
||||
PKGNAMESUFFIX= 52
|
||||
|
||||
MAINTAINER= fiziologus@gmail.com
|
||||
MAINTAINER= lua@FreeBSD.org
|
||||
COMMENT= Small, compilable scripting language providing easy access to C code
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
#USE_LUA= 5.2
|
||||
LUA_VER= 5.2
|
||||
LUA_VER_SH= 1
|
||||
LUA_VER_STR= 52
|
||||
LUA_SUBDIR= lua${LUA_VER_STR}
|
||||
LUA_PREFIX= ${PREFIX}
|
||||
LUA_BINDIR= ${LUA_PREFIX}/bin/${LUA_SUBDIR}
|
||||
LUA_INCDIR= ${LUA_PREFIX}/include/${LUA_SUBDIR}
|
||||
LUA_LIBDIR= ${LUA_PREFIX}/lib/${LUA_SUBDIR}
|
||||
LUA_MODLIBDIR= ${LUA_PREFIX}/lib/lua/${LUA_VER}
|
||||
LUA_MODSHAREDIR= ${LUA_PREFIX}/share/lua/${LUA_VER}
|
||||
|
||||
ALL_TARGET= freebsd
|
||||
USES= pkgconfig readline
|
||||
USE_LDCONFIG= yes
|
||||
MAKE_ENV= LUA_SONAME="liblua-${LUA_VER}.so.${LUA_VER_SH}" \
|
||||
MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}"
|
||||
|
||||
# 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}
|
||||
# liblua.so requires libm, so make sure it has an explicit dependency
|
||||
# so that applications need not second-guess lua's dependencies.
|
||||
LDFLAGS+= -lm -pthread
|
||||
BUILD_WRKSRC= ${WRKSRC}/src
|
||||
MAKE_ARGS+= MYCFLAGS="${CFLAGS} -DLUA_USE_LINUX" \
|
||||
MYLDFLAGS="${LDFLAGS} -Wl,-E -lreadline" \
|
||||
CC="${CC}" \
|
||||
LUA_T=lua52 \
|
||||
LUAC_T=luac52 \
|
||||
LUA_A=liblua-${LUA_VER}.a \
|
||||
LUA_SO=liblua-${LUA_VER}.so \
|
||||
TO_BIN="lua52 luac52" \
|
||||
TO_LIB="liblua-${LUA_VER}.a liblua-${LUA_VER}.so" \
|
||||
INSTALL_TOP=${STAGEDIR}${PREFIX} \
|
||||
INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua52 \
|
||||
INSTALL_EXEC="${INSTALL_PROGRAM}"
|
||||
|
||||
MAN1= lua-${LUA_VER}.1 luac-${LUA_VER}.1
|
||||
DOCSDIR= ${PREFIX}/share/doc/${LUA_SUBDIR}
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.pre.mk>
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${ARCH} == "amd64" || ${ARCH} == "powerpc"
|
||||
CFLAGS+= -fPIC
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -Ee \
|
||||
"s|%%LUA_PREFIX%%|${LUA_PREFIX}| ; \
|
||||
s|%%LUA_BINDIR%%|${LUA_BINDIR}| ; \
|
||||
s|%%LUA_INCDIR%%|${LUA_INCDIR}| ; \
|
||||
s|%%LUA_LIBDIR%%|${LUA_LIBDIR}| ; \
|
||||
s|%%LUA_MODSHAREDIR%%|${LUA_MODSHAREDIR}| ; \
|
||||
s|%%LUA_MODLIBDIR%%|${LUA_MODLIBDIR}| ; \
|
||||
s|%%LUA_VER_SH%%|${LUA_VER_SH}|" \
|
||||
${WRKSRC}/Makefile
|
||||
@${REINPLACE_CMD} -e 's,rand *(,random(,g' \
|
||||
${WRKSRC}/src/lmathlib.c
|
||||
@${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}|" \
|
||||
${WRKSRC}/src/luaconf.h
|
||||
|
||||
post-install:
|
||||
.for f in lua luac
|
||||
${LN} -sf ${LUA_BINDIR}/${f} ${PREFIX}/bin/${f}-${LUA_VER}
|
||||
.endfor
|
||||
${LN} -sf ${LUA_LIBDIR}/liblua-${LUA_VER}.so.${LUA_VER_SH} ${LUA_LIBDIR}/liblua.so
|
||||
${LN} -sf ${LUA_SUBDIR}/liblua-${LUA_VER}.so.${LUA_VER_SH} ${PREFIX}/lib
|
||||
${LN} -sf liblua-${LUA_VER}.so.${LUA_VER_SH} ${PREFIX}/lib/liblua-${LUA_VER}.so
|
||||
@${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
|
||||
${STAGEDIR}${PREFIX}/man/man1/lua52.1
|
||||
@${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
|
||||
${STAGEDIR}${PREFIX}/man/man1/luac52.1
|
||||
|
||||
# Documentation.
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${DOCSDIR}
|
||||
cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif *.css *.png ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (lua-5.2.2.tar.gz) = 3fd67de3f5ed133bf312906082fa524545c6b9e1b952e8215ffbd27113f49f00
|
||||
SIZE (lua-5.2.2.tar.gz) = 251713
|
||||
SHA256 (lua-5.2.3.tar.gz) = 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d
|
||||
SIZE (lua-5.2.3.tar.gz) = 251195
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
--- Makefile.orig 2012-12-14 18:29:11.000000000 +0400
|
||||
+++ Makefile 2012-12-14 18:45:06.000000000 +0400
|
||||
@@ -10,13 +10,13 @@
|
||||
# so take care if INSTALL_TOP is not an absolute path. See the local target.
|
||||
# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
|
||||
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
|
||||
-INSTALL_TOP= /usr/local
|
||||
-INSTALL_BIN= $(INSTALL_TOP)/bin
|
||||
-INSTALL_INC= $(INSTALL_TOP)/include
|
||||
-INSTALL_LIB= $(INSTALL_TOP)/lib
|
||||
+INSTALL_TOP= %%LUA_PREFIX%%
|
||||
+INSTALL_BIN= %%LUA_BINDIR%%
|
||||
+INSTALL_INC= %%LUA_INCDIR%%
|
||||
+INSTALL_LIB= %%LUA_LIBDIR%%
|
||||
INSTALL_MAN= $(INSTALL_TOP)/man/man1
|
||||
-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
|
||||
-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
|
||||
+INSTALL_LMOD= %%LUA_MODSHAREDIR%%
|
||||
+INSTALL_CMOD= %%LUA_MODLIBDIR%%
|
||||
|
||||
# How to install. If your install program does not support "-p", then
|
||||
# you may have to run ranlib on the installed liblua.a.
|
||||
@@ -41,8 +41,8 @@
|
||||
# What to install.
|
||||
TO_BIN= lua luac
|
||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
||||
-TO_LIB= liblua.a
|
||||
-TO_MAN= lua.1 luac.1
|
||||
+TO_LIB= liblua.a liblua-5.2.so.1
|
||||
+TO_MAN= lua-5.2.1 luac-5.2.1
|
||||
|
||||
# Lua version and release.
|
||||
V= 5.2
|
||||
@@ -61,8 +61,8 @@
|
||||
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
||||
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
||||
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
||||
- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
||||
- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
||||
+ cd src && mv liblua.so liblua-$V.so.%%LUA_VER_SH%% && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
||||
+ cd doc && mv lua.1 lua-$V.1 && mv luac.1 luac-$V.1 && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
||||
|
||||
uninstall:
|
||||
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
|
|
@ -1,29 +1,16 @@
|
|||
bin/lua-5.2
|
||||
bin/lua52/lua
|
||||
bin/lua52/luac
|
||||
bin/luac-5.2
|
||||
bin/lua52
|
||||
bin/luac52
|
||||
include/lua52/lauxlib.h
|
||||
include/lua52/lua.h
|
||||
include/lua52/lua.hpp
|
||||
include/lua52/luaconf.h
|
||||
include/lua52/lualib.h
|
||||
lib/liblua-5.2.a
|
||||
lib/liblua-5.2.so
|
||||
lib/liblua-5.2.so.1
|
||||
lib/lua52/liblua-5.2.so.1
|
||||
lib/lua52/liblua.a
|
||||
lib/lua52/liblua.so
|
||||
%%PORTDOCS%%%%DOCSDIR%%/contents.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/logo.gif
|
||||
%%PORTDOCS%%%%DOCSDIR%%/lua.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/manual.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/manual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/osi-certified-72x60.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/readme.html
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@dirrm bin/lua52
|
||||
@dirrm include/lua52
|
||||
@dirrm lib/lua52
|
||||
man/man1/lua52.1.gz
|
||||
man/man1/luac52.1.gz
|
||||
@dirrmtry %%DATADIR%%/5.2
|
||||
@dirrmtry %%DATADIR%%
|
||||
@dirrmtry lib/lua/5.2
|
||||
@dirrmtry lib/lua
|
||||
@dirrmtry share/lua/5.2
|
||||
@dirrmtry share/lua
|
||||
@dirrmtry include/lua52
|
||||
|
|
Loading…
Reference in a new issue