Opened 6 years ago

Closed 6 years ago

#56866 closed defect (fixed)

pstoedit @3.73_1: conflict problems with MacTeX - build failure

Reported by: majoc-at-astro (majoc-at-astro) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: haspatch Cc:
Port: pstoedit

Description

When MacTeX is prepended to binpath (using instructions I can't locate atm), this causes two related problems to pstoedit at build time.

  • There's a hard build-time dependency on texlive-bin-extras to make latex2man available. MacPorts dutifully installs a full copy of TexLive, then uses the copy of latex2man in MacTeX. (In our builds, the redundant texlive is stripped out at the end of business, but it contributes to build time, and may distract other package builds.)

Fix: use a bin dependency on latex2man, as attached.

  • Whichever latex2man is used, it's run with Perl from MacPorts (via the !#/usr/bin/env perl trick), which is stricter about regular expressions than the system version. The copy of latex2man in MacTeX 2017 contains a regexp which the newer Perl objects to, and the build of pstoedit fails:
    :info:build latex2man -t ./pstoedit.trans -M pstoedit.tex pstoedit.1
    :info:build Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\([a-zA-Z]+){([^}]*)}{ <-- HERE ([^}]*)}/ at /Library/TeX/texbin/latex2man line 1287.
    :info:build make[1]: *** [pstoedit.1] Error 255
    
    Fix: update to MacTeX 2018.

Please find enclosed the obvious one-line fix to the Portfile, which avoids the redundant texlive installation when latex2man is available via MacTeX. (Admission: I've not tested the MacTeX-absent case.) I'm not at all sure whether to use a note statement to document the MacTeX version compatibility problem and solution, or whether it'd be more appropriate to trap for this as a precondition; please advise.

System details: macOS 10.11, 10.12, 10.13; latest compatible versions of Xcode for each.

Thanks in advance. Apologies as usual for formatting problems or other sins of omission or commission, in particular (in the absence of a pstoedit maintainer) not knowing who to CC this to.

PS: Can someone point me to the documentation for prepending MacTeX to binpath, please? That's the logical location for the compatibility warning, but my search-engine fu is saying only "foo" today.

Attachments (1)

Portfile.mactex_conflict.diff (373 bytes) - added by majoc-at-astro (majoc-at-astro) 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by majoc-at-astro (majoc-at-astro)

comment:1 Changed 6 years ago by mojca (Mojca Miklavec)

Thank you very much for the patch. Since you don't seem to have consciously left some identity anywhere, I'll commit under my name (trac shows one of your emails to logged in users, but I'm not sure if you want us to use that one or not).

A hint for the future: a lot more people are checking GitHub, so it's orders of magnitude faster to get the patch accepted via a pull request (this one would probably take a few hours). This shouldn't have been the case, but given the lack of people constantly watching the trac tickets ...

I'm not able to find any definitive documentation about MacTeX either. There are lots of emails in archives, comments in tickets, but I'm not able to find anything specific beyond two mentions of binpath in the guide, but I guess you already found those. Where would you be looking for such information / what's the best place to put this information to? This is another thing that would be much much much quicker resolved on the mailing list or via the IRC channel.

comment:2 Changed 6 years ago by mojca (Mojca Miklavec)

Regarding the failure with MacTeX 2017 I don't seem any sane way to safeguard for this. The guide explicitly says that this is not the recommended way. There is basically no way to predict when such a failure would happen. The user might have the latest version of latex2man installed on top of a super outdated distribution. And MacTeX is by far not the only TeX distribution out there, even if it's probably the most popular.

I'm not sure if you were asking for a link to instructions about setting up an external TeX distribution, or for instructions themselves.

The instructions themselves would be to change binpath in

/opt/local/etc/macports/macports.conf

by uncommenting the relevant line and prepending /Library/TeX/texbin (assuming that's where your TeX distribution is):

binpath             	/Library/TeX/texbin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

comment:3 Changed 6 years ago by mojca (Mojca Miklavec)

Owner: set to mojca
Resolution: fixed
Status: newclosed

In 77a8aaa7a055aa502cc6b17761adeea011475ace/macports-ports (master):

pstoedit: allow MacTeX to satisfy build dependency

The build only requires latex2man and pdftex,
which may both come from an external TeX distribution.

Closes: #56866

Note: See TracTickets for help on using tickets.