source: trunk/dports/textproc/lookup/Portfile

Last change on this file was 137635, checked in by mojca@…, 2 years ago

lookup: whitespace only

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 137635 2015-06-15 16:37:32Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                lookup
7set ver_main        1.4
8set ver_media       20121122
9version             ${ver_main}-media-${ver_media}
10revision            1
11categories          textproc japanese
12maintainers         nomaintainer
13description         Dictionary search interface for Emacs, including the media patch
14long_description    ${description}
15platforms           darwin
16license             GPL-2+
17homepage            http://green.ribbon.to/~ikazuhiro/lookup/lookup.html
18master_sites        http://green.ribbon.to/~ikazuhiro/lookup/files/:lookup \
19                    http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/lookup/:texinfo-jp \
20                    ftp://fsci.fuk.kindai.ac.jp/pub/ptex/utils/:texinfo-jp
21distfiles           ${name}-${ver_main}+media-${ver_media}${extract.suffix}:lookup
22
23checksums           ${name}-${ver_main}+media-${ver_media}${extract.suffix} \
24                    rmd160  1f975a956c769a9eec8e5c513f1b037960dbb389 \
25                    sha256  417fb5d854816d0264be55377b960382a833a467364deeffce18d7a44138fe72 \
26                    texinfo.tex \
27                    rmd160  c5db8b73738942572423eb39dbe21ea91cdd84d2 \
28                    sha256  a25a0391f1ad2c9b9d76056676fda0166a334976a12719a857d9ebe66df0c63d
29
30depends_lib         path:bin/emacs:emacs \
31                    port:eblook
32depends_build       port:texinfo
33
34extract.only        ${name}-${ver_main}+media-${ver_media}${extract.suffix}
35worksrcdir          ${name}-${ver_main}+media-${ver_media}
36
37set dir_info        ${prefix}/share/info
38configure.args      --infodir=${dir_info}
39
40use_parallel_build  yes
41
42# The following line is a workaround to avoid "Searching for program: unknown error: 0" problem.
43build.env           SHELL=/bin/bash
44
45#test.run        yes
46#test.target     check
47
48post-destroot {
49    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
50    set docs {AUTHORS COPYING ChangeLog NEWS README README.org VERSION}
51    foreach f ${docs} {
52        xinstall -m 644 ${worksrcpath}/${f} ${destroot}${prefix}/share/doc/${name}
53    }
54
55    delete ${destroot}${dir_info}/dir
56}
57
58# MacPorts does not have post-deactivate phase yet.
59#set infos {lookup-guide lookup}
60#post-activate {
61#    foreach f ${infos} {
62#        system "install-info --info-dir=${dir_info} ${prefix}/share/info/${f}.info"
63#    }
64#}
65#post-deactivate {
66#    foreach f ${infos} {
67#        system "install-info --delete --info-dir=${dir_info} ${prefix}/share/info/${f}.info"
68#    }
69#}
70
71universal_variant   no
72
73variant emacs_app conflicts carbon_emacs_package description {Use this package with Emacs.app} {
74    depends_lib-delete      path:bin/emacs:emacs
75    depends_lib-append      path:${applications_dir}/Emacs.app/Contents/MacOS/Emacs:emacs-app
76    set dir_info            ${applications_dir}/Emacs.app/Contents/Resources/info
77    configure.env           EMACS=${applications_dir}/Emacs.app/Contents/MacOS/Emacs
78    configure.args          --with-lispdir=${applications_dir}/Emacs.app/Contents/Resources/site-lisp/lookup \
79                            --infodir=${dir_info}
80    notes-append "Before using lookup with emacs.app, put \"(setq exec-path (cons \"${prefix}/bin\" exec-path))\" in your .emacs"
81}
82
83variant carbon_emacs_package conflicts emacs_app description {Use this package with Carbon Emacs Package} {
84    depends_lib-delete      path:bin/emacs:emacs
85    set dir_info            /Applications/Emacs.app/Contents/Resources/info
86    configure.env           EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs
87    configure.args          --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/lookup \
88                            --infodir=${dir_info}
89    pre-configure {
90        if {![file exists /Applications/Emacs.app/Contents/MacOS/Emacs]} {
91            return -code error "Before building this port, please install Carbon Emacs Package into /Application folder."
92        }
93    }
94    destroot.violate_mtree  yes
95    notes-append "This variant has been deprecated. Please consider using +emacs_app instead."
96}
97
98variant ptex description {Build and install PDF documents using pTeX} {
99    distfiles-append        texinfo.tex:texinfo-jp
100    depends_build-append    port:texlive-lang-japanese \
101                            port:texlive-fonts-recommended
102    post-extract {
103        # this is texinfo.tex 2008-11-25.16 with Japanese support
104        copy ${distpath}/texinfo.tex ${worksrcpath}/texi
105    }
106    post-patch {
107        reinplace "s|documentlanguage ja|documentlanguage en|" ${worksrcpath}/texi/lookup.texi
108    }
109    post-build {
110        # A little glitch remains in the concept index page
111        # because MacPorts's texinfo isn't jtexinfo (i.e. texinfo with Japanese support.)
112        system "cd ${worksrcpath}/texi && ptex -kanji=utf8 lookup.texi && texindex lookup.?? && ptex -kanji=utf8 lookup.texi && dvipdfmx lookup.dvi"
113    }
114    post-destroot {
115        xinstall -m 644 ${worksrcpath}/texi/lookup.pdf ${destroot}${prefix}/share/doc/${name}
116    }
117}
118
119livecheck.type      regex
120livecheck.version   ${ver_main}+media-${ver_media}
121livecheck.regex     "${name}-(\[0-9.a-z\+\-\]+).tar.gz"
Note: See TracBrowser for help on using the repository browser.