Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2013 00:56:05 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r336503 - in head/lang/lua52: . files
Message-ID:  <201312150056.rBF0u522046140@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Dec 15 00:56:05 2013
New Revision: 336503
URL: http://svnweb.freebsd.org/changeset/ports/336503

Log:
  Update to 5.2.3
  
  Pass maintainership to lua@
  Lots of cleanup in the Makefile
  Reduce patching
  Support stage

Deleted:
  head/lang/lua52/files/patch-Makefile
Modified:
  head/lang/lua52/Makefile
  head/lang/lua52/distinfo
  head/lang/lua52/pkg-plist

Modified: head/lang/lua52/Makefile
==============================================================================
--- head/lang/lua52/Makefile	Sun Dec 15 00:50:37 2013	(r336502)
+++ head/lang/lua52/Makefile	Sun Dec 15 00:56:05 2013	(r336503)
@@ -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
-
-# Documentation.
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif *.css *.png ${DOCSDIR}
-.endif
+	@${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
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/lang/lua52/distinfo
==============================================================================
--- head/lang/lua52/distinfo	Sun Dec 15 00:50:37 2013	(r336502)
+++ head/lang/lua52/distinfo	Sun Dec 15 00:56:05 2013	(r336503)
@@ -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

Modified: head/lang/lua52/pkg-plist
==============================================================================
--- head/lang/lua52/pkg-plist	Sun Dec 15 00:50:37 2013	(r336502)
+++ head/lang/lua52/pkg-plist	Sun Dec 15 00:56:05 2013	(r336503)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312150056.rBF0u522046140>