summaryrefslogtreecommitdiff
blob: 8699d3f648e2acbe7da1c397c450f19d2f96c145 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

# ebuild generated by hackport 0.5.9999

CABAL_FEATURES="bin"
inherit haskell-cabal

MY_PN="QuickFuzz"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="An experimental grammar fuzzer in Haskell using QuickCheck"
HOMEPAGE="http://quickfuzz.cifasis-conicet.gov.ar/"
SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="archs codes docs imgs media net pki"

RDEPEND="dev-haskell/abstract-par:=
	dev-haskell/argparser:=
	dev-haskell/derive:=
	dev-haskell/linear:=
	dev-haskell/monad-par:=
	dev-haskell/mtl:=
	dev-haskell/parallel-io:=
	dev-haskell/primitive:=
	dev-haskell/process-extras:=
	dev-haskell/quickcheck:2=
	dev-haskell/quickcheck-unicode:=
	dev-haskell/random:=
	dev-haskell/split:=
	dev-haskell/text:=
	dev-haskell/vector:=
	dev-haskell/wl-pprint:=
	>=dev-lang/ghc-7.8.2:=
	archs? ( dev-haskell/base16-bytestring:=
			>=dev-haskell/tar-0.5:=
			dev-haskell/zip-archive:= )
	!archs? ( net? ( dev-haskell/base16-bytestring:= ) )
	codes? ( dev-haskell/haxml:=
			dev-haskell/json:=
			dev-haskell/language-bash:=
			dev-haskell/language-css:=
			dev-haskell/language-dot:=
			dev-haskell/language-ecmascript:=
			dev-haskell/language-glsl:=
			dev-haskell/language-lua:=
			dev-haskell/language-python:=
			dev-haskell/shell-escape:=
			dev-haskell/uniplate:= )
	docs? ( app-text/pandoc:=
		dev-haskell/data-default:=
		dev-haskell/hcg-minus:=
		dev-haskell/hps:=
		dev-haskell/icalendar:=
		dev-haskell/pandoc-types:= )
	imgs? ( dev-haskell/ac-ppm:=
		dev-haskell/memory:=
		dev-haskell/attoparsec:=
		dev-haskell/lens:=
		dev-haskell/scientific:=
		dev-haskell/thyme:=
		dev-haskell/xml:=
		>=dev-haskell/zlib-0.6:= )
	!imgs? ( archs? ( >=dev-haskell/zlib-0.6:= ) )
	media? ( dev-haskell/hcodecs:=
			dev-haskell/hunit:=
			dev-haskell/mtl:=
			dev-haskell/old-locale:=
			dev-haskell/random:=
			dev-haskell/idiii:=
			dev-haskell/bitwise:=
			dev-haskell/monad-loops:=
			dev-haskell/mtl:=
			dev-haskell/wavy:= )
	net? ( dev-haskell/concurrent-extra:=
		dev-haskell/dns:=
		dev-haskell/http:=
		dev-haskell/iproute:=
		dev-haskell/network:=
		dev-haskell/network-uri:=
		dev-haskell/unbounded-delays:= )
	pki? ( dev-haskell/hourglass:=
		dev-haskell/asn1-types:=
		dev-haskell/asn1-parse:=
		dev-haskell/cryptonite:=
		dev-haskell/hourglass:=
		dev-haskell/memory:= )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.18.1.3
"

PATCHES=(
	"${FILESDIR}"/${P}-ghc-8.0.2_rc1.patch
	"${FILESDIR}"/${P}-directory-1.3.patch
	"${FILESDIR}"/${P}-derive-2.6.patch
)

# $1 - target tarball name (not including extension)
make_snapshot() {
	ln -s "${S}" "${WORKDIR}"/"$1" || die
	tar \
		--dereference \
		--directory="${WORKDIR}" \
		--exclude="$1"/bundled/Juicy.Pixels/tests \
		-zcvvf \
		"${WORKDIR}"/"$1".tar.gz "$1"/ || die
}

# As of 2016-09-10 QuickFuzz forks a few hackage packages
# without renames:
# - asn1-encoding: stabilised handling of corrupterd data
# - hogg: more functions are exported directly
# - juicypixels: more functions and modules are exported,
#                unsafe functions are changed to safe
# - svg-tree: upstream, build agains patched juicypixels
# - x509: stabilised handling of corrupterd data
# - megadeth: not a fork but has no releases
# - ttasm: cabalised, renamed module

src_prepare() {
	default

	# inline dependencies of bundled dependencies
	cabal_chdeps \
		'JuicyPixels'   'memory' \
		'asn1-encoding' 'hourglass' \
		'hogg'          'array' \
		'megadeth'      'base' \
		'svg-tree'      'attoparsec, lens, scientific, thyme' \
		'ttasm'         'bitwise, mtl, monad-loops' \
		'x509'          'asn1-parse, cryptonite, hourglass, memory' \
		\
		'hs-source-dirs:      src' 'hs-source-dirs: src, bundled/Juicy.Pixels/src, bundled/hogg, bundled/hs-asn1-encoding, bundled/hs-certificate-x509, bundled/megadeth, bundled/svg-tree/src, bundled/ttasm'
}

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag archs archs) \
		$(cabal_flag codes codes) \
		$(cabal_flag docs docs) \
		$(cabal_flag imgs imgs) \
		$(cabal_flag media media) \
		$(cabal_flag net net) \
		$(cabal_flag pki pki)
}