source: trunk/dports/ruby/rb-hyperestraier/Portfile

Last change on this file was 136054, checked in by mf2k@…, 2 years ago

hyperestraier p5-mecab py-hyperestraier py-mecab qdbm rb-hyperestraier rb-mecab rb19-mecab: Ports abandoned by gmail.com:rsky0711. (#47295)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# $Id: Portfile 136054 2015-05-11 14:00:12Z ryandesign@macports.org $
2
3PortSystem      1.0
4PortGroup       ruby 1.0
5ruby.setup      hyperestraier 1.4.13 gnu {}
6maintainers     nomaintainer
7platforms       darwin
8description     Ruby binding of Hyper Estraier
9long_description ${description}
10
11homepage        http://hyperestraier.sourceforge.net/
12master_sites    http://hyperestraier.sourceforge.net/
13dist_subdir     hyperestraier
14distname        hyperestraier-${version}
15worksrcdir      hyperestraier-${version}/rubynative
16checksums       md5 847aefb9e23266545280378d797f3981 \
17                sha1 21c3f325f42019fef096172105c2fc16f3e72fc0 \
18                rmd160 8af0af25df6d5bd45a09e9abfbb26300339b5a2c
19
20categories      ruby textproc
21depends_lib     port:ruby port:hyperestraier
22# fix old ruby C-API
23patchfiles      patch-rubynative-src-estraier.c.diff \
24                patch-rubynative-configure.diff
25
26configure.args-append --bindir=${ruby.bindir}
27configure.env-append RUBY=${ruby.bin} RDOC=${ruby.rdoc} HOME=${prefix}
28
29post-extract {
30    # Makefile.in
31    reinplace "s|\$(HOME)|${prefix}|g" \
32        ${worksrcpath}/Makefile.in
33    reinplace "s|MYRBLIBS = estraier\.so|MYRBLIBS = estraier.bundle|g" \
34        ${worksrcpath}/Makefile.in
35    # estcmd.rb
36    reinplace "s|/usr/bin/ruby|${ruby.bin}|g" \
37        ${worksrcpath}/estcmd.rb
38
39    if { [variant_isset p2p] } {
40        # configure
41        reinplace "s|\$HOME|${prefix}|g" \
42            ${workpath}/${distname}/rubypure/configure
43        # Makefile.in
44        reinplace "s|@RUBY@|${ruby.bin}|g" \
45            ${workpath}/${distname}/rubypure/Makefile.in
46        # estcall.rb
47        reinplace "s|/usr/bin/ruby|${ruby.bin}|g" \
48            ${workpath}/${distname}/rubypure/estcall.rb
49    }
50}
51
52post-destroot {
53    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/examples
54    xinstall -m 644 ${worksrcpath}/overview \
55        ${destroot}${prefix}/share/doc/${name}
56    xinstall -m 644 -W ${worksrcpath}/example \
57        example001.rb example002.rb \
58        ${destroot}${prefix}/share/doc/${name}/examples
59
60    if { [variant_isset p2p] } {
61        system "cd ${workpath}/${distname}/rubypure; \
62            ./configure --prefix=${prefix} && \
63            ${build.cmd} && \
64            ${destroot.cmd} install ${destroot.destdir}"
65
66        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/p2p/examples
67        xinstall -m 644 ${workpath}/${distname}/rubypure/overview \
68            ${destroot}${prefix}/share/doc/${name}/p2p
69        xinstall -m 644 -W ${workpath}/${distname}/rubypure/example \
70            example001.rb example002.rb \
71            ${destroot}${prefix}/share/doc/${name}/p2p/examples
72    }
73}
74
75variant p2p {
76    categories-append   net
77}
Note: See TracBrowser for help on using the repository browser.