# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# ebuild generated by hackport 0.3.1.9999

CABAL_FEATURES="lib profile haddock hoogle hscolour"
inherit haskell-cabal

DESCRIPTION="Utilities related to freedesktop Trash standard"
HOMEPAGE="https://github.com/jkarlson/fdo-trash"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE=""

RDEPEND=">=dev-haskell/diff-0.2:=[profile?]
		dev-haskell/parsec:=[profile?]
		dev-haskell/time-locale-compat:=[profile?]
		dev-haskell/url:=[profile?]
		>=dev-lang/ghc-6.12.1:="
DEPEND="${RDEPEND}
		>=dev-haskell/cabal-1.12
		sys-apps/help2man"

PATCHES=(
	"${FILESDIR}"/${PN}-0.0.0.2-ghc-7.10.patch
	"${FILESDIR}"/${PN}-0.0.0.2-diff-0.4.patch
)

src_compile() {
	haskell-cabal_src_compile
	man/genManPages
}

src_install()
{
	haskell-cabal_src_install
	dosym ./fdo-trash /usr/bin/fdo-rm
	dosym ./fdo-trash /usr/bin/fdo-unrm
	dosym ./fdo-trash /usr/bin/fdo-purge
	doman *.1
}