From owner-svn-doc-head@FreeBSD.ORG Mon May 26 16:34:04 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D06E99B7; Mon, 26 May 2014 16:34:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B101B259B; Mon, 26 May 2014 16:34:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QGY4HG036748; Mon, 26 May 2014 16:34:04 GMT (envelope-from mat@svn.freebsd.org) Received: (from mat@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QGY4Cf036747; Mon, 26 May 2014 16:34:04 GMT (envelope-from mat@svn.freebsd.org) Message-Id: <201405261634.s4QGY4Cf036747@svn.freebsd.org> From: Mathieu Arnold Date: Mon, 26 May 2014 16:34:04 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44959 - head/en_US.ISO8859-1/books/porters-handbook/special X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 16:34:05 -0000 Author: mat (ports committer) Date: Mon May 26 16:34:04 2014 New Revision: 44959 URL: http://svnweb.freebsd.org/changeset/doc/44959 Log: Major axing of the lua part, it is much, much simpler now. Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Mon May 26 15:14:15 2014 (r44958) +++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Mon May 26 16:34:04 2014 (r44959) @@ -3676,355 +3676,21 @@ PLIST_SUB+= VERSION="${VER_STR}" Version Selection - To make your port use a specific version of - Lua there are two variables - available for defining (if only one is defined the other - will be set to a default value): - - - Variables to Select <application>Lua</application> - Versions + A port using Lua only needs to + have the following line: - - - - Variable - Description - Default value - - - - - - USE_LUA - List of versions the port can use - All available versions - - - - USE_LUA_NOT - List of versions the port can not use - None - - - -
- - The following is a list of available - Lua versions and the - corresponding ports in the tree: - - - Available <application>Lua</application> - Versions - - - - - Version - Port - - - - - - 4.0 - lang/lua4 - - - - 5.0 - lang/lua50 - - - - 5.1 - lang/lua - - - -
- - The variables in can - be set to one or more of the following combinations - separated by spaces: - - - <application>Lua</application> Version - Specifications - - - - - Description - Example - - - - - - Single version - 4.0 - - - - Ascending range - 5.0+ - - - - Descending range - 5.0- - - - - Full range (must be ascending) - 5.0-5.1 - - - -
- - There are also some variables to select the preferred - versions from the available ones. They can be set to a list - of versions, the first ones will have higher - priority. - - - Variables to Select Preferred - <application>Lua</application> Versions - - - - - Name - Designed for - - - - - - WANT_LUA_VER - the port - - - - WITH_LUA_VER - the user - - - -
- - - Selecting the <application>Lua</application> - Version - - The following fragment is from a port which can use - Lua version - 5.0 or 5.1, and uses - 5.0 by default. It can be overridden - by the user with WITH_LUA_VER. - - USE_LUA= 5.0-5.1 -WANT_LUA_VER= 5.0 - -
- - - Component Selection - - There are other applications that, while not being - Lua libraries, are related to - them. These applications can be specified in the - LUA_COMPS variable. The following - components are available: - - - Available <application>Lua</application> - Components - - - - - Name - Description - Version restriction - - - - - - lua - main library - none - - - - tolua - Library for accessing C/C++ code - 4.0-5.0 - - - - ruby - Ruby bindings - 4.0-5.0 - - - -
- - - There are more components but they are modules for the - interpreter, not used by applications (only by other - modules). - - - The dependency type can be selected for each component - by adding a suffix separated by a semicolon. If not present - then a default type will be used (see - ). The following types - are available: - - - Available <application>Lua</application> Dependency - Types + USES= lua - - - - Name - Description - - - - - - build - Component is required for building, equivalent - to BUILD_DEPENDS - - - - run - Component is required for running, equivalent - to RUN_DEPENDS - - - - lib - Component is required for building and running, - equivalent to LIB_DEPENDS - - - -
- - The default values for the components are detailed in - the following table: - - - Default <application>Lua</application> Dependency - Types - - - - - Component - Dependency type - - - - - - lua - lib for - 4.0-5.0 (shared) and - build for 5.1 - (static) - - - - tolua - build (static) - - - - ruby - lib (shared) - - - -
- - - Selecting <application>Lua</application> - Components - - The following fragment corresponds to a port which - uses Lua version - 4.0 and its - Ruby bindings. - - USE_LUA= 4.0 -LUA_COMPS= lua ruby - -
- - - Detecting Installed Versions - - To detect an installed version you have to define - WANT_LUA. If you do not set it to a - specific version then the components will have a version - suffix. The HAVE_LUA variable will be - filled after detection. - - - Detecting Installed <application>Lua</application> - Versions and Components - - The following fragment can be used in a port that uses - Lua if it is installed, or an - option is selected. - - WANT_LUA= yes - -.include <bsd.port.pre.mk> - -.if defined(WITH_LUA5) || !empty(PORT_OPTIONS:MLUA5) || !empty(HAVE_LUA:Mlua-5.[01]) -USE_LUA= 5.0-5.1 -CONFIGURE_ARGS+= --enable-lua5 -.endif - - The following fragment can be used in a port that - enables tolua support if it is - installed or if an option is selected, in addition to - Lua, both version - 4.0. - - USE_LUA= 4.0 -LUA_COMPS= lua -WANT_LUA= 4.0 - -.include <bsd.port.pre.mk> - -.if defined(WITH_TOLUA) || !empty(PORT_OPTIONS:MTOLUA) || !empty(HAVE_LUA:Mtolua) -LUA_COMPS+= tolua -CONFIGURE_ARGS+= --enable-tolua -.endif - + If a specific version of Lua is needed, instructions on + how to select it are given in the USES=lua part + of . Defined Variables - The following variables are available in the port (after - defining one from - ). + The following variables are available in the port. Variables Defined for Ports That Use @@ -4047,13 +3713,6 @@ CONFIGURE_ARGS+= --enable-tolua </row> <row> - <entry><varname>LUA_VER_SH</varname></entry> - <entry>The <application>Lua</application> shared - library major version (e.g., - <literal>1</literal>)</entry> - </row> - - <row> <entry><varname>LUA_VER_STR</varname></entry> <entry>The <application>Lua</application> version without the dots (e.g., @@ -4122,75 +3781,9 @@ CONFIGURE_ARGS+= --enable-tolua <entry>The path to the <application>Lua</application> compiler</entry> </row> - - <row> - <entry><varname>TOLUA_CMD</varname></entry> - <entry>The path to the - <application>tolua</application> program</entry> - </row> </tbody> </tgroup> </table> - - <example xml:id="lua-variables-example"> - <title>Telling the Port Where to Find - <application>Lua</application> - - The following fragment shows how to tell a port that - uses a configure script where the - Lua header files and libraries - are. - - USE_LUA= 4.0 -GNU_CONFIGURE= yes -CONFIGURE_ENV= CPPFLAGS="-I${LUA_INCDIR}" LDFLAGS="-L${LUA_LIBDIR}" - - - - - Processing in - <filename>bsd.port.pre.mk</filename> - - If you need to use the variables for running commands - right after including bsd.port.pre.mk - you need to define LUA_PREMK. - - - If you define LUA_PREMK, then the - version, dependencies, components and defined variables - will not change if you modify the - Lua port variables - after including - bsd.port.pre.mk. - - - - Using <application>Lua</application> Variables in - Commands - - The following fragment illustrates the use of - LUA_PREMK by running the - Lua interpreter to obtain the - full version string, assign it to a variable and pass it - to the program. - - USE_LUA= 5.0 -LUA_PREMK= yes - -.include <bsd.port.pre.mk> - -.if exists(${LUA_CMD}) -VER_STR!= ${LUA_CMD} -v - -CFLAGS+= -DLUA_VERSION_STRING="${VER_STR}" -.endif - - - - The Lua variables can be - safely used in commands when they are inside targets - without the need of LUA_PREMK. -