| 1 |
gienah |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
slyfox |
1.3 |
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/darcs-2.8.0.ebuild,v 1.2 2012/05/24 05:38:05 vapier Exp $
|
| 4 |
gienah |
1.1 |
|
| 5 |
|
|
# ebuild generated by hackport 0.2.17.9999
|
| 6 |
|
|
|
| 7 |
|
|
EAPI=4
|
| 8 |
|
|
|
| 9 |
|
|
CABAL_FEATURES="bin lib profile haddock hscolour"
|
| 10 |
vapier |
1.2 |
inherit haskell-cabal eutils bash-completion-r1
|
| 11 |
gienah |
1.1 |
|
| 12 |
|
|
DESCRIPTION="a distributed, interactive, smart revision control system"
|
| 13 |
|
|
HOMEPAGE="http://darcs.net/"
|
| 14 |
|
|
SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
| 15 |
|
|
|
| 16 |
|
|
LICENSE="GPL-2"
|
| 17 |
|
|
SLOT="0"
|
| 18 |
slyfox |
1.3 |
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
|
| 19 |
gienah |
1.1 |
IUSE="doc test"
|
| 20 |
|
|
|
| 21 |
|
|
RDEPEND=">=dev-haskell/hashed-storage-0.5.6[profile?]
|
| 22 |
|
|
<dev-haskell/hashed-storage-0.6[profile?]
|
| 23 |
|
|
>=dev-haskell/haskeline-0.6.3[profile?]
|
| 24 |
|
|
<dev-haskell/haskeline-0.7[profile?]
|
| 25 |
|
|
=dev-haskell/html-1.0*[profile?]
|
| 26 |
|
|
>=dev-haskell/http-4000.0.8[profile?]
|
| 27 |
|
|
<dev-haskell/http-4000.3[profile?]
|
| 28 |
|
|
=dev-haskell/mmap-0.5*[profile?]
|
| 29 |
|
|
>=dev-haskell/mtl-1.0[profile?]
|
| 30 |
|
|
<dev-haskell/mtl-2.2[profile?]
|
| 31 |
|
|
>=dev-haskell/network-2.2[profile?]
|
| 32 |
|
|
<dev-haskell/network-2.4[profile?]
|
| 33 |
|
|
>=dev-haskell/parsec-2.0[profile?]
|
| 34 |
|
|
<dev-haskell/parsec-3.2[profile?]
|
| 35 |
|
|
=dev-haskell/random-1.0*[profile?]
|
| 36 |
|
|
>=dev-haskell/regex-compat-0.95.1[profile?]
|
| 37 |
|
|
=dev-haskell/tar-0.3*[profile?]
|
| 38 |
|
|
=dev-haskell/terminfo-0.3*[profile?]
|
| 39 |
|
|
>=dev-haskell/text-0.11.0.6[profile?]
|
| 40 |
|
|
<dev-haskell/text-0.12.0.0[profile?]
|
| 41 |
|
|
>=dev-haskell/vector-0.7[profile?]
|
| 42 |
|
|
>=dev-haskell/zlib-0.5.1.0[profile?]
|
| 43 |
|
|
<dev-haskell/zlib-0.6.0.0[profile?]
|
| 44 |
|
|
>=dev-lang/ghc-6.10.1
|
| 45 |
|
|
net-misc/curl
|
| 46 |
|
|
virtual/mta"
|
| 47 |
|
|
|
| 48 |
|
|
# darcs also has a library version; we thus need $DEPEND
|
| 49 |
|
|
DEPEND="${RDEPEND}
|
| 50 |
|
|
>=dev-haskell/cabal-1.8
|
| 51 |
|
|
doc? ( virtual/latex-base
|
| 52 |
|
|
|| ( dev-tex/latex2html[png]
|
| 53 |
|
|
dev-tex/latex2html[gif]
|
| 54 |
|
|
)
|
| 55 |
|
|
)
|
| 56 |
|
|
test? ( >=dev-haskell/cmdlib-0.2.1[profile?]
|
| 57 |
|
|
<dev-haskell/cmdlib-0.4[profile?]
|
| 58 |
|
|
>=dev-haskell/shellish-0.1.3[profile?]
|
| 59 |
|
|
<dev-haskell/shellish-0.2[profile?]
|
| 60 |
|
|
dev-haskell/test-framework[profile?]
|
| 61 |
|
|
dev-haskell/test-framework-hunit[profile?]
|
| 62 |
|
|
dev-haskell/test-framework-quickcheck2[profile?]
|
| 63 |
|
|
)
|
| 64 |
|
|
"
|
| 65 |
|
|
|
| 66 |
|
|
src_prepare() {
|
| 67 |
|
|
epatch "${FILESDIR}/${PN}-2.8.0-mtl-2.1.patch"
|
| 68 |
|
|
|
| 69 |
|
|
rm "${S}/tests/add_permissions.sh" || die "Could not rm add_permissions.sh"
|
| 70 |
|
|
rm "${S}/tests/send-output-v1.sh" || die "Could not rm send-output-v1.sh"
|
| 71 |
|
|
rm "${S}/tests/send-output-v2.sh" || die "Could not rm send-output-v2.sh"
|
| 72 |
|
|
rm "${S}/tests/utf8.sh" || die "Could not rm utf8.sh"
|
| 73 |
|
|
}
|
| 74 |
|
|
|
| 75 |
|
|
src_configure() {
|
| 76 |
|
|
# checking whether ghc supports -threaded flag
|
| 77 |
|
|
# Beware: http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker
|
| 78 |
|
|
# contains: 'The ability to make a foreign call that does not block all other Haskell threads.'
|
| 79 |
|
|
# It might have interactivity impact.
|
| 80 |
|
|
|
| 81 |
|
|
threaded_flag=""
|
| 82 |
|
|
if $(ghc-getghc) --info | grep "Support SMP" | grep -q "YES"; then
|
| 83 |
|
|
threaded_flag="--flags=threaded"
|
| 84 |
|
|
einfo "$P will be built with threads support"
|
| 85 |
|
|
else
|
| 86 |
|
|
threaded_flag="--flags=-threaded"
|
| 87 |
|
|
einfo "$P will be built without threads support"
|
| 88 |
|
|
fi
|
| 89 |
|
|
|
| 90 |
|
|
# Use curl for net stuff to avoid strict version dep on HTTP and network
|
| 91 |
|
|
cabal_src_configure \
|
| 92 |
|
|
--flags=curl \
|
| 93 |
|
|
--flags=-http \
|
| 94 |
|
|
--flags=color \
|
| 95 |
|
|
--flags=terminfo \
|
| 96 |
|
|
--flags=mmap \
|
| 97 |
|
|
$threaded_flag \
|
| 98 |
|
|
$(cabal_flag test)
|
| 99 |
|
|
}
|
| 100 |
|
|
|
| 101 |
|
|
src_test() {
|
| 102 |
|
|
# run cabal test from haskell-cabal
|
| 103 |
|
|
haskell-cabal_src_test || die "cabal test failed"
|
| 104 |
|
|
}
|
| 105 |
|
|
|
| 106 |
|
|
src_install() {
|
| 107 |
|
|
cabal_src_install
|
| 108 |
|
|
newbashcomp "${S}/contrib/darcs_completion" "${PN}"
|
| 109 |
|
|
|
| 110 |
|
|
# fixup perms in such an an awkward way
|
| 111 |
|
|
mv "${ED}/usr/share/man/man1/darcs.1" "${S}/darcs.1" || die "darcs.1 not found"
|
| 112 |
|
|
doman "${S}/darcs.1" || die "failed to register darcs.1 as a manpage"
|
| 113 |
|
|
}
|
| 114 |
|
|
|
| 115 |
|
|
pkg_postinst() {
|
| 116 |
|
|
ghc-package_pkg_postinst
|
| 117 |
|
|
|
| 118 |
|
|
ewarn "NOTE: in order for the darcs send command to work properly,"
|
| 119 |
|
|
ewarn "you must properly configure your mail transport agent to relay"
|
| 120 |
|
|
ewarn "outgoing mail. For example, if you are using ssmtp, please edit"
|
| 121 |
|
|
ewarn "${EPREFIX}/etc/ssmtp/ssmtp.conf with appropriate values for your site."
|
| 122 |
|
|
}
|