diff options
author | Mark Wright <gienah@gentoo.org> | 2014-07-02 11:58:03 +0000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2014-07-02 11:58:03 +0000 |
commit | 48171acbd7a09058dd38d5f523a52174ed09ef4e (patch) | |
tree | f13d33ec64e73f09893b51a7094f153949f8c4f9 /dev-haskell/options | |
parent | Add options (diff) | |
download | historical-48171acbd7a09058dd38d5f523a52174ed09ef4e.tar.gz historical-48171acbd7a09058dd38d5f523a52174ed09ef4e.tar.bz2 historical-48171acbd7a09058dd38d5f523a52174ed09ef4e.zip |
Add options
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0x618E971F
Diffstat (limited to 'dev-haskell/options')
-rw-r--r-- | dev-haskell/options/Manifest | 13 | ||||
-rw-r--r-- | dev-haskell/options/metadata.xml | 63 | ||||
-rw-r--r-- | dev-haskell/options/options-1.2-r1.ebuild | 36 |
3 files changed, 111 insertions, 1 deletions
diff --git a/dev-haskell/options/Manifest b/dev-haskell/options/Manifest index e362b28583e1..2048512e06eb 100644 --- a/dev-haskell/options/Manifest +++ b/dev-haskell/options/Manifest @@ -1,3 +1,14 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + DIST options-1.2.tar.gz 25214 SHA256 7d9353b93ff22a9a20c088a6895d08b02266e1a61e5c7192711c14881a9f1993 SHA512 9c7cfcfbf3e1e487bc80a3ea68ba484b22b7adecf65af5e5f3d3cd9ebcabf952286cf1b29d6e1ef6654eed49aeb70a2936bc977f8c3665bd7ab59340cf2f2f18 WHIRLPOOL 1ef4d4c61464379d35cc8445c331387247d3dd67122b0d8a7b9030a70c67c3e44e41272aef9fa6b792addb2d08dde55dd079a581b4f1f5ffd5f63ffe3054db53 -EBUILD options-1.2-r1.ebuild 967 SHA256 802792d13c45b5cf98d7f46ce6c23c28718eba1ceb019d466810289d05f1fd5b SHA512 e5871cec1142f09df1d93e8885e49bd7a7676e329a81eed25e5abd53596f064c785243483ce5830f8250534fec6b6e7b0938392c7fdd823d55a65dc3da3d6b21 WHIRLPOOL 145ed80cf663399aad0e0b4d000c5ff931c110b2398603ca8dc62882371683dd5825bd65ec757e3bdd9d327113a496b252467d8ab8431801959e323e9958a7cc +EBUILD options-1.2-r1.ebuild 1070 SHA256 03d61174edc852689b8c548f775740badbad20bb4d394b8159da757a0774eb26 SHA512 15caefbd77967de522a778d64c731ddc89bcdb52a542c456c65280385ae354fdca65c7c31b41de422b8e86290592ad084fe100d160b829eb876d9cd0de762b68 WHIRLPOOL 43c5874764413c19b2f22ea490bc2305e969196857980f88b0c24d0cd3cae7f1def61c829dedc967142973c551dc775bcd11aa4dbf440afcd8998da0c8a4d4d2 +MISC ChangeLog 344 SHA256 b1c83a523143ad21161af52e4df7d5432cc256c76fed5c6bcfaca907bd996c59 SHA512 4f4ba8fe8a0efd17f718b6e86b0e7bdf74d8de3cb4c5c7643b972cf4bf2e8074b165b3a41278dc463cefb9b2bd231f994632a5cf51b26413988ea82be0380ca8 WHIRLPOOL f936d771537049d65a84506f544fadcfc8a19491f8b2db12feb88b54cb87e70b9c506f10818a09af5febd9e5c825b2efe6a89d7e59ef507dbe08cd7607c645d0 MISC metadata.xml 1856 SHA256 7da0e1c426a8517309af6b9fd37f6ce07b2d7aebee83d9629b2bf45f11848595 SHA512 4c53f0bb042f05a89fd43f0af18947d615cf7239c672881dac8a281f7b7fe3c6e20e39b9f4f013ea3f82fddcb452372668abec6abc3a3a3bc14824556c568a83 WHIRLPOOL 45c9d8e8ff91e7e2ad488ed1956ac280b382ab642ab6f609a87dcca8ff18df69722fbc6a228af3fc8574fe69b6e42911a0eb5f71fd5a743869e82dd1ef43cd20 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iF4EAREIAAYFAlOz88kACgkQoBEVQmGOlx98sAEArtL2ItyLc1n3+oTSNGJ0TO4s +MiJWNv/9Q2sOiTOwuNkBAKkJHvuZLWZ/3LTaTgATfWizaa+nKsyCFBse2G7IorU0 +=V3Q8 +-----END PGP SIGNATURE----- diff --git a/dev-haskell/options/metadata.xml b/dev-haskell/options/metadata.xml new file mode 100644 index 000000000000..846fd82ab4df --- /dev/null +++ b/dev-haskell/options/metadata.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>haskell</herd> + <maintainer> + <email>haskell@gentoo.org</email> + </maintainer> + <longdescription> + The @options@ package lets library and application developers easily work + with command-line options. + + The following example is a full program that can accept two options, + @--message@ and @--quiet@: + + @ + import Control.Applicative + import Options + + data MainOptions = MainOptions + &#x20; &#x7b; optMessage :: String + &#x20; , optQuiet :: Bool + &#x20; &#x7d; + + instance 'Options' MainOptions where + &#x20; defineOptions = pure MainOptions + &#x20; \<*\> simpleOption \"message\" \"Hello world!\" + &#x20; \"A message to show the user.\" + &#x20; \<*\> simpleOption \"quiet\" False + &#x20; \"Whether to be quiet.\" + + main :: IO () + main = runCommand $ \\opts args -> do + &#x20; if optQuiet opts + &#x20; then return () + &#x20; else putStrLn (optMessage opts) + @ + + >$ ./hello + >Hello world! + >$ ./hello --message='ciao mondo' + >ciao mondo + >$ ./hello --quiet + >$ + + In addition, this library will automatically create documentation options + such as @--help@ and @--help-all@: + + >$ ./hello --help + >Help Options: + > -h, --help + > Show option summary. + > --help-all + > Show all help options. + > + >Application Options: + > --message :: text + > A message to show the user. + > default: "Hello world!" + > --quiet :: bool + > Whether to be quiet. + > default: false + </longdescription> +</pkgmetadata> diff --git a/dev-haskell/options/options-1.2-r1.ebuild b/dev-haskell/options/options-1.2-r1.ebuild new file mode 100644 index 000000000000..23bf52773bba --- /dev/null +++ b/dev-haskell/options/options-1.2-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/options/options-1.2-r1.ebuild,v 1.1 2014/07/02 11:57:55 gienah Exp $ + +EAPI=5 + +# ebuild generated by hackport 0.4.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +DESCRIPTION="A powerful and easy-to-use command-line option parser." +HOMEPAGE="https://john-millikin.com/software/haskell-options/" +SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=dev-haskell/monads-tf-0.1:=[profile?] + >=dev-haskell/transformers-0.2:=[profile?] + >=dev-lang/ghc-7.4.1:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8 + test? ( >=dev-haskell/chell-0.3.1 <dev-haskell/chell-0.5 + >=dev-haskell/chell-quickcheck-0.2 <dev-haskell/chell-quickcheck-0.3 + >=dev-haskell/monads-tf-0.1 + >=dev-haskell/transformers-0.2 ) +" + +src_prepare() { + cabal_chdeps \ + 'chell >= 0.3.1 && < 0.4' 'chell >= 0.3.1 && < 0.5' +} |