| 1 | # Wedge definition for zsh
|
| 2 | #
|
| 3 | # Loaded by deps/wedge.sh.
|
| 4 |
|
| 5 | set -o nounset
|
| 6 | set -o pipefail
|
| 7 | set -o errexit
|
| 8 |
|
| 9 | # sourced
|
| 10 | WEDGE_NAME='zsh'
|
| 11 |
|
| 12 | # Validate requested version against this list
|
| 13 | # The global variable WEDGE_VERSION gets SET after validation.
|
| 14 | WEDGE_VERSION_LIST='5.1.1 5.9'
|
| 15 |
|
| 16 | wedge-make() {
|
| 17 | local src_dir=$1
|
| 18 | local build_dir=$2
|
| 19 | local install_dir=$3
|
| 20 |
|
| 21 | # FIX for Github Actions, there's "no controlling tty", so add --with-tcsetpgrp
|
| 22 | # https://www.linuxfromscratch.org/blfs/view/7.5/postlfs/zsh.html
|
| 23 |
|
| 24 | # Fedora has a conflict with zsh/Src/Modules/termcap.c and
|
| 25 | # /usr/include/term.h
|
| 26 | # Happens from zsh 5.1.1 all the way to zsh 5.9.
|
| 27 | # This doesn't happen on Debian/Ubuntu.
|
| 28 |
|
| 29 | # This creates config.modules
|
| 30 |
|
| 31 | # 2025-10:
|
| 32 | # CFLAGS="-Wno-error=incompatible-pointer-types" added for zsh 5.1.1 on GCC 15 (Arch/Fedora)
|
| 33 | # zsh 5.9 probably doesn't need it?
|
| 34 |
|
| 35 | time $src_dir/configure \
|
| 36 | --disable-dynamic --with-tcsetpgrp \
|
| 37 | --prefix=$install_dir \
|
| 38 | CFLAGS="-Wno-error=incompatible-pointer-types"
|
| 39 |
|
| 40 | # For some reason the regex module isn't included if we --disable-dynamic?
|
| 41 | # name=zsh/regex modfile=Src/Modules/regex.mdd link=no
|
| 42 | # ->
|
| 43 | # name=zsh/regex modfile=Src/Modules/regex.mdd link=static
|
| 44 |
|
| 45 | # INSTALL says I need this after editing config.modules.
|
| 46 | sed -i 's/regex.mdd link=no/regex.mdd link=static/' config.modules
|
| 47 | make prep
|
| 48 |
|
| 49 | time make
|
| 50 | # make test?
|
| 51 | }
|
| 52 |
|
| 53 | wedge-install() {
|
| 54 | local build_dir=$1
|
| 55 |
|
| 56 | pushd $build_dir
|
| 57 |
|
| 58 | #time make install-strip
|
| 59 | time make install
|
| 60 |
|
| 61 | popd
|
| 62 | }
|
| 63 |
|
| 64 | wedge-smoke-test() {
|
| 65 | local install_dir=$1
|
| 66 |
|
| 67 | $install_dir/bin/zsh -c 'echo "hi from zsh"'
|
| 68 |
|
| 69 | # Create symlinks for use in spec tests
|
| 70 | pushd $install_dir/bin
|
| 71 | ln -s -f -v zsh zsh-$WEDGE_VERSION
|
| 72 | popd
|
| 73 | }
|