aboutsummaryrefslogtreecommitdiff
path: root/www/tdiary/Makefile
diff options
context:
space:
mode:
authorTAKATSU Tomonari <tota@FreeBSD.org>2013-10-13 05:25:07 +0000
committerTAKATSU Tomonari <tota@FreeBSD.org>2013-10-13 05:25:07 +0000
commitdde54a3134105d7bc60cd062a9c7f84c8ec4ee4d (patch)
tree20545339a6e618ebf6a39d176c591479344d4598 /www/tdiary/Makefile
parentb5673794348c617559295cb88d513e2fa17522e7 (diff)
downloadports-dde54a3134105d7bc60cd062a9c7f84c8ec4ee4d.tar.gz
ports-dde54a3134105d7bc60cd062a9c7f84c8ec4ee4d.zip
Notes
Diffstat (limited to 'www/tdiary/Makefile')
-rw-r--r--www/tdiary/Makefile74
1 files changed, 32 insertions, 42 deletions
diff --git a/www/tdiary/Makefile b/www/tdiary/Makefile
index 5a9c44232b05..10b7afc46fa1 100644
--- a/www/tdiary/Makefile
+++ b/www/tdiary/Makefile
@@ -2,28 +2,30 @@
# $FreeBSD$
PORTNAME= tdiary
-PORTVERSION= 3.2.2
+PORTVERSION= 4.0.0
CATEGORIES?= www ruby
MASTER_SITES= http://www.tdiary.org/download/
-DISTNAME= ${PORTNAME}-full-${PORTVERSION}
+DISTNAME= ${PORTNAME}-full-v${PORTVERSION}
MAINTAINER= tota@FreeBSD.org
COMMENT= Web-based diary system (like weblog) written in Ruby
LICENSE= GPLv2
-RUN_DEPENDS= hikidoc:${PORTSDIR}/textproc/ruby-hikidoc \
- rubygem-imagesize>=0.1.1:${PORTSDIR}/graphics/rubygem-imagesize \
- rubygem-json_pure>=1.7.7:${PORTSDIR}/devel/rubygem-json_pure
+RUN_DEPENDS= rubygem-fastimage>=1.5.0:${PORTSDIR}/graphics/rubygem-fastimage \
+ hikidoc:${PORTSDIR}/textproc/ruby-hikidoc \
+ rubygem-multi_json>=1.7.7:${PORTSDIR}/devel/rubygem-multi_json \
+ rubygem-rack>=0:${PORTSDIR}/www/rubygem-rack
NO_BUILD= yes
USE_RUBY= yes
-RUBY_REQUIRE= Ruby >= 185
+RUBY_REQUIRE= Ruby >= 193
RUBY_SHEBANG_FILES= index.fcgi \
index.rb \
update.fcgi \
update.rb \
+ bin/tdiary \
misc/convert2.rb \
misc/migrate.rb \
misc/plugin/amazon/amazonimg.rb \
@@ -43,7 +45,7 @@ PORTDOCS= ChangeLog doc.css ${HTML} ${MD}
SUB_FILES= pkg-message tdiaryinst.rb
SUB_LIST+= TDIARY_LANG=${TDIARY_LANG} \
TDIARY_SCRIPT=${TDIARY_SCRIPT}
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+WRKSRC= ${WRKDIR}/${PORTNAME}-v${PORTVERSION}
DOCSDIR= ${PREFIX}/share/doc/${UNIQUENAME}
WWWDIR= ${PREFIX}/www/${UNIQUENAME}
@@ -56,36 +58,43 @@ TDIARY_LANG= en
REINPLACE_ARGS= -i ''
-OPTIONS_DEFINE= DOCS NORA
-OPTIONS_DEFAULT= NORA
+OPTIONS_DEFINE= DOCS
-NORA_DESC= Use Nora
+.include <bsd.port.pre.mk>
+
+.if ${RUBY_VER} == 1.9
+.if !defined(RUBY_PROVIDED)
+IGNORE= requires Ruby 1.9.3 or later
+.endif
+.endif
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+.if ${RUBY_VER} == 1.8
+.if !defined(RUBY_PROVIDED)
+IGNORE= requires Ruby 1.9.3 or later
+.endif
+.endif
pre-patch:
@${RM} ${WRKSRC}/.coveralls.yml
@${RM} ${WRKSRC}/.gitignore
@${RM} ${WRKSRC}/.travis.yml
- @${RM} ${WRKSRC}/Capfile
@${RM} ${WRKSRC}/Gemfile
@${RM} ${WRKSRC}/Gemfile.lock
@${RM} ${WRKSRC}/LICENSE
@${RM} ${WRKSRC}/Procfile
@${RM} ${WRKSRC}/Rakefile
@${RM} ${WRKSRC}/config.ru
+ @${RM} -r ${WRKSRC}/.bundle
+ @${RM} -r ${WRKSRC}/misc/lib/bundler-1.3.5
@${RM} -r ${WRKSRC}/public
@${RM} -r ${WRKSRC}/spec
@${RM} -r ${WRKSRC}/test
- @${RM} -r ${WRKSRC}/vendor/hikidoc-0.0.6
- @${RM} -r ${WRKSRC}/vendor/imagesize-0.1.1/*
- @${RM} -r ${WRKSRC}/vendor/json_pure-1.7.7
+ @${RM} -r ${WRKSRC}/vendor
@${MV} ${WRKSRC}/ChangeLog ${WRKSRC}/doc
@${MV} ${WRKSRC}/README.md ${WRKSRC}/doc
post-patch:
- @${RUBY} -i -pe "sub %r|((\s*)require 'json')|, %Q|\\\2require 'rubygems'\n\\\1|" ${WRKSRC}/tdiary.rb
+ @${RUBY} -i -pe "sub %r|(.*< ::Rack::Request)|, %Q|\trequire 'rack'\n\\\1|" ${WRKSRC}/tdiary/request.rb
pre-install:
@${SED} -e 's,#!/usr/bin/env ruby,#!${RUBY},' \
@@ -94,18 +103,17 @@ pre-install:
@${REINPLACE_CMD} '/#!\/usr\/bin\/env ruby/d' ${WRKSRC}/misc/migrate.rb
do-install:
- @${INSTALL_SCRIPT} ${WRKDIR}/${TDIARY_SCRIPT} ${PREFIX}/bin
- @-${MKDIR} ${WWWDIR}
- @${TAR} --exclude "doc" -C ${WRKSRC} -cf - . | ${TAR} --unlink -C ${WWWDIR} -xf -
- @${LN} -sf ${LOCALBASE}/lib/ruby/gems/${RUBY_VER}/gems/imagesize-0.1.1/lib ${WWWDIR}/vendor/imagesize-0.1.1/lib
- @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+ @${INSTALL_SCRIPT} ${WRKDIR}/${TDIARY_SCRIPT} ${STAGEDIR}${PREFIX}/bin
+ @-${MKDIR} ${STAGEDIR}${WWWDIR}
+ @${TAR} --exclude "doc" -C ${WRKSRC} -cf - . | ${TAR} --unlink -C ${STAGEDIR}${WWWDIR} -xf -
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}
post-install:
@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}' >> ${TMPPLIST}
@${ECHO_CMD} bin/${TDIARY_SCRIPT} >> ${TMPPLIST}
.if ${PORT_OPTIONS:MDOCS}
- @${INSTALL} -d ${DOCSDIR}
- @cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+ @${INSTALL} -d ${STAGEDIR}${DOCSDIR}
+ @cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
@@ -113,22 +121,4 @@ x-generate-plist:
${FIND} ${WWWDIR} -type f -o -type l | ${SORT} | ${SED} -e 's,${WWWDIR},%%WWWDIR%%,g' > pkg-plist.new
${FIND} ${WWWDIR} -type d -depth | ${SORT} -r | ${SED} -e 's,${WWWDIR},@dirrm %%WWWDIR%%,g' >> pkg-plist.new
-.include <bsd.port.pre.mk>
-
-.if ${RUBY_VER} == 1.9
-.if !defined(RUBY_PROVIDED)
-IGNORE= requires Ruby 1.9.1 or later
-.endif
-.endif
-
-.if ${RUBY_VER} == 1.8
-.if !defined(RUBY_PROVIDED)
-IGNORE= requires Ruby 1.8.5 or later
-.endif
-RUN_DEPENDS+= ${DEPEND_RUBY_ICONV}
-.if ${PORT_OPTIONS:MNORA}
-RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/web/escape_ext.so:${PORTSDIR}/www/ruby-nora
-.endif
-.endif
-
.include <bsd.port.post.mk>