pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang Reimport lang/lua as lang/lua52, and bring back t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/50bbb215493d
branches:  trunk
changeset: 626004:50bbb215493d
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Wed Oct 30 06:18:09 2013 +0000

description:
Reimport lang/lua as lang/lua52, and bring back the previous Lua 5.1
package as lang/lua51.

I've adjusted the depends and switched the PKGNAMEs but these packages
are otherwise unchanged. This means that you can't install both at
once. There are preliminary patches for that (see tech-pkg) but they
aren't quite ready yet.

This also doesn't include agc's builtin.mk, although it should be
possible to drop it into the lua51 package with only very minor
modifications. I don't think the builtin packages will allow having
one builtin.mk for both lua51 and lua52, but I'd be happy to be shown
wrong about that.

Add infrastructure support for Lua module packages (including
multiversion support), application packages written in Lua, and a
redirecting bl3.mk file for packages that just link Lua in. This is
based on the Python infrastructure.

The new variable LUA_VERSION_DEFAULT picks which Lua package you get
by default; it is set to 52 so as to maintain the status quo.

Packages can set LUA_VERSIONS_ACCEPTED and/or LUA_VERSIONS_INCOMPATIBLE.
I have found (I think) most or all the packages that don't work with
lua51 and will be marking those; I have not tracked down most of the
ones that don't work with lua52 yet as I was originally intending to
roll back to 5.1 as the default.

diffstat:

 lang/lua/DESCR              |   21 -------
 lang/lua/Makefile           |   57 -------------------
 lang/lua/PLIST              |   21 -------
 lang/lua/application.mk     |   21 +++++++
 lang/lua/buildlink3.mk      |   23 +++----
 lang/lua/distinfo           |    8 --
 lang/lua/files/lua.pc.in    |   21 -------
 lang/lua/luaversion.mk      |  130 ++++++++++++++++++++++++++++++++++++++++++++
 lang/lua/module.mk          |   18 ++---
 lang/lua/patches/patch-aa   |   53 -----------------
 lang/lua/patches/patch-ab   |   74 -------------------------
 lang/lua/patches/patch-ac   |   23 -------
 lang/lua/version.mk         |    6 --
 lang/lua51/DESCR            |   21 +++++++
 lang/lua51/Makefile         |   81 +++++++++++++++++++++++++++
 lang/lua51/PLIST            |   49 ++++++++++++++++
 lang/lua51/buildlink3.mk    |   15 +++++
 lang/lua51/distinfo         |    8 ++
 lang/lua51/patches/patch-aa |   53 +++++++++++++++++
 lang/lua51/patches/patch-ab |   80 +++++++++++++++++++++++++++
 lang/lua51/patches/patch-ac |   26 ++++++++
 lang/lua51/version.mk       |    6 ++
 lang/lua52/DESCR            |   21 +++++++
 lang/lua52/Makefile         |   59 +++++++++++++++++++
 lang/lua52/PLIST            |   21 +++++++
 lang/lua52/buildlink3.mk    |   15 +++++
 lang/lua52/distinfo         |    8 ++
 lang/lua52/files/lua.pc.in  |   21 +++++++
 lang/lua52/patches/patch-aa |   53 +++++++++++++++++
 lang/lua52/patches/patch-ab |   74 +++++++++++++++++++++++++
 lang/lua52/patches/patch-ac |   23 +++++++
 lang/lua52/version.mk       |    6 ++
 32 files changed, 808 insertions(+), 308 deletions(-)

diffs (truncated from 1268 to 300 lines):

diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/DESCR
--- a/lang/lua/DESCR    Wed Oct 30 06:04:16 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-Lua is a powerful, light-weight programming language designed for
-extending applications. Lua is also frequently used as a
-general-purpose, stand-alone language.
-
-Lua combines simple procedural syntax (similar to Pascal) with
-powerful data description constructs based on associative arrays and
-extensible semantics. Lua is dynamically typed, interpreted from
-bytecodes, and has automatic memory management, making it ideal for
-configuration, scripting, and rapid prototyping.
-
-Lua is a language engine that you can embed into your application.
-This means that, besides syntax and semantics, Lua has an API that
-allows the application to exchange data with Lua programs and also to
-extend Lua with C functions. In this sense, Lua can be regarded as a
-language framework for building domain-specific languages.
-
-Lua is implemented as a small library of C functions, written in ANSI
-C, and compiles unmodified in all known platforms. The implementation
-goals are simplicity, efficiency, portability, and low embedding cost.
-The result is a fast language engine with small footprint, making it
-ideal in embedded systems too.
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/Makefile
--- a/lang/lua/Makefile Wed Oct 30 06:04:16 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-# $NetBSD: Makefile,v 1.51 2013/07/15 02:02:23 ryoon Exp $
-
-DISTNAME=      lua-${LUA_VERSION}
-CATEGORIES=    lang
-MASTER_SITES=  http://www.lua.org/ftp/ \
-               http://www.tecgraf.puc-rio.br/lua/ftp/
-
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://www.lua.org/
-COMMENT=       Powerful light-weight language for extending applications
-LICENSE=       mit
-
-.include "../../lang/lua/version.mk"
-
-PKG_INSTALLATION_TYPES=        overwrite pkgviews
-
-.include "../../mk/bsd.prefs.mk"
-
-USE_LIBTOOL=   yes
-USE_TOOLS+=    gmake
-MAKE_ENV+=     DLLIB=${BUILDLINK_LDADD.dl:Q}
-MAKE_ENV+=     INSTALL_DATA=${INSTALL_DATA:Q}
-CFLAGS+=       -DLUA_ROOT=\"${PREFIX}/\"
-
-PKGCONFIG_OVERRIDE=    ${WRKSRC}/lua.pc
-INSTALLATION_DIRS+=    lib/pkgconfig share/doc/lua
-
-.if ${OPSYS} == "FreeBSD"
-BUILD_TARGET=  freebsd
-.elif !empty(OPSYS:M*BSD*) || ${OPSYS} == "DragonFly"
-BUILD_TARGET=  bsd
-.elif ${OPSYS} == "Linux"
-BUILD_TARGET=  linux
-.elif ${OPSYS} == "Darwin"
-BUILD_TARGET=  macosx
-.elif ${OPSYS} == "SunOS"
-BUILD_TARGET=  solaris
-.elif ${OPSYS} == "AIX"
-BUILD_TARGET=  aix
-.else
-BUILD_TARGET=  generic
-.endif
-
-pre-configure:
-       sed     -e 's,@PREFIX@,${PREFIX},g' \
-               -e 's,@VER@,${PKGVERSION_NOREV:R},g' \
-               -e 's,@REV@,${PKGVERSION_NOREV},g' \
-               ${FILESDIR}/lua.pc.in > ${WRKSRC}/lua.pc
-
-post-install:
-       ${INSTALL_DATA} ${WRKSRC}/lua.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
-       ${INSTALL_DATA} ${WRKSRC}/doc/*.??? ${DESTDIR}${PREFIX}/share/doc/lua
-       ${INSTALL_DATA} ${WRKSRC}/doc/*.???? ${DESTDIR}${PREFIX}/share/doc/lua
-
-.include "../../mk/readline.buildlink3.mk"
-.include "../../mk/dlopen.buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/PLIST
--- a/lang/lua/PLIST    Wed Oct 30 06:04:16 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-@comment $NetBSD: PLIST,v 1.14 2013/07/04 18:04:42 adam Exp $
-bin/lua
-bin/luac
-include/lauxlib.h
-include/lua.h
-include/lua.hpp
-include/luaconf.h
-include/lualib.h
-lib/liblua.la
-lib/pkgconfig/lua.pc
-man/man1/lua.1
-man/man1/luac.1
-share/doc/lua/contents.html
-share/doc/lua/logo.gif
-share/doc/lua/lua.css
-share/doc/lua/manual.css
-share/doc/lua/manual.html
-share/doc/lua/osi-certified-72x60.png
-share/doc/lua/readme.html
-@pkgdir share/lua/5.2
-@pkgdir lib/lua/5.2
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/application.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/lua/application.mk   Wed Oct 30 06:18:09 2013 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: application.mk,v 1.1 2013/10/30 06:18:09 dholland Exp $
+#
+# This makefile fragment is intended to be included by packages that
+# install Lua scripts.
+#
+# Package-settable variables:
+#
+# REPLACE_LUA
+#      A list of Lua scripts ot be installed, relative to ${WRKSRC}.
+#
+# Keywords: Lua
+#
+
+.include "../../lang/lua/luaversion.mk"
+
+.if defined(REPLACE_LUA)
+REPLACE_INTERPRETER+=  lua
+REPLACE.lua.old=       .*lua
+REPLACE.lua.new=       ${PREFIX}/bin/lua
+REPLACE_FILES.lua=     ${REPLACE_LUA}
+.endif
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/buildlink3.mk
--- a/lang/lua/buildlink3.mk    Wed Oct 30 06:04:16 2013 +0000
+++ b/lang/lua/buildlink3.mk    Wed Oct 30 06:18:09 2013 +0000
@@ -1,15 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.16 2013/07/15 02:02:23 ryoon Exp $
-
-BUILDLINK_TREE+=       lua
-
-.if !defined(LUA_BUILDLINK3_MK)
-LUA_BUILDLINK3_MK:=
+# $NetBSD: buildlink3.mk,v 1.17 2013/10/30 06:18:09 dholland Exp $
+#
+# This is a fake buildlink3.mk file. It figures out the Lua version
+# and then includes the real buildlink3.mk file for that Lua version.
+#
+# It is intended to be included by packages that embed the Lua
+# interpreter and therefore link against Lua.
 
-BUILDLINK_API_DEPENDS.lua+=    lua>=5.2.0
-BUILDLINK_ABI_DEPENDS.lua+=    lua>=5.2.0
-BUILDLINK_PKGSRCDIR.lua?=      ../../lang/lua
+.include "../../lang/lua/luaversion.mk"
+.include "${LUA_PKGSRCDIR}/buildlink3.mk"
 
-.include "../../mk/readline.buildlink3.mk"
-.endif # LUA_BUILDLINK3_MK
-
-BUILDLINK_TREE+=       -lua
+BUILDLINK_PREFIX.lua=  ${BUILDLINK_PREFIX.${LUA_PACKAGE}}
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/distinfo
--- a/lang/lua/distinfo Wed Oct 30 06:04:16 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-$NetBSD: distinfo,v 1.29 2013/07/04 18:04:42 adam Exp $
-
-SHA1 (lua-5.2.2.tar.gz) = 0857e41e5579726a4cb96732e80d7aa47165eaf5
-RMD160 (lua-5.2.2.tar.gz) = d17967150017e9b25a26c1ad527647cd0b9e598f
-Size (lua-5.2.2.tar.gz) = 251713 bytes
-SHA1 (patch-aa) = 5fa5c7fecc7fd50dc9d88d441ad9373f59ecb841
-SHA1 (patch-ab) = 4f2f05f6a5e4cfffe8f9ef7bf4de6f054074baa4
-SHA1 (patch-ac) = b8b9c0068210795e5eb22512767ac2e98bca8cbc
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/files/lua.pc.in
--- a/lang/lua/files/lua.pc.in  Wed Oct 30 06:04:16 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# $NetBSD: lua.pc.in,v 1.1 2013/07/04 18:04:42 adam Exp $
-# lua.pc is not any longer distributed, but is still required by other packages.
-
-prefix= @PREFIX@
-INSTALL_BIN= ${prefix}/bin
-INSTALL_INC= ${prefix}/include
-INSTALL_LIB= ${prefix}/lib
-INSTALL_MAN= ${prefix}/man/man1
-INSTALL_LMOD= ${prefix}/share/lua/@VER@
-INSTALL_CMOD= ${prefix}/lib/lua/@VER@
-
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: Lua
-Description: An Extensible Extension Language
-Version: @REV@
-Requires: 
-Libs: -L${libdir} -llua -lm
-Cflags: -I${includedir}
diff -r 027ffb17c3f5 -r 50bbb215493d lang/lua/luaversion.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/lua/luaversion.mk    Wed Oct 30 06:18:09 2013 +0000
@@ -0,0 +1,130 @@
+# $NetBSD: luaversion.mk,v 1.1 2013/10/30 06:18:09 dholland Exp $
+
+# This file determins which Lua version is used as a dependency for
+# a package.
+#
+# === User-settable variables ===
+#
+# LUA_VERSION_DEFAULT
+#      The preferred lua version to use.
+#
+#      Possible values: 51 52
+#      Default: 52
+#
+# === Infrastructure variables ===
+#
+# LUA_VERSION_REQD
+#      Lua version to use. This variable should not be set by
+#      packages; it is ordinarily set by multiversion builds.
+#
+#      Possible values: ${LUA_VERSIONS_ACCEPTED}
+#      Default: ${LUA_VERSION_DEFAULT}
+#
+# === Package-settable variables ===
+#
+# LUA_VERSIONS_ACCEPTED
+#      The Lua versions that the package can build against. Order
+#      is significant; those listed earlier are preferred over those
+#      listed later.
+#
+#      Possible values: 51 52
+#      Default: 52 51
+#
+# LUA_VERSIONS_INCOMPATIBLE
+#      The Lua versions that the package *cannot* build against.
+#
+#      Possible values: 51 52
+#      Default: <empty>
+#
+# LUA_SELF_CONFLICT
+#      If set to "yes", CONFLICTS entries are added among the various
+#      per-Lua-version variants of a multiversion package.
+#
+# === Defined variables ===
+#
+# LUA_PKGPREFIX
+#      The prefix to use in PKGNAME for multiversion packages.
+#
+#      Example: lua51
+#
+# Keywords: Lua
+#
+
+.if !defined (LUA_LUAVERSION_MK)
+LUA_LUAVERSION_MK=     # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=           LUA_VERSION_DEFAULT
+BUILD_DEFS_EFFECTS+=   LUAPACKAGE
+
+LUA_VERSION_DEFAULT?=  52
+LUA_VERSIONS_ACCEPTED?=        52 51
+LUA_VERSIONS_INCOMPATIBLE?=# empty
+
+#
+# Resolve LUA_VERSIONS_INCOMPATBLE and generate the _OK vars.
+#
+.for v in ${LUA_VERSIONS_ACCEPTED}
+.if empty(LUA_VERSIONS_INCOMPATIBLE:M${v})
+_LUA_VERSION_${v}_OK=          yes
+_LUA_VERSIONS_ACCEPTED+=       ${v}
+.endif
+.endfor
+
+# Pick a version
+.if defined(LUA_VERSION_REQD)
+.  if defined(_LUA_VERSION_${LUA_VERSION_REQD}_OK)
+_LUA_VERSION=          ${LUA_VERSION_REQD}
+.  endif
+.else
+.  if defined(_LUA_VERSION_${LUA_VERSION_DEFAULT}_OK)
+_LUA_VERSION?=         ${LUA_VERSION_DEFAULT}
+.  endif
+.  for v in ${_LUA_VERSIONS_ACCEPTED}
+.    if defined(_LUA_VERSION_${v}_OK)
+_LUA_VERSION?=         ${v}
+.    endif
+.  endfor
+.endif
+
+#
+# Enable multiversion builds.
+#
+MULTI+=        LUA_VERSION_REQD=${_LUA_VERSION}



Home | Main Index | Thread Index | Old Index