Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/mc/
Date: Sun, 27 Mar 2022 20:04:04
Message-Id: 1648411432.8bbc36263ca99059242651049cc3de7e41f1136f.polynomial-c@gentoo
1 commit: 8bbc36263ca99059242651049cc3de7e41f1136f
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 27 20:02:16 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 27 20:03:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bbc3626
7
8 app-misc/mc: Bump to version 4.8.28
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 app-misc/mc/Manifest | 1 +
13 app-misc/mc/mc-4.8.28.ebuild | 124 +++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 125 insertions(+)
15
16 diff --git a/app-misc/mc/Manifest b/app-misc/mc/Manifest
17 index 24aa91127356..3bd448e40db0 100644
18 --- a/app-misc/mc/Manifest
19 +++ b/app-misc/mc/Manifest
20 @@ -1 +1,2 @@
21 DIST mc-4.8.27.tar.xz 2510296 BLAKE2B efb0f3a8beb7285a793085a8e3b3a49619d0f8a4babff7de90f7a462cf6c013bbc08b92bc48e2c2e2204799332cd0160a86e201d9368cabde78e653b4306763f SHA512 c955d66cee06e3a0e0c795f2f6b98b184762363390a903cf8ef83dc5e98e6e94d5a9c06c4788d9ff4b3ae111541df8c7dc0b864a5c21c40421a81cd8690e9a69
22 +DIST mc-4.8.28.tar.xz 2333072 BLAKE2B f4218e6c166df85b7b3736f0fd1414c9507c72074f06001f12b114ce6c6fbbf3688ab850aa70f5063eb3920736f878e113eb39a5d261ccfc3ffa9dab473a8436 SHA512 ca3b3a57281e9387cb52bf1fcfc3f39a4d5f438aafc256dc492c192678824f67c983a852c759664efc5bc6d0de471c9b3929834f8301f6302ca1ebeee513fdfd
23
24 diff --git a/app-misc/mc/mc-4.8.28.ebuild b/app-misc/mc/mc-4.8.28.ebuild
25 new file mode 100644
26 index 000000000000..3b62f454f445
27 --- /dev/null
28 +++ b/app-misc/mc/mc-4.8.28.ebuild
29 @@ -0,0 +1,124 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +inherit autotools flag-o-matic
36 +
37 +MY_P="${P/_/-}"
38 +SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
39 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
40 +
41 +DESCRIPTION="GNU Midnight Commander is a text based file manager"
42 +HOMEPAGE="https://midnight-commander.org"
43 +
44 +LICENSE="GPL-3"
45 +SLOT="0"
46 +IUSE="+edit gpm nls sftp +slang spell test unicode X"
47 +
48 +REQUIRED_USE="spell? ( edit )"
49 +
50 +RDEPEND="
51 + >=dev-libs/glib-2.30.0:2
52 + gpm? ( sys-libs/gpm )
53 + kernel_linux? ( sys-fs/e2fsprogs )
54 + sftp? ( net-libs/libssh2 )
55 + slang? ( >=sys-libs/slang-2 )
56 + !slang? ( sys-libs/ncurses:=[unicode(+)?] )
57 + spell? ( app-text/aspell )
58 + X? (
59 + x11-libs/libX11
60 + x11-libs/libICE
61 + x11-libs/libXau
62 + x11-libs/libXdmcp
63 + x11-libs/libSM
64 + )
65 +"
66 +DEPEND="${RDEPEND}"
67 +BDEPEND="
68 + app-arch/xz-utils
69 + virtual/pkgconfig
70 + nls? ( sys-devel/gettext )
71 + test? ( dev-libs/check )
72 +"
73 +
74 +RESTRICT="!test? ( test )"
75 +
76 +S="${WORKDIR}/${MY_P}"
77 +
78 +PATCHES=(
79 + "${FILESDIR}"/${PN}-4.8.26-ncurses-mouse.patch
80 +)
81 +
82 +pkg_pretend() {
83 + if use slang && use unicode ; then
84 + ewarn "\"unicode\" USE flag only takes effect when the \"slang\" USE flag is disabled."
85 + fi
86 +}
87 +
88 +src_prepare() {
89 + default
90 + # patch touches configure.ac
91 + eautoreconf
92 +}
93 +
94 +src_configure() {
95 + [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
96 +
97 + local myeconfargs=(
98 + --enable-charset
99 + --enable-vfs
100 + --with-screen=$(usex slang 'slang' "ncurses$(usex unicode 'w' '')")
101 + $(use_enable kernel_linux vfs-undelfs)
102 + # Today mclib does not expose any headers and is linked to
103 + # single 'mc' binary. Thus there is no advantage of having
104 + # a library. Let's avoid shared library altogether
105 + # as it also conflicts with sci-libs/mc: bug #685938
106 + --disable-mclib
107 + $(use_enable nls)
108 + $(use_enable sftp vfs-sftp)
109 + $(use_enable spell aspell)
110 + $(use_enable test tests)
111 + $(use_with gpm gpm-mouse)
112 + $(use_with X x)
113 + $(use_with edit internal-edit)
114 + )
115 + econf "${myeconfargs[@]}"
116 +}
117 +
118 +src_test() {
119 + # Bug #759466
120 + if [[ ${EUID} == 0 ]] ; then
121 + ewarn "You are emerging ${PN} as root with 'userpriv' disabled."
122 + ewarn "Expect some test failures, or emerge with 'FEATURES=userpriv'!"
123 + fi
124 +
125 + # CK_FORK=no to avoid using fork() in check library
126 + # as mc mocks fork() itself: bug #644462.
127 + #
128 + # VERBOSE=1 to make test failures contain detailed
129 + # information.
130 + CK_FORK=no emake check VERBOSE=1
131 +}
132 +src_install() {
133 + emake DESTDIR="${D}" install
134 + dodoc AUTHORS NEWS README
135 +
136 + # fix bug #334383
137 + if use kernel_linux && [[ ${EUID} == 0 ]] ; then
138 + fowners root:tty /usr/libexec/mc/cons.saver
139 + fperms g+s /usr/libexec/mc/cons.saver
140 + fi
141 +}
142 +
143 +pkg_postinst() {
144 + if use spell && ! has_version app-dicts/aspell-en ; then
145 + elog "'spell' USE flag is enabled however app-dicts/aspell-en is not installed."
146 + elog "You should manually set 'spell_language' in the Misc section of ~/.config/mc/ini"
147 + elog "It has to be set to one of your installed aspell dictionaries or 'NONE'"
148 + elog
149 + fi
150 + elog "To enable exiting to latest working directory,"
151 + elog "put this into your ~/.bashrc:"
152 + elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
153 +}