From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 24 09:30:04 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1DC12638 for ; Fri, 24 May 2013 09:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 021DCDE1 for ; Fri, 24 May 2013 09:30:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r4O9U302014806 for ; Fri, 24 May 2013 09:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r4O9U3kW014805; Fri, 24 May 2013 09:30:03 GMT (envelope-from gnats) Resent-Date: Fri, 24 May 2013 09:30:03 GMT Resent-Message-Id: <201305240930.r4O9U3kW014805@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hirohisa Yamaguchi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8271C375 for ; Fri, 24 May 2013 09:24:59 +0000 (UTC) (envelope-from umq.876@gmail.com) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEE9D7B for ; Fri, 24 May 2013 09:24:59 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id w11so894848pde.9 for ; Fri, 24 May 2013 02:24:58 -0700 (PDT) Received: from nafbsd2.m.nd.to (p057007.dynamic.ppp.asahi-net.or.jp. [221.113.57.7]) by mx.google.com with ESMTPSA id yj2sm15459068pbb.40.2013.05.24.02.24.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 24 May 2013 02:24:56 -0700 (PDT) Message-Id: <86hahsbuje.wl%umq@ueo.co.jp> Date: Fri, 24 May 2013 18:23:49 +0900 From: Hirohisa Yamaguchi Sender: Hirohisa Yamaguchi To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/178930: [patch] lang/lua52 to use Mk/bsd.lua.mk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 May 2013 09:30:04 -0000 >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: >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 @@ -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 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: