blob: 4f413b103b9f4e8d23a227f163ce1b9353dba34c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Created by: TAKATSU Tomonari <tota@FreeBSD.org>
# $FreeBSD$
PORTNAME= mikutter
PORTVERSION= 3.0.4
CATEGORIES= net-im ruby
MASTER_SITES= http://mikutter.hachune.net/bin/ \
LOCAL
MASTER_SITE_SUBDIR= tota/${PORTNAME}
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= tota@FreeBSD.org
COMMENT= Simple, powerful, and moeful Twitter client
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= rubygem-gtk2>=2.1.0:${PORTSDIR}/x11-toolkits/rubygem-gtk2 \
rubygem-cairo>=1.12.8:${PORTSDIR}/graphics/rubygem-cairo \
rubygem-addressable>=2.3.5:${PORTSDIR}/www/rubygem-addressable \
rubygem-hmac>=0.4.0:${PORTSDIR}/security/rubygem-hmac \
rubygem-json>=1.8.1:${PORTSDIR}/devel/rubygem-json \
${RUBY_SITELIBDIR}/memoize.rb:${PORTSDIR}/devel/ruby-memoize \
rubygem-oauth>=0.4.7:${PORTSDIR}/net/rubygem-oauth \
${RUBY_SITELIBDIR}/bsearch.rb:${PORTSDIR}/devel/ruby-bsearch \
rubygem-typed-array>=0.1.2:${PORTSDIR}/devel/rubygem-typed-array \
rubygem-delayer>=0.0.2:${PORTSDIR}/devel/rubygem-delayer \
rubygem-gettext>=2.3.1:${PORTSDIR}/devel/rubygem-gettext
WRKSRC= ${WRKDIR}/${PORTNAME}
USE_RUBY= yes
NO_BUILD= yes
RUBY_SHEBANG_FILES= mikutter.rb \
core/miku/miku.rb \
core/lib/piapro.rb \
devel/makechi.rb
PORTDOCS= README
SUB_FILES= mikutter.desktop
SUB_LIST= RUBY_SITELIBDIR=${RUBY_SITELIBDIR}
REINPLACE_ARGS= -i ''
OPTIONS_DEFINE= DOCS HTTPCLIENT NOTIFY
HTTPCLIENT_DESC= httpclient support
NOTIFY_DESC= notify-send support
OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MHTTPCLIENT}
RUN_DEPENDS+= rubygem-httpclient>=0:${PORTSDIR}/www/rubygem-httpclient
.endif
.if ${PORT_OPTIONS:MNOTIFY}
RUN_DEPENDS+= notify-send:${PORTSDIR}/devel/libnotify
.endif
post-patch:
@${REINPLACE_CMD} -e "s|%%RUBY_SITELIBDIR%%|${RUBY_SITELIBDIR}|" \
${WRKSRC}/mikutter.rb
@${RM} -r ${WRKSRC}/vendor
do-install:
${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/mikutter.rb ${STAGEDIR}${PREFIX}/bin/mikutter
cd ${INSTALL_WRKSRC} \
&& ${COPYTREE_SHARE} core ${STAGEDIR}${RUBY_SITELIBDIR}/mikutter \
&& ${COPYTREE_SHARE} plugin ${STAGEDIR}${RUBY_SITELIBDIR}/mikutter
${INSTALL_DATA} ${WRKDIR}/${SUB_FILES} ${STAGEDIR}${PREFIX}/share/applications/
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${INSTALL_WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
x-generate-plist: stage
${ECHO} bin/mikutter > pkg-plist.new
${FIND} ${STAGEDIR}${RUBY_SITELIBDIR}/mikutter -type f | ${SORT} | ${SED} -e 's,${STAGEDIR}${RUBY_SITELIBDIR},%%RUBY_SITELIBDIR%%,' >> pkg-plist.new
${ECHO} share/applications/mikutter.desktop >> pkg-plist.new
${FIND} ${STAGEDIR}${RUBY_SITELIBDIR}/mikutter -type d -depth | ${SORT} -r | ${SED} -e 's,${STAGEDIR}${RUBY_SITELIBDIR},@dirrm %%RUBY_SITELIBDIR%%,' >> pkg-plist.new
${REINPLACE_CMD} -E 's|@dirrm (%%RUBY_SITELIBDIR%%/mikutter/plugin)|@dirrmtry \1|' pkg-plist.new
.include <bsd.port.mk>
|