summaryrefslogtreecommitdiff
path: root/net-ftp/gftp/gftp-2.9.1b-r4.ebuild
blob: ce911dcdc97f9093f444510eed242a2bb8615747 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 2021-2025 BaldEagleOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic gnome2 meson

DESCRIPTION="a free multithreaded file transfer client"
HOMEPAGE="https://github.com/masneyb/gftp"
GIT_COMMIT="a7265eb958437fafc8b4d4e8f4fe960371723237"
SRC_URI="https://github.com/masneyb/gftp/archive/${GIT_COMMIT}.tar.gz -> ${PN}-${GIT_COMMIT}.tar.gz"

# Override gnome.org.eclass's S= (bug #904064)
S="${WORKDIR}/${PN}-${GIT_COMMIT}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm64 ppc ppc64 ~riscv sparc x86"
IUSE="gtk gtk2 gtk3 libressl ssl"
REQUIRED_USE="gtk? ( || ( gtk2 gtk3 ) )"

RDEPEND="
	dev-libs/glib:2
	sys-libs/ncurses:0=
	sys-libs/readline:0
	gtk? (
		gtk2? ( x11-libs/gtk+:2 )
		gtk3? ( x11-libs/gtk+:3 )
	)
	ssl? (
		!libressl? ( dev-libs/openssl:0= )
		libressl? ( dev-libs/libressl:0= ) )
"
DEPEND="${RDEPEND}"
BDEPEND="
	sys-devel/gettext
	virtual/pkgconfig
"

PATCHES=(
	# https://github.com/masneyb/gftp/issues/178
	"${FILESDIR}"/"${P}"-fix-socklen-type.patch
)

src_prepare() {
	gnome2_src_prepare
	# https://github.com/masneyb/gftp/issues/181
	sed -i -e 's/Icon=gftp.png/Icon=gftp/' docs/gftp.desktop || die
	eapply -p0 ${FILESDIR}/patch-lib-pty.c
}

src_configure() {
	local emesonargs=(
		$(meson_use ssl)
	)

	if use gtk; then
		local emesonargs+=(
			$(meson_use gtk2)
			$(meson_use gtk3)
			-Dgtkport=true
			-Dtextport=false
			-Dgtkwarnings=true
		)
	else
		local emesonargs+=(
			$(meson_use gtk2)
			-Dgtkport=false
			-Dtextport=true
			-Dgtkwarnings=false
		)
	fi

	meson_src_configure
#	gnome2_src_configure \
#		$(use_enable gtk gtkport) \
#		$(use_enable ssl)
}

src_compile() {
	append-cxxflags -Wno-error=incompatible-pointer-types
	append-cflags -Wno-error=incompatible-pointer-types
#	default
	meson_src_compile
}

src_install() {
	meson_src_install
	#gnome2_src_install
	dodoc docs/USERS-GUIDE
}