LaTeXML

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

# -*- CPERL -*-
#======================================================================
# Makefile Maker for LaTeXML
# Bruce.Miller@NIST.gov
#======================================================================
use ExtUtils::MakeMaker;
use strict;
use warnings;
use FindBin;

#======================================================================
# Use "perl Makefile.PL <options>"
# Build options are:
#   OLD_LIBXML  : if you only have access to an old version of XML::LibXML (ie. before 1.61).
#     This is necessary because we will have an additional dependency
#     (XML::LibXML::XPathContext), and it would be too late to add that
#     dependence when we discover which version of XML::LibXML we end up with.
#     "Enterprise" Linuxes, like Centos and RedHat Enterprise are likely
#     to be stuck with such older versions (till now).
#   TEXMF=<texmfdir> : Installs the tex style files to this texmf tree,
#     rather than where kpsewhich says TEXMFLOCAL is (useful for spec files?)
#   NOMKTEXLSR : disables running mktexlsr (to re-index the texmf directories
#     after installing our style files).  This is to be used when Makefile.PL
#     is invoked within a staged installation system like rpm, macports, etc.
#     In those cases you'll need to run "mktexlsr" within the post-install
#     and post-uninstall stages of the build.
#======================================================================

our $OLD_LIBXML     = grep { /OLD_LIBXML/ } @ARGV;
our $NOMKTEXLSR     = grep { /NOMKTEXLSR/ } @ARGV;
our $KPSE_TOOLCHAIN = "";
our ($KPSEV, $TEXMF);
my ($texmfspec) = grep { /^TEXMF/ } @ARGV;
if ($texmfspec && $texmfspec =~ /^TEXMF\s*=(.*)$/) {
  $TEXMF = $1;
  local @ARGV = grep { $_ ne $texmfspec } @ARGV; }    # Remove so MakeMaker doesn't fret.
our @EXCLUSIONS     = ();
our $MORE_MACROS    = {};
our $MORE_MAKERULES = '';

record_revision();
compile_MathGrammar();
install_TeXStyles();
extra_Tests();

WriteMakefile(NAME => 'LaTeXML',
  AUTHOR => ['Bruce Miller <bruce.miller@nist.gov>',
    'Deyan Ginev <deyan.ginev@gmail.com>'],
  ABSTRACT         => "transforms TeX and LaTeX into XML/HTML/MathML",
  VERSION_FROM     => 'lib/LaTeXML.pm',
  MIN_PERL_VERSION => 5.010001,
  # A very restricted set of licenses are allowed here. No Creative Commons, eg.!
  # The tag open_source should be an Open Source Initiative approved license;
  # public domain is sorta included. See http://opensource.org/faq#public-domain
  LICENSE            => 'open_source',
  CONFIGURE_REQUIRES => {
    'version' => 0.77,
  },
  PREREQ_PM => {
    'Archive::Zip'      => 0,
    'DB_File'           => 0,
    'File::Which'       => 0,
    'Getopt::Long'      => 2.37,
    'Image::Size'       => 0,
    'IO::String'        => 0,
    'IO::Handle'        => 0,
    'JSON::XS'          => 0,
    'LWP'               => 0,
    'MIME::Base64'      => 0,      # Core
    'Parse::RecDescent' => 0,
    'Pod::Parser'       => 0,      # for Pod::Find
    'Text::Unidecode'   => 0,
    'Test::More'        => 0,      # part of Test::Simple
    'Time::HiRes'       => 0,
    'URI'               => 0,
    'version'           => 0,
    # Windows terminal handling (see Common::Error)
    # Windows argument escaping (see Util::Pathname)
    ($^O eq 'MSWin32'
      ? ('Win32::Console' => 0,
        'Win32::Console::ANSI' => 0,
        'Win32::ShellQuote'    => 0)
      : ()),
    # If we have an "old" version of XML::LibXML,
    # we also need XPathContext.
    # But we can't determine that additional dependence
    # after we've already started resolving dependences!
    ($OLD_LIBXML
      ? ('XML::LibXML' => 1.58,
        'XML::LibXML::XPathContext' => 0)
      : ('XML::LibXML' => 1.61)),    # But > 1.62 is better
    'XML::LibXSLT' => 1.58,
  },
  EXE_FILES => ['bin/latexml', 'bin/latexmlpost', 'bin/latexmlfind', 'bin/latexmlmath', 'bin/latexmlc'],
  macro     => $MORE_MACROS,
  # link to  github location to newer MakeMaker



( run in 0.887 second using v1.01-cache-2.11-cpan-5a3173703d6 )