- Add LICENSE
- Remove .include <bsd.port.options.mk> - Silence patch message - Use GEM_NAME - Cosmetic change - Update pkg-descr - Update WWW - Take maintainership
This commit is contained in:
parent
74e1fb0925
commit
eee499a3b5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=375409
@ -6,31 +6,29 @@ PORTVERSION= 1.3.0
|
||||
CATEGORIES= devel ruby
|
||||
MASTER_SITES= RG
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Term::ANSIColor for Ruby
|
||||
|
||||
RUN_DEPENDS= rubygem-tins>=0.8:${PORTSDIR}/devel/rubygem-tins
|
||||
LICENSE= GPLv2
|
||||
|
||||
RUN_DEPENDS= rubygem-tins>=1.0:${PORTSDIR}/devel/rubygem-tins
|
||||
|
||||
OPTIONS_DEFINE= EXAMPLES
|
||||
|
||||
USE_RUBY= yes
|
||||
USE_RUBYGEMS= yes
|
||||
RUBYGEM_AUTOPLIST= yes
|
||||
|
||||
PLIST_FILES+= bin/colortab bin/term_display bin/term_mandel
|
||||
|
||||
PLIST_FILES= bin/colortab bin/term_display bin/term_mandel
|
||||
PORTEXAMPLES= cdiff decolor
|
||||
|
||||
OPTIONS_DEFINE= EXAMPLES
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
post-patch:
|
||||
# Chop out the cdiff and decolor binaries; these should be installed to
|
||||
# EXAMPLESDIR
|
||||
${REINPLACE_CMD} -e '/^- [cd][de][ic][fo][fl]o*r*$$/d' \
|
||||
${WRKSRC}/term-ansicolor-${PORTVERSION}.gemspec
|
||||
@${REINPLACE_CMD} -e '/^- [cd][de][ic][fo][fl]o*r*$$/d' ${WRKSRC}/${GEM_NAME}.gemspec
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
${INSTALL_SCRIPT} ${PORTEXAMPLES:S,^,${WRKSRC}/bin/,} ${STAGEDIR}${EXAMPLESDIR}/
|
||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
|
||||
cd ${WRKSRC}/bin/ && ${INSTALL_SCRIPT} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,11 +1,23 @@
|
||||
Small Ruby library that colors strings using ANSI escape sequences.
|
||||
It's possible to use constants:
|
||||
|
||||
include Term::ANSIColor
|
||||
print red, bold, "red bold", reset, "\n"
|
||||
|
||||
or
|
||||
or unary functions:
|
||||
|
||||
print red(bold("red bold")), "\n"
|
||||
|
||||
WWW: http://rubygems.org/gems/term-ansicolor/
|
||||
Blockforms do also autoreset at the block's end:
|
||||
|
||||
print red { bold { "red bold" } }, "\n"
|
||||
|
||||
It's also possible to use this module as Mixin for classes of objects that
|
||||
respond to :to_str, e.g. String.
|
||||
|
||||
class String
|
||||
include Term::ANSIColor
|
||||
end
|
||||
print "red bold".red.bold, "\n"
|
||||
|
||||
WWW: http://flori.github.io/term-ansicolor/
|
||||
RG: https://rubygems.org/gems/term-ansicolor
|
||||
|
Loading…
Reference in New Issue
Block a user