pkgsrc-Bugs archive

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

pkg/47587: lua not linked to pthread causes issues with modules



>Number:         47587
>Category:       pkg
>Synopsis:       lua not linked to pthread causes issues with modules
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 24 00:30:00 +0000 2013
>Originator:     Waitman Gobble
>Release:        NetBSD 6.0 stable
>Organization:
Waitman Gobble
>Environment:
NetBSD dx.burplex.com 6.0_STABLE NetBSD 6.0_STABLE (KAINDA) #3: Mon Feb 18 
06:45:17 PST 2013  
da3m0n8t3r%dx.burplex.com@localhost:/usr/obj/sys/arch/amd64/compile/KAINDA amd64

>Description:
Hi,

I am working on a project with luasql/postgres and noticed that the base lua 
install is not linked with pthread

# lua testpg.lua 
lua: error loading module 'luasql.postgres' from file 
'/usr/lib/lua/5.1/luasql/postgres.so':
        Cannot dlopen non-loadable /usr/lib/libpthread.so.1


I noticed lua 5.1.5 in /usr/pkg/lang but it does not link to pthread either. 

Adding this to the Makefile links pthread:


PTHREAD_AUTO_VARS=      yes
.include "../../mk/pthread.buildlink3.mk"
.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} != "none"
SUBST_CLASSES+=         pthread
SUBST_STAGE.pthread=    pre-configure
SUBST_FILES.pthread=    configure
SUBST_SED.pthread=      -e 's|-lpthread|${PTHREAD_LIBS}|'
.endif

# ldd /usr/pkg/bin/lua
/usr/pkg/bin/lua:
        -llua.5 => /usr/pkg/lib/liblua.so.5
        -lm.0 => /usr/lib/libm.so.0
        -lgcc_s.1 => /usr/lib/libgcc_s.so.1
        -lc.12 => /usr/lib/libc.so.12
        -ledit.3 => /usr/lib/libedit.so.3
        -lterminfo.1 => /usr/lib/libterminfo.so.1
        -lpthread.1 => /usr/lib/libpthread.so.1

this allows the 'testpg.lua' to execute, ie:

luasql = require "luasql.postgres"
envv = assert (luasql.postgres())
con = assert (envv:connect('test', 'postgres', nil, '127.0.0.1', 5432))


Anyhow, this could be something useful for users to have in the pkgsrc 
Makefile.. (?)


>How-To-Repeat:
i have attached a shar with an updated Makefile for review.

thank you,

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       lua
#       lua/CVS
#       lua/CVS/Root
#       lua/CVS/Repository
#       lua/CVS/Entries
#       lua/Makefile
#       lua/DESCR
#       lua/distinfo
#       lua/PLIST
#       lua/patches
#       lua/patches/CVS
#       lua/patches/CVS/Root
#       lua/patches/CVS/Repository
#       lua/patches/CVS/Entries
#       lua/patches/patch-aa
#       lua/patches/patch-ab
#       lua/patches/patch-ac
#       lua/buildlink3.mk
#       lua/module.mk
#       lua/version.mk
#
echo c - lua
mkdir -p lua > /dev/null 2>&1
echo c - lua/CVS
mkdir -p lua/CVS > /dev/null 2>&1
echo x - lua/CVS/Root
sed 's/^X//' >lua/CVS/Root << 'END-of-lua/CVS/Root'
Xanoncvs%anoncvs.NetBSD.org@localhost:/cvsroot
END-of-lua/CVS/Root
echo x - lua/CVS/Repository
sed 's/^X//' >lua/CVS/Repository << 'END-of-lua/CVS/Repository'
Xpkgsrc/lang/lua
END-of-lua/CVS/Repository
echo x - lua/CVS/Entries
sed 's/^X//' >lua/CVS/Entries << 'END-of-lua/CVS/Entries'
X/DESCR/1.1/Thu Nov  1 00:24:03 2001//
X/Makefile/1.49/Tue Oct  2 20:11:44 2012//
X/PLIST/1.13/Mon Mar 12 15:49:27 2012//
X/buildlink3.mk/1.14/Wed Jan 19 13:46:13 2011//
X/distinfo/1.28/Mon Mar 12 15:49:27 2012//
X/module.mk/1.3/Sun Jun 14 22:58:02 2009//
X/version.mk/1.2/Mon Mar 12 15:49:27 2012//
XD/patches////
END-of-lua/CVS/Entries
echo x - lua/Makefile
sed 's/^X//' >lua/Makefile << 'END-of-lua/Makefile'
X# $NetBSD: Makefile,v 1.49 2012/10/02 20:11:44 asau Exp $
X
XDISTNAME=      lua-${LUA_VERSION}
XCATEGORIES=    lang
XMASTER_SITES=  http://www.lua.org/ftp/ \
X               http://www.tecgraf.puc-rio.br/lua/ftp/
X
XMAINTAINER=    pkgsrc-users%NetBSD.org@localhost
XHOMEPAGE=      http://www.lua.org/
XCOMMENT=       Powerful light-weight language for extending applications
XLICENSE=       mit
X
X.include "../../lang/lua/version.mk"
X
XPKG_INSTALLATION_TYPES=        overwrite pkgviews
X
X.include "../../mk/bsd.prefs.mk"
X
XUSE_LIBTOOL=   yes
XUSE_TOOLS+=    gmake
XMAKE_ENV+=     DLLIB=${BUILDLINK_LDADD.dl:Q}
XMAKE_ENV+=     INSTALL_DATA=${INSTALL_DATA:Q}
XCFLAGS+=       -DLUA_ROOT=\"${PREFIX}/\"
X
XMAKE_FLAGS+=   CC=cc
X
XPTHREAD_AUTO_VARS=     yes
X.include "../../mk/pthread.buildlink3.mk"
X.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} != "none"
XSUBST_CLASSES+=                pthread
XSUBST_STAGE.pthread=   pre-configure
XSUBST_FILES.pthread=   configure
XSUBST_SED.pthread=     -e 's|-lpthread|${PTHREAD_LIBS}|'
X.endif
X
XDOCDIR=                ${PREFIX}/share/doc/lua
XEGDIR=         ${PREFIX}/share/examples/lua
X
X.if ${OPSYS} == "FreeBSD"
XBUILD_TARGET=  freebsd
X.elif !empty(OPSYS:M*BSD*) || ${OPSYS} == "DragonFly"
XBUILD_TARGET=  bsd
X.elif ${OPSYS} == "Linux"
XBUILD_TARGET=  linux
X.elif ${OPSYS} == "Darwin"
XBUILD_TARGET=  macosx
X.elif ${OPSYS} == "SunOS"
XBUILD_TARGET=  solaris
X.elif ${OPSYS} == "AIX"
XBUILD_TARGET=  aix
X.else
XBUILD_TARGET=  generic
X.endif
X
XPKGCONFIG_OVERRIDE=    ${WRKSRC}/etc/lua.pc
X
XINSTALLATION_DIRS+=    lib/pkgconfig
X
XSUBST_CLASSES+=                pc-prefix
XSUBST_FILES.pc-prefix+=        ${WRKSRC}/etc/lua.pc
XSUBST_SED.pc-prefix+=  -e "s,/usr/local,${PREFIX},"
XSUBST_STAGE.pc-prefix= post-build
X
Xpost-install:
X       ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
X       set -e; \
X       cd ${WRKSRC}; for f in README COPYRIGHT HISTORY; do             \
X               ${INSTALL_DATA} "$$f" ${DESTDIR}${DOCDIR};              \
X       done
X       set -e; \
X       cd ${WRKSRC}/doc; for f in *.html *.gif; do                     \
X               ${INSTALL_DATA} "$$f" ${DESTDIR}${DOCDIR};              \
X       done
X       ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
X       set -e; \
X       cd ${WRKSRC}/test; for f in README *.lua; do                    \
X               ${INSTALL_DATA} "$$f" ${DESTDIR}${EGDIR};               \
X       done
X       ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}/etc
X       set -e; \
X       cd ${WRKSRC}/etc; for f in README *.c *.ico *.lua; do \
X               ${INSTALL_DATA} "$$f" ${DESTDIR}${EGDIR}/etc;           \
X       done
X       ${INSTALL_DATA} ${WRKSRC}/etc/lua.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
X
X.include "../../devel/readline/buildlink3.mk"
X.include "../../mk/dlopen.buildlink3.mk"
X.include "../../mk/bsd.pkg.mk"
END-of-lua/Makefile
echo x - lua/DESCR
sed 's/^X//' >lua/DESCR << 'END-of-lua/DESCR'
XLua is a powerful, light-weight programming language designed for
Xextending applications. Lua is also frequently used as a
Xgeneral-purpose, stand-alone language.
X
XLua combines simple procedural syntax (similar to Pascal) with
Xpowerful data description constructs based on associative arrays and
Xextensible semantics. Lua is dynamically typed, interpreted from
Xbytecodes, and has automatic memory management, making it ideal for
Xconfiguration, scripting, and rapid prototyping.
X
XLua is a language engine that you can embed into your application.
XThis means that, besides syntax and semantics, Lua has an API that
Xallows the application to exchange data with Lua programs and also to
Xextend Lua with C functions. In this sense, Lua can be regarded as a
Xlanguage framework for building domain-specific languages.
X
XLua is implemented as a small library of C functions, written in ANSI
XC, and compiles unmodified in all known platforms. The implementation
Xgoals are simplicity, efficiency, portability, and low embedding cost.
XThe result is a fast language engine with small footprint, making it
Xideal in embedded systems too.
END-of-lua/DESCR
echo x - lua/distinfo
sed 's/^X//' >lua/distinfo << 'END-of-lua/distinfo'
X$NetBSD: distinfo,v 1.28 2012/03/12 15:49:27 wiz Exp $
X
XSHA1 (lua-5.1.5.tar.gz) = b3882111ad02ecc6b972f8c1241647905cb2e3fc
XRMD160 (lua-5.1.5.tar.gz) = b0c2234675335a8bf158a125b6778cf800c754a0
XSize (lua-5.1.5.tar.gz) = 221213 bytes
XSHA1 (patch-aa) = 25bcd22d3fc319c51356b7f976d0215eb04900db
XSHA1 (patch-ab) = 6f0964957112afbbc77648c86ae2a6ddd20c3389
XSHA1 (patch-ac) = bd2348dcb273de09ddc09da906c93de6cc209c5c
END-of-lua/distinfo
echo x - lua/PLIST
sed 's/^X//' >lua/PLIST << 'END-of-lua/PLIST'
X@comment $NetBSD: PLIST,v 1.13 2012/03/12 15:49:27 wiz Exp $
Xbin/lua
Xbin/luac
Xinclude/lauxlib.h
Xinclude/lua.h
Xinclude/lua.hpp
Xinclude/luaconf.h
Xinclude/lualib.h
Xlib/liblua.la
Xlib/pkgconfig/lua.pc
Xman/man1/lua.1
Xman/man1/luac.1
Xshare/doc/lua/COPYRIGHT
Xshare/doc/lua/HISTORY
Xshare/doc/lua/README
Xshare/doc/lua/contents.html
Xshare/doc/lua/logo.gif
Xshare/doc/lua/lua.html
Xshare/doc/lua/luac.html
Xshare/doc/lua/manual.html
Xshare/doc/lua/readme.html
Xshare/examples/lua/README
Xshare/examples/lua/bisect.lua
Xshare/examples/lua/cf.lua
Xshare/examples/lua/echo.lua
Xshare/examples/lua/env.lua
Xshare/examples/lua/etc/README
Xshare/examples/lua/etc/all.c
Xshare/examples/lua/etc/lua.ico
Xshare/examples/lua/etc/min.c
Xshare/examples/lua/etc/noparser.c
Xshare/examples/lua/etc/strict.lua
Xshare/examples/lua/factorial.lua
Xshare/examples/lua/fib.lua
Xshare/examples/lua/fibfor.lua
Xshare/examples/lua/globals.lua
Xshare/examples/lua/hello.lua
Xshare/examples/lua/life.lua
Xshare/examples/lua/luac.lua
Xshare/examples/lua/printf.lua
Xshare/examples/lua/readonly.lua
Xshare/examples/lua/sieve.lua
Xshare/examples/lua/sort.lua
Xshare/examples/lua/table.lua
Xshare/examples/lua/trace-calls.lua
Xshare/examples/lua/trace-globals.lua
Xshare/examples/lua/xd.lua
X@pkgdir share/lua/5.1
X@pkgdir lib/lua/5.1
END-of-lua/PLIST
echo c - lua/patches
mkdir -p lua/patches > /dev/null 2>&1
echo c - lua/patches/CVS
mkdir -p lua/patches/CVS > /dev/null 2>&1
echo x - lua/patches/CVS/Root
sed 's/^X//' >lua/patches/CVS/Root << 'END-of-lua/patches/CVS/Root'
Xanoncvs%anoncvs.NetBSD.org@localhost:/cvsroot
END-of-lua/patches/CVS/Root
echo x - lua/patches/CVS/Repository
sed 's/^X//' >lua/patches/CVS/Repository << 'END-of-lua/patches/CVS/Repository'
Xpkgsrc/lang/lua/patches
END-of-lua/patches/CVS/Repository
echo x - lua/patches/CVS/Entries
sed 's/^X//' >lua/patches/CVS/Entries << 'END-of-lua/patches/CVS/Entries'
X/patch-aa/1.19/Thu Dec 17 16:42:46 2009//
X/patch-ab/1.14/Mon Mar 12 15:49:27 2012//
X/patch-ac/1.9/Mon Mar 12 15:49:27 2012//
XD
END-of-lua/patches/CVS/Entries
echo x - lua/patches/patch-aa
sed 's/^X//' >lua/patches/patch-aa << 'END-of-lua/patches/patch-aa'
X$NetBSD: patch-aa,v 1.19 2009/12/17 16:42:46 jmmv Exp $
X
X--- Makefile.orig      2008-08-12 01:40:48.000000000 +0100
X+++ Makefile   2009-12-17 16:36:32.000000000 +0000
X@@ -9,11 +9,11 @@ PLAT= none
X 
X # Where to install. The installation starts in the src and doc directories,
X # so take care if INSTALL_TOP is not an absolute path.
X-INSTALL_TOP= /usr/local
X+INSTALL_TOP= ${PREFIX}
X INSTALL_BIN= $(INSTALL_TOP)/bin
X INSTALL_INC= $(INSTALL_TOP)/include
X INSTALL_LIB= $(INSTALL_TOP)/lib
X-INSTALL_MAN= $(INSTALL_TOP)/man/man1
X+INSTALL_MAN= $(INSTALL_TOP)/${PKGMANDIR}/man1
X #
X # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
X # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
X@@ -24,7 +24,7 @@ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
X # may have to run ranlib on the installed liblua.a (do "make ranlib").
X INSTALL= install -p
X INSTALL_EXEC= $(INSTALL) -m 0755
X-INSTALL_DATA= $(INSTALL) -m 0644
X+#INSTALL_DATA= $(INSTALL) -m 0644
X #
X # If you don't have install you can use cp instead.
X # INSTALL= cp -p
X@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linu
X # What to install.
X TO_BIN= lua luac
X TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
X-TO_LIB= liblua.a
X+TO_LIB= liblua.la
X TO_MAN= lua.1 luac.1
X 
X # Lua version and release.
X@@ -59,11 +59,11 @@ test:      dummy
X       src/lua test/hello.lua
X 
X install: dummy
X-      cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) 
$(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
X-      cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
X-      cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
X-      cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
X-      cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
X+      cd src && $(MKDIR) $(DESTDIR)$(INSTALL_BIN) $(DESTDIR)$(INSTALL_INC) 
$(DESTDIR)$(INSTALL_LIB) $(DESTDIR)$(INSTALL_MAN) $(DESTDIR)$(INSTALL_LMOD) 
$(DESTDIR)$(INSTALL_CMOD)
X+      cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_PROGRAM) 
$(TO_BIN) $(DESTDIR)$(INSTALL_BIN)
X+      cd src && $(INSTALL_DATA) $(TO_INC) $(DESTDIR)$(INSTALL_INC)
X+      cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_LIB) 
$(TO_LIB) $(DESTDIR)$(INSTALL_LIB)
X+      cd doc && $(INSTALL_DATA) $(TO_MAN) $(DESTDIR)$(INSTALL_MAN)
X 
X ranlib:
X       cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
END-of-lua/patches/patch-aa
echo x - lua/patches/patch-ab
sed 's/^X//' >lua/patches/patch-ab << 'END-of-lua/patches/patch-ab'
X$NetBSD: patch-ab,v 1.14 2012/03/12 15:49:27 wiz Exp $
X
X--- src/Makefile.orig  2012-02-13 20:41:22.000000000 +0000
X+++ src/Makefile
X@@ -7,8 +7,8 @@
X # Your platform. See PLATS for possible values.
X PLAT= none
X 
X-CC= gcc
X-CFLAGS= -O2 -Wall $(MYCFLAGS)
X+CC?= gcc
X+CFLAGS+= -Wall $(MYCFLAGS)
X AR= ar rcu
X RANLIB= ranlib
X RM= rm -f
X@@ -18,22 +18,32 @@ MYCFLAGS=
X MYLDFLAGS=
X MYLIBS=
X 
X+.SUFFIXES:    .lo
X+.c.lo:
X+      $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c $<
X+LV=   5:1
X+
X # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE 
=========
X 
X PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
X 
X-LUA_A=        liblua.a
X-CORE_O=       lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o 
lmem.o \
X+LUA_XA=       liblua.a
X+LUA_A=        liblua.la
X+XCORE_O=      lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o 
lmem.o \
X       lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o  \
X       lundump.o lvm.o lzio.o
X-LIB_O=        lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o 
ltablib.o \
X+XLIB_O=       lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o 
ltablib.o \
X       lstrlib.o loadlib.o linit.o
X+CORE_O=       $(XCORE_O:.o=.lo)
X+LIB_O=        $(XLIB_O:.o=.lo)
X 
X LUA_T=        lua
X-LUA_O=        lua.o
X+LUA_XO=       lua.o
X+LUA_O=        $(LUA_XO:.o=.lo)
X 
X LUAC_T=       luac
X-LUAC_O=       luac.o print.o
X+LUAC_XO=      luac.o print.o
X+LUAC_O=       $(LUAC_XO:.o=.lo)
X 
X ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
X ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
X@@ -48,14 +58,13 @@ o: $(ALL_O)
X a:    $(ALL_A)
X 
X $(LUA_A): $(CORE_O) $(LIB_O)
X-      $(AR) $@ $(CORE_O) $(LIB_O)     # DLL needs all object files
X-      $(RANLIB) $@
X+      ${LIBTOOL} --tag=CC --mode=link ${CC} ${LDFLAGS} -o $@ ${CORE_O} 
${LIB_O} -rpath ${PREFIX}/lib -version-info ${LV} ${LIBS}
X 
X $(LUA_T): $(LUA_O) $(LUA_A)
X-      $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
X+      ${LIBTOOL} --tag=CC --mode=link $(CC) -o $@ ${LDFLAGS} $(LUA_O) 
$(LUA_A) $(LIBS)
X 
X $(LUAC_T): $(LUAC_O) $(LUA_A)
X-      $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
X+      ${LIBTOOL} --tag=CC --mode=link $(CC) -static -o $@ ${LDFLAGS} 
$(LUAC_O) $(LUA_A) $(LIBS)
X 
X clean:
X       $(RM) $(ALL_T) $(ALL_O)
X@@ -87,7 +96,7 @@ ansi:
X       $(MAKE) all MYCFLAGS=-DLUA_ANSI
X 
X bsd:
X-      $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
X+      $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN 
-DLUA_USE_READLINE" MYLIBS="-Wl,-E -lreadline -lhistory"
X 
X freebsd:
X       $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
END-of-lua/patches/patch-ab
echo x - lua/patches/patch-ac
sed 's/^X//' >lua/patches/patch-ac << 'END-of-lua/patches/patch-ac'
X$NetBSD: patch-ac,v 1.9 2012/03/12 15:49:27 wiz Exp $
X
X- allow LUA_ROOT to be set by the pkgsrc makefile
X- solaris fix for PR 43350
X
X--- src/luaconf.h.orig 2008-02-11 16:25:08.000000000 +0000
X+++ src/luaconf.h
X@@ -94,7 +94,9 @@
X       ".\\?.dll;"  LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
X 
X #else
X+#ifndef LUA_ROOT
X #define LUA_ROOT      "/usr/local/"
X+#endif
X #define LUA_LDIR      LUA_ROOT "share/lua/5.1/"
X #define LUA_CDIR      LUA_ROOT "lib/lua/5.1/"
X #define LUA_PATH_DEFAULT  \
X@@ -183,7 +185,7 @@
X #define LUAI_DATA     /* empty */
X 
X #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
X-      defined(__ELF__)
X+      defined(__ELF__) && !defined(__sun)
X #define LUAI_FUNC     __attribute__((visibility("hidden"))) extern
X #define LUAI_DATA     LUAI_FUNC
X 
END-of-lua/patches/patch-ac
echo x - lua/buildlink3.mk
sed 's/^X//' >lua/buildlink3.mk << 'END-of-lua/buildlink3.mk'
X# $NetBSD: buildlink3.mk,v 1.14 2011/01/19 13:46:13 adam Exp $
X
XBUILDLINK_TREE+=       lua
X
X.if !defined(LUA_BUILDLINK3_MK)
XLUA_BUILDLINK3_MK:=
X
XBUILDLINK_API_DEPENDS.lua+=    lua>=5.1.1
XBUILDLINK_ABI_DEPENDS.lua+=    lua>=5.1.4nb1
XBUILDLINK_PKGSRCDIR.lua?=      ../../lang/lua
X
X.include "../../devel/readline/buildlink3.mk"
X.endif # LUA_BUILDLINK3_MK
X
XBUILDLINK_TREE+=       -lua
END-of-lua/buildlink3.mk
echo x - lua/module.mk
sed 's/^X//' >lua/module.mk << 'END-of-lua/module.mk'
X# $NetBSD: module.mk,v 1.3 2009/06/14 22:58:02 joerg Exp $
X#
X# This Makefile fragment is intended to be included by packages that
X# install Lua packages.
X
X.if !defined(LUA_MODULE_MK)
XLUA_MODULE_MK= # defined
X
X.include "../../lang/lua/version.mk"
X
X_LUA_VERSION=  ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
X
XLUA_PKGPREFIX= lua
XLUA_LDIR=      share/lua/${_LUA_VERSION}
XPLIST_SUBST+=  LUA_LDIR=${LUA_LDIR}
X
X.if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo])
XDEPENDS+=      lua-${_LUA_VERSION}.*:../../lang/lua
X.else
XLUA_CDIR=      lib/lua/${_LUA_VERSION}
XPLIST_SUBST+=  LUA_CDIR=${LUA_CDIR}
X
XBUILDLINK_API_DEPENDS.lua+=    lua-${_LUA_VERSION}.*
X
X.include "../../lang/lua/buildlink3.mk"
X.endif
X
X.endif  # LUA_MODULE_MK
END-of-lua/module.mk
echo x - lua/version.mk
sed 's/^X//' >lua/version.mk << 'END-of-lua/version.mk'
X# $NetBSD: version.mk,v 1.2 2012/03/12 15:49:27 wiz Exp $
X
XLUA_VERSION=   5.1.5
X
XLUA_VERSION_MAJOR=     ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
XLUA_VERSION_MINOR=     ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
END-of-lua/version.mk
exit




Home | Main Index | Thread Index | Old Index