mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-30 05:40:06 +00:00
2c1d5c8d64
NOPORTDOCS -> PORT_OPTIONS:MDOCS
102 lines
3.4 KiB
Makefile
102 lines
3.4 KiB
Makefile
# Created by: TAKATSU Tomonari <tota@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= rabbit
|
|
PORTVERSION= 1.0.9
|
|
CATEGORIES= misc ruby
|
|
MASTER_SITES= http://rabbit-shockers.org/download/ \
|
|
LOCAL
|
|
MASTER_SITE_SUBDIR= tota/${PORTNAME}
|
|
|
|
MAINTAINER= tota@FreeBSD.org
|
|
COMMENT= An RD-document-based presentation application
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/GPL
|
|
|
|
RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/gtk2.so:${PORTSDIR}/x11-toolkits/ruby-gtk2 \
|
|
${RUBY_SITEARCHLIBDIR}/rsvg2.so:${PORTSDIR}/graphics/ruby-rsvg2 \
|
|
${RUBY_SITEARCHLIBDIR}/poppler.so:${PORTSDIR}/x11-toolkits/ruby-poppler \
|
|
${RUBY_SITEARCHLIBDIR}/gio2.so:${PORTSDIR}/devel/ruby-gio2 \
|
|
hikidoc:${PORTSDIR}/textproc/ruby-hikidoc \
|
|
rubygem-nokogiri>0:${PORTSDIR}/textproc/rubygem-nokogiri \
|
|
rubygem-sinatra>0:${PORTSDIR}/www/rubygem-sinatra \
|
|
rubygem-haml>0:${PORTSDIR}/www/rubygem-haml \
|
|
rd2:${PORTSDIR}/textproc/ruby-rdtool \
|
|
rubygem-coderay>=1.0.0:${PORTSDIR}/textproc/rubygem-coderay \
|
|
rubygem-kramdown>0:${PORTSDIR}/textproc/rubygem-kramdown
|
|
|
|
USE_RUBY= yes
|
|
USE_RUBY_SETUP= yes
|
|
RUBY_SHEBANG_FILES= bin/rabbirack \
|
|
bin/rabbirc \
|
|
bin/rabbit \
|
|
bin/rabbit-command \
|
|
bin/rabbit-theme-manager \
|
|
bin/rabbiter \
|
|
bin/rabrick
|
|
|
|
PORTDOCS= *
|
|
PORTEXAMPLES= *
|
|
PORTDATA= *
|
|
|
|
OPTIONS_DEFINE= MIMETEX TWITTER
|
|
MIMETEX_DESC= Run with mimetex
|
|
TWITTER_DESC= Run with Twitter
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MNLS}
|
|
USES= gettext
|
|
RUN_DEPENDS+= rubygem-gettext>0:${PORTSDIR}/devel/rubygem-gettext
|
|
PLIST_SUB+= NLS=""
|
|
.else
|
|
PLIST_SUB+= NLS="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMIMETEX}
|
|
RUN_DEPENDS+= ${LOCALBASE}/www/mimetex/cgi-bin/mimetex.cgi:${PORTSDIR}/www/mimetex
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MTWITTER}
|
|
RUN_DEPENDS+= rubygem-twitter_oauth>=0:${PORTSDIR}/security/rubygem-twitter_oauth \
|
|
rubygem-twitter-stream>=0.1.16:${PORTSDIR}/net/rubygem-twitter-stream
|
|
.endif
|
|
|
|
post-patch:
|
|
${RM} ${WRKSRC}/bin/rabwii
|
|
${RUBY} -i -pe 'sub %r|((\s*)require "rack")|, %Q|\\2require "rubygems"\n\\1|' ${WRKSRC}/bin/rabbirack
|
|
${RUBY} -i -pe 'sub %r|(require "hikidoc")|, %Q|require "rubygems"\n\\1|' ${WRKSRC}/lib/rabbit/parser/wiki.rb
|
|
${RUBY} -i -pe "sub %r|((\s*)require 'twitter_oauth')|, %Q|\\\2require 'rubygems'\n\\\1|" ${WRKSRC}/lib/rabbit/twitter.rb
|
|
${RUBY} -i -pe "sub %r|(require 'coderay')|, %Q|require 'rubygems'\n\\\1|" ${WRKSRC}/lib/rabbit/parser/ext/coderay.rb
|
|
.if ${PORT_OPTIONS:MMIMETEX}
|
|
${REINPLACE_CMD} -e 's|"mimetex.cgi"|"${PREFIX}/www/mimetex/cgi-bin/mimetex.cgi"|' \
|
|
${WRKSRC}/lib/rabbit/parser/ext/tex.rb
|
|
.endif
|
|
|
|
post-install:
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
@${MKDIR} ${DOCSDIR}
|
|
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
|
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR}
|
|
.endif
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
@cd ${WRKSRC}/sample && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
|
|
.endif
|
|
.if defined(NOPORTDATA)
|
|
@${RM} -r ${DATADIR}
|
|
.endif
|
|
|
|
# This target is only meant to be used by the port maintainer.
|
|
x-generate-plist:
|
|
${CP} /dev/null pkg-plist.new
|
|
.for f in ${RUBY_SHEBANG_FILES}
|
|
${ECHO} ${f} >> pkg-plist.new
|
|
.endfor
|
|
${FIND} ${RUBY_SITELIBDIR}/rabbit -type f | ${SORT} | ${SED} -e 's,${RUBY_SITELIBDIR},%%RUBY_SITELIBDIR%%,' >> pkg-plist.new
|
|
${FIND} ${PREFIX}/share/locale -type f -name rabbit.mo | ${SORT} | ${SED} -e 's,^${PREFIX}/,%%NLS%%,' >> pkg-plist.new
|
|
${FIND} ${RUBY_SITELIBDIR}/rabbit -type d -depth | ${SORT} -r | ${SED} -e 's,${RUBY_SITELIBDIR},@dirrm %%RUBY_SITELIBDIR%%,' >> pkg-plist.new
|
|
|
|
.include <bsd.port.mk>
|