mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
164 lines
4.1 KiB
Bash
164 lines
4.1 KiB
Bash
SUMMARY="A very advanced and programmable command interpreter (shell) for UNIX"
|
|
DESCRIPTION="Zsh is a shell designed for interactive use, although it \
|
|
is also a powerful scripting language. Many of the useful features of \
|
|
bash, ksh, and tcsh were incorporated into zsh; plenty original features \
|
|
were added."
|
|
HOMEPAGE="https://www.zsh.org/"
|
|
COPYRIGHT="1992-2020 The Zsh Development Group"
|
|
LICENSE="ZSH
|
|
GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://downloads.sf.net/zsh/zsh-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5"
|
|
SOURCE_URI_2="https://downloads.sf.net/zsh/zsh-$portVersion-doc.tar.xz"
|
|
CHECKSUM_SHA256_2="6f7c091249575e68c177c5e8d5c3e9705660d0d3ca1647aea365fd00a0bd3e8a"
|
|
PATCHES="zsh-$portVersion.patchset"
|
|
ADDITIONAL_FILES="
|
|
zprofile
|
|
zshenv
|
|
zshrc
|
|
"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandBinDir=$binDir
|
|
commandSuffix=$secondaryArchSuffix
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
GLOBAL_WRITABLE_FILES="
|
|
settings/zsh directory keep-old
|
|
settings/zsh/zlogin
|
|
settings/zsh/zlogout
|
|
settings/zsh/zprofile keep-old
|
|
settings/zsh/zshenv keep-old
|
|
settings/zsh/zshrc keep-old
|
|
"
|
|
USER_SETTINGS_FILES="
|
|
settings/zsh directory
|
|
settings/zsh/.zlogin
|
|
settings/zsh/.zlogout
|
|
settings/zsh/.zprofile
|
|
settings/zsh/.zshenv
|
|
settings/zsh/.zshrc
|
|
"
|
|
|
|
PROVIDES="
|
|
zsh$secondaryArchSuffix = $portVersion compat >= 5
|
|
cmd:zsh$commandSuffix = $portVersion compat >= 5
|
|
cmd:zsh_$portVersion$commandSuffix = $portVersion compat >= 5
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libgdbm$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libncursesw$secondaryArchSuffix
|
|
lib:libpcre$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_doc="
|
|
zsh${secondaryArchSuffix}_doc = $portVersion
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgdbm$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libncursesw$secondaryArchSuffix
|
|
devel:libpcre$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:autoreconf
|
|
cmd:awk
|
|
cmd:col
|
|
cmd:find
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:grep
|
|
cmd:make
|
|
cmd:man
|
|
cmd:nroff
|
|
cmd:sed
|
|
cmd:texi2any >= 7
|
|
cmd:texi2dvi
|
|
cmd:texi2html
|
|
cmd:texi2pdf
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
# Remove unneeded and conflicting completion scripts
|
|
for _fpath in AIX BSD Cygwin Darwin Debian Linux Mandriva openSUSE Redhat Solaris; do
|
|
rm -rf Completion/$_fpath
|
|
sed "s#\s*Completion/$_fpath/\*/\*##g" -i Src/Zle/complete.mdd
|
|
done
|
|
# Disable these completions until Haiku support is added
|
|
for _fpath in _arp _beep _df _ifconfig _kill _mount _ps _renice _shutdown; do
|
|
rm -rf Completion/Unix/Command/$_fpath
|
|
done
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
cp -rut . "$sourceDir2/zsh-$portVersion"/*
|
|
|
|
export LIBS="-Wl,--as-needed -lnetwork -lbsd -lgnu"
|
|
export CPPFLAGS="-D_DEFAULT_SOURCE"
|
|
|
|
autoupdate
|
|
autoreconf -vfi
|
|
|
|
runConfigure --omit-dirs binDir ./configure \
|
|
--bindir=$commandBinDir \
|
|
--htmldir="$developDocDir/html" \
|
|
--enable-etcdir="$sysconfDir/zsh" \
|
|
--enable-zshenv="$sysconfDir/zsh/zshenv" \
|
|
--enable-zlogin="$sysconfDir/zsh/zlogin" \
|
|
--enable-zlogout="$sysconfDir/zsh/zlogout" \
|
|
--enable-zprofile="$sysconfDir/zsh/zprofile" \
|
|
--enable-zshrc="$sysconfDir/zsh/zshrc" \
|
|
--enable-maildir-support \
|
|
--with-term-lib='ncursesw' \
|
|
--enable-multibyte \
|
|
--enable-function-subdirs \
|
|
--enable-fndir="$sysconfDir/zsh/functions" \
|
|
--enable-scriptdir="$sysconfDir/zsh/scripts" \
|
|
--with-tcsetpgrp \
|
|
--enable-pcre \
|
|
--enable-cap \
|
|
--enable-zsh-secure-free \
|
|
--enable-dynamic
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
install -d -m 755 "$settingsDir/zsh"
|
|
|
|
# Source /etc/profile on startup, which contains important settings. Set PS1 to behave
|
|
# similarly to what's set in /etc/profile, but using zsh compatible syntax
|
|
# Keep dots in B_USER_SETTINGS_DIRECTORY, if the user hasn't got any
|
|
# dots in their home directory
|
|
install -m 644 \
|
|
"$portDir"/additional-files/zprofile \
|
|
"$portDir"/additional-files/zshenv \
|
|
"$portDir"/additional-files/zshrc \
|
|
"$settingsDir"/zsh
|
|
|
|
make install.html
|
|
install -t "$developDocDir" -m 644 Doc/*.pdf
|
|
packageEntries doc "$developDir"
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
mkdir -p "$sourceDir/fakehome"
|
|
|
|
HOME="$sourceDir/fakehome" make check
|
|
}
|