diff options
-rw-r--r-- | Build/source/utils/xindy/user-commands/xindy.in | 13 | ||||
-rwxr-xr-x | Master/texmf/scripts/xindy/xindy.pl | 13 |
2 files changed, 24 insertions, 2 deletions
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(); diff --git a/Master/texmf/scripts/xindy/xindy.pl b/Master/texmf/scripts/xindy/xindy.pl index 72407935c54..4dc4465b8ab 100755 --- a/Master/texmf/scripts/xindy/xindy.pl +++ b/Master/texmf/scripts/xindy/xindy.pl @@ -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(); |