diff options
author | Felix Neumärker | 2019-08-02 15:39:37 +0200 |
---|---|---|
committer | Felix Neumärker | 2019-08-02 15:39:37 +0200 |
commit | 9c274272ef224e8d1ac3308f52606203794ad193 (patch) | |
tree | 61a59f28deaca4b78b865945b73dba95f054050c | |
parent | 733cc71b031514ed4402707efab8cc93b0402088 (diff) | |
download | aur-9c274272ef224e8d1ac3308f52606203794ad193.tar.gz |
bump to 4.3.0
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | moduleshome.patch | 13 | ||||
-rw-r--r-- | zshcomp.patch | 90 |
4 files changed, 36 insertions, 110 deletions
@@ -1,6 +1,6 @@ pkgbase = env-modules pkgdesc = Provides for an easy dynamic modification of a user's environment via modulefile. - pkgver = 4.2.5 + pkgver = 4.3.0 pkgrel = 0 url = https://sourceforge.net/projects/modules/ install = env-modules.install @@ -12,10 +12,10 @@ pkgbase = env-modules conflicts = env-modules replaces = env-modules backup = etc/modules/init/modulerc - source = https://sourceforge.net/projects/modules/files/Modules/modules-4.2.5/modules-4.2.5.tar.gz - source = zshcomp.patch - md5sums = 1d0aeea49a86cba41f6fb0b701110eb1 - md5sums = 48195d9f1c157c17b5c07e3997739f9c + source = https://sourceforge.net/projects/modules/files/Modules/modules-4.3.0/modules-4.3.0.tar.gz + source = moduleshome.patch + md5sums = bc45aff23db73a38f635d3311c61ce16 + md5sums = 7e6bf66733845eb3705a0a19c029eed6 pkgname = env-modules @@ -1,6 +1,6 @@ # Maintainer: snafu pkgname=(env-modules) -pkgver=4.2.5 +pkgver=4.3.0 pkgrel=0 epoch= pkgdesc="Provides for an easy dynamic modification of a user's environment via modulefile." @@ -18,11 +18,11 @@ replaces=(env-modules) options=() install=env-modules.install changelog= -source=("https://sourceforge.net/projects/modules/files/Modules/modules-$pkgver/modules-$pkgver.tar.gz" zshcomp.patch) +source=("https://sourceforge.net/projects/modules/files/Modules/modules-$pkgver/modules-$pkgver.tar.gz" moduleshome.patch) noextract=() validpgpkeys=() -md5sums=('1d0aeea49a86cba41f6fb0b701110eb1' - '48195d9f1c157c17b5c07e3997739f9c') +md5sums=('bc45aff23db73a38f635d3311c61ce16' + '7e6bf66733845eb3705a0a19c029eed6') # Install locations: install_prefix=/usr @@ -36,18 +36,24 @@ backup=("${config_path:1}/${moduledir}/init/modulerc") prepare() { cd "modules-$pkgver" - # comment if you don't won't the zsh-completion patch or if it doesn't work for you - patch -p1 < ../zshcomp.patch + patch -p1 < ../moduleshome.patch } build() { cd "modules-$pkgver" ./configure \ - --prefix=/usr \ - --docdir=$install_prefix/share/doc/$moduledir \ - --initdir=$config_path/$moduledir/init \ - --modulefilesdir=$config_path/$moduledir/modulefiles \ + --prefix="" \ + --bindir=/usr/bin \ + --libdir=/usr/$(get_libdir) \ + --libexecdir=/usr/libexec \ + --etcdir=/etc \ + --initdir=/etc/modules/init \ + --datarootdir=/usr/share \ + --mandir=/usr/share/man \ + --docdir=/usr/share/doc \ + --vimdatadir=/usr/share/vim/vimfiles \ + --modulefilesdir=/etc/modules/modulefiles \ --disable-set-binpath \ --disable-set-manpath \ --enable-compat-version \ @@ -71,11 +77,8 @@ package() { _profiled="${pkgdir}${profiled}" mkdir -p "$_profiled" - ln -s ${config_path}/${moduledir}/init/profile.csh $_profiled/env-modules.csh - ln -s ${config_path}/${moduledir}/init/profile.sh $_profiled/env-modules.sh - - # Work around, since module needs <PREFIX>/init for autoinitialization - ln -s ..${config_path}/${moduledir}/init ${pkgdir}/usr/init + ln -s ../${moduledir}/init/profile.csh $_profiled/env-modules.csh + ln -s ../${moduledir}/init/profile.sh $_profiled/env-modules.sh # Keep up with old versions: ln -s ./perl.pm ${pkgdir}${config_path}/${moduledir}/init/perl diff --git a/moduleshome.patch b/moduleshome.patch new file mode 100644 index 000000000000..6b6c9cbe55c5 --- /dev/null +++ b/moduleshome.patch @@ -0,0 +1,13 @@ +diff --git a/modulecmd.tcl.in b/modulecmd.tcl.in +index 843e178..8e77ec7 100644 +--- a/modulecmd.tcl.in ++++ b/modulecmd.tcl.in +@@ -9066,7 +9066,7 @@ proc cmdModuleAutoinit {} { + pushMode load + + # default MODULESHOME +- setenv MODULESHOME @prefix@ ++ setenv MODULESHOME [file dirname @initdir@] + + # register command location + setenv MODULES_CMD [getAbsolutePath $::argv0] diff --git a/zshcomp.patch b/zshcomp.patch deleted file mode 100644 index eaaad5c807c1..000000000000 --- a/zshcomp.patch +++ /dev/null @@ -1,90 +0,0 @@ ---- a/init/zsh-functions/_module -+++ a/init/zsh-functions/_module -@@ -4,17 +4,35 @@ - # Zsh command-line completion for module - # Copyright (C) 2017 Xavier Delaruelle <xavier.delaruelle@cea.fr> - # -+# patched version: -+# - directory-wise completion -+# - --_module_avail() { -- module avail -t 2>&1 | sed ' -- /^-\+/d; /^\s*$/d; -- /->.*$/d; -- /:$/d; -- /:ERROR:/d; -- s#^\(.*\)/\(.\+\)(.*default.*)#\1\n\1\/\2#; -- s#(.*)$##g; -- s#\s*$##g; -- s#/*$##g;' -+function _module_completion () { -+ emulate -L zsh -+ local _module_path_prefix -+ local -a _module_search_path _module_type_d _module_type_f -+ _module_path_prefix=$(echo ${(q)words[$CURRENT]} | sed -ne 's#\(.*/\).*#\1#p') -+ _module_search_paths=(${^${(@s/:/)MODULEPATH}}/$_module_path_prefix) -+ -+ _module_type_d=() -+ _module_type_f=() -+ eval $(find $_module_search_paths -mindepth 1 -maxdepth 1 -not -name '.modulerc' -not -name '.version' -printf "_module_type_%Y+=${(q)_module_path_prefix}%P\n" 2> /dev/null) -+ -+ case "$@" in -+ dir) -+ compadd ${_module_type_d} -+ ;; -+ notloaded) -+ local -a _modules_loaded=(${=LOADEDMODULES//:/}) -+ compadd -q -S / ${_module_type_d} -+ compadd ${_module_type_f:|_modules_loaded} -+ ;; -+ *) -+ compadd -q -S / ${_module_type_d} -+ compadd ${_module_type_f} -+ ;; -+ esac - } - - _module_savelist() { -@@ -24,16 +42,13 @@ _module_savelist() { - /:ERROR:/d;' - } - --_module_not_yet_loaded() { -- _module_avail | sort | sed -E "\%^(${LOADEDMODULES//:/|})$%d" --} -+_module_all_mods() { -+ _module_completion -+ } - - - _module_avail_mods() { -- local -a avail_mods; -- avail_mods=(${$(_module_avail)}) -- -- _describe -t avail-mods 'available modulefiles' avail_mods && ret=0 -+ _module_completion dir - } - - _module_saved_colls() { -@@ -44,10 +59,8 @@ _module_saved_colls() { - } - - _module_notloaded_mods() { -- local -a not_yet_loaded_mods; -- not_yet_loaded_mods=(${$(_module_not_yet_loaded)}) -+ _module_completion notloaded - -- _describe -t avail-mods 'available modulefiles' not_yet_loaded_mods && ret=0 - } - - _module_loaded_mods() { -@@ -177,7 +190,7 @@ _module() { - '*:modulepath:_files -/' && ret=0 - ;; - (display|help|show|test|whatis|is-loaded|is-avail|info-loaded) -- _alternative 'avail-mods:modulefiles:{_module_avail_mods}' \ -+ _alternative 'avail-mods:modulefiles:{_module_all_mods}' \ - && ret=0 - ;; - (append-path|prepend-path) |