From: | "Mark Wright (gienah)" <gienah@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in dev-haskell/options: metadata.xml options-1.2-r1.ebuild Manifest ChangeLog |
Date: | Wed, 02 Jul 2014 11:57:59 |
Message-Id: | 20140702115755.D53F82004E@flycatcher.gentoo.org |
1 | gienah 14/07/02 11:57:55 |
2 | |
3 | Added: metadata.xml options-1.2-r1.ebuild Manifest |
4 | ChangeLog |
5 | Log: |
6 | Add options |
7 | |
8 | (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 618E971F) |
9 | |
10 | Revision Changes Path |
11 | 1.1 dev-haskell/options/metadata.xml |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/metadata.xml?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/metadata.xml?rev=1.1&content-type=text/plain |
15 | |
16 | Index: metadata.xml |
17 | =================================================================== |
18 | <?xml version="1.0" encoding="UTF-8"?> |
19 | <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
20 | <pkgmetadata> |
21 | <herd>haskell</herd> |
22 | <maintainer> |
23 | <email>haskell@g.o</email> |
24 | </maintainer> |
25 | <longdescription> |
26 | The @options@ package lets library and application developers easily work |
27 | with command-line options. |
28 | |
29 | The following example is a full program that can accept two options, |
30 | @--message@ and @--quiet@: |
31 | |
32 | @ |
33 | import Control.Applicative |
34 | import Options |
35 | |
36 | data MainOptions = MainOptions |
37 | &#x20; &#x7b; optMessage :: String |
38 | &#x20; , optQuiet :: Bool |
39 | &#x20; &#x7d; |
40 | |
41 | instance 'Options' MainOptions where |
42 | &#x20; defineOptions = pure MainOptions |
43 | &#x20; \<*\> simpleOption \"message\" \"Hello world!\" |
44 | &#x20; \"A message to show the user.\" |
45 | &#x20; \<*\> simpleOption \"quiet\" False |
46 | &#x20; \"Whether to be quiet.\" |
47 | |
48 | main :: IO () |
49 | main = runCommand $ \\opts args -> do |
50 | &#x20; if optQuiet opts |
51 | &#x20; then return () |
52 | &#x20; else putStrLn (optMessage opts) |
53 | @ |
54 | |
55 | >$ ./hello |
56 | >Hello world! |
57 | >$ ./hello --message='ciao mondo' |
58 | >ciao mondo |
59 | >$ ./hello --quiet |
60 | >$ |
61 | |
62 | In addition, this library will automatically create documentation options |
63 | such as @--help@ and @--help-all@: |
64 | |
65 | >$ ./hello --help |
66 | >Help Options: |
67 | > -h, --help |
68 | > Show option summary. |
69 | > --help-all |
70 | > Show all help options. |
71 | > |
72 | >Application Options: |
73 | > --message :: text |
74 | > A message to show the user. |
75 | > default: "Hello world!" |
76 | > --quiet :: bool |
77 | > Whether to be quiet. |
78 | > default: false |
79 | </longdescription> |
80 | </pkgmetadata> |
81 | |
82 | |
83 | |
84 | 1.1 dev-haskell/options/options-1.2-r1.ebuild |
85 | |
86 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/options-1.2-r1.ebuild?rev=1.1&view=markup |
87 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/options-1.2-r1.ebuild?rev=1.1&content-type=text/plain |
88 | |
89 | Index: options-1.2-r1.ebuild |
90 | =================================================================== |
91 | # Copyright 1999-2014 Gentoo Foundation |
92 | # Distributed under the terms of the GNU General Public License v2 |
93 | # $Header: /var/cvsroot/gentoo-x86/dev-haskell/options/options-1.2-r1.ebuild,v 1.1 2014/07/02 11:57:55 gienah Exp $ |
94 | |
95 | EAPI=5 |
96 | |
97 | # ebuild generated by hackport 0.4.9999 |
98 | |
99 | CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" |
100 | inherit haskell-cabal |
101 | |
102 | DESCRIPTION="A powerful and easy-to-use command-line option parser." |
103 | HOMEPAGE="https://john-millikin.com/software/haskell-options/" |
104 | SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" |
105 | |
106 | LICENSE="MIT" |
107 | SLOT="0/${PV}" |
108 | KEYWORDS="~amd64 ~x86" |
109 | IUSE="" |
110 | |
111 | RDEPEND=">=dev-haskell/monads-tf-0.1:=[profile?] |
112 | >=dev-haskell/transformers-0.2:=[profile?] |
113 | >=dev-lang/ghc-7.4.1:= |
114 | " |
115 | DEPEND="${RDEPEND} |
116 | >=dev-haskell/cabal-1.8 |
117 | test? ( >=dev-haskell/chell-0.3.1 <dev-haskell/chell-0.5 |
118 | >=dev-haskell/chell-quickcheck-0.2 <dev-haskell/chell-quickcheck-0.3 |
119 | >=dev-haskell/monads-tf-0.1 |
120 | >=dev-haskell/transformers-0.2 ) |
121 | " |
122 | |
123 | src_prepare() { |
124 | cabal_chdeps \ |
125 | 'chell >= 0.3.1 && < 0.4' 'chell >= 0.3.1 && < 0.5' |
126 | } |
127 | |
128 | |
129 | |
130 | 1.1 dev-haskell/options/Manifest |
131 | |
132 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/Manifest?rev=1.1&view=markup |
133 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/Manifest?rev=1.1&content-type=text/plain |
134 | |
135 | Index: Manifest |
136 | =================================================================== |
137 | DIST options-1.2.tar.gz 25214 SHA256 7d9353b93ff22a9a20c088a6895d08b02266e1a61e5c7192711c14881a9f1993 SHA512 9c7cfcfbf3e1e487bc80a3ea68ba484b22b7adecf65af5e5f3d3cd9ebcabf952286cf1b29d6e1ef6654eed49aeb70a2936bc977f8c3665bd7ab59340cf2f2f18 WHIRLPOOL 1ef4d4c61464379d35cc8445c331387247d3dd67122b0d8a7b9030a70c67c3e44e41272aef9fa6b792addb2d08dde55dd079a581b4f1f5ffd5f63ffe3054db53 |
138 | EBUILD options-1.2-r1.ebuild 967 SHA256 802792d13c45b5cf98d7f46ce6c23c28718eba1ceb019d466810289d05f1fd5b SHA512 e5871cec1142f09df1d93e8885e49bd7a7676e329a81eed25e5abd53596f064c785243483ce5830f8250534fec6b6e7b0938392c7fdd823d55a65dc3da3d6b21 WHIRLPOOL 145ed80cf663399aad0e0b4d000c5ff931c110b2398603ca8dc62882371683dd5825bd65ec757e3bdd9d327113a496b252467d8ab8431801959e323e9958a7cc |
139 | MISC metadata.xml 1856 SHA256 7da0e1c426a8517309af6b9fd37f6ce07b2d7aebee83d9629b2bf45f11848595 SHA512 4c53f0bb042f05a89fd43f0af18947d615cf7239c672881dac8a281f7b7fe3c6e20e39b9f4f013ea3f82fddcb452372668abec6abc3a3a3bc14824556c568a83 WHIRLPOOL 45c9d8e8ff91e7e2ad488ed1956ac280b382ab642ab6f609a87dcca8ff18df69722fbc6a228af3fc8574fe69b6e42911a0eb5f71fd5a743869e82dd1ef43cd20 |
140 | |
141 | |
142 | |
143 | 1.1 dev-haskell/options/ChangeLog |
144 | |
145 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/ChangeLog?rev=1.1&view=markup |
146 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/options/ChangeLog?rev=1.1&content-type=text/plain |
147 | |
148 | Index: ChangeLog |
149 | =================================================================== |
150 | # ChangeLog for dev-haskell/options |
151 | # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
152 | # $Header: /var/cvsroot/gentoo-x86/dev-haskell/options/ChangeLog,v 1.1 2014/07/02 11:57:55 gienah Exp $ |
153 | |
154 | *options-1.2-r1 (02 Jul 2014) |
155 | |
156 | 02 Jul 2014; Mark Wright <gienah@g.o> +metadata.xml, |
157 | +options-1.2-r1.ebuild: |
158 | Add options |