1231209ea1f53ed5e7c1b2eff943fafb28fe9894
[gentoo.git] / net-ftp / filezilla / filezilla-3.44.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 WX_GTK_VER="3.0-gtk3"
7
8 inherit autotools flag-o-matic wxwidgets xdg
9
10 MY_PV=${PV/_/-}
11 MY_P="FileZilla_${MY_PV}"
12
13 DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
14 HOMEPAGE="https://filezilla-project.org/"
15 SRC_URI="https://download.filezilla-project.org/client/${MY_P}_src.tar.bz2"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~x86"
20 IUSE="dbus nls test"
21
22 # pugixml 1.7 minimal dependency is for c++11 proper configuration
23 RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
24         >=dev-libs/nettle-3.1:=
25         >=dev-db/sqlite-3.7
26         >=dev-libs/libfilezilla-0.18.1
27         <dev-libs/libfilezilla-0.19.0
28         >=dev-libs/pugixml-1.7
29         >=net-libs/gnutls-3.5.7
30         >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X]
31         x11-misc/xdg-utils
32         dbus? ( sys-apps/dbus )"
33 DEPEND="${RDEPEND}
34         virtual/pkgconfig
35         >=sys-devel/libtool-1.4
36         nls? ( >=sys-devel/gettext-0.11 )
37         test? ( >=dev-util/cppunit-1.13.0 )"
38
39 RESTRICT="!test? ( test )"
40
41 S="${WORKDIR}"/${PN}-${MY_PV}
42
43 DOCS=(AUTHORS ChangeLog NEWS )
44
45 PATCHES=(
46         "${FILESDIR}"/${PN}-3.22.1-debug.patch
47 )
48
49 pkg_pretend() {
50         if [[ ${MERGE_TYPE} != binary ]]; then
51                 if ! test-flag-CXX -std=c++14; then
52                         eerror "${P} requires C++14-capable C++ compiler. Your current compiler"
53                         eerror "does not seem to support -std=c++14 option. Please upgrade your compiler"
54                         eerror "to gcc-4.9 or an equivalent version supporting C++14."
55                         die "Currently active compiler does not support -std=c++14"
56                 fi
57         fi
58 }
59
60 src_prepare() {
61         setup-wxwidgets
62         default
63         eautoreconf
64 }
65
66 src_configure() {
67         local myeconfargs=(
68                 --disable-autoupdatecheck
69                 --with-pugixml=system
70                 $(use_enable nls locales)
71                 $(use_with dbus)
72         )
73         econf "${myeconfargs[@]}"
74 }
75
76 pkg_preinst() {
77         xdg_pkg_preinst
78 }
79
80 pkg_postinst() {
81         xdg_pkg_postinst
82 }
83
84 pkg_postrm() {
85         xdg_pkg_postrm
86 }