zsh: Update to 5.4.1

This commit is contained in:
mashir43 2017-08-21 13:35:11 +09:00
parent 2e8ef71dc3
commit b9f5cf54b5
2 changed files with 64 additions and 86 deletions

View File

@ -2,14 +2,14 @@
pkgbase=zsh
pkgname=('zsh' 'zsh-doc')
pkgver=5.3.1
pkgrel=2
pkgver=5.4.1
pkgrel=1
arch=('i686' 'x86_64')
url='https://www.zsh.org/'
license=('custom')
makedepends=('ncurses-devel' 'pcre-devel' 'libiconv-devel' 'libgdbm-devel')
source=("https://downloads.sourceforge.net/project/zsh/zsh/${pkgver}/zsh-${pkgver}.tar.gz"
"https://downloads.sourceforge.net/project/zsh/zsh-doc/${pkgver}/zsh-${pkgver}-doc.tar.gz"
source=("https://downloads.sourceforge.net/project/zsh/zsh/${pkgver}/zsh-${pkgver}.tar.xz"{,.asc}
"https://downloads.sourceforge.net/project/zsh/zsh-doc/${pkgver}/zsh-${pkgver}-doc.tar.xz"{,.asc}
'config.guess::https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
'config.sub::https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
'zprofile'
@ -17,88 +17,87 @@ source=("https://downloads.sourceforge.net/project/zsh/zsh/${pkgver}/zsh-${pkgve
add-pwd-W-option.patch
msysize.patch
zsh-5.0.6-1.patch
msys-symlink-hack.patch
user-autocomplete.patch)
sha256sums=('3d94a590ff3c562ecf387da78ac356d6bea79b050a9ef81e3ecb9f8ee513040e'
'c16b66c7a3825836562033e562debcc87f89d0fc117e87e94cb1f4f17eb07841'
'794439fde1d86ebc688f622d7aac3b46497831de5c5e4c4ed43a604e5d6ead56'
'72e02ea93447038f8ced24f296b31e0f397bbcc6b32abdcf9b38c80f153433fd'
msys-symlink-hack.patch)
sha256sums=('94cbd57508287e8faa081424509738d496f5f41e32ed890e3a5498ce05d3633b'
'SKIP'
'b8b1a40aeec852806ad2b74b0a0c534320bf517e2fe2a087c0c9d39e75dc29f1'
'SKIP'
'74864f1132e27449adb18f2ace0a1d738efc412217ea538e9b4d3c61dda63e83'
'52d7418817df4a0bd139446cf014f9dfd5bb3406a95c3109ca6fd578068be472'
'230832038c3b8f67fdb1b284ac5f68d709cdb7f1bc752b0e60657b9b9d091045'
'95fbe7af62b22143911bbe691a79381bf00a35c7818a5418f6ee9eade1e4a690'
'b3f74a10a27eff498124adc96bc8c5cced7bb15e18c2603d7c3490a81e3c2e48'
'4c13a4b3685b04747c48e2d3c983ec1bf01094967e39c9cabef8c9029da6e6bf'
'336a8e6e93b778e7aec27348619b7200e0a75e5cf14dce720afd9dd6f836ea2c'
'de515b0d86c13c29a663b4ba0fdb338dea83f82f145cf8c4da78d30369f963e4'
'e46c88a8853d9a4440bc3ccc1b7c161a8788ea4b8acd1bfe24b1866f48850212')
'de515b0d86c13c29a663b4ba0fdb338dea83f82f145cf8c4da78d30369f963e4')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
cd ${srcdir}/${pkgname}-${pkgver}
patch -p0 -i "${srcdir}/Makefile.in.patch"
patch -p1 -i "${srcdir}/add-pwd-W-option.patch"
patch -p1 -i "${srcdir}/msysize.patch"
patch -p1 -i "${srcdir}/zsh-5.0.6-1.patch"
patch -p1 -i "${srcdir}/msys-symlink-hack.patch"
patch -p1 -i "${srcdir}/user-autocomplete.patch"
patch -p0 -i "${srcdir}/Makefile.in.patch"
patch -p1 -i "${srcdir}/add-pwd-W-option.patch"
patch -p1 -i "${srcdir}/msysize.patch"
patch -p1 -i "${srcdir}/zsh-5.0.6-1.patch"
patch -p1 -i "${srcdir}/msys-symlink-hack.patch"
autoreconf -fiv
autoreconf -fiv
mv -f ${srcdir}/config.guess ${srcdir}/config.sub ${srcdir}/${pkgname}-${pkgver}/
# Set correct keymap path
sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys
mv -f ${srcdir}/config.guess ${srcdir}/config.sub ${srcdir}/${pkgname}-${pkgver}/
# Set correct keymap path
sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys
# Remove unneeded and conflicting completion scripts
for _fpath in AIX BSD Cygwin Darwin Debian Mandriva openSUSE Redhat Solaris; do
rm -rf Completion/$_fpath
sed "s#\s*Completion/$_fpath/\*/\*##g" -i Src/Zle/complete.mdd
done
rm -f Completion/Linux/Command/_{pkgtool,rpmbuild,yast}
rm -f Completion/Unix/Command/_{osc,systemd}
# Remove unneeded and conflicting completion scripts
for _fpath in AIX BSD Cygwin Darwin Debian Mandriva openSUSE Redhat Solaris; do
rm -rf Completion/$_fpath
sed "s#\s*Completion/$_fpath/\*/\*##g" -i Src/Zle/complete.mdd
done
rm -f Completion/Linux/Command/_{pkgtool,rpmbuild,yast}
rm -f Completion/Unix/Command/_{osc,systemd}
}
build() {
cd ${srcdir}/${pkgname}-${pkgver}
cd ${srcdir}/${pkgname}-${pkgver}
./configure --prefix=/usr \
--build=${CHOST} \
--host=${CHOST} \
--docdir=/usr/share/doc/zsh \
--enable-etcdir=/etc/zsh \
--enable-zshenv=/etc/zsh/zshenv \
--enable-zlogin=/etc/zsh/zlogin \
--enable-zlogout=/etc/zsh/zlogout \
--enable-zprofile=/etc/zsh/zprofile \
--enable-zshrc=/etc/zsh/zshrc \
--enable-maildir-support \
--with-term-lib='ncursesw' \
--enable-multibyte \
--enable-function-subdirs \
--enable-fndir=/usr/share/zsh/functions \
--enable-scriptdir=/usr/share/zsh/scripts \
--with-tcsetpgrp \
--enable-pcre \
--disable-cap \
--enable-zsh-secure-free
make
./configure --prefix=/usr \
--build=${CHOST} \
--host=${CHOST} \
--docdir=/usr/share/doc/zsh \
--enable-etcdir=/etc/zsh \
--enable-zshenv=/etc/zsh/zshenv \
--enable-zlogin=/etc/zsh/zlogin \
--enable-zlogout=/etc/zsh/zlogout \
--enable-zprofile=/etc/zsh/zprofile \
--enable-zshrc=/etc/zsh/zshrc \
--enable-maildir-support \
--with-term-lib='ncursesw' \
--enable-multibyte \
--enable-function-subdirs \
--enable-fndir=/usr/share/zsh/functions \
--enable-scriptdir=/usr/share/zsh/scripts \
--with-tcsetpgrp \
--enable-pcre \
--disable-cap \
--enable-zsh-secure-free
make
}
package_zsh() {
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
depends=('ncurses' 'pcre' 'libiconv' 'gdbm')
backup=('etc/zsh/zprofile')
install=zsh.install
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
depends=('ncurses' 'pcre' 'libiconv' 'gdbm')
backup=('etc/zsh/zprofile')
install=zsh.install
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}/" install
install -D -m644 "${srcdir}/zprofile" "${pkgdir}/etc/zsh/zprofile"
install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}/" install
install -D -m644 "${srcdir}/zprofile" "${pkgdir}/etc/zsh/zprofile"
install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_zsh-doc() {
pkgdesc='Info, HTML and PDF format of the ZSH documentation'
install=zsh-doc.install
pkgdesc='Info, HTML and PDF format of the ZSH documentation'
install=zsh-doc.install
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}/" install.info
install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}/" install.info
install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -1,21 +0,0 @@
diff --git a/Src/utils.c b/Src/utils.c
index b3fa3d24c..0aeb85089 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1230,13 +1230,13 @@ adduserdir(char *s, char *t, int flags, int always)
* named directory, since these are sometimes used for
* special purposes.
*/
- nd->dir = ztrdup(t);
+ nd->dir = metafy(t, -1, META_DUP);
} else
- nd->dir = ztrduppfx(t, eptr - t);
+ nd->dir = metafy(t, eptr - t , META_DUP);
/* The variables PWD and OLDPWD are not to be displayed as ~PWD etc. */
if (!strcmp(s, "PWD") || !strcmp(s, "OLDPWD"))
nd->node.flags |= ND_NOABBREV;
- nameddirtab->addnode(nameddirtab, ztrdup(s), nd);
+ nameddirtab->addnode(nameddirtab, metafy(s, -1, META_DUP), nd);
}
/* Get a named directory: this function can cause a directory name *