summaryrefslogtreecommitdiff
path: root/dev-haskell/options
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/options
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/options')
-rw-r--r--dev-haskell/options/Manifest3
-rw-r--r--dev-haskell/options/metadata.xml63
-rw-r--r--dev-haskell/options/options-1.2.1.1.ebuild30
3 files changed, 96 insertions, 0 deletions
diff --git a/dev-haskell/options/Manifest b/dev-haskell/options/Manifest
new file mode 100644
index 000000000000..01a61da8ec8a
--- /dev/null
+++ b/dev-haskell/options/Manifest
@@ -0,0 +1,3 @@
+DIST options-1.2.1.1.tar.gz 25327 BLAKE2B 66611694e5beb558e185cd9a89e9368ebac035118360a4c1cb9bcba5ad2a0be74c32848e3983aec999b4cee6e3138c527fe31c869b52c84719ee89afe3aad232 SHA512 615a3767b74ca0ba2eae993f6e475963df2a0933f1e6c9bbfe35144c4dc6018af276144b2ec1b608b695dc7fca904784ebc63cd58a432f966588846cb36f94ea
+EBUILD options-1.2.1.1.ebuild 860 BLAKE2B 85adfff07995b3f2b576ede295e35be3b17ca5c88be9348bbda24b6a9e39a2ebcbad692124540dccd3c53875f0ee474aa19982fffa2e0e5b51252eeca757cca8 SHA512 10cdbf905a60b8e8226cb2703ea5fda1042fb05d887a11bd2c4e4edccb9b2d84f674ee205c35d4da270a914f25178c7c3b8ddf13c10293bd313f5835ac49d4d3
+MISC metadata.xml 1803 BLAKE2B 8cb824136f208f42f22c79344cdceeff042be92bb2fda3ebd0ff18931b028980459bcdfac015b4c5bdd4481d2b4fd2e5395eaf6eee2bb3352649354c238cf59a SHA512 0ee4d11702f1f43fb4fbb5416b96fbcf5d56ce3280deaa0474acce57a00f172133b19a8ce204c76a1b89320e708b9e3eb2cefb0ed1306d45d131073a382cef27
diff --git a/dev-haskell/options/metadata.xml b/dev-haskell/options/metadata.xml
new file mode 100644
index 000000000000..4d7ecf23aaee
--- /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>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </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
+ &amp;#x20; &amp;#x7b; optMessage :: String
+ &amp;#x20; , optQuiet :: Bool
+ &amp;#x20; &amp;#x7d;
+
+ instance 'Options' MainOptions where
+ &amp;#x20; defineOptions = pure MainOptions
+ &amp;#x20; \&lt;*\&gt; simpleOption \"message\" \"Hello world!\"
+ &amp;#x20; \"A message to show the user.\"
+ &amp;#x20; \&lt;*\&gt; simpleOption \"quiet\" False
+ &amp;#x20; \"Whether to be quiet.\"
+
+ main :: IO ()
+ main = runCommand $ \\opts args -&gt; do
+ &amp;#x20; if optQuiet opts
+ &amp;#x20; then return ()
+ &amp;#x20; else putStrLn (optMessage opts)
+ @
+
+ &gt;$ ./hello
+ &gt;Hello world!
+ &gt;$ ./hello --message='ciao mondo'
+ &gt;ciao mondo
+ &gt;$ ./hello --quiet
+ &gt;$
+
+ In addition, this library will automatically create documentation options
+ such as @--help@ and @--help-all@:
+
+ &gt;$ ./hello --help
+ &gt;Help Options:
+ &gt; -h, --help
+ &gt; Show option summary.
+ &gt; --help-all
+ &gt; Show all help options.
+ &gt;
+ &gt;Application Options:
+ &gt; --message :: text
+ &gt; A message to show the user.
+ &gt; default: "Hello world!"
+ &gt; --quiet :: bool
+ &gt; Whether to be quiet.
+ &gt; default: false
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-haskell/options/options-1.2.1.1.ebuild b/dev-haskell/options/options-1.2.1.1.ebuild
new file mode 100644
index 000000000000..4757f77492b0
--- /dev/null
+++ b/dev-haskell/options/options-1.2.1.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.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="alpha amd64 ia64 ppc ppc64 sparc x86"
+IUSE=""
+
+RESTRICT=test # circular depends
+
+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.4 <dev-haskell/chell-0.5
+ >=dev-haskell/chell-quickcheck-0.2 <dev-haskell/chell-quickcheck-0.3 )
+"