diff options
author | miwi <miwi@FreeBSD.org> | 2008-11-10 07:05:04 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2008-11-10 07:05:04 +0800 |
commit | 75480dc1193fd1c8bee29cd39437d4234ed5fcf2 (patch) | |
tree | 3f354793658dda647e5e25533497ced28fb2c7d5 /devel | |
parent | c21bb933d0fc5c80c12c2287d1cf7ab2a1d75d98 (diff) | |
download | freebsd-ports-gnome-75480dc1193fd1c8bee29cd39437d4234ed5fcf2.tar.gz freebsd-ports-gnome-75480dc1193fd1c8bee29cd39437d4234ed5fcf2.tar.zst freebsd-ports-gnome-75480dc1193fd1c8bee29cd39437d4234ed5fcf2.zip |
main.rb features the following:
- unification of option, argument, keyword, and environment
parameter parsing
- auto generation of usage and help messages
- support for mode/sub-commands
- io redirection support
- logging hooks using ruby's built-in logging mechanism
- intelligent error handling and exit codes
- use as dsl or library for building Main objects
- parsing user defined ARGV and ENV
- zero requirements for understanding the obtuse apis of any
command line option parsers
- leather pants
In short main.rb aims to drastically lower the barrier to writing
uniform command line applications.
WWW: http://codeforpeople.com/lib/ruby/main/
PR: ports/128664
Submitted by: Wen Heping <wenheping at gmail.com>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/rubygem-main/Makefile | 32 | ||||
-rw-r--r-- | devel/rubygem-main/distinfo | 3 | ||||
-rw-r--r-- | devel/rubygem-main/pkg-descr | 18 |
4 files changed, 54 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index dd6ede9d73d3..32d105e2a476 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2415,6 +2415,7 @@ SUBDIR += rubygem-json SUBDIR += rubygem-json_pure SUBDIR += rubygem-linecache + SUBDIR += rubygem-main SUBDIR += rubygem-mocha SUBDIR += rubygem-mojombo-grit SUBDIR += rubygem-needle diff --git a/devel/rubygem-main/Makefile b/devel/rubygem-main/Makefile new file mode 100644 index 000000000000..a99cdfbd4d76 --- /dev/null +++ b/devel/rubygem-main/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: rubygem-main +# Date created: 07, Nov 2008 +# Whom: Wen Heping <wenheping@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= main +PORTVERSION= 2.8.3 +CATEGORIES= devel rubygems +MASTER_SITES= RF/codeforpeople + +MAINTAINER= wenheping@gmail.com +COMMENT= A Class Factory and Dsl for Generating Command Line Programs + +BUILD_DEPENDS= rubygem-fattr>=1.0.3:${PORTSDIR}/devel/rubygem-fattr \ + rubygem-arrayfields>=4.5.0:${PORTSDIR}/devel/rubygem-arrayfields +RUN_DEPENDS= rubygem-fattr>=1.0.3:${PORTSDIR}/devel/rubygem-fattr \ + rubygem-arrayfields>=4.5.0:${PORTSDIR}/devel/rubygem-arrayfields + +USE_RUBY= yes +USE_RUBYGEMS= yes + +post-install: + @${ECHO} ${GEM_CACHE} > ${TMPPLIST} + @${FIND} ${PREFIX}/${GEM_DOC_DIR} -type f | ${SED} -e 's,${PREFIX}/${GEM_DOC_DIR},${GEM_DOC_DIR},' >> ${TMPPLIST} + @${FIND} ${PREFIX}/${GEM_LIB_DIR} -type f | ${SED} -e 's,${PREFIX}/${GEM_LIB_DIR},${GEM_LIB_DIR},' >> ${TMPPLIST} + @${ECHO} ${GEM_SPEC} >> ${TMPPLIST} + @${FIND} ${PREFIX}/${GEM_LIB_DIR} -type d -depth | ${SED} -e 's,${PREFIX}/${GEM_LIB_DIR},@dirrm ${GEM_LIB_DIR},' >> ${TMPPLIST} + @${FIND} ${PREFIX}/${GEM_DOC_DIR} -type d -depth | ${SED} -e 's,${PREFIX}/${GEM_DOC_DIR},@dirrm ${GEM_DOC_DIR},' >> ${TMPPLIST} + +.include <bsd.port.mk> diff --git a/devel/rubygem-main/distinfo b/devel/rubygem-main/distinfo new file mode 100644 index 000000000000..6619181700ce --- /dev/null +++ b/devel/rubygem-main/distinfo @@ -0,0 +1,3 @@ +MD5 (rubygem/main-2.8.3.gem) = dcb344a9ad5f72cdc03c34a496400d73 +SHA256 (rubygem/main-2.8.3.gem) = 013b059565cd133ab5dfddf53c9cb265949e6d6ad717296617c3381b4fb7e05a +SIZE (rubygem/main-2.8.3.gem) = 30720 diff --git a/devel/rubygem-main/pkg-descr b/devel/rubygem-main/pkg-descr new file mode 100644 index 000000000000..75bd0a636f80 --- /dev/null +++ b/devel/rubygem-main/pkg-descr @@ -0,0 +1,18 @@ +main.rb features the following: + - unification of option, argument, keyword, and environment + parameter parsing + - auto generation of usage and help messages + - support for mode/sub-commands + - io redirection support + - logging hooks using ruby's built-in logging mechanism + - intelligent error handling and exit codes + - use as dsl or library for building Main objects + - parsing user defined ARGV and ENV + - zero requirements for understanding the obtuse apis of any + command line option parsers + - leather pants + + In short main.rb aims to drastically lower the barrier to writing + uniform command line applications. + +WWW: http://codeforpeople.com/lib/ruby/main/ |