Date: Fri, 24 May 2013 18:23:49 +0900 From: Hirohisa Yamaguchi <umq@ueo.co.jp> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/178930: [patch] lang/lua52 to use Mk/bsd.lua.mk Message-ID: <86hahsbuje.wl%umq@ueo.co.jp> Resent-Message-ID: <201305240930.r4O9U3kW014805@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178930 >Category: ports >Synopsis: [patch] lang/lua52 to use Mk/bsd.lua.mk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri May 24 09:30:03 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Hirohisa Yamaguchi >Release: FreeBSD 8.3-RELEASE-p3 amd64 >Organization: <organization of PR author (multiple lines)> >Environment: System: FreeBSD **** 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: lang/lua52 does not seem to honour Mk/bsd.lua.mk. (i.e. none of USE_LUA=5.2, 5.1+, nor 5.0+ would use lua52) I've written a patch to do this. There are some ports stating USE_LUA=5.0+: devel/lua-bitlib, devel/swig13, games/stratagus, and games/battletanks. They might not be compatible with lua 5.2, I have not tested them. Ports stating 5.1+ will be okay I assume. >How-To-Repeat: N/A >Fix: The patch follows: M Mk/bsd.lua.mk M lang/lua52/Makefile M lang/lua52/pkg-plist Index: Mk/bsd.lua.mk =================================================================== --- Mk/bsd.lua.mk (revision 318926) +++ Mk/bsd.lua.mk (working copy) @@ -40,6 +40,7 @@ # 5.0 - app, compat51, dfui, filename, gettext, # posix, pty, socket. # 5.1 - alien, filename, gettext, posix, pty, socket. +# 5.2 - none yet. # The available dependency types are: # build - Requires component for building. # lib - Requires component for building and running. @@ -153,7 +154,7 @@ alien app compat51 dfui filename gettext posix \ pty socket _LUA_DEP_TYPES_ALL= build lib run -_LUA_VERS_ALL= 4.0 5.0 5.1 +_LUA_VERS_ALL= 4.0 5.0 5.1 5.2 _LUA_PLIST_ALL= LUA_VER LUA_VER_SH LUA_VER_STR LUA_PREFIX LUA_SUBDIR _LUA_PLIST_DIR_ALL= LUA_BINDIR LUA_INCDIR LUA_LIBDIR \ LUA_MODLIBDIR LUA_MODSHAREDIR @@ -201,6 +202,10 @@ _LUA_PORT_tolua_5.1= lang/tolua _LUA_PORT_toluaxx_5.1= lang/tolua++ +_LUA_PORT_lua_5.2= lang/lua52 +_LUA_DEPTYPE_lua_5.2= lib +_LUA_SHVER_lua_5.2= 1 + . for comp in ${_LUA_COMPS_ALL} _LUA_COMP= ${comp} . for ver in ${_LUA_VERS_ALL} @@ -208,7 +213,7 @@ # are here only to allow autodetection of installed versions. . if ${_LUA_COMP} == "lua" _LUA_LIB_${comp}_${ver}= lua-${ver}.${_LUA_SHVER_${comp}_${ver}} -_LUA_SHVER_${comp}_${ver}= ${ver:C/[[:digit:]]\.([[:digit:]])/\1/} +_LUA_SHVER_${comp}_${ver}?= ${ver:C/[[:digit:]]\.([[:digit:]])/\1/} _LUA_FILE_${comp}_${ver}= ${LOCALBASE}/lib/lua${ver:S/.//g}/liblua.a . elif ${_LUA_COMP} == "tolua" _LUA_FILE_${comp}_${ver}= ${LOCALBASE}/lib/lua${ver:S/.//g}/libtolua.a @@ -443,7 +448,7 @@ # Version. LUA_VER?= ${_LUA_VER} -LUA_VER_SH?= ${LUA_VER:C/[[:digit:]]\.([[:digit:]])/\1/} +LUA_VER_SH?= ${_LUA_SHVER_lua_${LUA_VER}} LUA_VER_STR?= ${LUA_VER:S/.//g} # Package name. Index: lang/lua52/Makefile =================================================================== --- lang/lua52/Makefile (revision 318926) +++ lang/lua52/Makefile (working copy) @@ -11,18 +11,10 @@ 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} +PORTSCOUT= limit:^5\.2 +USE_LUA= 5.2 +LUA_COMPS= # ALL_TARGET= freebsd USE_LDCONFIG= yes MAKE_JOBS_SAFE= yes @@ -35,6 +27,7 @@ MAN1= lua-${LUA_VER}.1 luac-${LUA_VER}.1 DOCSDIR= ${PREFIX}/share/doc/${LUA_SUBDIR} LATEST_LINK= ${LUA_SUBDIR} +PORTDOCS= * .include <bsd.port.pre.mk> @@ -64,11 +57,13 @@ ${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 +# Module directories. + ${MKDIR} ${LUA_MODLIBDIR} + ${MKDIR} ${LUA_MODSHAREDIR} .include <bsd.port.post.mk> Index: lang/lua52/pkg-plist =================================================================== --- lang/lua52/pkg-plist (revision 318926) +++ lang/lua52/pkg-plist (working copy) @@ -1,29 +1,23 @@ -bin/lua-5.2 -bin/lua52/lua -bin/lua52/luac -bin/luac-5.2 -include/lua52/lauxlib.h -include/lua52/lua.h -include/lua52/lua.hpp -include/lua52/luaconf.h -include/lua52/lualib.h -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 -@dirrmtry lib/lua/5.2 +bin/lua-%%LUA_VER%% +%%LUA_BINDIR%%/lua +%%LUA_BINDIR%%/luac +bin/luac-%%LUA_VER%% +%%LUA_INCDIR%%/lauxlib.h +%%LUA_INCDIR%%/lua.h +%%LUA_INCDIR%%/lua.hpp +%%LUA_INCDIR%%/luaconf.h +%%LUA_INCDIR%%/lualib.h +lib/liblua-%%LUA_VER%%.so +lib/liblua-%%LUA_VER%%.so.%%LUA_VER_SH%% +%%LUA_LIBDIR%%/liblua-%%LUA_VER%%.so.%%LUA_VER_SH%% +%%LUA_LIBDIR%%/liblua.a +%%LUA_LIBDIR%%/liblua.so +@dirrmtry %%DATADIR%%/%%LUA_VER%% +@dirrmtry %%DATADIR%% +@dirrm %%LUA_LIBDIR%% +@dirrmtry lib/lua/%%LUA_VER%% @dirrmtry lib/lua -@dirrmtry share/lua/5.2 -@dirrmtry share/lua +@dirrm %%LUA_INCDIR%% +@dirrm %%LUA_BINDIR%% +@exec mkdir -p %D/%%DATADIR%%/%%LUA_VER%% +@exec mkdir -p %D/lib/lua/%%LUA_VER%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86hahsbuje.wl%umq>