aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-ansicolors
diff options
context:
space:
mode:
authorGuilherme Felipe da Silva <gfsilva.eng@gmail.com>2020-03-02 15:40:05 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-03-03 07:09:25 -0300
commitde6b3e42f5d56b68d9d65ad71a42c4daa2e176e4 (patch)
tree00aa9878219b82876b3a89b98fe4d0e46a3ab72d /testing/lua-ansicolors
parenta2d2affa1ee54f0575210abb26383c3888812494 (diff)
downloadaports-de6b3e42f5d56b68d9d65ad71a42c4daa2e176e4.tar.bz2
aports-de6b3e42f5d56b68d9d65ad71a42c4daa2e176e4.tar.xz
testing/lua-ansicolors: new aport
https://github.com/kikito/ansicolors.lua ANSI terminal color manipulation for Lua
Diffstat (limited to 'testing/lua-ansicolors')
-rw-r--r--testing/lua-ansicolors/APKBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/lua-ansicolors/APKBUILD b/testing/lua-ansicolors/APKBUILD
new file mode 100644
index 0000000000..347100777d
--- /dev/null
+++ b/testing/lua-ansicolors/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Guilherme Felipe da Silva <gfsilva.eng@gmail.com>
+pkgname=lua-ansicolors
+_rockname="${pkgname#lua-}"
+pkgver=1.0.2
+pkgrel=0
+pkgdesc="ANSI terminal color manipulation for Lua"
+url="https://github.com/kikito/ansicolors.lua"
+license="MIT"
+arch="all"
+makedepends="luarocks"
+options="!check" # Test dependencies not available
+source="$_rockname-$pkgver.tar.gz::https://github.com/kikito/$_rockname.lua/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_rockname.lua-$pkgver"
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev luarocks$_v"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+build() {
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver..."
+
+ luarocks-$lver \
+ --deps-mode=none \
+ LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \
+ LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \
+ make --tree="./build" \
+ "$_rockname-${pkgver%??}-1.rockspec"
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+
+ local path; for path in "lib/luarocks/rocks-$lver" "share/lua/$lver"; do
+ mkdir -p "$subpkgdir/usr/${path%/*}"
+ mv "$builddir/build/$path" "$subpkgdir/usr/$path/"
+ done
+}
+sha512sums="d7052fc63ec09076c0fa940f506fa06ebd210cf590f35310a21c80062cbf062b6d2607c3f89b8dbb39377793e25ea11f471101913e620a7566957e7ed7efbb04 ansicolors-1.0.2.tar.gz"