summaryrefslogtreecommitdiff
blob: cf60600336eaae0b513d2d30360cec499669df8c (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

# ebuild generated by hackport 0.6.7.9999
#hackport: flags: -hgettext

CABAL_FEATURES="test-suite"
inherit haskell-cabal

DESCRIPTION="Draw sequence diagrams of D-Bus traffic"
HOMEPAGE="https://gitlab.freedesktop.org/bustle/bustle#readme"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="LGPL-2.1 GPL-2 GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="interactivetests +threaded"

RDEPEND="dev-haskell/cairo:=
	dev-haskell/gio:=
	dev-haskell/glib:=
	dev-haskell/gtk3:=
	>=dev-haskell/mtl-2.2.1:=
	dev-haskell/pango:=
	dev-haskell/text:=
	>=dev-lang/ghc-8.4.3:=
	dev-libs/glib:2
	net-libs/libpcap
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.2.0.1
	virtual/pkgconfig
	test? ( dev-haskell/hunit
		dev-haskell/quickcheck
		dev-haskell/test-framework
		dev-haskell/test-framework-hunit )
"

src_configure() {
	haskell-cabal_src_configure \
		--flag=-hgettext \
		$(cabal_flag interactivetests interactivetests) \
		$(cabal_flag threaded threaded)
}

src_compile() {
	# compile haskell part
	haskell-cabal_src_compile || die "could not build haskell parts"

	# compile C part
	emake \
		"CC=$(tc-getCC)" \
		"CFLAGS=${CFLAGS}" \
		"CPPFLAGS=${CPPFLAGS}" \
		"LDFLAGS=${LDFLAGS}"
}

src_install() {
	# install haskell part
	haskell-cabal_src_install || die "could not install haskell parts"

	dobin "${S}"/dist/build/bustle-pcap
	doman bustle-pcap.1
	dodoc README.md NEWS.md
}