Gentoo Archives: gentoo-commits

From: "Lennart Kolmodin (kolmodin)" <kolmodin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-vcs/darcs: ChangeLog darcs-2.4.4-r1.ebuild
Date: Mon, 28 Jun 2010 18:53:37
Message-Id: 20100628185332.9244A2C3ED@corvid.gentoo.org
1 kolmodin 10/06/28 18:53:32
2
3 Modified: ChangeLog
4 Added: darcs-2.4.4-r1.ebuild
5 Log:
6 dev-vcs/darcs-2.4.4: make a -r1 that attempts to fix two issues
7 (Portage version: 2.1.8.3/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.6 dev-vcs/darcs/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/ChangeLog?rev=1.6&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/ChangeLog?rev=1.6&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/ChangeLog?r1=1.5&r2=1.6
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v
19 retrieving revision 1.5
20 retrieving revision 1.6
21 diff -u -r1.5 -r1.6
22 --- ChangeLog 17 Jun 2010 06:33:35 -0000 1.5
23 +++ ChangeLog 28 Jun 2010 18:53:32 -0000 1.6
24 @@ -1,6 +1,19 @@
25 # ChangeLog for dev-vcs/darcs
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v 1.5 2010/06/17 06:33:35 kolmodin Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v 1.6 2010/06/28 18:53:32 kolmodin Exp $
29 +
30 +*darcs-2.4.4-r1 (28 Jun 2010)
31 +
32 + 28 Jun 2010; Lennart Kolmodin <kolmodin@g.o>
33 + +darcs-2.4.4-r1.ebuild,
34 + +files/darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch:
35 + Attempt to solve issue1770 ( http://bugs.darcs.net/issue1770 ) which stops
36 + users from fetching the Gentoo Haskell overlay. The patch is taken from
37 + darcs HEAD and is written by Dmitry Kurochkin
38 + <dmitry.kurochkin@×××××.com>.
39 +
40 + Also, remove test case that required hlint. If the user would have a
41 + recent version of hlint installed it would break the tests. Fix by slyfox.
42
43 16 Jun 2010; Lennart Kolmodin <kolmodin@g.o>
44 -darcs-1.1.0_pre1.ebuild, darcs-2.1.0-r1.ebuild, darcs-2.2.1.ebuild,
45
46
47
48 1.1 dev-vcs/darcs/darcs-2.4.4-r1.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/darcs-2.4.4-r1.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/darcs-2.4.4-r1.ebuild?rev=1.1&content-type=text/plain
52
53 Index: darcs-2.4.4-r1.ebuild
54 ===================================================================
55 # Copyright 1999-2010 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/darcs-2.4.4-r1.ebuild,v 1.1 2010/06/28 18:53:32 kolmodin Exp $
58
59 EAPI="2"
60 CABAL_FEATURES="bin lib profile haddock"
61 inherit haskell-cabal eutils bash-completion
62
63 DESCRIPTION="a distributed, interactive, smart revision control system"
64 HOMEPAGE="http://darcs.net/"
65 SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
66
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~amd64 ~ppc64 ~x86"
70 IUSE="doc test"
71
72 # Dependency notes:
73 # 1) Use a cunning trick for hashed-storage, haskeline, regex-compat
74 # where the min bound is the lowest version available.
75 # 2) Do the opposite for zlib: highest not available.
76 # 3) Prefer curl over HTTP since darcs uses an old version of HTTP.
77 # 4) Use the same bounds for mmap as hashed-storage.
78
79 COMMONDEPS=">=dev-lang/ghc-6.8
80 >=dev-haskell/hashed-storage-0.4.13
81 =dev-haskell/haskeline-0.6*
82 =dev-haskell/html-1.0*
83 =dev-haskell/mmap-0.4*
84 <dev-haskell/mtl-1.2
85 =dev-haskell/network-2.2*
86 dev-haskell/parsec:0
87 <dev-haskell/regex-compat-0.94
88 =dev-haskell/terminfo-0.3*
89 =dev-haskell/utf8-string-0.3*
90 <dev-haskell/zlib-0.6.0.0
91 net-misc/curl"
92
93 DEPEND="${COMMONDEPS}
94 >=dev-haskell/cabal-1.6
95 doc? ( virtual/latex-base
96 dev-tex/latex2html )
97 test? ( dev-haskell/test-framework
98 dev-haskell/test-framework-hunit
99 dev-haskell/test-framework-quickcheck2 )
100 "
101
102 # darcs also has a library version; we thus need $DEPEND
103 RDEPEND="${COMMONDEPS}
104 virtual/mta"
105
106 pkg_setup() {
107 if use doc && ! built_with_use -o dev-tex/latex2html png gif; then
108 eerror "Building darcs with USE=\"doc\" requires that"
109 eerror "dev-tex/latex2html is built with at least one of"
110 eerror "USE=\"png\" and USE=\"gif\"."
111 die "USE=doc requires dev-tex/latex2html with USE=\"png\" or USE=\"gif\""
112 fi
113 }
114
115 src_prepare() {
116 pushd "contrib"
117 epatch "${FILESDIR}/${PN}-1.0.9-bashcomp.patch"
118 popd
119
120 epatch "${FILESDIR}/${P}-issue1770-curl_multi_perform-no-running-handles.patch"
121
122 # Loosen dependency on hashed-storage
123 sed -i -e "s/hashed-storage == 0.4.13/hashed-storage == 0.4.*/" \
124 "${S}/${PN}.cabal" \
125 || die "Could not loosen deps on hashed-storage"
126
127 # hlint tests tend to break on every newly released hlint
128 rm "${S}/tests/haskell_policy.sh"
129 }
130
131 src_configure() {
132 # checking whether ghc supports -threaded flag
133 # Beware: http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker
134 # contains: 'The ability to make a foreign call that does not block all other Haskell threads.'
135 # It might have interactivity impact.
136
137 threaded_flag=""
138 if $(ghc-getghc) --info | grep "Support SMP" | grep -q "YES"; then
139 threaded_flag="--flags=threaded"
140 einfo "$P will be built with threads support"
141 else
142 threaded_flag="--flags=-threaded"
143 einfo "$P will be built without threads support"
144 fi
145
146 # Use curl for net stuff to avoid strict version dep on HTTP and network
147 cabal_src_configure \
148 --flags=curl \
149 --flags=-http \
150 --flags=curl-pipelining \
151 --flags=color \
152 --flags=terminfo \
153 --flags=mmap \
154 $threaded_flag \
155 $(cabal_flag test)
156 }
157
158 src_test() {
159 # run cabal test from haskell-cabal
160 haskell-cabal_src_test || die "cabal test failed"
161
162 # run the unit tests (not part of cabal test for some reason...)
163 # breaks the cabal abstraction a bit...
164 "${S}/dist/build/unit/unit" || die "unit tests failed"
165 }
166
167 src_install() {
168 cabal_src_install
169 dobashcompletion "${S}/contrib/darcs_completion" "${PN}"
170
171 rm "${D}/usr/bin/unit" 2> /dev/null
172
173 # fixup perms in such an an awkward way
174 mv "${D}/usr/share/man/man1/darcs.1" "${S}/darcs.1" || die "darcs.1 not found"
175 doman "${S}/darcs.1" || die "failed to register darcs.1 as a manpage"
176
177 # if tests were enabled, make sure the unit test driver is deleted
178 rm -rf "${D}/usr/bin/unit"
179 }
180
181 pkg_postinst() {
182 ghc-package_pkg_postinst
183 bash-completion_pkg_postinst
184
185 ewarn "NOTE: in order for the darcs send command to work properly,"
186 ewarn "you must properly configure your mail transport agent to relay"
187 ewarn "outgoing mail. For example, if you are using ssmtp, please edit"
188 ewarn "/etc/ssmtp/ssmtp.conf with appropriate values for your site."
189 }