pkgsrc/lang/lua52/Makefile
dholland 7d313c888d 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.
2013-10-30 06:18:09 +00:00

59 lines
1.6 KiB
Makefile

# $NetBSD: Makefile,v 1.1 2013/10/30 06:18:10 dholland Exp $
DISTNAME= lua-${LUA_VERSION}
PKGNAME= lua52-${LUA_VERSION}
CATEGORIES= lang
MASTER_SITES= http://www.lua.org/ftp/ \
http://www.tecgraf.puc-rio.br/lua/ftp/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.lua.org/
COMMENT= Powerful light-weight language for extending applications
LICENSE= mit
.include "../../lang/lua52/version.mk"
PKG_INSTALLATION_TYPES= overwrite pkgviews
CONFLICTS+= lua-[0-9]*
.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"