From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OhiAc-0007Xz-Ug for garchives@archives.gentoo.org; Sat, 07 Aug 2010 12:06:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE592E089F; Sat, 7 Aug 2010 12:06:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AEACDE08D4 for ; Sat, 7 Aug 2010 12:06:32 +0000 (UTC) Received: from corvid.gentoo.org (corvid.gentoo.org [208.92.234.79]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C2B61B400B for ; Sat, 7 Aug 2010 12:06:32 +0000 (UTC) Received: by corvid.gentoo.org (Postfix, from userid 2118) id 125DF2CE15; Sat, 7 Aug 2010 12:06:30 +0000 (UTC) From: "Lennart Kolmodin (kolmodin)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, kolmodin@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: haskell-cabal.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: haskell-cabal.eclass X-VCS-Directories: eclass X-VCS-Committer: kolmodin X-VCS-Committer-Name: Lennart Kolmodin Content-Type: text/plain; charset=utf8 Message-Id: <20100807120631.125DF2CE15@corvid.gentoo.org> Date: Sat, 7 Aug 2010 12:06:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7f47a2d6-68c7-493e-86e8-741a875e7ec7 X-Archives-Hash: edf614d414e1e1ddc51db3e8d59d5731 kolmodin 10/08/07 12:06:29 Modified: haskell-cabal.eclass Log: Allow USE=3Dhscolour for dev-haskell packages that have CABAL_FEATURES=3D"hscolour" (none yet in portage). Revision Changes Path 1.21 eclass/haskell-cabal.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/haskell-cab= al.eclass?rev=3D1.21&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/haskell-cab= al.eclass?rev=3D1.21&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/haskell-cab= al.eclass?r1=3D1.20&r2=3D1.21 Index: haskell-cabal.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- haskell-cabal.eclass 30 Mar 2010 22:18:37 -0000 1.20 +++ haskell-cabal.eclass 7 Aug 2010 12:06:27 -0000 1.21 @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.20 20= 10/03/30 22:18:37 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.21 20= 10/08/07 12:06:27 kolmodin Exp $ # # Original authors: Andres Loeh # Duncan Coutts @@ -18,6 +18,7 @@ # # Currently supported features: # haddock -- for documentation generation +# hscolour -- generation of colourised sources # alex -- lexer/scanner generator # happy -- parser generator # c2hs -- C interface generator @@ -57,6 +58,7 @@ for feature in ${CABAL_FEATURES}; do case ${feature} in haddock) CABAL_USE_HADDOCK=3Dyes;; + hscolour) CABAL_USE_HSCOLOUR=3Dyes;; alex) CABAL_USE_ALEX=3Dyes;; happy) CABAL_USE_HAPPY=3Dyes;; c2hs) CABAL_USE_C2HS=3Dyes;; @@ -75,6 +77,11 @@ DEPEND=3D"${DEPEND} doc? ( dev-haskell/haddock )" fi =20 +if [[ -n "${CABAL_USE_HSCOLOUR}" ]]; then + IUSE=3D"${IUSE} hscolour" + DEPEND=3D"${DEPEND} hscolour? ( dev-haskell/hscolour )" +fi + if [[ -n "${CABAL_USE_ALEX}" ]]; then DEPEND=3D"${DEPEND} dev-haskell/alex" cabalconf=3D"${cabalconf} --with-alex=3D/usr/bin/alex" @@ -187,10 +194,19 @@ > $setupdir/Setup.hs } =20 +cabal-hscolour() { + ./setup hscolour || die "setup hscolour failed" +} + cabal-haddock() { ./setup haddock || die "setup haddock failed" } =20 +cabal-hscolour-haddock() { + # --hyperlink-source implies calling 'setup hscolour' + ./setup haddock --hyperlink-source || die "setup haddock failed" +} + cabal-configure() { if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then cabalconf=3D"${cabalconf} --with-haddock=3D/usr/bin/haddock" @@ -349,7 +365,18 @@ cabal-build =20 if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then - cabal-haddock + if [[ -n "${CABAL_USE_HSCOLOUR}" ]] && use hscolour; then + # hscolour and haddock + cabal-hscolour-haddock + else + # just haddock + cabal-haddock + fi + else + if [[ -n "${CABAL_USE_HSCOLOUR}" ]] && use hscolour; then + # just hscolour + cabal-hscolour + fi fi fi }