[MacPorts] #63392: doxygen @1.9.2: CMake Error: Unknown argument -EPSTOPDF=/opt/local/bin/epstopdf

MacPorts noreply at macports.org
Fri Aug 20 14:40:16 UTC 2021


#63392: doxygen @1.9.2: CMake Error: Unknown argument
-EPSTOPDF=/opt/local/bin/epstopdf
-------------------------+--------------------
  Reporter:  mouse07410  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  doxygen     |
-------------------------+--------------------

Comment (by mouse07410):

 > I would not want a port to declare a dependency on something it does not
 use, and I did not see evidence of epstopdf's use in the log  .  .  .

 The following precursory analysis of the Doxygen source demonstrates that
 it does require {{{epstopdf}}} to run:
 {{{
 $ cd ~/src/doxygen
 $ rg epstopdf
 src/msc.cpp
 130:    QCString epstopdfArgs(maxCmdLine);
 131:    epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
 134:    if (Portable::system("epstopdf",epstopdfArgs)!=0)
 136:      err_full(srcFile,srcLine,"Problems running epstopdf when
 processing '%s.eps'. Check your TeX installation!\n",

 src/dia.cpp
 75:    QCString epstopdfArgs(maxCmdLine);
 76:    epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
 79:    if (Portable::system("epstopdf",epstopdfArgs)!=0)
 81:      err("Problems running epstopdf. Check your TeX installation!\n");

 src/docparser.cpp
 343:      QCString epstopdfArgs(4096);
 344:      epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
 348:      if (Portable::system("epstopdf",epstopdfArgs)!=0)
 350:    err("Problems running epstopdf. Check your TeX installation!\n");

 doc/CMakeLists.txt
 18:find_program(EPSTOPDF NAMES epstopdf )

 src/plantuml.cpp
 259:        Debug::print(Debug::Plantuml,0,"*** %s Running
 epstopdf\n","PlantumlManager::runPlantumlContent");
 266:            QCString epstopdfArgs(maxCmdLine);
 267:            epstopdfArgs.sprintf("\"%s%s.eps\"
 --outfile=\"%s%s.pdf\"",
 270:            if
 ((exitCode=Portable::system("epstopdf",epstopdfArgs.data()))!=0)
 272:              err_full(nb.srcFile,nb.srcLine,"Problems running
 epstopdf. Check your TeX installation! Exit code: %d\n",exitCode);

 doc/changelog.doc
 2793:<li>Bug <a
 href="https://github.com/doxygen/doxygen/issues/5559">5559</a> - plantUML
 requires epstopdf for building PDF files [<a
 href="https://github.com/doxygen/doxygen/commit/52d216a87451c867c92691a4483cd85d3e5b906f">view</a>]</li>
 9939:<li>   Fixed problem with doxygen calling epstopdf.bat in
 Windows.</li>

 src/diagram.cpp
 1327:    QCString epstopdfArgs(4096);
 1328:    epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
 1330:    //printf("Converting eps using '%s'\n",qPrint(epstopdfArgs));
 1332:    if (Portable::system("epstopdf",epstopdfArgs)!=0)
 1334:       err("Problems running epstopdf. Check your TeX
 installation!\n");
 $
 }}}


 > I assumed that epstopdf is something that would be used during the build

 Apparently, it is **not** used during (or for) the build. It is something
 that run-time requires for specific tasks (and, as expected, mostly for
 image or file format conversion), which a given invocation may or may not
 have.

 Now, nowhere in the source did I find the {{{EPSTOPDF}}} definition used.
 The code invokes the {{{epstopdf}}} executable directly. I suspect it's an
 artifact of dependency discovery process, to ensure the required package
 is installed on this system:
 {{{
 $ rg EPSTOPDF
 doc/CMakeLists.txt
 18:find_program(EPSTOPDF NAMES epstopdf )
 $
 }}}

 >  The use of epstopdf only appears within the port's doc variant and the
 only types of dependencies added by that variant are build dependencies  .
 .  .

 Frankly, I doubt that - and conjecture that it indicates a deficiency of
 the Portfile, rather than how Doxygen works. But since I'm not an expert
 in either Doxygen innards, or Macports - I could be wrong here. Still,
 that's what the browsing of the Doxygen sources suggests (see above).


 > I left these notes in this ticket in order to assist whoever picks it up
 next; I'm not investigating further at the moment.

 Again, I suggest that this obvious bug is fixed, to enable the package
 build - and IMHO no further investigation is necessary: the runtime
 dependency seems clear enough, so removing {{{epstopdf}}} package is
 highly likely to cause runtime failures for some people, depending on what
 they do.

-- 
Ticket URL: <https://trac.macports.org/ticket/63392#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list