[MacPorts] #16133: Fix for XeTeX Leopard Build Failure
MacPorts
noreply at macports.org
Tue Jul 29 23:24:06 PDT 2008
#16133: Fix for XeTeX Leopard Build Failure
------------------------------------+---------------------------------------
Reporter: kthenriksson at gmail.com | Owner: macports-tickets at 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
More information about the macports-tickets
mailing list