summaryrefslogtreecommitdiff
path: root/app-shells
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-16 08:53:45 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-16 08:53:45 +0000
commitd969fd257186a9d8083279276697f827331f0e46 (patch)
treea4fe23332c9c7bacf2bf53f2ceeeb5af501d373f /app-shells
parentd17fad940dac9897b8b58d2f1d072869942696a5 (diff)
gentoo auto-resync : 16:12:2023 - 08:53:44
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/Manifest.gzbin9626 -> 9625 bytes
-rw-r--r--app-shells/fzf/Manifest2
-rw-r--r--app-shells/fzf/fzf-0.44.0.ebuild2
-rw-r--r--app-shells/zsh/Manifest3
-rw-r--r--app-shells/zsh/files/zsh-5.9-c99.patch45
-rw-r--r--app-shells/zsh/files/zsh-5.9-relro.patch71
-rw-r--r--app-shells/zsh/zsh-5.9-r5.ebuild245
7 files changed, 366 insertions, 2 deletions
diff --git a/app-shells/Manifest.gz b/app-shells/Manifest.gz
index 3ab5f921e686..4969dd7872a2 100644
--- a/app-shells/Manifest.gz
+++ b/app-shells/Manifest.gz
Binary files differ
diff --git a/app-shells/fzf/Manifest b/app-shells/fzf/Manifest
index 1ca5cb13c787..e079855c73ad 100644
--- a/app-shells/fzf/Manifest
+++ b/app-shells/fzf/Manifest
@@ -7,5 +7,5 @@ DIST fzf-0.44.0-deps.tar.xz 16844060 BLAKE2B 33f85423868719cf86664a0fd7691c42c6e
DIST fzf-0.44.0.tar.gz 250927 BLAKE2B 3689d8843a4b008abc7b77e7b0fe7b681891c5f397ac7460c26ea303e04e7bb7dcb03af4012cfea12dd8c771c012a656e8bc65684941d66ebbb6533796d09ec2 SHA512 62084284a2329250e87f107900ffaddf94043274b1d9ede1dacdeed2e8ef87722c80708addd7907c35035e742645f5168776e5f0295d5695e9512acdbb43936c
EBUILD fzf-0.42.0-r1.ebuild 2049 BLAKE2B 3155efecc3fd0c671fd14afa9925e45b0a5d0cb958ca0fb45672a9a4a45e17bd3ba3babac8c911f324371437f3ca7d4bb8d33cd3cb2d7a969b6dbaa332db1b03 SHA512 1204ef113334ad3aaad7faaa4ea8e52c76c7a8693bc5c5a20f70a57aa5330a4100d407e0aae4ff522b390cad356a63e4f9285c44168a0fb8d4ad4e36953c38b7
EBUILD fzf-0.43.0.ebuild 1987 BLAKE2B 297c12249d52f548cdff98fc03b0b5788b3c4e59998558e0aed86c054d5e21be2cbc71f05bbffee67d3ac1fd699601aad6d8190a2f25eaf7fa1db1db14a08740 SHA512 02c1e8b1853b17ece3c3d8da3f6fc04ea98daf6f837ce94a88a8ecd22e71b5082b78870b0ef1a8a6faca9636ef468c28e879cbc566b47fcf219bd3a4687ebc48
-EBUILD fzf-0.44.0.ebuild 1989 BLAKE2B 3eca26d11f03c3968440d40017360a51533b65b2662a78d3e806ee1c40403268bcd45ed4bbc2da0841db6183f0eb46875dd8546f51a0e99609562e361c5b7ead SHA512 53d5b6e62ef263d8f2e1099b09ecffc1b819e4b8e1b912230524e52b67fc69dab6047bf608dd600fe4effca631536de84b91ac4e97611144c72f3247e0e48bb1
+EBUILD fzf-0.44.0.ebuild 1987 BLAKE2B 687fcdc261e83b4420c2983adbfb1314a845a9b4a7975495cace07f2c1626a03bc4e380366541a4d2521c4542432abcc5ad0819bb4d2bd05b0ad32cd10f248b1 SHA512 0f53a9e36b502abb5230510c6d74ee1960b0aa43a4219bebaa7bcd407352c7bae31fb0fc57f97aadb752560e0c9b17f8fd401ddc78f00d3450fe3479aecfad5f
MISC metadata.xml 469 BLAKE2B 3d6dcce756d040b715bbf17f33faea2c0ddd810857cb38289f59cab134a5b049d21db71c9c3844497643e1728ecd09a924a51ba273f736712543307f2b806d1a SHA512 21f3fef809b276da7f7ad33dbafefc2ebfa86b9ce9aa0dea664724c399a6743923a8a1825cffbd06d885181dc7b305d351e7ab77bd133abb98f601a84783f52f
diff --git a/app-shells/fzf/fzf-0.44.0.ebuild b/app-shells/fzf/fzf-0.44.0.ebuild
index 12bc25a2e10a..7abef5e1ee13 100644
--- a/app-shells/fzf/fzf-0.44.0.ebuild
+++ b/app-shells/fzf/fzf-0.44.0.ebuild
@@ -19,7 +19,7 @@ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar
LICENSE="MIT BSD-with-disclosure"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv x86"
src_prepare() {
default
diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest
index b5b50620865c..0f62287823b8 100644
--- a/app-shells/zsh/Manifest
+++ b/app-shells/zsh/Manifest
@@ -1,11 +1,14 @@
AUX prompt_gentoo_setup-1 817 BLAKE2B 37f6f7eae4602ca62b8bd8a01c442712903b5b1823959a58ef3bee41701e64d372dcf21fc2aa37421751349769605acedcca60e7b63328d662c96c42f7771485 SHA512 16298741c01755108234b7a6d4f5bca98a5033fa390c1796129368e11067f3f3884a3cb34629172d0cb3cf7eff35912149022de0ff6ea429e5327a71fc9a0aea
AUX zprofile-4 1314 BLAKE2B 8373d9f68613d5d44121c46a02dd7a5c988f4a3d948aa6bf96a9b0c5f67967f4b787b7ab346e7fabcdd8805321a89b63e6919d5abef082d24e4c46157c68e4db SHA512 5f87b4f0e59bb338f9aa8ec811424d37042ab5ad889aa00f6f912003b7aaaf8b3ea59746590c639a45facace0743deab89779ae5cee8ff6a39beda99864c9cf7
AUX zsh-5.3-init.d-gentoo.diff 1048 BLAKE2B 295e391679ef876a7bdaeaf6dc4b1b3a342c40f092f8cbeba137ee5ea6d26e16f988fc92f105bfcec739bc2aeca62195839b80dee337de8bfdfb5ff00a34fa22 SHA512 9f059cf4b99b7006955ab0ac43d4a4b4d762d193da9a738f771c562f2c3af3a9125694da59c584a3ff829598443e5429c873319ecd8fae2feba7096b597798dd
+AUX zsh-5.9-c99.patch 2942 BLAKE2B 712e976811a955f79c935ef9f50bdac1233addcafa78b14ca721a5d60f42c9e175e2f529131d57d9e2eecbfe0a7ae79cece8277b45b680de43c77a37504317e1 SHA512 89a472cd0c08869cee82049a26a7b434fc2b67f45e6450e552dac2c17c9df17b406584fa64a4b2ca91ce8a0470c303bce8080e43a37f7c643064db713bfbbf98
AUX zsh-5.9-clang-15-configure.patch 16672 BLAKE2B b139c130b4f25b2ff3a3d704f1c3e58fe3d8455fe7576c897796778e81236cd7d108a06a0e49b18cdbed9d0c87b20169ff06fd47c0bd4821e6a795931d3ab34e SHA512 40f6673022f3a82fc2779850b9d1c38b574a85abbad6c99562bf53235f394f71628d6029e0e4b3d0a9701d450e347743ae44529eb1de2160a57f5ad99d34e799
AUX zsh-5.9-do-not-use-egrep-in-tests.patch 4658 BLAKE2B 7ea45e76cbde716908c7e3d0e53951d91410087f8eb238f4781d070c44e53003afcd93053fdea4625ee556d6905f2e9b393381f7ccdca7883f292668aaf5687c SHA512 253ceac34d8e2ab9dec07ad99f17214b8ef79a12cc81158fd8e985706be6a45b7e6b3f65383c440bb6a3a14ced4a3e31a9f63dd2a2c0ada9f51b51959bbfb6dc
AUX zsh-5.9-musl-V09datetime-test-fix.patch 641 BLAKE2B 693f3caf1e98ba971d776f1afc40570eb9fedb95b0be9f676cc7aae0e4a2c60af1c95d90b7e675be5de5498d1b2e8af6e3bfb3410e3f4e81d3b6eabc0159fa01 SHA512 1a11e774b85b68065e49a3a9407f46c3fde1432ce5192a696aea66f5a6beb9a2430e71233d1c29b75f87ac0ba27173b450b8bc867f684eccd28db03b7dc71a09
+AUX zsh-5.9-relro.patch 2397 BLAKE2B 42dc7f483ad7f586b450fea41a884bd08d6edc5e5abd0ca023845ee00cc307b66bc3890a3b06a0d81f50fe4ece76f547f5efdfbb7813537fe32c0a3ba89ad5ab SHA512 35fdb43f7adf4c579f235beab6c924bc5977c5fef5e9945c86a6b0acef2ae435bbb08ea35bfbe286460c6df5fb26b24b7f8daa8daa288db6a3cad8b1948d329c
DIST zsh-5.9-doc.tar.xz 3130444 BLAKE2B 96b635b438f8a90bc1f3c15c8a287ab392ba830e975e49b7f1c09d12de44c250dcf33d1d6dc93b58693839af2e57eb5c9d4e874ca08dd82fe876cb5ca26e6508 SHA512 5cc6abcdcfb4f5ad7bc4a31364ca49dfd87ae03e0082d89cc2ba1f00570f6757266ee60894ad31b562408de91494c22f177b414b03cb78c31d92328686be9860
DIST zsh-5.9.tar.xz 3332400 BLAKE2B 3ecd6d080ff47b78d228d9bf5c1bafd3dfc602beb681ec533ce1039041d0e93143ebd7e0e73a9aed0789e27ca42d58a55f3b6e2c7d89113ab3ee99112dec46d1 SHA512 d9138b7f379ad942a5f46819d2dd52d31f3a1129f2a0d1b53d4c5cd43c318b60396da6d37c57c477b8e958fb750209aca0ae93f8c9dd42ac958de006a0ff067e
EBUILD zsh-5.9-r3.ebuild 6435 BLAKE2B a8f7b2986af71f78382d2885a9166b63cfe67fe144f57407e215ef6eea23552038c81e23392599b96b95f62ab5726f1d2b6595f3045fed3a5acc13d646beb486 SHA512 4281936a4a39508e4293a9e5a5b8714e23aef1b733741e5fa93f101af647444f03b08bbb90a0c4e9420618717bb917b1a978c2bc2f1e2c41e8fc5d80856c7989
EBUILD zsh-5.9-r4.ebuild 6638 BLAKE2B ebcd1be278338eaebbb2bbce4c6b54c7b81e2a0fcecd026a78a3b77de37015bcf549543a0665892274707a75510511e03c57efd33eddd12f8f4e4129e9497fc0 SHA512 5c9fb955dc89b057886184f6cc8c0c540548d51ccd65583307923f7ed4469802fc7ca6291c866d19696b04ab6dd36e22f5c88c501c7f89d7bced16b3737a3db9
+EBUILD zsh-5.9-r5.ebuild 6733 BLAKE2B 267c81a116adafcd2195da76cf70de7554743bb63e781ec994b37c0226873c78b7d84808a9030307ad032ac6444b9cd0a27ece4845b5b12d47cfcbd2db08ffb0 SHA512 10d5ce9c4e89d7fea844a5722572a62c8e3d4114d0736243a2f25ecc8831bacf9803714ee0805c176226cf30e183c5fb8ad758b71092d74f7e769aa81343da2e
MISC metadata.xml 685 BLAKE2B 4e9a3a03df89f28b2636ce9f08067f499054bfa1439eb76bca27654a823ef2e2af3d0e6fa46f6e64082b0b56661fccaac3a30db98a4d8a4060d5cb90871baa6a SHA512 cae2243e4d9748bd02315cce89d1df07d56f6d1f7d097e3cdf6d324c1fe656a87d03d248461bf17674a786c2acb4ee0b3e0e7cc602a53109de7c111f097f5a09
diff --git a/app-shells/zsh/files/zsh-5.9-c99.patch b/app-shells/zsh/files/zsh-5.9-c99.patch
new file mode 100644
index 000000000000..fad71a6a6c2b
--- /dev/null
+++ b/app-shells/zsh/files/zsh-5.9-c99.patch
@@ -0,0 +1,45 @@
+https://github.com/zsh-users/zsh/commit/4c89849c98172c951a9def3690e8647dae76308f
+https://bugs.gentoo.org/919001
+
+Avoid incompatible pointer types in terminfo global variable checks.
+Some compilers reject these incompatible pointer types, causing the
+checks to always fail, when these variables are in fact available.
+
+Submitted upstream: <https://www.zsh.org/mla/workers/2023/msg01112.html>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1769,27 +1769,27 @@ if test x$zsh_cv_path_term_header != xnone; then
+ fi
+
+ AC_MSG_CHECKING(if boolcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
+ AC_MSG_RESULT($boolcodes)
+
+ AC_MSG_CHECKING(if numcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
+ AC_MSG_RESULT($numcodes)
+
+ AC_MSG_CHECKING(if strcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
+ AC_MSG_RESULT($strcodes)
+
+ AC_MSG_CHECKING(if boolnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
+ AC_MSG_RESULT($boolnames)
+
+ AC_MSG_CHECKING(if numnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
+ AC_MSG_RESULT($numnames)
+
+ AC_MSG_CHECKING(if strnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
+ AC_MSG_RESULT($strnames)
+
+ dnl There are apparently defective terminal library headers on some
diff --git a/app-shells/zsh/files/zsh-5.9-relro.patch b/app-shells/zsh/files/zsh-5.9-relro.patch
new file mode 100644
index 000000000000..7475c7cb85a6
--- /dev/null
+++ b/app-shells/zsh/files/zsh-5.9-relro.patch
@@ -0,0 +1,71 @@
+https://src.fedoraproject.org/rpms/zsh/blob/rawhide/f/0003-zsh-fix-module-loading-problem-with-full-RELRO.patch
+https://github.com/zsh-users/zsh/commit/a84fdd7c8f77935ecce99ff2b0bdba738821ed79
+
+From a84fdd7c8f77935ecce99ff2b0bdba738821ed79 Mon Sep 17 00:00:00 2001
+From: Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
+Date: Mon, 26 Jun 2023 17:13:04 +0900
+Subject: [PATCH] 51889: fix module loading problem with full RELRO
+
+If full RELRO (relocation read-only, one of the security enhancement
+methods for ELF-based systems) is used when building zsh (as in binary
+packages of most Linuxes), loading a module (e.g. zsh/zftp) fails unless
+all the modules it depends on are already loaded. With this patch the
+necessary modules are automatically loaded.
+
+Upstream-commit: a84fdd7c8f77935ecce99ff2b0bdba738821ed79
+Signed-off-by: Lukáš Zaoral <lzaoral@redhat.com>
+---
+ Src/Modules/zftp.c | 2 +-
+ Src/mkbltnmlst.sh | 24 ++++++++++++++++++++++++
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
+index 49b3ffa89..47a5e9de9 100644
+--- a/Src/Modules/zftp.c
++++ b/Src/Modules/zftp.c
+@@ -3172,7 +3172,7 @@ static struct features module_features = {
+ int
+ setup_(UNUSED(Module m))
+ {
+- return (require_module("zsh/net/tcp", NULL, 0) == 1);
++ return 0;
+ }
+
+ /**/
+diff --git a/Src/mkbltnmlst.sh b/Src/mkbltnmlst.sh
+index c4611d8b3..067ecdaf9 100644
+--- a/Src/mkbltnmlst.sh
++++ b/Src/mkbltnmlst.sh
+@@ -76,6 +76,30 @@ for x_mod in $x_mods; do
+ test "x$linked" = xno && echo "#endif"
+ done
+
++# if dynamic module 'mod' with load=no has moddeps in its .mdd,
++# then output add_dep(mod, dep) for each 'dep' in moddeps.
++dyn_mods="`grep ' link=dynamic .* load=no ' $CFMOD | \
++ sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`"
++
++for mod in $dyn_mods; do
++ modfile="`grep '^name='$mod' ' $CFMOD | \
++ sed -e 's/^.* modfile=//' -e 's/ .*//'`"
++ if test "x$modfile" = x; then
++ echo >&2 "WARNING: no name for \`$mod' in $CFMOD (ignored)"
++ continue
++ fi
++ unset moddeps
++ . $srcdir/../$modfile
++ if test -n "$moddeps"; then
++ echo '#ifdef DYNAMIC'
++ echo "/* non-linked-in known module \`$mod' */"
++ for dep in $moddeps; do
++ echo " add_dep(\"$mod\", \"$dep\");"
++ done
++ echo '#endif'
++ fi
++done
++
+ echo
+ done_mods=" "
+ for bin_mod in $bin_mods; do
+--
+2.41.0
diff --git a/app-shells/zsh/zsh-5.9-r5.ebuild b/app-shells/zsh/zsh-5.9-r5.ebuild
new file mode 100644
index 000000000000..d81b45f6a42d
--- /dev/null
+++ b/app-shells/zsh/zsh-5.9-r5.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic prefix
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+
+SRC_URI="https://www.zsh.org/pub/${P}.tar.xz
+ https://www.zsh.org/pub/old/${P}.tar.xz
+ mirror://sourceforge/${PN}/${P}.tar.xz
+ doc? (
+ https://www.zsh.org/pub/${P}-doc.tar.xz
+ mirror://sourceforge/${PN}/${P}-doc.tar.xz
+ )"
+
+DESCRIPTION="UNIX Shell similar to the Korn shell"
+HOMEPAGE="https://www.zsh.org/"
+
+LICENSE="ZSH gdbm? ( GPL-2 )"
+SLOT="0"
+IUSE="caps debug doc examples gdbm maildir pcre static valgrind"
+
+# Next release should use pcre2: https://github.com/zsh-users/zsh/commit/b62e911341c8ec7446378b477c47da4256053dc0
+RDEPEND="
+ >=sys-libs/ncurses-5.1:0=
+ static? ( >=sys-libs/ncurses-5.7-r4:0=[static-libs] )
+ caps? ( sys-libs/libcap )
+ pcre? (
+ >=dev-libs/libpcre-3.9
+ static? ( >=dev-libs/libpcre-3.9[static-libs] )
+ )
+ gdbm? (
+ sys-libs/gdbm:=
+ static? ( sys-libs/gdbm:=[static-libs] )
+ )
+"
+DEPEND="sys-apps/groff
+ valgrind? ( dev-util/valgrind )
+ ${RDEPEND}"
+PDEPEND="
+ examples? ( app-doc/zsh-lovers )
+"
+if [[ ${PV} == *9999 ]] ; then
+ DEPEND+=" app-text/yodl
+ doc? (
+ sys-apps/texinfo
+ app-text/texi2html
+ virtual/latex-base
+ )"
+fi
+
+PATCHES=(
+ # Add openrc specific options for init.d completion
+ "${FILESDIR}"/${PN}-5.3-init.d-gentoo.diff
+ # Please refer gentoo bug #833981
+ "${FILESDIR}"/${PN}-5.9-musl-V09datetime-test-fix.patch
+ # bug #869539
+ "${FILESDIR}"/${PN}-5.9-clang-15-configure.patch
+ "${FILESDIR}"/${PN}-5.9-do-not-use-egrep-in-tests.patch
+ # bug #919001
+ "${FILESDIR}"/${PN}-5.9-c99.patch
+ "${FILESDIR}"/${PN}-5.9-relro.patch
+)
+
+src_prepare() {
+ if [[ ${PV} != *9999 ]]; then
+ # fix zshall problem with soelim
+ ln -s Doc man1 || die
+ mv Doc/zshall.1 Doc/zshall.1.soelim || die
+ soelim Doc/zshall.1.soelim > Doc/zshall.1 || die
+ fi
+
+ default
+
+ hprefixify configure.ac
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i "/^VERSION=/s@=.*@=${PV}@" Config/version.mk || die
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --bindir="${EPREFIX}"/bin
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --enable-etcdir="${EPREFIX}"/etc/zsh
+ --enable-runhelpdir="${EPREFIX}"/usr/share/zsh/${PV%_*}/help
+ --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/functions
+ --enable-site-fndir="${EPREFIX}"/usr/share/zsh/site-functions
+ --enable-function-subdirs
+ --with-tcsetpgrp
+ --enable-multibyte
+ --with-term-lib='tinfow ncursesw'
+ $(use_enable maildir maildir-support)
+ $(use_enable pcre)
+ $(use_enable caps cap)
+ $(use_enable gdbm)
+ $(use_enable valgrind zsh-valgrind)
+ )
+
+ if use static ; then
+ myconf+=( --disable-dynamic )
+ append-ldflags -static
+ fi
+ if use debug ; then
+ myconf+=(
+ --enable-zsh-debug
+ --enable-zsh-mem-debug
+ --enable-zsh-mem-warning
+ --enable-zsh-secure-free
+ --enable-zsh-hash-debug
+ )
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ myconf+=( --enable-libs=-liconv )
+ append-ldflags -Wl,-x
+ fi
+
+ econf "${myconf[@]}"
+
+ if use static ; then
+ # compile all modules statically, see Bug #27392
+ # removed cap and curses because linking failes
+ sed -e "s,link=no,link=static,g" \
+ -e "/^name=zsh\/cap/s,link=static,link=no," \
+ -e "/^name=zsh\/curses/s,link=static,link=no," \
+ -i "${S}"/config.modules || die
+ if ! use gdbm ; then
+ sed -i '/^name=zsh\/db\/gdbm/s,link=static,link=no,' \
+ "${S}"/config.modules || die
+ fi
+ fi
+}
+
+src_compile() {
+ default
+
+ if [[ ${PV} == *9999 ]] && use doc ; then
+ emake -C Doc everything
+ fi
+}
+
+src_test() {
+ # Fixes tests A03quoting.ztst B03print.ztst on musl
+ # Please refer:
+ # https://www.zsh.org/mla/workers/2021/msg00805.html
+ # Test E02xtrace fails on musl, so we are removing it.
+ # Closes: https://bugs.gentoo.org/833981
+ if use elibc_musl ; then
+ unset LC_ALL
+ unset LC_COLLATE
+ unset LC_NUMERIC
+ unset LC_MESSAGES
+ unset LANG
+ rm "${S}"/Test/E02xtrace.ztst || die
+ fi
+
+ # Breaks tests if inherited from environment.
+ unset TMPPREFIX
+
+ addpredict /dev/ptmx
+ local i
+ for i in C02cond.ztst V08zpty.ztst X02zlevi.ztst Y01completion.ztst Y02compmatch.ztst Y03arguments.ztst ; do
+ rm "${S}"/Test/${i} || die
+ done
+ emake check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install $(usex doc "install.info" "")
+
+ insinto /etc/zsh
+ export PREFIX_QUOTE_CHAR='"' PREFIX_EXTRA_REGEX="/EUID/s,0,${EUID},"
+ newins "$(prefixify_ro "${FILESDIR}"/zprofile-4)" zprofile
+
+ keepdir /usr/share/zsh/site-functions
+ insinto /usr/share/zsh/${PV%_*}/functions/Prompts
+ newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup
+
+ local i
+
+ # install miscellaneous scripts (bug #54520)
+ sed -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \
+ -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" \
+ -i {Util,Misc}/* || die
+ for i in Util Misc ; do
+ insinto /usr/share/zsh/${PV%_*}/${i}
+ doins ${i}/*
+ done
+
+ # install header files (bug #538684)
+ insinto /usr/include/zsh
+ doins config.h Src/*.epro
+ for i in Src/{zsh.mdh,*.h} ; do
+ sed -e 's@\.\./config\.h@config.h@' \
+ -e 's@#\(\s*\)include "\([^"]\+\)"@#\1include <zsh/\2>@' \
+ -i "${i}"
+ doins "${i}"
+ done
+
+ dodoc ChangeLog* META-FAQ NEWS README config.modules
+
+ if use doc ; then
+ pushd "${WORKDIR}/${PN}-${PV%_*}" >/dev/null
+ dodoc Doc/zsh.{dvi,pdf}
+ docinto html
+ dodoc Doc/*.html
+ popd >/dev/null
+ fi
+
+ docinto StartupFiles
+ dodoc StartupFiles/z*
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ echo
+ elog "If you want to enable Portage completions and Gentoo prompt,"
+ elog "emerge app-shells/gentoo-zsh-completions and add"
+ elog " autoload -U compinit promptinit"
+ elog " compinit"
+ elog " promptinit; prompt gentoo"
+ elog "to your ~/.zshrc"
+ echo
+ elog "Also, if you want to enable cache for the completions, add"
+ elog " zstyle ':completion::complete:*' use-cache 1"
+ elog "to your ~/.zshrc"
+ echo
+ elog "Note that a system zprofile startup file is installed. This will override"
+ elog "PATH and possibly other variables that a user may set in ~/.zshenv."
+ elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile"
+ elog "or other user startup files that are sourced after the system zprofile."
+ echo
+ elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells,"
+ elog "one method is to use a separate path-setting file that is conditionally sourced"
+ elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the"
+ elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/."
+ echo
+ elog "See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation."
+ echo
+ fi
+}