1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

- update to 0.2.7 from github

- use STAGEDIR
This commit is contained in:
Dirk Meyer 2014-03-30 14:12:45 +00:00
parent fd725de7e0
commit c64dba031d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349621
3 changed files with 27 additions and 39 deletions

View File

@ -2,21 +2,28 @@
# $FreeBSD$
PORTNAME= amatch
PORTVERSION= 0.2.5
PORTVERSION= 0.2.7
CATEGORIES= textproc ruby
MASTER_SITES= RF
MASTER_SITES= https://codeload.github.com/flori/amatch/zipball/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
EXTRACT_SUFX= .tgz
DIST_SUBDIR= ruby
EXTRACT_SUFX=
DISTNAME= v${PORTVERSION}
DIST_SUBDIR= ruby/amatch
MAINTAINER= ruby@FreeBSD.org
COMMENT= Ruby library for approximate string matching and searching
OPTIONS_DEFINE= DOCS
NO_BUILD= yes # build while install
USE_RUBY= yes
USES= gmake
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
USE_GITHUB= yes
GH_ACCOUNT= flori
GH_TAGNAME= v${PORTVERSION}
GH_COMMIT= 98473c4
CONFIGURE_WRKSRC= ${WRKSRC}/ext
BUILD_WRKSRC= ${WRKSRC}/ext
PLIST_FILES= bin/agrep.rb %%RUBY_SITELIBDIR%%/amatch/version.rb \
%%RUBY_SITEARCHLIBDIR%%/amatch.so
@ -24,17 +31,23 @@ PLIST_DIRS= %%RUBY_SITELIBDIR%%/amatch
AMATCH_RUBY= install.rb
DOCSDIR= ${RUBY_MODDOCDIR}
PORTDOCS= CHANGES README
PORTDOCS= CHANGES README.rdoc
NO_STAGE= yes
.include <bsd.port.options.mk>
do-install:
@${ECHO_MSG} "===> Running ${AMATCH_RUBY} to install"
cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${AMATCH_RUBY} install
${MKDIR} ${STAGEDIR}${RUBY_SITELIBDIR}/amatch \
${STAGEDIR}${RUBY_SITEARCHLIBDIR}
${INSTALL_SCRIPT} ${WRKSRC}/bin/agrep.rb \
${STAGEDIR}${PREFIX}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/lib/amatch/version.rb \
${STAGEDIR}${RUBY_SITELIBDIR}/amatch/
${INSTALL_DATA} ${WRKSRC}/ext/amatch.so \
${STAGEDIR}${RUBY_SITEARCHLIBDIR}/
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}/
cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
${MKDIR} ${STAGEDIR}${DOCSDIR}/
cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} \
${STAGEDIR}${DOCSDIR}/
.endif
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (ruby/amatch-0.2.5.tgz) = fd3eb6ac602fbd7dac3d51d3476da750e1cb20e3b1597529c0ebcbfc24591322
SIZE (ruby/amatch-0.2.5.tgz) = 38582
SHA256 (ruby/amatch/v0.2.7) = 2d254225a5006efe35feec75fd36c5291045812bf45533e966344dafb1a2cb14
SIZE (ruby/amatch/v0.2.7) = 30512

View File

@ -1,25 +0,0 @@
--- ext/amatch.c.orig 2009-08-26 02:35:48.000000000 +0200
+++ ext/amatch.c 2010-04-23 12:48:35.000000000 +0200
@@ -89,9 +89,10 @@
if (TYPE(strings) == T_STRING) { \
return match_function(amatch, strings); \
} else { \
- Check_Type(strings, T_ARRAY); \
int i; \
- VALUE result = rb_ary_new2(RARRAY_LEN(strings)); \
+ VALUE result; \
+ Check_Type(strings, T_ARRAY); \
+ result = rb_ary_new2(RARRAY_LEN(strings)); \
for (i = 0; i < RARRAY_LEN(strings); i++) { \
VALUE string = rb_ary_entry(strings, i); \
if (TYPE(string) != T_STRING) { \
@@ -1098,8 +1099,8 @@
if (TYPE(strings) == T_STRING) {
result = PairDistance_match(amatch, strings, regexp, use_regexp);
} else {
- Check_Type(strings, T_ARRAY);
int i;
+ Check_Type(strings, T_ARRAY);
result = rb_ary_new2(RARRAY_LEN(strings));
for (i = 0; i < RARRAY_LEN(strings); i++) {
VALUE string = rb_ary_entry(strings, i);