summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralnsn <alnsn@pkgsrc.org>2016-06-06 21:31:52 +0000
committeralnsn <alnsn@pkgsrc.org>2016-06-06 21:31:52 +0000
commit76072e7184515312735d377e34141ab057725345 (patch)
tree4b75283652c4c969c4fe05ac2f392da100150c44
parent46d90f0fa87fa059562ca268b738b8f55e0cb2b6 (diff)
downloadpkgsrc-76072e7184515312735d377e34141ab057725345.tar.gz
Initial import of devel/lua-rocks version 2.3.0.
LuaRocks is a deployment and management system for Lua modules. It allows you to install Lua modules as self-contained packages called rocks, which also contain version dependency information. This information can be used both during installation, so that when one rock is requested all rocks it depends on are installed as well, and also optionally at run time, so that when a module is required, the correct version is loaded. LuaRocks supports both local and remote repositories, and multiple local rocks trees.
-rw-r--r--devel/lua-rocks/ALTERNATIVES2
-rw-r--r--devel/lua-rocks/DESCR9
-rw-r--r--devel/lua-rocks/Makefile48
-rw-r--r--devel/lua-rocks/PLIST71
-rw-r--r--devel/lua-rocks/distinfo8
-rw-r--r--devel/lua-rocks/patches/patch-Makefile24
-rw-r--r--devel/lua-rocks/patches/patch-Makefile.install.inc14
7 files changed, 176 insertions, 0 deletions
diff --git a/devel/lua-rocks/ALTERNATIVES b/devel/lua-rocks/ALTERNATIVES
new file mode 100644
index 00000000000..4a3b31a026f
--- /dev/null
+++ b/devel/lua-rocks/ALTERNATIVES
@@ -0,0 +1,2 @@
+bin/luarocks @PREFIX@/bin/luarocks-@LUADOTVER@
+bin/luarocks-admin @PREFIX@/bin/luarocks-admin-@LUADOTVER@
diff --git a/devel/lua-rocks/DESCR b/devel/lua-rocks/DESCR
new file mode 100644
index 00000000000..4fcc16a3587
--- /dev/null
+++ b/devel/lua-rocks/DESCR
@@ -0,0 +1,9 @@
+LuaRocks is a deployment and management system for Lua modules.
+
+It allows you to install Lua modules as self-contained packages
+called rocks, which also contain version dependency information.
+This information can be used both during installation, so that when
+one rock is requested all rocks it depends on are installed as
+well, and also optionally at run time, so that when a module is
+required, the correct version is loaded. LuaRocks supports both
+local and remote repositories, and multiple local rocks trees.
diff --git a/devel/lua-rocks/Makefile b/devel/lua-rocks/Makefile
new file mode 100644
index 00000000000..e2bb8c4c6e1
--- /dev/null
+++ b/devel/lua-rocks/Makefile
@@ -0,0 +1,48 @@
+# $NetBSD: Makefile,v 1.1.1.1 2016/06/06 21:31:52 alnsn Exp $
+
+DISTNAME= luarocks-2.3.0
+PKGNAME= ${DISTNAME:S/luarocks/${LUA_PKGPREFIX}-rocks/}
+CATEGORIES= devel
+MASTER_SITES= http://luarocks.org/releases/
+
+MAINTAINER= alnsn@NetBSD.org
+HOMEPAGE= http://luarocks.org/
+COMMENT= Deployment and management system for Lua modules
+LICENSE= mit
+
+USE_TOOLS+= curl:run # downloader (curl or wget)
+USE_TOOLS+= openssl:run # md5-checker (openssl or md5sum)
+
+.include "../../mk/bsd.prefs.mk"
+
+HAS_CONFIGURE= yes
+USE_LANGUAGES= # none
+
+REPLACE_LUA+= src/bin/luarocks src/bin/luarocks-admin
+
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+CONFIGURE_ARGS+= --rocks-tree=${PREFIX}/luarocks
+CONFIGURE_ARGS+= --with-lua=${PREFIX}
+CONFIGURE_ARGS+= --lua-suffix=${_LUA_DOT_VERSION}
+CONFIGURE_ARGS+= --lua-version=${_LUA_DOT_VERSION}
+CONFIGURE_ARGS+= --with-lua-include=${PREFIX}/${LUA_INCDIR}
+CONFIGURE_ARGS+= --versioned-rocks-dir
+CONFIGURE_ARGS+= --with-downloader=curl
+CONFIGURE_ARGS+= --with-md5-checker=openssl
+
+BUILD_TARGET= build
+MAKE_ENV+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR}
+
+PKG_SYSCONFSUBDIR= luarocks
+LUAROCKS_CONF= config-${_LUA_DOT_VERSION}.lua
+CONF_FILES= ${LUA_EXAMPLESDIR}/${LUAROCKS_CONF} \
+ ${PKG_SYSCONFDIR}/${LUAROCKS_CONF}
+
+# XXX Add subst rules to ../../lang/lua/xxx.mk
+PLIST_SUBST+= LUADOTVER=${_LUA_DOT_VERSION}
+FILES_SUBST+= LUADOTVER=${_LUA_DOT_VERSION}
+
+.include "../../lang/lua/application.mk"
+.include "../../lang/lua/module.mk"
+.include "../../mk/alternatives.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/lua-rocks/PLIST b/devel/lua-rocks/PLIST
new file mode 100644
index 00000000000..3b0d1b61c10
--- /dev/null
+++ b/devel/lua-rocks/PLIST
@@ -0,0 +1,71 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2016/06/06 21:31:52 alnsn Exp $
+bin/luarocks-${LUADOTVER}
+bin/luarocks-admin-${LUADOTVER}
+${LUA_EXAMPLESDIR}/config-${LUADOTVER}.lua
+${LUA_LDIR}/luarocks/add.lua
+${LUA_LDIR}/luarocks/admin_remove.lua
+${LUA_LDIR}/luarocks/build.lua
+${LUA_LDIR}/luarocks/build/builtin.lua
+${LUA_LDIR}/luarocks/build/cmake.lua
+${LUA_LDIR}/luarocks/build/command.lua
+${LUA_LDIR}/luarocks/build/make.lua
+${LUA_LDIR}/luarocks/cache.lua
+${LUA_LDIR}/luarocks/cfg.lua
+${LUA_LDIR}/luarocks/command_line.lua
+${LUA_LDIR}/luarocks/config_cmd.lua
+${LUA_LDIR}/luarocks/deps.lua
+${LUA_LDIR}/luarocks/dir.lua
+${LUA_LDIR}/luarocks/doc.lua
+${LUA_LDIR}/luarocks/download.lua
+${LUA_LDIR}/luarocks/fetch.lua
+${LUA_LDIR}/luarocks/fetch/cvs.lua
+${LUA_LDIR}/luarocks/fetch/git.lua
+${LUA_LDIR}/luarocks/fetch/git_file.lua
+${LUA_LDIR}/luarocks/fetch/git_http.lua
+${LUA_LDIR}/luarocks/fetch/git_https.lua
+${LUA_LDIR}/luarocks/fetch/hg.lua
+${LUA_LDIR}/luarocks/fetch/hg_http.lua
+${LUA_LDIR}/luarocks/fetch/hg_https.lua
+${LUA_LDIR}/luarocks/fetch/hg_ssh.lua
+${LUA_LDIR}/luarocks/fetch/sscm.lua
+${LUA_LDIR}/luarocks/fetch/svn.lua
+${LUA_LDIR}/luarocks/fs.lua
+${LUA_LDIR}/luarocks/fs/lua.lua
+${LUA_LDIR}/luarocks/fs/unix.lua
+${LUA_LDIR}/luarocks/fs/unix/tools.lua
+${LUA_LDIR}/luarocks/fs/win32.lua
+${LUA_LDIR}/luarocks/fs/win32/tools.lua
+${LUA_LDIR}/luarocks/help.lua
+${LUA_LDIR}/luarocks/index.lua
+${LUA_LDIR}/luarocks/install.lua
+${LUA_LDIR}/luarocks/lint.lua
+${LUA_LDIR}/luarocks/list.lua
+${LUA_LDIR}/luarocks/loader.lua
+${LUA_LDIR}/luarocks/make.lua
+${LUA_LDIR}/luarocks/make_manifest.lua
+${LUA_LDIR}/luarocks/manif.lua
+${LUA_LDIR}/luarocks/manif_core.lua
+${LUA_LDIR}/luarocks/new_version.lua
+${LUA_LDIR}/luarocks/pack.lua
+${LUA_LDIR}/luarocks/path.lua
+${LUA_LDIR}/luarocks/path_cmd.lua
+${LUA_LDIR}/luarocks/persist.lua
+${LUA_LDIR}/luarocks/purge.lua
+${LUA_LDIR}/luarocks/refresh_cache.lua
+${LUA_LDIR}/luarocks/remove.lua
+${LUA_LDIR}/luarocks/repos.lua
+${LUA_LDIR}/luarocks/require.lua
+${LUA_LDIR}/luarocks/search.lua
+${LUA_LDIR}/luarocks/show.lua
+${LUA_LDIR}/luarocks/site_config.lua
+${LUA_LDIR}/luarocks/tools/patch.lua
+${LUA_LDIR}/luarocks/tools/tar.lua
+${LUA_LDIR}/luarocks/tools/zip.lua
+${LUA_LDIR}/luarocks/type_check.lua
+${LUA_LDIR}/luarocks/unpack.lua
+${LUA_LDIR}/luarocks/upload.lua
+${LUA_LDIR}/luarocks/upload/api.lua
+${LUA_LDIR}/luarocks/upload/multipart.lua
+${LUA_LDIR}/luarocks/util.lua
+${LUA_LDIR}/luarocks/validate.lua
+${LUA_LDIR}/luarocks/write_rockspec.lua
diff --git a/devel/lua-rocks/distinfo b/devel/lua-rocks/distinfo
new file mode 100644
index 00000000000..ee4f9ee988f
--- /dev/null
+++ b/devel/lua-rocks/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2016/06/06 21:31:52 alnsn Exp $
+
+SHA1 (luarocks-2.3.0.tar.gz) = 5f1e1658ef8c7c9710fbc751cad79eb69ae2a891
+RMD160 (luarocks-2.3.0.tar.gz) = 883671495ba6399e3ab49f5a57506ecd6717f735
+SHA512 (luarocks-2.3.0.tar.gz) = 99f99ec59f663b3db22350946eb3357928c0e462ddcc7c3e5e0923e422c7ad6acffb0d2c95d1ec53526b08c33f2ae628276138e2daa7da077fd8de4b0b18eb15
+Size (luarocks-2.3.0.tar.gz) = 123787 bytes
+SHA1 (patch-Makefile) = 98e2844ac32d138eb3de371c89679a19effa9fcf
+SHA1 (patch-Makefile.install.inc) = 8f0208358ba720e67e331fce89d846084702af22
diff --git a/devel/lua-rocks/patches/patch-Makefile b/devel/lua-rocks/patches/patch-Makefile
new file mode 100644
index 00000000000..d9373cca371
--- /dev/null
+++ b/devel/lua-rocks/patches/patch-Makefile
@@ -0,0 +1,24 @@
+$NetBSD: patch-Makefile,v 1.1.1.1 2016/06/06 21:31:52 alnsn Exp $
+
+Install config-5.x.lua to LUA_EXAMPLESDIR. Do not undo REPLACE_LUA changes.
+
+--- Makefile.orig 2015-12-29 15:50:56.000000000 +0000
++++ Makefile
+@@ -9,7 +9,7 @@ SYSCONFDIR ?= $(PREFIX)/etc/luarocks
+ LUA_DIR ?= /usr/local
+ LUA_BINDIR ?= $(LUA_DIR)/bin
+
+-CONFIG_FILE = $(SYSCONFDIR)/config-$(LUA_VERSION).lua
++CONFIG_FILE = $(PREFIX)/$(LUA_EXAMPLESDIR)/config-$(LUA_VERSION).lua
+
+ SAFEPWD=`echo "$$PWD" | sed -e 's/\([][]\)\1/]]..'\''\1\1'\''..[[/g'`
+
+@@ -116,7 +116,7 @@ cleanup_bins:
+ for f in $(BIN_FILES) ;\
+ do \
+ mv src/bin/$$f src/bin/$$f.bak ;\
+- sed "s,^#!.*lua.*,#!/usr/bin/env lua,;/^package.path/d" < src/bin/$$f.bak > src/bin/$$f ;\
++ sed "/^package.path/d" < src/bin/$$f.bak > src/bin/$$f ;\
+ chmod +x src/bin/$$f ;\
+ rm -f src/bin/$$f.bak ;\
+ done
diff --git a/devel/lua-rocks/patches/patch-Makefile.install.inc b/devel/lua-rocks/patches/patch-Makefile.install.inc
new file mode 100644
index 00000000000..73e06274642
--- /dev/null
+++ b/devel/lua-rocks/patches/patch-Makefile.install.inc
@@ -0,0 +1,14 @@
+$NetBSD: patch-Makefile.install.inc,v 1.1.1.1 2016/06/06 21:31:52 alnsn Exp $
+
+Be pkg_alternatives(8) friendly.
+
+--- Makefile.install.inc.orig 2015-12-29 15:50:56.000000000 +0000
++++ Makefile.install.inc
+@@ -8,7 +8,6 @@ install_bins:
+ for f in $(BIN_FILES); \
+ do \
+ cp "$$f" "$(DESTDIR)$(BINDIR)/$$f-$$luaver"; \
+- ln -nfs "$$f-$$luaver" "$(DESTDIR)$(BINDIR)/$$f"; \
+ done
+
+ install_luas: