Skip to content

Commit

Permalink
dev-lua/luafilesystem: version bump to 1.7.0.2
Browse files Browse the repository at this point in the history
Updated the ebuild so that it builds the lib for all the installed Lua
versions. If luajit use flag is used, it will pull the appropriate
lua5.x abi matching version from the build since it replaces it.

Closes: gentoo#14416
Signed-off-by: Victor Payno <[email protected]>
Signed-off-by: Georgy Yakovlev <[email protected]>
  • Loading branch information
vpayno authored and gyakovlev committed Mar 15, 2020
1 parent 61b4700 commit aa4c6dc
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev-lua/luafilesystem/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST luafilesystem-1.5.0.tar.gz 26660 BLAKE2B 555a119c580a14377e0b721929d33f6e15e4b4449c061860d611a12896020959f3755bde44ba29d492e8bd10a084a6dc7cd78ed0ef67c1fad85a7acb49bcf6c2 SHA512 79e767be5b923424c2f3c0025e050b6a5b15550cf96d153072f817b0f94757032feeaa579e4d73cc009a5954d38a30079db1c1c15545a45e9f13c0c776080aac
DIST luafilesystem-1.6.2.tar.gz 27886 BLAKE2B fa13cc529f3ff2b5c5bbf082c5071d066da2da97c066054c9c312366a43e0a2e136bf6eae139abb63e6de916ecca60421cd36bce132393cf0333f9d124027117 SHA512 75debecd3b35d43e76b51de02cface73808547be6a26e15c06c969c50bbfd7c4d0801ccb68812b7ecb99e56eaa63deeadaba6d0387748e215e5bdab784d463ff
DIST luafilesystem-1.6.3.tar.gz 30389 BLAKE2B 412d2893a59ccde2eb8912523bea4d06d4f140dee2f47b5e8e9795d1ca950a4be93a32eb5632775277ab2c2c22a9229c9f33d062e0d1fcd5397178962b96bae9 SHA512 47a2637903c9d42ce3ab7cf3e27b6457845aeed7ce90c0fee964ba9bf9eabf6a6eea940f960713f6b982f1b64167dbd5da8f217281284143c89e3cc5488b8404
DIST luafilesystem-1.7.0.2.tar.gz 30877 BLAKE2B c90d960b3cb28a7339e5d103a262beb76864cfd30e0502e991ae82d6fb8706da8a99d9c19d037d7c299139346a5b925e10886addce07e3755891f11b9c2ec4d9 SHA512 a1d4d077776e57cd878dbcd21656da141ea3686c587b5420a2b039aeaf086b7e7d05d531ee1cc2bbd7d06660d1315b09593e52143f6711f033ce8eecdc550511
66 changes: 66 additions & 0 deletions dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit toolchain-funcs

MY_PV=${PV//./_}

DESCRIPTION="File System Library for the Lua Programming Language"
HOMEPAGE="https://keplerproject.github.io/luafilesystem/"
SRC_URI="https://github.com/keplerproject/luafilesystem/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86"
IUSE="luajit test"

RESTRICT="!test? ( test )"

RDEPEND="
>=dev-lang/lua-5.1:*
luajit? ( dev-lang/luajit:2 )"
BDEPEND="
virtual/pkgconfig
test? ( ${RDEPEND} )"
DEPEND="${RDEPEND}"

S="${WORKDIR}/${PN}-${MY_PV}"

src_configure() {
cat > config <<-EOF
# Installation directories
# Default installation prefix
PREFIX="${ED}/$($(tc-getPKG_CONFIG) --variable exec_prefix $(usex luajit 'luajit' 'lua'))"
# System's libraries directory (where binary libraries are installed)
LUA_LIBDIR="${ED}/$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
# Lua includes directory
LUA_INC=-I$(pwd)/src
LUA_INC+=-I$($(tc-getPKG_CONFIG) --variable includedir $(usex luajit 'luajit' 'lua'))
# OS dependent
LIB_OPTION=-shared #for Linux
LIBNAME=$T.so.$V
# Compilation directives
WARN=-O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
INCS=\$(LUA_INC)
CFLAGS=\$(WARN) \$(INCS)
CC=gcc
EOF
}

src_test() {
LUA_CPATH=./src/?.so $(usex luajit 'luajit' 'lua') tests/test.lua || die
}

src_install() {
local -a HTML_DOCS=( doc/us )
einstalldocs

emake DESTDIR="${D}" install
}
12 changes: 11 additions & 1 deletion dev-lua/luafilesystem/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person">
<email>[email protected]</email>
<name>Victor Payno</name>
</maintainer>
<maintainer type="person">
<email>[email protected]</email>
<name>Georgy Yakovlev</name>
</maintainer>
<longdescription lang="en">
LuaFileSystem is a Lua library developed to complement the set of functions
related to file systems offered by the standard Lua distribution.

LuaFileSystem offers a portable way to access the underlying directory
structure and file attributes.
</longdescription>
<upstream>
<remote-id type="github">keplerproject/luafilesystem</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit aa4c6dc

Please sign in to comment.