Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#51818 closed update (fixed)

New release of LaTeXML

Reported by: brucemiller (bruce miller) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: maintainer haspatch Cc: mojca (Mojca Miklavec), drkp (Dan Ports), raimue (Rainer Müller), kurthindenburg (Kurt Hindenburg)
Port: LaTeXML

Description

I have a new release of LaTeXML: 0.8.2. I've updated the Portfile, but don't have commit access.

The Portfile incorporates the changes for #47972 and #49507; I'll post the diff here which is the diff *after* the changes for those tickets.

Could some interested party please check out the Portfile & commit for me? Thanks!

Attachments (7)

Portfile.diff (1.3 KB) - added by brucemiller (bruce miller) 6 years ago.
Portfile (5.3 KB) - added by brucemiller (bruce miller) 6 years ago.
Portfile.2.diff (6.1 KB) - added by brucemiller (bruce miller) 6 years ago.
diff from commited version
Portfile.2 (5.0 KB) - added by brucemiller (bruce miller) 6 years ago.
Portfile.3.diff (4.6 KB) - added by brucemiller (bruce miller) 6 years ago.
Portfile.3 (5.0 KB) - added by brucemiller (bruce miller) 6 years ago.
Portfile.4.diff (4.6 KB) - added by brucemiller (bruce miller) 6 years ago.

Download all attachments as: .zip

Change History (22)

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile.diff added

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Thanks. Note that the revision line should be deleted because it starts at 0 when increasing the version and that is the default value.

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile added

comment:2 Changed 6 years ago by brucemiller (bruce miller)

This latest Portfile incorporates the update to 0.8.2, removes the revision line and bumps the perl dependence to 5.24. It also fixes #47972 and #49507 (which should be closed once this Portfile is committed). [There are too many uncommitted patches floating around for a diff to be of much use.]

comment:3 Changed 6 years ago by mf2k (Frank Schima)

Please attach this as a patchfile diff.

comment:4 in reply to:  3 Changed 6 years ago by mf2k (Frank Schima)

Replying to mf2k@…:

Please attach this as a portfile diff.

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile.2.diff added

diff from commited version

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

Cc: dports@… added
Version: 2.3.4

Btw, the diff goes in the wrong direction (I usually just run svn diff in the latest checkout). Not that this is a major problem.

I don't understand the following code:

post-uninstall { 
    foreach sty [glob -nocomplain ${texlive_texmfdist}/tex/latex/latexml/*.sty] {

Aren't those files removed automatically? I would be seriously worried if they are not.

I would be much happier if the code inside the macports variant would be handled by the TeX Live portgroup.

Despite all that we should really get the fixes committed ASAP.

comment:6 Changed 6 years ago by brucemiller (bruce miller)

regarding the post-uninstall: I was also surprised that they weren't automatically deleted. But then, I also expected there would be some shorthand using the texlive portgroup that would allow you to say "Here's some style files" and have the right thing done automatically at all stages. I couldn't find it (or couldn't recognize it), so resorted to using xinstall & file copy during post-destroot to install the files, and then delete in post-uninstall. I'd be happy to change it if there's a better way.

Likewise, I'd be happy if some of my mactex code could help enhance the texlive portgroup.

(note: I haven't got commit access to macports)

comment:7 Changed 6 years ago by brucemiller (bruce miller)

Perhaps I didn't understand the comments, but is there anything I can/should do to get this committed?

comment:8 Changed 6 years ago by raimue (Rainer Müller)

Cc: raimue@… added
Keywords: maintainer haspatch added

The files are not removed as they were not properly installed and registered by MacPorts. The destroot phase is putting them into ${prefix} instead of ${destroot}${prefix}. The post-destroot block should be the following (similar for the +mactex variant):

post-destroot {
    xinstall -d ${destroot}${texlive_texmfdist}/tex/latex/latexml
    foreach sty [glob ${worksrcpath}/lib/LaTeXML/texmf/*.sty] {
        file copy -force ${sty} ${destroot}${texlive_texmfdist}/tex/latex/latexml/
    }
}

Why install the files both to texmf-local and texmf-texlive? Could we not just set TEXMF=${prefix}/share/tex/texmf-texlive?

pre-configure {
   configure.args-append   TEXMF=
  }

Why is this in a pre-configure block? This should be at the main level.

All of latexml.* are normal variables, do not declare this as options, for example use set latexml.found_tex no and override them the same way later.

The post-activate block at the end of the file should be replaced with notes, as it was before this patch.

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile.2 added

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile.3.diff added

comment:9 in reply to:  8 ; Changed 6 years ago by brucemiller (bruce miller)

Thanks for the tips; I hadn't really gotten some of the TCL stuff.

Replying to raimue@…:

Why install the files both to texmf-local and texmf-texlive? Could we not just set TEXMF=${prefix}/share/tex/texmf-texlive?

Not sure I understand your question. The default installs to where MacPort's texlive would have them but we avoid having a dependency on any parts of texlive (the files are there if the user ever does). Since they're installed within the same framework as texlive, they go into texmf-dist.

With the +mactex variant, they're installed where MacTeX expects, but since it's coming from outside MacTeX, they go to texmf-local.

Does that address your concern?

comment:10 in reply to:  9 ; Changed 6 years ago by raimue (Rainer Müller)

On my system with texlive and no variants selected, these files clearly end up twice in the destroot:

$ ls -la work/destroot/opt/local/share/**/latexml
work/destroot/opt/local/share/texmf-local/tex/latex/latexml:
total 32
drwxr-xr-x  5 root  admin   170 Sep 15 21:45 ./
drwxr-xr-x  3 root  admin   102 Sep 15 21:45 ../
-rw-r--r--  1 root  admin   323 Sep 15 21:45 .packlist
-r--r--r--  1 root  admin  6578 Sep 20  2015 latexml.sty
-r--r--r--  1 root  admin  1225 Apr 17  2015 lxRDFa.sty

work/destroot/opt/local/share/texmf-texlive/tex/latex/latexml:
total 24
drwxr-xr-x  4 root  admin   136 Sep 15 21:45 ./
drwxr-xr-x  3 root  admin   102 Sep 15 21:45 ../
-rw-r--r--  1 root  admin  6578 Sep 20  2015 latexml.sty
-rw-r--r--  1 root  admin  1225 Apr 17  2015 lxRDFa.sty

If the intention of this pre-configure block with TEXMF= was to stop that, it is not working.

By the way, that .packlist still hardcodes path to the destroot and needs to be edited just like the perl5 port group usually does:

post-destroot {
    fs-traverse file ${destroot}${prefix}/share {
        if {[file isfile ${file}] && [file tail ${file}] eq ".packlist"} {
            ui_info "Fixing paths in [string map "${destroot}${prefix}/ {}" ${file}]"
            reinplace -n "s|${destroot}||p" ${file}
        }
    }
}

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile.3 added

Changed 6 years ago by brucemiller (bruce miller)

Attachment: Portfile.4.diff added

comment:11 in reply to:  10 Changed 6 years ago by brucemiller (bruce miller)

Replying to raimue@…:

If the intention of this pre-configure block with TEXMF= was to stop that, it is not working.

Oooh, you're so embarrassingly right. So, best approach (as you suggested) is just to let the Makefile do it.

comment:12 Changed 6 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

From what I can tell, the latest patch seems to work. Raimue, do you still have any objections?

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

Committed in r154083 with some changes:

  • I added ${destroot} in front of installation of ${latexml.mactex_texmf} for installing files
    • and thus removed the section that tries to delete these files during post-uninstall: the files should be gone automatically
    • note that this might cause an error if you already have the files installed there, but I guess that's acceptable one-time issue that users can take care of by deleting the two files
  • forgotten "set" resulted in
    Error: Failed to activate LaTeXML: invalid command name "latexml.found_tex"
    
  • I used xinstall -m 644 instead of "file copy -force". Not sure if that's any better way, but I didn't like the -force switch.
  • I admit that I haven't seen mktexlsr being executed during post-[de]activate, but maybe that's just me or I wasn't too careful.

For the future: Portfile.4.diff is in a somewhat weird format (if you used diff, there's a command-line option to get the other format; don't ask me which one). It's probably easiest to do svn diff or git diff, but then again, but the time you submit the next request we might be using pull requests already :) Despite some people insisting in the diff file I have to agree with you here. Having the original Portfile was much more useful that having a convoluted (more or less useless to me) diff. It's usually wise to provide the diff just in case that further changes happen to the files in the meantime, but having the Portfile is more important/useful to me in this exceptional case of heavy changes.

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

Resolution: fixed
Status: newclosed

comment:15 in reply to:  13 Changed 6 years ago by brucemiller (bruce miller)

Replying to mojca@…:

Committed in r154083 with some changes:

  • I added ${destroot} in front of installation of ${latexml.mactex_texmf} for installing files
    • and thus removed the section that tries to delete these files during post-uninstall: the files should be gone automatically

Nice! Somehow it didn't dawn on me that I could use destroot to install outside MacPort's tree (slapping forehead).

Thanks!!

Note: See TracTickets for help on using tickets.