[MacPorts] #16133: Fix for XeTeX Leopard Build Failure
#16133: Fix for XeTeX Leopard Build Failure ------------------------------------+--------------------------------------- Reporter: kthenriksson@gmail.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Keywords: texlive xetex | ------------------------------------+--------------------------------------- Right now, XeTeX will not build on Leopard, and even if it did, two of its files to install conflict with files in texlive_base. Because it wouldn't compile in Leopard, it was removed from texlive_base in changeset [31087], but there I can't seem to find any tickets about this particular issue. Ticket #11388 seems to be similar, especially in the suggested fix, but does not show the same build error. The following patch applied to 'libs/icu-xetex/config/mh-darwin' in the texlive_base or xetex packages corrects this error and allows the build to complete successfully: {{{ --- mh-darwin.orig 2008-07-29 21:55:37.000000000 -0700 +++ mh-darwin 2008-07-29 21:56:16.000000000 -0700 @@ -58,7 +58,7 @@ @echo "generating dependency information for $<" @$(GEN_DEPS.c) $< > /dev/null @mv $@ $@~ - @echo -n "$@ " > $@ + @/bin/echo -n "$@ " > $@ @cat < $@~ >> $@ @-rm $@~ @@ -66,7 +66,7 @@ @echo "generating dependency information for $<" @$(GEN_DEPS.cc) $< >/dev/null @mv $@ $@~ - @echo -n "$@ " > $@ + @/bin/echo -n "$@ " > $@ @cat < $@~ >> $@ @-rm $@~ }}} The problem that occurs is that make uses sh to invoke commands in a Makefile, but perhaps from the bash configure option `--enable-strict- posix-default`, the bash shell option `xpg_echo` defaults to on. Because sh was compiled to default to POSIX mode, this means that `echo` no longer recognizes any options and prints all arguments verbatim (except for backslash escape expansion, see http://www.gnu.org/software/bash/manual/bashref.html and search for `xpg_echo` for details). So the Makefile that wants `echo -n` to mean no new line actually gets it to mean print a `-n` literally, which ends up ruining another Makefile called stubdata.d and prevents successful compilation. As you can see from the patch, the fix is to invoke the actual `echo` program instead of the shell builtin called `echo`, which is accomplished here by using the full path to `echo`. The patch should be applied to both the texlive_base and xetex file trees and the texlive_base Portfile can hopefully be updated to reenable compilation of xetex. I believe that the xetex package can actually be removed as well once xetex has be reenabled in texlive_base. Due to a file conflict that the inclusion of xetex brings, texlive_texmf- full needs the line "delete ${worksrcpath}/texmf/web2c/xetex.pool" in the build section. One other change is that texlive will need the line "ln -s ${prefix}/bin/xetex ${destroot}${prefix}/bin/xelatex" added to the destroot section to give the correct xelatex symbolic link. -- Ticket URL: <http://trac.macports.org/ticket/16133> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Changes (by blb@macports.org): * cc: pguyot@kallisys.net (added) * owner: macports-tickets@lists.macosforge.org => milosh@macports.org * milestone: => Port Bugs Comment: Assigning/Cc maintainers. FYI, the base change is due to the [http://developer.apple.com/releasenotes/Darwin/RN-Unix03Conformance/ Unix 03 conformance] stuff Apple did for 10.5. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment (by kthenriksson@gmail.com): According to that link you provided, it seems that printf is the preferred way to replace echo in this usage, although it probably doesn't matter. On closer inspection, other lines need to be removed from other Portfiles to add xetex back. The lines {{{ delete ${worksrcpath}/texmf-dist/tex/latex/latexconfig/xelatex.ini delete ${worksrcpath}/texmf-dist/tex/plain/config/xetex.ini }}} need to be removed from the texlive_texmf-minimal Portfile, otherwise the xetex.fmt and xelatex.fmt files required by `xetex` and `xelatex` respectively can't be built. The lines {{{ delete ${worksrcpath}/texmf/fmtutil/format.xetex.cnf delete ${worksrcpath}/texmf-dist/tex/generic/xetexconfig delete ${worksrcpath}/texmf-dist/tex/xelatex/xetexconfig delete ${worksrcpath}/texmf-dist/tex/xelatex/xetexurl }}} need to be removed from the texlive_texmf-full Portfile, because they also delete required files. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment(by informatique@thibaut-cousin.net): Hello, Is there any news on this? Will it be integrated soon? If not, how can I integrate it manually? I'm new to Macports, but I'm not new to other packaging systems. Thank you in advance. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment(by kthenriksson@gmail.com): I don't know what the deal is with this. I reported it and said what was the proper fix, but there doesn't seem to be any progress. I'd be happy to detail exactly what you need to do to get everything working. Please let me know if you run into a problem. First, you need to have some kind of command line text editor, like nano, vi, emacs, or joe. I use joe, and that's the example I'll use here, but you should just substitute the one you want. Run: {{{ sudo -s export EDITOR=joe port edit texlive }}} Be sure to enter your password after the sudo command. Increment the value of revision by one, e.g. 1->2. Go down to the destroot section and add the line {{{ ln -s ${prefix}/bin/xetex ${destroot}${prefix}/bin/xelatex }}} to this section. Save and exit the text editor. Now run {{{ port edit texlive_texmf-minimal }}} Increment the revision by one, then go down to the build section and remove the lines {{{ delete ${worksrcpath}/texmf-dist/tex/latex/latexconfig/xelatex.ini delete ${worksrcpath}/texmf-dist/tex/plain/config/xetex.ini }}} from the file. These should be the second and third lines. Save and exit the text editor. Like before, run `port edit texlive_texmf-full` and remove the lines {{{ delete ${worksrcpath}/texmf/fmtutil/format.xetex.cnf delete ${worksrcpath}/texmf-dist/tex/generic/xetexconfig delete ${worksrcpath}/texmf-dist/tex/xelatex/xetexconfig delete ${worksrcpath}/texmf-dist/tex/xelatex/xetexurl }}} from the file. These should be all but the first lines. Also, increment the revision by one. Save and exit again. Now run `port edit texlive_base` and increment the revision by one again. Then go down to the post-destroot section. Remove the line {{{ reinplace "s|.*xetex.*||" ${destroot}${prefix}/share/texmf/web2c/fmtutil.cnf }}} and save and quit. Now run `port extract texlive_base` and wait for everything to finish executing so you get dropped back to the command line. Now copy and paste the command (as one long line) '''joe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_tex_texlive_base/work/texlive_base-2007/libs /icu-xetex/config/mh-darwin''' and go down to a line that says Dependency rules, which is about 60 lines down. Just a little below you'll see a couple lines that say "@echo -n ..." where I've substituted the end of the lines with ... just for the purpose of this explanation. Replace both instances of "echo -n" with "/bin/echo -n" and leave everything else alone. Save and exit again. Now as the very final step, run `port install texlive` and you should get everything installing properly. Now you should be all set to use `xetex`. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment(by kthenriksson@gmail.com): Sorry, I have something to add that I forgot above. After executing `port edit texlive_base`, you need to edit not just the post-destroot section, but also the configure.args section right above it. In that section, remove the text "--without-xetex" from the end. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Changes (by raimue@macports.org): * cc: raimue@macports.org (added) Comment: Looks like the maintainer is not available. Please provide a patch, this will make the process a lot faster. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment(by kthenriksson@gmail.com): I'm not familiar with the whole MacPorts system overall. However, I checked out the dports directory from SVN and made all the changes that (I believe) are necessary. This is the output of `svn diff` run from the dports directory and implements the instructions I included above. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment(by milosh@macports.org): I committed your changes in r39684. I don't know about xetex so I couldn't test that it really works. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: texlive xetex -------------------------------------+-------------------------------------- Comment(by kthenriksson@gmail.com): I realized that I made an omission in my previous patch. I forgot to add a certain "delete" line to a portfile. Also, it turns out that the `fmtutil- sys --all` command depends on a file in texlive_texmf-full when xetex is enabled so I changed the depends on texlive_base. This is I realize a dramatic change, so if necessary I'll find some other way to make it work. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16133: Fix for XeTeX Leopard Build Failure -------------------------------------+-------------------------------------- Reporter: kthenriksson@gmail.com | Owner: milosh@macports.org Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: fixed | Keywords: texlive xetex Port: | -------------------------------------+-------------------------------------- Changes (by milosh@macports.org): * status: new => closed * resolution: => fixed Comment: Yep, quite a dramatic change as it disables the minimal variant. It would be too much work to fix, so I applied the change and got rid of variant minimal in r39696. -- Ticket URL: <http://trac.macports.org/ticket/16133#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts