mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
- Unbreak by makeing use of latest code on Github
- Adapt to new options framework
This commit is contained in:
parent
7dadfc8a88
commit
5ba687ea39
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=317456
@ -2,24 +2,101 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= io-like
|
||||
PORTVERSION= 0.3.0
|
||||
PORTVERSION= 0.3.0.20130301
|
||||
CATEGORIES= devel rubygems
|
||||
MASTER_SITES= RG
|
||||
MASTER_SITES= LOCAL
|
||||
MASTER_SITE_SUBDIR= tota/${PORTNAME}
|
||||
PKGNAMEPREFIX= rubygem-
|
||||
|
||||
MAINTAINER= tota@FreeBSD.org
|
||||
COMMENT= The interface of IO objects to classes providing a few simple methods
|
||||
|
||||
DEPRECATED= Does not work with Ruby 1.9
|
||||
EXPIRATION_DATE= 2013-05-02
|
||||
BUILD_DEPENDS= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems \
|
||||
rdoc:${PORTSDIR}/devel/rubygem-rdoc
|
||||
RUN_DEPENDS= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
|
||||
|
||||
USE_RUBY= yes
|
||||
USE_RUBYGEMS= yes
|
||||
RUBYGEM_AUTOPLIST= yes
|
||||
USE_RAKE= yes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER}
|
||||
GEMS_DIR= ${GEMS_BASE_DIR}/gems
|
||||
DOC_DIR= ${GEMS_BASE_DIR}/doc
|
||||
CACHE_DIR= ${GEMS_BASE_DIR}/cache
|
||||
SPEC_DIR= ${GEMS_BASE_DIR}/specifications
|
||||
GEM_NAME= ${PORTNAME}-${PORTVERSION:C/(\.[0-9]+)$//}
|
||||
GEM_LIB_DIR= ${GEMS_DIR}/${GEM_NAME}
|
||||
GEM_DOC_DIR= ${DOC_DIR}/${GEM_NAME}
|
||||
GEM_SPEC= ${SPEC_DIR}/${GEM_NAME}.gemspec
|
||||
GEM_CACHE= ${CACHE_DIR}/${GEM_NAME}.gem
|
||||
|
||||
.if ${RUBY_VER} == 1.9
|
||||
BROKEN= does not work with ruby 1.9
|
||||
PLIST_SUB+= PORTVERSION="${PORTVERSION}" \
|
||||
REV="${RUBY_GEM}" \
|
||||
GEMS_BASE_DIR="lib/ruby/gems/${RUBY_VER}" \
|
||||
GEMS_DIR="${GEMS_DIR}" \
|
||||
DOC_DIR="${DOC_DIR}" \
|
||||
CACHE_DIR="${CACHE_DIR}" \
|
||||
SPEC_DIR="${SPEC_DIR}" \
|
||||
PORT="${PORTNAME}-${PORTVERSION}" \
|
||||
GEM_NAME="${GEM_NAME}" \
|
||||
GEM_LIB_DIR="${GEM_LIB_DIR}" \
|
||||
GEM_DOC_DIR="${GEM_DOC_DIR}" \
|
||||
GEM_SPEC="${GEM_SPEC}" \
|
||||
GEM_CACHE="${GEM_CACHE}" \
|
||||
EXTRACT_SUFX=".gem"
|
||||
|
||||
RUBYGEMBIN= ${LOCALBASE}/bin/gem${RUBY_VER:S/.//}
|
||||
|
||||
GEMFILES= ${GEM_NAME}.gem
|
||||
|
||||
RUBYGEM_ARGS=-l --no-update-sources --no-ri --install-dir ${PREFIX}/lib/ruby/gems/${RUBY_VER}
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-ruby-1.9-temp
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
BUILD_DEPENDS+= rubygem-allison>=0:${PORTSDIR}/devel/rubygem-allison
|
||||
.else
|
||||
RUBYGEM_ARGS+= --no-rdoc
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
post-patch:
|
||||
.for l in 1.8.6 1.8.7 1.9.2 1.9.3
|
||||
@${ECHO} lib/io/like-${l}.rb >> ${WRKSRC}/MANIFEST
|
||||
.endfor
|
||||
.for f in likestringio.rb rot13filter.rb
|
||||
@${RUBY} -i -pe "sub %r|((\s*)require 'io/like')|, %Q|\\\2require 'rubygems'\n\\\1|" ${WRKSRC}/examples/${f}
|
||||
.endfor
|
||||
|
||||
do-build:
|
||||
@cd ${BUILD_WRKSRC} && ${RAKE_BIN}
|
||||
|
||||
do-install:
|
||||
@(cd ${INSTALL_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} pkg/${GEMFILES} -- --build-args ${CONFIGURE_ARGS})
|
||||
|
||||
post-install:
|
||||
@${ECHO} ${GEM_CACHE} >> ${TMPPLIST}
|
||||
@${ECHO} ${GEM_SPEC} >> ${TMPPLIST}
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${FIND} -ds ${PREFIX}/${GEM_DOC_DIR} -type f -print | ${SED} -E -e \
|
||||
's,^${PREFIX}/?,,' >> ${TMPPLIST}
|
||||
@${FIND} -ds ${PREFIX}/${GEM_DOC_DIR} -type d -print | ${SED} -E -e \
|
||||
's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}
|
||||
.endif
|
||||
@${FIND} -ds ${PREFIX}/${GEM_LIB_DIR} -type f -print | ${SED} -E -e \
|
||||
's,^${PREFIX}/?,,' >> ${TMPPLIST}
|
||||
@${FIND} -ds ${PREFIX}/${GEM_LIB_DIR} -type d -print | ${SED} -E -e \
|
||||
's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${GEMS_DIR} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${DOC_DIR} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
.endif
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${CACHE_DIR} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${SPEC_DIR} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/${GEMS_BASE_DIR} 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems 2>/dev/null || true" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec rmdir %D/lib/ruby 2>/dev/null || true" >> ${TMPPLIST}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (rubygem/io-like-0.3.0.gem) = d3fc128940d11704ac0d9bc0d46a2b30be162aca030273e690b1bfca8506d612
|
||||
SIZE (rubygem/io-like-0.3.0.gem) = 31744
|
||||
SHA256 (io-like-0.3.0.20130301.tar.gz) = aa83c964b18be21fa51d4ae04d1284e4751babb9827022f2fa486830fa5fd5ce
|
||||
SIZE (io-like-0.3.0.20130301.tar.gz) = 81450
|
||||
|
Loading…
Reference in New Issue
Block a user