From a68489f9f86349004a9bfda8b3482705a678c00f Mon Sep 17 00:00:00 2001 From: Vladimir Volovich Date: Tue, 29 Jul 2008 12:55:01 +0000 Subject: add support for Mac universal binary: xindy.run is one binary for intel and powerpc Mac, but the mem file depends on machine type: xindy-powerpc.mem or xindy-i386.mem git-svn-id: svn://tug.org/texlive/trunk@9870 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/xindy/user-commands/xindy.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Build/source/utils/xindy') diff --git a/Build/source/utils/xindy/user-commands/xindy.in b/Build/source/utils/xindy/user-commands/xindy.in index 97093cff0be..4070bad1e06 100644 --- a/Build/source/utils/xindy/user-commands/xindy.in +++ b/Build/source/utils/xindy/user-commands/xindy.in @@ -345,7 +345,7 @@ BEGIN { use Getopt::Long qw(:config bundling); use File::Temp qw(tempfile tmpnam); use File::Spec; - +use POSIX qw(uname); # Check arguments, store them in proper variables. # @@ -396,7 +396,18 @@ our ($quiet, $verbose, %debug, $outfile, $logfile, $language, @codepages, @modules, $input_markup, $interactive, $mem_file); $input_markup = 'latex'; + $mem_file = "$lib_dir/xindy.mem"; +if ($^O eq 'darwin' && ! -e $mem_file) { + # support universal binary on mac + my @uname = POSIX::uname(); + if ($uname[4] eq 'Power Macintosh') { + $mem_file = "$lib_dir/xindy-powerpc.mem"; + } else { + $mem_file = "$lib_dir/xindy-i386.mem"; + } +} +die "$cmd: Cannot locate $mem_file" if ! -e $mem_file; parse_options(); -- cgit v1.2.3