# $Id$ PortSystem 1.0 name pTeX version 20110314 revision 6 epoch ${version} set ver_ptetex3 20080616 set ver_dvipdfmx 20110311 set ver_dvipsk 5.97-p1.7b-20090509 set ver_jsclasses 100314 set ver_txfonts 3.2.1 set ver_pxfonts 1.1.1 set ver_tipa 1.3-20090407 set ver_cm-super 0.3.4-20080709 set ver_utopia 20061119 set ver_fourier 1.4.1-20050130 set ver_mh 20071227 set ver_xcolor 2.11 set ver_pgf 2.10 set ver_beamer 3.10-208bcd589060 set ver_hyperref 20110309 set ver_oberdiek 20100501 set ver_ifxetex 20100912 set ver_pstricks pTeX-20110314_1 set ver_powerdot 20110220 categories tex print textproc japanese maintainers takanori openmaintainer description Japanese TeX (pTeX) processing environment long_description \ ${description} platforms darwin license Restrictive/Distributable homepage http://www.nn.iij4u.or.jp/~tutimura/tex/ptetex.html master_sites http://ftp.riken.go.jp/pub/tex-archive/obsolete/systems/unix/teTeX/3.0/distrib/:tetex \ http://ftp.yz.yamagata-u.ac.jp/pub/CTAN/obsolete/systems/unix/teTeX/3.0/distrib/:tetex \ http://dante.ctan.org/tex-archive/obsolete/systems/unix/teTeX/3.0/distrib/:tetex \ http://tug.ctan.org/tex-archive/obsolete/systems/unix/teTeX/3.0/distrib/:tetex \ http://tutimura.ath.cx/~nob/tex/ptetex/ptetex3/:ptetex3 \ macports::ptetex3 \ macports::dvipsk \ http://project.ktug.or.kr/dvipdfmx/snapshot/latest/:dvipdfmx \ http://project.ktug.or.kr/dvipdfmx/snapshot/archive/:dvipdfmx \ macports::dvipdfmx \ http://oku.edu.mie-u.ac.jp/~okumura/jsclasses/:jsclasses \ macports::jsclasses \ macports::misc \ http://svn.sourceforge.jp/svnroot/macports-jp/distfiles/pTeX/:mpjp # http://ring.riken.jp/archives/text/TeX/ptex-win32/utils/:dvipsk distname ptetex3-${ver_ptetex3} distfiles tetex-src-3.0.tar.gz:tetex \ tetex-texmf-3.0po.tar.gz:tetex \ ${distname}${extract.suffix}:ptetex3 \ dvipdfmx-${ver_dvipdfmx}.tar.gz:dvipdfmx \ dvipsk-${ver_dvipsk}.tar.gz:dvipsk \ jsclasses-${ver_jsclasses}.zip:jsclasses \ txfonts-${ver_txfonts}.zip:misc \ pxfonts-${ver_pxfonts}.zip:misc \ cmap-gs871.tar.gz:misc \ mappingresources4pdf_2unicode-20091208.tar.Z:misc \ mappingresources4pdf_other-20091208.tar.Z:misc \ tipa-${ver_tipa}.zip:misc \ cm-super-${ver_cm-super}.zip:misc \ utopia-${ver_utopia}.zip:misc \ fourier-GUT-${ver_fourier}.zip:misc \ mh-${ver_mh}.zip:mpjp \ xcolor-${ver_xcolor}.zip:mpjp \ pgf-${ver_pgf}.zip:mpjp \ beamer-${ver_beamer}.zip:mpjp \ hyperref.tds-${ver_hyperref}.zip:mpjp \ oberdiek.tds-${ver_oberdiek}.zip:mpjp \ ifxetex.tds-${ver_ifxetex}.zip:mpjp \ pstricks-${ver_pstricks}.zip:mpjp \ powerdot-${ver_powerdot}.zip:mpjp patchfiles patch-1check-archive.sh.diff \ patch-2extract-src.sh.diff \ patch-3extract-texmf.sh.diff \ patch-4make-install.sh.diff \ patch-5macro.sh.diff \ patch-7font-search.sh.diff \ patch-8test.sh.diff \ patch-common.sh.diff \ patch-md5sum_texmf.diff \ patch-md5sum_texsrc.traditional.diff checksums tetex-src-3.0.tar.gz rmd160 15a139f5f36993e4ed3583260e175cfb13ce7bcc \ tetex-texmf-3.0po.tar.gz rmd160 a1e87733fa3cbef04e39a690ed8549aeaaddb241 \ ${distname}${extract.suffix} rmd160 50bcf8986d1cb5f23e578ba97d7ade20bb05f3a2 \ dvipdfmx-${ver_dvipdfmx}.tar.gz rmd160 e43491e21d14432c17b7a0b61151c3cb6b2320df \ dvipsk-${ver_dvipsk}.tar.gz rmd160 c15135bcd4c01143a921d5eaeadd43247738289e \ jsclasses-${ver_jsclasses}.zip rmd160 7e2704ca941fa6e4cd4e0d200fd3387b4052f4e0 \ txfonts-${ver_txfonts}.zip rmd160 e0881b33012ae10a7557ee773439df62e600e56d \ pxfonts-${ver_pxfonts}.zip rmd160 9a2e8df4b779dab2c93704f0716f3d69dcbac6fe \ cmap-gs871.tar.gz rmd160 1fb4a51914f6b17050d984414e0490d9a5e6edc9 \ mappingresources4pdf_2unicode-20091208.tar.Z rmd160 bc1b86e6a5f0e022f88070195eb3e01e167114a7 \ mappingresources4pdf_other-20091208.tar.Z rmd160 1e2ea9af6be8b60c9a54963e542fa06ceb2daccd \ tipa-${ver_tipa}.zip rmd160 ea4f393f8a2e151b0933829ba7d193761ca8433a \ cm-super-${ver_cm-super}.zip rmd160 fc2f18c2b000725c8076bc6a52f0ccaf06dcecd1 \ utopia-${ver_utopia}.zip rmd160 c6d326323948c724c1d24ca9058171e732c1d247 \ fourier-GUT-${ver_fourier}.zip rmd160 b95903070f38c545d8cccc39da38195e7a116d16 \ mh-${ver_mh}.zip rmd160 d9f585dc1df2913ea7e9f32c6de9362ac99a5254 \ xcolor-${ver_xcolor}.zip rmd160 39e86a131206ac67a580accffb56a8bc18aa2061 \ pgf-${ver_pgf}.zip rmd160 4b52c180937c4ad9668ebbf2265e227663a47682 \ beamer-${ver_beamer}.zip rmd160 d333be434ba877c8dff98a21c4d079b92d8ee735 \ hyperref.tds-${ver_hyperref}.zip rmd160 cc16595639d7954695bc5bf534a848ea258fe928 \ oberdiek.tds-${ver_oberdiek}.zip rmd160 7e3ce56ddc56280e0dff7675056c38e830b26dd9 \ ifxetex.tds-${ver_ifxetex}.zip rmd160 fd7d3891400a2b5b3f06c185a15dbde0e6c31450 \ pstricks-${ver_pstricks}.zip rmd160 c5d29384354ac285ed7b23e297c655cd1b8cbad0 \ powerdot-${ver_powerdot}.zip rmd160 6df0eb5f8c61ee0a92dba9ce3d3184202785018b depends_lib port:gd2 \ port:jpeg \ port:libiconv \ port:libpaper \ port:libpng \ port:ncurses \ port:perl5 \ port:t1lib \ port:zlib depends_build port:ghostscript-fonts-hiragino \ port:nkf # bin:bash:bash # bin:bison:bison # bin:flex:flex # port:gmake # port:gpatch depends_run port:ghostscript-fonts-hiragino \ port:t1utils \ port:texi2html \ port:texinfo conflicts texlive-common if {![variant_isset euc] && ![variant_isset sjis] && ![variant_isset utf8]} { default_variants +utf8 } if {![variant_isset no_x11] && ![variant_isset motif] && ![variant_isset xaw] && ![variant_isset xaw3d] && ![variant_isset nextaw]} { default_variants +motif } extract.only ${distname}${extract.suffix} post-extract { foreach f {cmap-gs871.tar.gz mappingresources4pdf_2unicode-20091208.tar.Z mappingresources4pdf_other-20091208.tar.Z} { system "cd ${worksrcpath} && gzip -dc ${distpath}/${f} | tar --no-same-owner -xf -" } move ${worksrcpath}/MappingOther/Adobe-CNS1-ETen-B5 ${worksrcpath}/MappingOther/Adobe-CNS1-ETenms-B5 } post-patch { eval copy [glob ${filespath}/archive/*] ${worksrcpath}/archive/ eval copy [glob ${filespath}/security/*] ${worksrcpath}/security/ foreach f {dvipdfmx-${ver_dvipdfmx}.tar.gz dvipsk-${ver_dvipsk}.tar.gz txfonts-${ver_txfonts}.zip pxfonts-${ver_pxfonts}.zip tipa-${ver_tipa}.zip cm-super-${ver_cm-super}.zip utopia-${ver_utopia}.zip fourier-GUT-${ver_fourier}.zip mh-${ver_mh}.zip xcolor-${ver_xcolor}.zip pgf-${ver_pgf}.zip beamer-${ver_beamer}.zip hyperref.tds-${ver_hyperref}.zip oberdiek.tds-${ver_oberdiek}.zip ifxetex.tds-${ver_ifxetex}.zip pstricks-${ver_pstricks}.zip} { eval copy ${distpath}/${f} ${worksrcpath}/archive/ } copy ${distpath}/jsclasses-${ver_jsclasses}.zip ${worksrcpath}/macro/ delete ${worksrcpath}/macro/jsclasses-071024.zip copy ${distpath}/powerdot-${ver_powerdot}.zip ${worksrcpath}/macro/ delete ${worksrcpath}/macro/powerdot.tar.gz delete ${worksrcpath}/archive/dvipdfmx-20070409.tar.gz delete ${worksrcpath}/archive/dvipsk-5.96-p1.7b.tar.gz } configure.args --without-texi2html \ --without-texinfo \ --with-system-gd \ --with-system-ncurses \ --with-system-pnglib \ --with-system-t1lib \ --with-system-zlib # --enable-shared configure { set fd [open [file join ${worksrcpath} my_option] w 0644] puts ${fd} "TMP_PREFIX=${workpath}/temp" puts ${fd} "SRC_DIR=${distpath}" puts ${fd} "PREFIX=${prefix}" puts ${fd} "DATADIR=${prefix}/share" puts ${fd} "CONF_OPTION=\"\$CONF_OPTION ${configure.args}\"" if {[variant_isset sjis]} { puts ${fd} "KANJI_CODE=SJIS" } elseif {[variant_isset utf8]} { puts ${fd} "KANJI_CODE=UTF8" } else { puts ${fd} "KANJI_CODE=EUC" } if {[variant_isset no_x11]} { puts ${fd} "XDVI=echo" puts ${fd} "PXDVI=echo" } puts ${fd} "CFLAGS=\"${configure.cflags}\"" puts ${fd} "CPPFLAGS=\"${configure.cppflags}\"" puts ${fd} "LDFLAGS=\"${configure.ldflags}\"" puts ${fd} "LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:${prefix}/lib\"" puts ${fd} "export CFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH" close ${fd} } build.target all0 use_parallel_build no pre-build { if {![variant_isset no_otf]} {build.target-append otf} build.target-append babel fonty foreach d {texmf .texmf-var .texmf-config} { if {[file isdirectory "$env(HOME)/${d}"]} { ui_msg "" ui_msg " Personal texmf directory is detected. ($env(HOME)/${d}) " ui_msg " Be careful. It may cause a build error. " ui_msg "" } } } test.run yes destroot { system "(cd ${workpath}/temp; tar -cf - bin include lib share) | (cd ${destroot}${prefix}; tar --no-same-owner -xf -)" system "(cd ${workpath}/temp; tar -cf - info man) | (cd ${destroot}${prefix}/share; tar --no-same-owner -xf -)" delete ${destroot}${prefix}/share/info/dir copy ${destroot}${prefix}/share/texmf/fonts/map/dvipdfm/morisawa.map ${destroot}${prefix}/share/texmf/fonts/map/dvipdfm/morisawa-hiraginoEmbed.map foreach {mori hira} {Ryumin-Light HiraMinPro-W3.otf GothicBBB-Medium HiraKakuPro-W3.otf FutoMinA101-Bold HiraMinPro-W6.otf FutoGoB101-Bold HiraKakuPro-W6.otf Jun101-Light HiraMaruPro-W4.otf} { reinplace "s|${mori}|${hira}|g" ${destroot}${prefix}/share/texmf/fonts/map/dvipdfm/morisawa-hiraginoEmbed.map } foreach d {texmf texmf-config} { if {[file exists ${destroot}${prefix}/share/${d}/web2c/updmap.cfg]} { reinplace "s|^\\(KanjiMap morisawa.map\\)$|\\1\\\n#! KanjiMap morisawa-hiraginoEmbed.map|" ${destroot}${prefix}/share/${d}/web2c/updmap.cfg } } # I would like to keep this backward compatibility for a while. system "cd ${destroot}${prefix} && patch -p0 < ${filespath}/oldfmtfiles.diff" foreach f {ptex platex} { foreach e {euc jis sjis utf8} { ln -s ptex ${destroot}${prefix}/bin/${f}-${e} } } system "cd ${destroot}${prefix}/share/texmf/packages/jsclasses && patch -p0 < ${filespath}/minijs_sty-20100317.diff" # Update ls-R, map and fmt files (before packaging) set destroot_var "PATH=\"${destroot}${prefix}/bin:$env(PATH)\" TEXMFMAIN=${destroot}${prefix}/share/texmf LD_LIBRARY_PATH=${destroot}${prefix}/lib" system "${destroot_var} mktexlsr" if {![variant_isset no_hiragino]} { system "${destroot_var} updmap-sys --setoption kanjiEmbed hiragino --nomkmap || true" system "${destroot_var} updmap-sys --disable morisawa.map --nomkmap || true" system "${destroot_var} updmap-sys --enable KanjiMap morisawa-hiraginoEmbed.map --nomkmap || true" system "${destroot_var} updmap-sys" } system "${destroot_var} fmtutil-sys --all" # Modify mktex.opt to force use of varfonts reinplace "s|MT_FEATURES=appendonlydir|MT_FEATURES=appendonlydir:varfonts|g" ${destroot}${prefix}/share/texmf/web2c/mktex.opt # Add a directory for local enhancements xinstall -m 755 -d ${destroot}${prefix}/share/texmf-local system "touch ${destroot}${prefix}/share/texmf-local/.ptetex3-${ver_ptetex3}" } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/doc ln -s ../texmf/doc/ptetex ${destroot}${prefix}/share/doc/ptetex3 } post-activate { system "ranlib ${prefix}/lib/libkpathsea.a" system "ranlib ${prefix}/lib/libptexenc.a" system "${prefix}/bin/mktexlsr" foreach f {tipa.map} { system "${prefix}/bin/updmap-sys --enable MixedMap ${f} --nomkmap || true" } foreach f {cm-super-t1.map cm-super-ts1.map cm-super-t2a.map cm-super-t2b.map cm-super-t2c.map cm-super-x2.map fourier.map} { system "${prefix}/bin/updmap-sys --enable Map ${f} --nomkmap || true" } system "${prefix}/bin/updmap-sys" system "${prefix}/bin/fmtutil-sys --all" } universal_variant no variant no_hiragino description {Do not depend on Hiragino fonts} { depends_build-delete port:ghostscript-fonts-hiragino depends_build-append port:ghostscript depends_run-delete port:ghostscript-fonts-hiragino depends_run-append port:ghostscript } variant no_otf description {Do not install otf.sty} {} variant euc conflicts sjis utf8 description {Set the default character encoding to EUC-JP} {} variant sjis conflicts euc utf8 description {Set the default character encoding to Shift_JIS} {} variant utf8 conflicts euc sjis description {Set the default character encoding to UTF-8} {} variant no_x11 conflicts motif xaw xaw3d nextaw { depends_lib-delete port:fontconfig port:freetype port:jpeg port:libiconv configure.args-append --without-x --without-xdvik } variant motif conflicts no_x11 xaw xaw3d nextaw description {Use Motif to build xdvi} { depends_lib-append lib:libXm:openmotif configure.args-append --with-xdvi-x-toolkit=motif } variant xaw conflicts no_x11 motif xaw3d nextaw description {Use Xaw to build xdvi} { depends_lib-append port:xorg-libXaw configure.args-append --with-xdvi-x-toolkit=xaw } variant xaw3d conflicts no_x11 motif xaw nextaw description {Use Xaw3d to build xdvi} { depends_lib-append port:Xaw3d configure.args-append --with-xdvi-x-toolkit=xaw3d } variant nextaw conflicts no_x11 motif xaw xaw3d description {Use neXtaw to build xdvi} { depends_lib-append port:neXtaw configure.args-append --with-xdvi-x-toolkit=neXtaw } platform darwin 9 {} livecheck.type regex livecheck.url "http://tutimura.ath.cx/~nob/tex/ptetex/ptetex3/?C=M;O=D" livecheck.version ${ver_ptetex3} livecheck.regex ptetex3-(\[0-9\]+)\\.tar