1 |
commit: ea77f8244a04828ac242fcc6d0e17e02acd0bb7d |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 5 12:44:16 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 5 12:44:16 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea77f824 |
7 |
|
8 |
app-misc/mc: live ebuild overhaul |
9 |
|
10 |
- EAPI-8 |
11 |
- Removed samba support (upstream removed it as well) |
12 |
- Synced with release ebuild |
13 |
|
14 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
15 |
|
16 |
app-misc/mc/mc-9999.ebuild | 45 +++++++++++++++++++++++++++++---------------- |
17 |
1 file changed, 29 insertions(+), 16 deletions(-) |
18 |
|
19 |
diff --git a/app-misc/mc/mc-9999.ebuild b/app-misc/mc/mc-9999.ebuild |
20 |
index 1d3a9867b94..efb7afe860f 100644 |
21 |
--- a/app-misc/mc/mc-9999.ebuild |
22 |
+++ b/app-misc/mc/mc-9999.ebuild |
23 |
@@ -1,18 +1,16 @@ |
24 |
# Copyright 1999-2021 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
-EAPI=7 |
28 |
+EAPI=8 |
29 |
|
30 |
+inherit flag-o-matic |
31 |
+ |
32 |
+MY_P="${P/_/-}" |
33 |
if [[ ${PV} = *9999* ]]; then |
34 |
+ inherit autotools git-r3 |
35 |
EGIT_REPO_URI="https://github.com/MidnightCommander/mc.git" |
36 |
- LIVE_ECLASSES="git-r3 autotools" |
37 |
- LIVE_EBUILD=yes |
38 |
-fi |
39 |
- |
40 |
-inherit flag-o-matic ${LIVE_ECLASSES} |
41 |
- |
42 |
-if [[ -z ${LIVE_EBUILD} ]]; then |
43 |
- SRC_URI="http://ftp.midnight-commander.org/${P}.tar.xz" |
44 |
+else |
45 |
+ SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz" |
46 |
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" |
47 |
fi |
48 |
|
49 |
@@ -21,14 +19,13 @@ HOMEPAGE="https://midnight-commander.org" |
50 |
|
51 |
LICENSE="GPL-3" |
52 |
SLOT="0" |
53 |
-IUSE="+edit gpm nls samba sftp +slang spell test unicode X" |
54 |
+IUSE="+edit gpm nls sftp +slang spell test unicode X" |
55 |
|
56 |
REQUIRED_USE="spell? ( edit )" |
57 |
|
58 |
RDEPEND=">=dev-libs/glib-2.26.0:2 |
59 |
gpm? ( sys-libs/gpm ) |
60 |
kernel_linux? ( sys-fs/e2fsprogs ) |
61 |
- samba? ( net-fs/samba ) |
62 |
sftp? ( net-libs/libssh2 ) |
63 |
slang? ( >=sys-libs/slang-2 ) |
64 |
!slang? ( sys-libs/ncurses:=[unicode(+)?] ) |
65 |
@@ -38,15 +35,18 @@ RDEPEND=">=dev-libs/glib-2.26.0:2 |
66 |
x11-libs/libXau |
67 |
x11-libs/libXdmcp |
68 |
x11-libs/libSM )" |
69 |
-DEPEND="${RDEPEND} |
70 |
+DEPEND="${RDEPEND}" |
71 |
+BDEPEND=" |
72 |
app-arch/xz-utils |
73 |
virtual/pkgconfig |
74 |
nls? ( sys-devel/gettext ) |
75 |
test? ( dev-libs/check ) |
76 |
- " |
77 |
+" |
78 |
|
79 |
RESTRICT="!test? ( test )" |
80 |
|
81 |
+S="${WORKDIR}/${MY_P}" |
82 |
+ |
83 |
pkg_pretend() { |
84 |
if use slang && use unicode ; then |
85 |
ewarn "\"unicode\" USE flag only takes effect when the \"slang\" USE flag is disabled." |
86 |
@@ -56,7 +56,15 @@ pkg_pretend() { |
87 |
src_prepare() { |
88 |
default |
89 |
|
90 |
- [[ -n ${LIVE_EBUILD} ]] && ./autogen.sh |
91 |
+ if [[ ${PV} == *9999* ]] ; then |
92 |
+ eautoreconf |
93 |
+ # taken from autogen.sh script |
94 |
+ xgettext --keyword=_ --keyword=N_ --keyword=Q_ --output=- \ |
95 |
+ $(find . -name '*.[ch]') | sed -ne '/^#:/{s/#://;s/:[0-9]*/\ |
96 |
+ /g;s/ //g;p;}' | grep -v '^$' | sort | uniq > po/POTFILES.in \ |
97 |
+ || die |
98 |
+ ./version.sh ${S} || die |
99 |
+ fi |
100 |
} |
101 |
|
102 |
src_configure() { |
103 |
@@ -73,7 +81,6 @@ src_configure() { |
104 |
# as it also conflicts with sci-libs/mc: bug #685938 |
105 |
--disable-mclib |
106 |
$(use_enable nls) |
107 |
- $(use_enable samba vfs-smb) |
108 |
$(use_enable sftp vfs-sftp) |
109 |
$(use_enable spell aspell) |
110 |
$(use_enable test tests) |
111 |
@@ -85,6 +92,12 @@ src_configure() { |
112 |
} |
113 |
|
114 |
src_test() { |
115 |
+ # Bug #759466 |
116 |
+ if [[ ${EUID} == 0 ]] ; then |
117 |
+ ewarn "You are emerging ${PN} as root with 'userpriv' disabled." |
118 |
+ ewarn "Expect some test failures, or emerge with 'FEATURES=userpriv'!" |
119 |
+ fi |
120 |
+ |
121 |
# CK_FORK=no to avoid using fork() in check library |
122 |
# as mc mocks fork() itself: bug #644462. |
123 |
# |
124 |
@@ -94,7 +107,7 @@ src_test() { |
125 |
} |
126 |
src_install() { |
127 |
emake DESTDIR="${D}" install |
128 |
- dodoc AUTHORS doc/{FAQ,NEWS,README} |
129 |
+ dodoc AUTHORS NEWS README |
130 |
|
131 |
# fix bug #334383 |
132 |
if use kernel_linux && [[ ${EUID} == 0 ]] ; then |