app-arch/dump: fix openssl 1.1 compatibility
[gentoo.git] / app-arch / dump / dump-0.4.46-r1.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 inherit versionator
7
8 MY_P="${PN}-$(replace_version_separator 2 b)"
9 S=${WORKDIR}/${MY_P}
10 DESCRIPTION="Dump/restore ext2fs backup utilities"
11 HOMEPAGE="http://dump.sourceforge.net/"
12 SRC_URI="mirror://sourceforge/dump/${MY_P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
17 # We keep uuid USE flag default dsiabled for this version. Don't forget
18 # to default enable it for later versions as this is the upstream default.
19 IUSE="bzip2 debug ermt libressl lzo readline selinux sqlite ssl static test uuid zlib"
20 REQUIRED_USE="
21         ermt? ( ssl )
22         ssl? ( zlib )
23         test? ( sqlite? ( uuid ) )
24 "
25
26 RDEPEND=">=sys-fs/e2fsprogs-1.27:=
27         >=sys-libs/e2fsprogs-libs-1.27:=
28         sys-apps/util-linux
29         bzip2? ( >=app-arch/bzip2-1.0.2:= )
30         zlib? ( >=sys-libs/zlib-1.1.4:= )
31         lzo? ( dev-libs/lzo:2= )
32         sqlite? ( dev-db/sqlite:3= )
33         ermt? (
34                 !libressl? ( dev-libs/openssl:0= )
35                 libressl? ( dev-libs/libressl:0= )
36         )
37         ssl? (
38                 !libressl? ( dev-libs/openssl:0= )
39                 libressl? ( dev-libs/libressl:0= )
40         )
41         readline? (
42                 sys-libs/readline:0=
43                 sys-libs/ncurses:=
44                 static? ( sys-libs/ncurses:=[static-libs] )
45         )"
46 DEPEND="${RDEPEND}
47         virtual/pkgconfig
48         virtual/os-headers"
49
50 PATCHES=( "${FILESDIR}"/${P}-openssl11.patch )
51
52 src_configure() {
53         local myeconfargs=(
54                 --with-dumpdatespath=/etc/dumpdates
55                 --with-rmtpath='$(sbindir)/rmt'
56                 --enable-blkid
57                 $(use_enable bzip2)
58                 $(use_enable debug)
59                 $(use_enable ermt)
60                 $(use_enable lzo)
61                 $(use_enable readline)
62                 $(use_enable selinux)
63                 $(use_enable sqlite)
64                 $(use_enable ssl)
65                 $(use_enable static static-progs)
66                 $(use_enable uuid)
67                 $(use_enable zlib)
68         )
69         econf "${myeconfargs[@]}"
70 }
71
72 src_install() {
73         default
74         mv "${ED}"/usr/sbin/{,dump-}rmt || die
75         mv "${ED}"/usr/share/man/man8/{,dump-}rmt.8 || die
76         use ermt && newsbin rmt/ermt dump-ermt
77
78         dodoc KNOWNBUGS MAINTAINERS REPORTING-BUGS
79         dodoc -r examples
80 }
81
82 pkg_postinst() {
83         if [[ -z ${REPLACING_VERSIONS} ]] ; then
84                 ewarn "app-arch/dump installs 'rmt' as 'dump-rmt'."
85                 ewarn "This is to avoid conflicts with app-arch/tar 'rmt'."
86         fi
87 }