Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate lesstif: port motif to darwin and switch texlive to motif #17359

Closed
RamKromberg opened this issue Jul 29, 2016 · 14 comments
Closed

Deprecate lesstif: port motif to darwin and switch texlive to motif #17359

RamKromberg opened this issue Jul 29, 2016 · 14 comments
Labels
6.topic: darwin Running or building packages on Darwin

Comments

@RamKromberg
Copy link
Contributor

RamKromberg commented Jul 29, 2016

Currently, TexLive is the last package to depend on lesstif. Lesstif was abandoned circa 2012 (http://lesstif.sourceforge.net/ dates the last commit to May 27, 2009) when motif became available under lgpl. By contrast, motif just received an update and is available in nixpkgs (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/motif/default.nix).

As such, if a Mac user could port the motif package to darwin, it would be possible to completely deprecate lesstif.

How to fix:

  1. Try to compile motif on darwin with the demos. Resolve any issues. (DONE; motif: Add support for darwin #17410)
  2. Disable demos. (DONE; motif: Add support for darwin #17410)
  3. Try porting catclock (it should work as is since it's very minimal x11 and motif and upstream already tested it on mac). (DONE; motif: Add support for darwin #17410)
  4. Try switching TexLive to motif. (TODO;)
@FRidh FRidh added the 6.topic: darwin Running or building packages on Darwin label Jul 29, 2016
@knedlsepp
Copy link
Member

knedlsepp commented Jul 30, 2016

I'm currently compiling this on my 10.9 machine and it seems to compile fine with only minimal changes.

  • Removing the weak aliasing XM_ALIAS, which is not supported on darwin
  • Including the correct header for malloc in the demo program demos/programs/workspace/xrmLib.c

Especially I didn't have to remove lib/Xm/Xm.h or patch the bindings file to make it work.

My changes are located here: knedlsepp@d148388

I have only tested a few of the demos and they seem to work correctly.
Edit:
Catclock seems to work.

@RamKromberg
Copy link
Contributor Author

RamKromberg commented Jul 30, 2016

@knedlsepp nice :) I'll comment on the changes but for the most part you just need to condition the changes for darwin only using if stdenv.isDarwin then and so on... Once that done it's ready for a PR :)

Edit:
I've commented on changes over at knedlsepp@d148388. Throw me a mention when you have a PR or anything. I think it's also safe to throw in the catclock changes and any other motif package correction for darwin you have into a single PR and I'll review they work on linux. It's usually not recommended to do it all at once like that, but if we're both testing all the changes on darwin and linux, then I doubt anyone would mind.

And Thanks :) Especially for catclock :D

@knedlsepp
Copy link
Member

Ok. I'll add the removal of Xm.h and the bindings-patch to my commit.

@RamKromberg
Copy link
Contributor Author

@knedlsepp thanks :) I kept commenting a little further as well explaining some of the whats and whys...

Btw, it will probably be faster to push a PR and move the review over there. I don't have merge privileges so I suspect one of nixpkgs maintainers would want to weight in on the changes and make some of their own alterations.

@knedlsepp
Copy link
Member

knedlsepp commented Jul 31, 2016

I have not used any texlive from nixpkgs up until now. It seems the texLive one is deprecated and texlive is the new one. However there are still lots more different derivations.
Do you know which of all those different derivations we should use for testing the motif+texlive combo?

@RamKromberg
Copy link
Contributor Author

RamKromberg commented Aug 1, 2016

It's not deprecated. texLive refers to texlive. Do the following:

  1. git grep lesstif: Shows only pkgs/tools/typesetting/tex/texlive-new/bin.nix pkgs/tools/typesetting/tex/texlive/default.nix are left.
  2. git grep tools/typesetting/tex/texlive: shows how texLive relates to texlive.

There's also texlive-new which represents the current texlive as opposed to the stable derivation.

Regardless, at this point we actually shouldn't be doing it ourselves. Once your darwin motif PR gets committed, I'll CC the texlive maintainers and have them make the switch themselves.

Edit: err

@AndersonTorres
Copy link
Member

But texLive is an old derivation, and texlive is a new infrastructure.

@RamKromberg
Copy link
Contributor Author

@AndersonTorres see my previous comment. Also, run git grep texlive and git grep texLive. They're both being used.

@AndersonTorres
Copy link
Member

It doesn't imply texLive being "upstream-maintained".
But, anyway, it is another thing: texlive explicitly uses lesstif and not a "choose if you like motif".
The "change to motif" part is the easier one, I think.

@RamKromberg
Copy link
Contributor Author

RamKromberg commented Aug 1, 2016

The "change to motif" part is the easier one, I think.

I'm not sure which texlive package depends on motif. texlive-bin-2014.20140926.35254/texk/xdvik/LESSTIF-BUGS suggests to me we should at least try:

texlive.combine { inherit (texlive) scheme-full scheme-gust xdvi; }
texlive.combine { inherit (texlive) scheme-full scheme-gust seetexk; }
texlive.combine { inherit (texlive) scheme-full scheme-gust xetexko; }
texlive.combine { inherit (texlive) scheme-full scheme-gust luatexko; }

As https://nixos.org/wiki/TexLive_HOWTO explains. However, #17347 is probably holding us back on the first one.

Anyhow, even if I was sure this was all there is to it and that there's no need to get the texlive maintainers involved right up until PR time, I'd still prefer to at least wait until everything else is committed to master. Maybe even unstable...

Still, if you'd like, nothing is stopping you from running with this.

(EDIT) Admittedly, texlive-new is configured with "--without-x" so no one will even notice this change...

@RamKromberg
Copy link
Contributor Author

cc texlive-new maintainers @vcunat @abbradar now that #17410 got through regarding switching lesstif -> motif. Also note #17347.

@RamKromberg RamKromberg mentioned this issue Aug 7, 2016
6 tasks
@RamKromberg
Copy link
Contributor Author

RamKromberg commented Aug 7, 2016

The old texlive package can't be recompiled (mirror gone; missing tarballs. #10026 (comment)). So, I'm trying to piggy back on the upgrade PR for texlive-new (#16391).

(EDIT) To expand on that, the texlive people overwrote the tarballs on their website so the package broke. That is, if one were to try nix-build -E 'with import ./. {}; texlive.combine { inherit (texlive) scheme-full scheme-gust xdvi; }' -Q or whatever, the download will fail over the checksum. This means that the old package can't be updated.
On a more positive note, that just leaves texlive-new :D

@vcunat
Copy link
Member

vcunat commented Aug 9, 2016

Just note these are both about "texlive-new" (as typically used, by the directory name). The really old texLive* attributes are in https://github.com/nixos/nixpkgs/tree/master/pkgs/tools/typesetting/tex/texlive

@vcunat vcunat closed this as completed in 6152cf3 Aug 9, 2016
@RamKromberg
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

5 participants