diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-10-09 04:26:33 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-10-09 04:26:33 +0100 |
commit | 6ee17dd82a3bcd0e90af4ebfbb3e411d342761be (patch) | |
tree | 5ade54018efa76614b79d832bbe15a22021b6d8c /app-misc/mc | |
parent | 325837835fc86686829aaa6acace3d3c06c74cea (diff) |
gentoo auto-resync : 09:10:2024 - 04:26:32
Diffstat (limited to 'app-misc/mc')
-rw-r--r-- | app-misc/mc/Manifest | 2 | ||||
-rw-r--r-- | app-misc/mc/files/mc-4.8.32-fix-chdir.patch | 129 | ||||
-rw-r--r-- | app-misc/mc/mc-4.8.32-r1.ebuild | 140 |
3 files changed, 271 insertions, 0 deletions
diff --git a/app-misc/mc/Manifest b/app-misc/mc/Manifest index 2224205b3971..b5705f763d69 100644 --- a/app-misc/mc/Manifest +++ b/app-misc/mc/Manifest @@ -4,11 +4,13 @@ AUX mc-4.8.30-fish_fix_broken_national_characters.patch 2236 BLAKE2B 4d1b018106c AUX mc-4.8.30-mcdiff-segfault.patch 1534 BLAKE2B ff3904f22a3f46251833f259255abd15015d47fed685447fb7f42b4d8adc042adb3104b4e41c2bedc0552335e681ca5df7404cd9cd0e4066a8a84714faa718c2 SHA512 41aa773416a3bd2f035ed584b6179f237b216010bd541b1a881f95f25eb5d05abbe721af2ae3c64dc39916525ff284cf0c5bf2ddde89e4bcf3647f7c5cad4e2d AUX mc-4.8.30-musl-tests.patch 300 BLAKE2B 52dff36517ccd7643cf594e556b0f315081ed39d01735f6da351bdf3dadc70ce1b14e8320b5edb08a8ae1a2db533f1bea60ef6bb1c37bc24a80a0c671384349d SHA512 73b32f64c5976a1b4518d2cdb8c802d9a93c71aab3781c6edfc731d7088ac67e3a09687bc1cce8a3597117b333e13ba96c50c4b26a21f5ad4c81aa76f03cfb41 AUX mc-4.8.31-musl-tests.patch 1979 BLAKE2B 33e3a27b1063f254e015129a8b7544b6f5c97492b886b0ba9f51166be41b1bcfc118288047a7faac64b7ee948c9cfbb61943ab7699670cfcc5e606cbbd50ac38 SHA512 b1bdecffe89a63e3a9bd19eef63db169a3adf96c3643d9bc8cd2101d8ec23c267b283449d2e164ff67df0551fbe7c48f45e00a38ebb3f513ef0c0b0f6baaf449 +AUX mc-4.8.32-fix-chdir.patch 3915 BLAKE2B d6e1a46b4ac8e9db8da309976be5fe3727ca4910a6543e14972e71afa284748b14ecaba1405fc6f86d4c6155d6d0e52779e4b13f8ed9c10ffa32652d768083d9 SHA512 847d9ee8a7d7468b2c17e376bbb82b1e90a18d25d835eebf31845da6124de037a5a8c87fb3291652cd327faf1d04bf7d7e94bb098db85c010b4e9596356d5742 DIST mc-4.8.30.tar.xz 2380824 BLAKE2B 2bf759314abae39db7596426cba22f6eaac0efc58e7025f1a7ef1863496ea7a3c00d298d101123b9defb109e76e31fe988227fb5c1112e06051b3c7a5b3dc1b6 SHA512 f793f744eaff236c9952d477236dd775a24d9ddd7ff46940bfe2d06da5596bed91d6bd9c85250696da6dcdc0a1890dc01c736654df3f59039674eff38e12e68e DIST mc-4.8.31.tar.xz 2385632 BLAKE2B aa8406d7d68a7466f662f83730dfc157f6e4f444b62284d9b71ea12def333996e298352f94526a3eb85491030f62373cf8d5621e449a7abf1fb5267a13a396fe SHA512 dc2272a0016ed782eafc78efda575b04d064ffa7984a146f3389dea81f4c7886647e7d1f097b547f7ae00190c10e35979a24400a6bb936c023f190a82934c12d DIST mc-4.8.32.tar.xz 2385648 BLAKE2B eb2ac2474c86dbcfe43b4f229cdc458bdfc9de2acf1d0206198721b56ec188010aba24063c1fc079ada295c73ab915786749be1ead599a582832ca649b9a8347 SHA512 f7f46e4f065331ede638a79c821ab5ef65952ba99cf71710d4282efa9ed7de75f06c786a8f8feb27d487417f438a48959439b40bb6456eb64796d46518a3f4a8 EBUILD mc-4.8.30-r1.ebuild 3223 BLAKE2B c9fea0e19733cc8608c97e94ab2855a533e354e59bb9fecd2d7c0dd386d03094bcc36db479775b0ef6099d5dcc0417a9facf7bfe31873b5acc464178471ff841 SHA512 ef1ead28d300d64e396b979a33c528abcc23e473f6136f614acaa5c6f1b85112d1d26db6552db924aa6199684c16f5eeec35e0ed4788a35c8b7a5bdb9b14a267 EBUILD mc-4.8.30-r2.ebuild 3331 BLAKE2B 755c9cefdd530fae6614c65f7138dab9354260eaf5d25faeb815dc90836c1f631e6896e7fa4a51d781bb8a2f54b573cb19f070d06447491994ec0e0c0ae72158 SHA512 768de0ef01537742dbac911235d50b282a0487be6decac311a2bc3b8008c480ffbfd503c5b34d3a9f92a7914cd2d67f106d52e51c6d073b9ca119de49fcaf9d3 EBUILD mc-4.8.31.ebuild 3516 BLAKE2B f6e992a30c0ad59747d5cd9c8a96dc48579390cc0f3ed6f2e00d08a11ccc868cedb69714d1d368efec48d335b30114f9f429d8e0b1ddd15ae375697a58107a33 SHA512 c35b165a9ca27bbbb9bf2a41f079250ef0da78b768f50358dad50ccc74a7ac58a3f4b95cee07421060dc00608225ea396c8f0072f2e2af57ca089b89cffc2674 +EBUILD mc-4.8.32-r1.ebuild 3579 BLAKE2B 6195960e98c64cf1730c1c2305937b94b96209daa33cb6fa572181c9342fe604345cbc4037bf88e241ebd1270f7bfd5cfd0b98f04e5df71c09cdb44384a1ccbd SHA512 62a75c887c11db618bf3f262e631ac838cff7a61fc2f3c5e75ac559039c4cc3bb37b3a2ff0c22c11b723226afa3d1a0cb900c38e4a01578cefd3c98d5a5298a9 EBUILD mc-4.8.32.ebuild 3538 BLAKE2B c64e5884755a371c72ba092eaef81464469f635082f5faf755c6d833b565aaa8d547935ca370ab3be4461263ef0e91a2390503fd0e8196468eedc21c5ca91854 SHA512 5caecccf6565b124e8d21d7a3f69979ae0589dcd8c824cd49527aee91485de682625502c7ab6853ed99f316d1df8c16be2a58e082016bf45d76e95546d87516e MISC metadata.xml 675 BLAKE2B 706055e17dfe81af1715d1e5ee101e6486d8a0f1fd7791fff17c7f42fdcb1c3a559416c8e413b4c7ab1db6dd9bf2d4b94f67e8cdd035933c38885ae6ca42f8f6 SHA512 a86533b06dc0f64efafda59aa795ed3a5a9bb027bd4c1145d4aedc2af84cb1d64244409a0bcc42d5bb4048ed07190c7f86ebc0c31aa55d95c8837fde676d9284 diff --git a/app-misc/mc/files/mc-4.8.32-fix-chdir.patch b/app-misc/mc/files/mc-4.8.32-fix-chdir.patch new file mode 100644 index 000000000000..9b74da211f73 --- /dev/null +++ b/app-misc/mc/files/mc-4.8.32-fix-chdir.patch @@ -0,0 +1,129 @@ +https://github.com/MidnightCommander/mc/commit/7a3a763f0ea07a825ca2af4642e31f9e358a9fd0 +https://bugs.gentoo.org/941099 +https://midnight-commander.org/ticket/4535 + +From e2d96fa802abebf888dcc2cc938cfd06abca8eb0 Mon Sep 17 00:00:00 2001 +From: "Yury V. Zaytsev" <yury@shurup.com> +Date: Sun, 1 Sep 2024 12:01:37 +0200 +Subject: [PATCH 1/3] Ticket #4575: adjust mc-wrapper to fit changes in #4535. + +Signed-off-by: Yury V. Zaytsev <yury@shurup.com> +--- a/contrib/mc-wrapper.csh.in ++++ b/contrib/mc-wrapper.csh.in +@@ -1,9 +1,9 @@ +-set MC_USER=`whoami` +- +-if ($?TMPDIR) then +- setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$ ++if ($?MC_TMPDIR) then ++ setenv MC_PWD_FILE "`mktemp '$MC_TMPDIR/mc.pwd.XXXXXX'`" ++else if ($?TMPDIR) then ++ setenv MC_PWD_FILE "`mktemp '$TMPDIR/mc.pwd.XXXXXX'`" + else +- setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$ ++ setenv MC_PWD_FILE "`mktemp '/tmp/mc.pwd.XXXXXX'`" + endif + + @bindir@/mc -P "$MC_PWD_FILE" $* +@@ -11,11 +11,10 @@ endif + if (-r "$MC_PWD_FILE") then + setenv MC_PWD "`cat '$MC_PWD_FILE'`" + if ("$MC_PWD" != "$cwd" && -d "$MC_PWD") then +- cd "$MC_PWD" ++ cd "$MC_PWD" || true + endif + unsetenv MC_PWD + endif + + rm -f "$MC_PWD_FILE" + unsetenv MC_PWD_FILE +-unsetenv MC_USER +--- a/contrib/mc-wrapper.sh.in ++++ b/contrib/mc-wrapper.sh.in +@@ -1,15 +1,20 @@ +-MC_USER=`whoami` +-MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$" ++if test -n "$MC_TMPDIR"; then ++ MC_PWD_FILE="`mktemp "${MC_TMPDIR}/mc.pwd.XXXXXX"`" ++elif test -n "$TMPDIR"; then ++ MC_PWD_FILE="`mktemp "${TMPDIR}/mc.pwd.XXXXXX"`" ++else ++ MC_PWD_FILE="`mktemp "/tmp/mc.pwd.XXXXXX"`" ++fi ++ + @bindir@/mc -P "$MC_PWD_FILE" "$@" + + if test -r "$MC_PWD_FILE"; then + MC_PWD="`cat "$MC_PWD_FILE"`" + if test -n "$MC_PWD" && test "$MC_PWD" != "$PWD" && test -d "$MC_PWD"; then +- cd "$MC_PWD" ++ cd "$MC_PWD" || true + fi + unset MC_PWD + fi + + rm -f "$MC_PWD_FILE" + unset MC_PWD_FILE +-unset MC_USER + +From a3ce493ae25f35f29919332d4794c17109f56901 Mon Sep 17 00:00:00 2001 +From: "Yury V. Zaytsev" <yury@shurup.com> +Date: Thu, 29 Aug 2024 12:13:40 +0200 +Subject: [PATCH 2/3] vfs: fix tempdir path building to account for trailing + slash on macOS + +Signed-off-by: Yury V. Zaytsev <yury@shurup.com> +--- a/lib/vfs/interface.c ++++ b/lib/vfs/interface.c +@@ -775,6 +775,7 @@ mc_tmpdir (void) + static const char *tmpdir = NULL; + const char *sys_tmp; + struct stat st; ++ gchar *template; + + /* Check if already correctly initialized */ + if (tmpdir != NULL && lstat (tmpdir, &st) == 0 && S_ISDIR (st.st_mode) && +@@ -789,7 +790,10 @@ mc_tmpdir (void) + sys_tmp = TMPDIR_DEFAULT; + } + +- g_snprintf (buffer, sizeof (buffer), "%s/mc-XXXXXX", sys_tmp); ++ template = g_build_filename (sys_tmp, "mc-XXXXXX", (char *) NULL); ++ g_strlcpy (buffer, template, sizeof (buffer)); ++ g_free (template); ++ + tmpdir = g_mkdtemp (buffer); + if (tmpdir != NULL) + g_setenv ("MC_TMPDIR", tmpdir, TRUE); +--- a/tests/lib/vfs/tempdir.c ++++ b/tests/lib/vfs/tempdir.c +@@ -45,6 +45,9 @@ + static void + setup (void) + { ++ /* Ensure that tests behave consistently irrespectively of the environment */ ++ g_unsetenv ("MC_TMPDIR"); ++ + str_init_strings (NULL); + + vfs_init (); + +From d081bc68aa6ad3ded515ea490118b0a38a1ec204 Mon Sep 17 00:00:00 2001 +From: "Yury V. Zaytsev" <yury@shurup.com> +Date: Mon, 2 Sep 2024 16:51:17 +0200 +Subject: [PATCH 3/3] main: remove `O_EXCL` for wd-file since creation is now + managed by wrapper + +Signed-off-by: Yury V. Zaytsev <yury@shurup.com> +--- a/src/main.c ++++ b/src/main.c +@@ -509,8 +509,7 @@ main (int argc, char *argv[]) + { + int last_wd_fd; + +- last_wd_fd = open (mc_args__last_wd_file, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, +- S_IRUSR | S_IWUSR); ++ last_wd_fd = open (mc_args__last_wd_file, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (last_wd_fd != -1) + { + ssize_t ret1; diff --git a/app-misc/mc/mc-4.8.32-r1.ebuild b/app-misc/mc/mc-4.8.32-r1.ebuild new file mode 100644 index 000000000000..4be0fffe14c4 --- /dev/null +++ b/app-misc/mc/mc-4.8.32-r1.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +MY_P="${P/_/-}" +DESCRIPTION="GNU Midnight Commander is a text based file manager" +HOMEPAGE="https://midnight-commander.org" +SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+edit gpm nls sftp +slang spell test unicode X" + +REQUIRED_USE="spell? ( edit )" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + >=dev-libs/glib-2.30.0:2 + gpm? ( sys-libs/gpm ) + kernel_linux? ( sys-fs/e2fsprogs[tools(+)] ) + sftp? ( net-libs/libssh2 ) + slang? ( >=sys-libs/slang-2 ) + !slang? ( sys-libs/ncurses:=[unicode(+)?] ) + spell? ( app-text/aspell ) + X? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + ) +" + +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) +" + +RDEPEND=" + ${DEPEND} + spell? ( app-dicts/aspell-en ) +" + +BDEPEND=" + app-arch/xz-utils + virtual/pkgconfig + nls? ( sys-devel/gettext ) + test? ( dev-libs/check ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.8.26-ncurses-mouse.patch + "${FILESDIR}"/${PN}-4.8.29-gentoo-tools.patch + "${FILESDIR}"/${P}-fix-chdir.patch +) + +# This is a check for AIX, on Linux mc uses statvfs() regardless of whether +# LFS64 interfaces are available in libc or not. +QA_CONFIG_IMPL_DECL_SKIP=( + statvfs64 +) + +src_prepare() { + default + + # Bug #906194, #922483 + if use elibc_musl; then + eapply "${FILESDIR}"/${PN}-4.8.30-musl-tests.patch + eapply "${FILESDIR}"/${PN}-4.8.31-musl-tests.patch + fi + + eautoreconf +} + +src_configure() { + [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket" + + local myeconfargs=( + --enable-charset + --enable-vfs + --with-screen=$(usex slang 'slang' "ncurses$(usex unicode 'w' '')") + $(use_enable kernel_linux vfs-undelfs) + # Today mclib does not expose any headers and is linked to + # single 'mc' binary. Thus there is no advantage of having + # a library. Let's avoid shared library altogether + # as it also conflicts with sci-libs/mc: bug #685938 + --disable-mclib + $(use_enable nls) + $(use_enable sftp vfs-sftp) + $(use_enable spell aspell) + $(use_enable test tests) + $(use_with gpm gpm-mouse) + $(use_with X x) + $(use_with edit internal-edit) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + # Bug #759466 + if [[ ${EUID} == 0 ]] ; then + ewarn "You are emerging ${PN} as root with 'userpriv' disabled." + ewarn "Expect some test failures, or emerge with 'FEATURES=userpriv'!" + fi + + # CK_FORK=no to avoid using fork() in check library + # as mc mocks fork() itself: bug #644462. + # + # VERBOSE=1 to make test failures contain detailed + # information. + CK_FORK=no emake check VERBOSE=1 +} + +src_install() { + emake DESTDIR="${D}" install + dodoc AUTHORS NEWS README + + # fix bug #334383 + if use kernel_linux && [[ ${EUID} == 0 ]] ; then + fowners root:tty /usr/libexec/mc/cons.saver + fperms g+s /usr/libexec/mc/cons.saver + fi +} + +pkg_postinst() { + elog "${PN} extension scripts depend on many external tools, install them as needed" + elog + if use spell && ! has_version app-dicts/aspell-en ; then + elog "'spell' USE flag is enabled however app-dicts/aspell-en is not installed." + elog "You should manually set 'spell_language' in the Misc section of ~/.config/mc/ini" + elog "It has to be set to one of your installed aspell dictionaries or 'NONE'" + elog + fi + elog "To enable exiting to latest working directory," + elog "put this into your ~/.bashrc:" + elog ". ${EPREFIX}/usr/libexec/mc/mc.sh" +} |