Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-ftp/ftp/, net-ftp/ftp/files/
Date: Sat, 25 Jun 2022 04:37:53
Message-Id: 1656131351.6cfdad620208e2b48ab0c22785ba9cf3c646cee6.sam@gentoo
1 commit: 6cfdad620208e2b48ab0c22785ba9cf3c646cee6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 25 04:27:19 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 25 04:29:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cfdad62
7
8 net-ftp/ftp: fix musl build; modernise
9
10 Closes: https://bugs.gentoo.org/832430
11 Thanks-to: Cristian Othón Martínez Vera <cfuga <AT> cfuga.mx>
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 .../ftp-0.17.34.0.2.5.1-musl-glob-brace.patch | 14 ++++++++++
15 net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild | 30 ++++++++++++++--------
16 2 files changed, 33 insertions(+), 11 deletions(-)
17
18 diff --git a/net-ftp/ftp/files/ftp-0.17.34.0.2.5.1-musl-glob-brace.patch b/net-ftp/ftp/files/ftp-0.17.34.0.2.5.1-musl-glob-brace.patch
19 new file mode 100644
20 index 000000000000..386af410e913
21 --- /dev/null
22 +++ b/net-ftp/ftp/files/ftp-0.17.34.0.2.5.1-musl-glob-brace.patch
23 @@ -0,0 +1,14 @@
24 +https://bugs.gentoo.org/832430
25 +
26 +See e.g. https://patchwork.kernel.org/project/selinux/patch/20180517051117.48454-5-jason@×××××××××.com/ too.
27 +--- a/ftp/cmds.h
28 ++++ b/ftp/cmds.h
29 +@@ -61,3 +61,7 @@
30 + void do_umask(int argc, char *argv[]);
31 + void idle_cmd(int argc, char *argv[]);
32 + void setpassive(void);
33 ++
34 ++#ifndef GLOB_BRACE
35 ++#define GLOB_BRACE 0
36 ++#endif
37 +
38
39 diff --git a/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild b/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild
40 index a25ce7b145e0..bbdb45b4f87b 100644
41 --- a/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild
42 +++ b/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild
43 @@ -3,7 +3,7 @@
44
45 EAPI=7
46
47 -inherit flag-o-matic toolchain-funcs
48 +inherit edo flag-o-matic toolchain-funcs
49
50 PATCH_VER="3"
51 MY_PN="netkit-ftp"
52 @@ -11,11 +11,13 @@ MY_PV="$(ver_cut 1-2)"
53 MY_P="netkit-${PN}-${MY_PV}"
54 DEB_PN="${MY_PN}-ssl"
55 DEB_PV="$(ver_cut 1-3)+$(ver_cut 4-5)-$(ver_cut 6-7)"
56 +
57 DESCRIPTION="Standard Linux FTP client"
58 HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
59 SRC_URI="ftp://sunsite.unc.edu/pub/Linux/system/network/netkit/${MY_P}.tar.gz
60 mirror://debian/pool/main/n/${DEB_PN}/${DEB_PN}_${DEB_PV}.debian.tar.xz
61 https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}-patches-${PATCH_VER}.tar.bz2"
62 +S="${WORKDIR}"/${MY_P}
63
64 LICENSE="BSD"
65 SLOT="0"
66 @@ -24,22 +26,23 @@ IUSE="ipv6 readline ssl"
67
68 RDEPEND="
69 >=sys-libs/ncurses-5.2:=
70 - readline? ( sys-libs/readline:0= )
71 - ssl? ( dev-libs/openssl:0= )
72 + elibc_musl? ( sys-libs/obstack-standalone )
73 + readline? ( sys-libs/readline:= )
74 + ssl? ( dev-libs/openssl:= )
75 "
76 DEPEND="${RDEPEND}"
77 BDEPEND="sys-apps/grep"
78
79 -S=${WORKDIR}/${MY_P}
80 -
81 src_prepare() {
82 local p
83 for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series || die); do
84 - eapply "${WORKDIR}/debian/patches/${p}"
85 + eapply "${WORKDIR}"/debian/patches/${p}
86 done
87
88 eapply "${WORKDIR}"/patch
89 + eapply "${FILESDIR}"/${PN}-0.17.34.0.2.5.1-musl-glob-brace.patch
90
91 + # Drop bashism from configure
92 sed -i \
93 -e 's:echo -n:printf %s :' \
94 configure || die
95 @@ -48,15 +51,20 @@ src_prepare() {
96 }
97
98 src_configure() {
99 - append-lfs-flags #101038
100 + # bug #101038
101 + append-lfs-flags
102 tc-export CC
103 - # not an autoconf script
104 - ./configure \
105 +
106 + # Not an autoconf script
107 + edo ./configure \
108 --prefix=/usr \
109 $(use_enable ipv6) \
110 $(use_enable readline) \
111 - $(use_enable ssl) \
112 - || die
113 + $(use_enable ssl)
114 +
115 + if use elibc_musl ; then
116 + sed -i -e '/^LIBS=/ s/$/ -lobstack/' MCONFIG || die
117 + fi
118 }
119
120 src_install() {