diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-18 03:03:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-18 03:03:03 +0000 |
commit | f9f6fa91738181ebe9aca71b75d157d8b5df5335 (patch) | |
tree | 556cf671790196d83709b89133064a855f1879f2 /app-shells/dash | |
parent | 3455c0a5153ae27d7c6c16ecd35fa3dec33f3dda (diff) |
gentoo auto-resync : 18:11:2024 - 03:03:03
Diffstat (limited to 'app-shells/dash')
-rw-r--r-- | app-shells/dash/Manifest | 3 | ||||
-rw-r--r-- | app-shells/dash/dash-0.5.12-r1.ebuild | 70 | ||||
-rw-r--r-- | app-shells/dash/files/dash-0.5.12-c23-lto.patch | 36 | ||||
-rw-r--r-- | app-shells/dash/files/dash-0.5.12-c23.patch | 150 |
4 files changed, 259 insertions, 0 deletions
diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest index 2cff6c098692..035f5bcdd103 100644 --- a/app-shells/dash/Manifest +++ b/app-shells/dash/Manifest @@ -1,4 +1,7 @@ +AUX dash-0.5.12-c23-lto.patch 1216 BLAKE2B ddb81f3ff7fddcf0a5f36a5a7fc550113067bec7891144820812018309db7763721a7b7ce2454ec0b34bc8fe6d4a3c6ec3f29b3604c2d4a2b8b644d9c7c8515d SHA512 14497f2b29e61e8b746176e024ff4874d695f34bd0937716ba5bdfbb58f3ffc525058acbdbe510902b06f4d90967e2e4814db0f0afb15d8fe4cf92bd9dbc577d +AUX dash-0.5.12-c23.patch 2698 BLAKE2B 5ec3e2837de25a4e264ecb1b0c1dd5bb9c6771767177e427e432faaa05848fc6689e6a1df0a73f306ef9e87af56e8740cb7adf953df8df5643dbe22a1e95765e SHA512 3255e5f0c7a1ca4b6f3093f649d1646899b9ff16a5290dd968e360f53c89d44877dc3f1cd1b4817f83af69cf27b7bff0384f43986d60c76cf3f0ddf1d14e43b5 DIST dash-0.5.12.tar.gz 246054 BLAKE2B f4c5e7088d7b591e0890a0e1363ef4f70074f4033ae34d3f82d71379cee78876e1e89b5d8e4afa3ce9380f8d94c3e8970c480a21257f87706112dd883667893e SHA512 13bd262be0089260cbd13530a9cf34690c0abeb2f1920eb5e61be7951b716f9f335b86279d425dbfae56cbd49231a8fdffdff70601a5177da3d543be6fc5eb17 +EBUILD dash-0.5.12-r1.ebuild 1744 BLAKE2B 37c2b2c3f9d4aca00cd23742a9d191ddcb11fbc95c6535fd65e30ee6fc3414394776d7c12b448b77cff0070e8d552dabfe08978857b59a4afda2dcd8fc5d99dc SHA512 5f0769a316eff983307904488af493f4c0ba244387175f215cde66a4fcfd2925b4ac3cc0a3e09a86686713e7661e075b0aa87e1f2624236ac16219160a6a3944 EBUILD dash-0.5.12.ebuild 1651 BLAKE2B c5b334bb4a05fcca99f1fda2303b4289a0603e9be96184cb6c07c3d043a696aa0a3d1cfd861e0566df1f5bdb2fd79c9a669cac587b142c8953c4a009dabf46bb SHA512 a8e20819dd898c89e7887fc07cd362e7e990af7feeba4aee8a93882adee3dd8e2dd7b0c23014ff1806475f0a00eed473b77b809b22ab1febd366412ab9c5ccf6 EBUILD dash-9999.ebuild 1659 BLAKE2B e0976bd26b62ab852ae4826ad5a22d10a1548f0ee0dca2605aa9f955bf171abb0269de6fc9b84964eb7ebbee19629cfd2ea3138430a4090f8e188206062f252d SHA512 aefb6ce20bca1d72d48b266f8d9ad2e847f33adfc603ca76dcd578be4ed7653db0fabe4a1b0014750d1a7f8d6e5604b76209c5b46dfd778002a6c46885809fbc MISC metadata.xml 491 BLAKE2B 3d08132186e59ebe99a373e66213bfbba27182568e7eecbf508746d0906f980e3ebfdf216435a92b5493c13d40046dae037792258386d37f3eebcaa153fb3bf3 SHA512 8b441641d69c13cc5aeb93ad447c387b85d4b1958b67673df6ac5867073e4f204e6e06e35f3b92083266539bf3a0b1ee568aa2aa502ff8b27b9e54bed18b4d84 diff --git a/app-shells/dash/dash-0.5.12-r1.ebuild b/app-shells/dash/dash-0.5.12-r1.ebuild new file mode 100644 index 000000000000..7695ee2933c2 --- /dev/null +++ b/app-shells/dash/dash-0.5.12-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Debian Almquist Shell" +HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dash/dash.git" + inherit autotools git-r3 +else + SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="libedit static" + +BDEPEND="virtual/pkgconfig" +RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" +DEPEND=" + ${RDEPEND} + libedit? ( static? ( dev-libs/libedit[static-libs] ) ) +" + +PATCHES=( + "${FILESDIR}"/${P}-c23.patch + "${FILESDIR}"/${PN}-0.5.12-c23-lto.patch +) + +src_prepare() { + default + + [[ ${PV} == 9999 ]] && eautoreconf + + # Use pkg-config for libedit linkage + sed -i \ + -e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \ + configure || die +} + +src_configure() { + if [[ ${CHOST} == *-solaris* ]] ; then + # don't redefine stat, open, dirent, etc. on Solaris + export ac_cv_func_stat64=yes + export ac_cv_func_open64=yes + fi + + if [[ ${CHOST} == powerpc-*-darwin* ]] ; then + sed -i -e 's/= stpncpy(s, \([^,]\+\), \([0-9]\+\))/+= snprintf(s, \2, "%s", \1)/' \ + src/jobs.c || die + fi + + use static && append-ldflags -static + + append-cppflags -DJOBS=$(usex libedit 1 0) + + # Do not pass --enable-glob due to #443552. + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + --bindir="${EPREFIX}"/bin + --enable-fnmatch + $(use_with libedit) + ) + + econf "${myeconfargs[@]}" +} diff --git a/app-shells/dash/files/dash-0.5.12-c23-lto.patch b/app-shells/dash/files/dash-0.5.12-c23-lto.patch new file mode 100644 index 000000000000..bd53b4ca18d9 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.12-c23-lto.patch @@ -0,0 +1,36 @@ +https://lore.kernel.org/dash/9f2a8ab063e595188df3fe0546484e5a8156318a.1731810617.git.sam@gentoo.org/ + +From 9f2a8ab063e595188df3fe0546484e5a8156318a Mon Sep 17 00:00:00 2001 +Message-ID: <9f2a8ab063e595188df3fe0546484e5a8156318a.1731810632.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Sun, 17 Nov 2024 02:28:07 +0000 +Subject: [PATCH] bltin: fix timescmd with C23 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With C23 and LTO, we get the following warning (or error if promoted to such): +``` +src/builtins.c:28:5: error: type of ‘timescmd’ does not match original declaration [-Werror=lto-type-mismatch] + 28 | int timescmd(int, char **); + | ^ +src/bltin/times.c:15:5: note: type mismatch in parameter 1 +src/bltin/times.c:15:5: note: type ‘void’ should match type ‘int’ +``` + +Make the two consistent. This didn't show up before because pre-C23 +had unprototyped functions. +--- a/src/bltin/times.c ++++ b/src/bltin/times.c +@@ -12,7 +12,7 @@ + #endif + #include "system.h" + +-int timescmd() { ++int timescmd(int argc, char *argv[]) { + struct tms buf; + long int clk_tck = sysconf(_SC_CLK_TCK); + int mutime, mstime, mcutime, mcstime; +-- +2.47.0 + diff --git a/app-shells/dash/files/dash-0.5.12-c23.patch b/app-shells/dash/files/dash-0.5.12-c23.patch new file mode 100644 index 000000000000..63716b6276ce --- /dev/null +++ b/app-shells/dash/files/dash-0.5.12-c23.patch @@ -0,0 +1,150 @@ +https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=b41b0d41228fe82991a63f475e0bef701f539db9 (rebased) +--- a/src/exec.c ++++ b/src/exec.c +@@ -769,12 +769,8 @@ typecmd(int argc, char **argv) + return err; + } + +-STATIC int +-describe_command(out, command, path, verbose) +- struct output *out; +- char *command; +- const char *path; +- int verbose; ++static int describe_command(struct output *out, char *command, ++ const char *path, int verbose) + { + struct cmdentry entry; + struct tblentry *cmdp; +@@ -875,10 +871,7 @@ out: + return 0; + } + +-int +-commandcmd(argc, argv) +- int argc; +- char **argv; ++int commandcmd(int argc, char **argv) + { + char *cmd; + int c; +--- a/src/jobs.c ++++ b/src/jobs.c +@@ -243,10 +243,7 @@ close: + #endif + + +-int +-killcmd(argc, argv) +- int argc; +- char **argv; ++int killcmd(int argc, char **argv) + { + extern char *signal_names[]; + int signo = -1; +--- a/src/mksignames.c ++++ b/src/mksignames.c +@@ -360,9 +360,7 @@ initialize_signames () + } + } + +-void +-write_signames (stream) +- FILE *stream; ++void write_signames(FILE *stream) + { + register int i; + +--- a/src/nodes.c.pat ++++ b/src/nodes.c.pat +@@ -87,18 +87,14 @@ copyfunc(union node *n) + + + +-STATIC void +-calcsize(n) +- union node *n; ++static void calcsize(union node *n) + { + %CALCSIZE + } + + + +-STATIC void +-sizenodelist(lp) +- struct nodelist *lp; ++static void sizenodelist(struct nodelist *lp) + { + while (lp) { + funcblocksize += SHELL_ALIGN(sizeof(struct nodelist)); +@@ -109,9 +105,7 @@ sizenodelist(lp) + + + +-STATIC union node * +-copynode(n) +- union node *n; ++static union node *copynode(union node *n) + { + union node *new; + +@@ -120,9 +114,7 @@ copynode(n) + } + + +-STATIC struct nodelist * +-copynodelist(lp) +- struct nodelist *lp; ++static struct nodelist *copynodelist(struct nodelist *lp) + { + struct nodelist *start; + struct nodelist **lpp; +@@ -142,9 +134,7 @@ copynodelist(lp) + + + +-STATIC char * +-nodesavestr(s) +- char *s; ++static char *nodesavestr(char *s) + { + char *rtn = funcstring; + +--- a/src/options.c ++++ b/src/options.c +@@ -389,9 +389,7 @@ setcmd(int argc, char **argv) + } + + +-void +-getoptsreset(value) +- const char *value; ++void getoptsreset(const char *value) + { + shellparam.optind = number(value) ?: 1; + shellparam.optoff = -1; +--- a/src/redir.c ++++ b/src/redir.c +@@ -281,18 +281,12 @@ ecreate: + } + + +-STATIC void + #ifdef notyet +-dupredirect(redir, f, memory) ++static void dupredirect(union node *redir, int f, char memory[10]) + #else +-dupredirect(redir, f) ++static void dupredirect(union node *redir, int f) + #endif +- union node *redir; +- int f; +-#ifdef notyet +- char memory[10]; +-#endif +- { ++{ + int fd = redir->nfile.fd; + int err = 0; + |