26 | | depends_lib p5.16-archive-zip \ |
27 | | p5.16-file-which \ |
28 | | p5.16-getopt-long \ |
29 | | p5.16-image-size \ |
30 | | p5.16-io-string \ |
31 | | p5.16-json-xs \ |
32 | | p5.16-libwww-perl \ |
33 | | p5.16-parse-recdescent \ |
34 | | p5.16-time-hires \ |
35 | | p5.16-uri \ |
36 | | p5.16-xml-libxml \ |
37 | | p5.16-xml-libxslt \ |
38 | | p5.16-perlmagick |
39 | | |
40 | | # That last seems to be the way to depend on TeX |
41 | | # being installed, without necessarily requiring |
42 | | # _specifically_ texlive (eg MacTeX or something |
43 | | # else perhaps can work, if /usr/texbin is in |
44 | | # binpath in macports.conf) |
45 | | # |
| 33 | if {${perl5.major} != ""} { |
| 34 | depends_lib-append \ |
| 35 | port:p${perl5.major}-archive-zip \ |
| 36 | port:p${perl5.major}-file-which \ |
| 37 | port:p${perl5.major}-getopt-long \ |
| 38 | port:p${perl5.major}-image-size \ |
| 39 | port:p${perl5.major}-io-string \ |
| 40 | port:p${perl5.major}-json-xs \ |
| 41 | port:p${perl5.major}-libwww-perl \ |
| 42 | port:p${perl5.major}-parse-recdescent \ |
| 43 | port:p${perl5.major}-time-hires \ |
| 44 | port:p${perl5.major}-uri \ |
| 45 | port:p${perl5.major}-xml-libxml \ |
| 46 | port:p${perl5.major}-xml-libxslt \ |
| 47 | port:p${perl5.major}-perlmagick |
| 48 | } |
50 | | # It (hopefully) will find any installation if it can find kpsewhich |
51 | | # However, we don't require a dependency here since |
52 | | # users may prefer MacTeX, or MacPort's texlive or .... |
53 | | # bin:texhash:texlive |
54 | | notes "${name} works best with some version of TeX installed. \ |
55 | | Please install MacTeX or 'sudo port install texlive' (or other system) first." |
| 54 | # - it uses some latex style files from texlive within bindings |
| 55 | # - it can install its own style files for use within tex/latex |
| 56 | # We could simply depend on texlive, but some folks prefer MacTeX |
| 57 | # and object to 2nd multi-GB download! So we define variants. |
57 | | #============================================================ |
58 | | # Configuration |
59 | | # Override configure to do it the perl way. |
60 | | configure.cmd ${prefix}/bin/perl5.16 Makefile.PL |
61 | | |
62 | | # Note that installation does |
63 | | # make install DESTDIR=${destroot} |
64 | | # which stages the installation to $destroot, NOT the eventual final installation. |
| 59 | notes "${name} works best with some version of TeX installed. \ |
| 60 | Please consider +texlive variant, or PRE-install MacTeX and use +mactex variant." |
66 | | #============================================================ |
67 | | # Do this to enable testing |
68 | | # test.run yes |
| 62 | # The texlive variant depends on texlive |
| 63 | # and install latexml's stylefiles to texlive's texmf |
| 64 | variant texlive description {Build with (macports) texlive support} { |
| 65 | notes "Using texlive for TeX: will install styles to its texmf" |
| 66 | depends_lib-append texlive |
| 67 | configure.args-append TEXMF=[exec kpsewhich --expand-var='\$TEXMFLOCAL'] |
| 68 | post-activate { system "mktexlsr" } |
| 69 | } |
| 70 | |
| 71 | # The mactex variant expects MacTeX to be installed |
| 72 | # and installs latexml's stylefiles to MacTeX's texmf |
| 73 | variant mactex description {Build with MacTeX support} { |
| 74 | # check if MacTeX actually seems to be there... |
| 75 | pre-configure { |
| 76 | if {![file executable /usr/texbin/kpsewhich]} { |
| 77 | ui_error "I cannot find MacTeX's kpswhich in /usr/texbin; aborting installation" |
| 78 | return -code error |
| 79 | } } |
| 80 | notes "Using MacTeX for TeX: will install styles to MacTeX's texmf |
| 81 | (outside macport's common directory structure)" |
| 82 | configure.args-append TEXMF=[exec /usr/texbin/kpsewhich --expand-var='\$TEXMFLOCAL'] |
| 83 | post-activate { system /usr/texbin/mktexlsr } |
| 84 | # AND, since we're installing files outside macport's normal directories |
| 85 | destroot.violate_mtree yes |
| 86 | } |