Bug 248796 - new port: www/mathjax3: cross-browser JavaScript display engine for mathematics, Version 3
Summary: new port: www/mathjax3: cross-browser JavaScript display engine for mathemati...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-21 06:37 UTC by Marko Cupać
Modified: 2020-12-11 16:38 UTC (History)
4 users (show)

See Also:
lwhsu: maintainer-feedback? (marko.cupac)


Attachments
distinfo, Makefile, pkg-desc (1.24 KB, text/plain)
2020-08-21 06:37 UTC, Marko Cupać
no flags Details
mathjax3.shar (1.92 KB, text/plain)
2020-10-27 02:56 UTC, Li-Wen Hsu
no flags Details
mathjax3 3.1.2 port shar (1.96 KB, patch)
2020-11-24 11:30 UTC, Marko Cupać
marko.cupac: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Cupać 2020-08-21 06:37:09 UTC
Created attachment 217407 [details]
distinfo, Makefile, pkg-desc

Hi,

current port www/mathjax is for now legacy version, v2. Current version of MathJax is v3. v2 is still supported and gets patch releases, but v3 is intended for new deployments.

Upgrading v2 to v3 is not in-place upgrade, url of the script changes, which also requires change config of web server which hosts it. Therefore I think it is better to introduce new version as mathjax3.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2020-08-21 06:53:50 UTC
How about copy current www/mathjax to www/mathjax2 and upgrade www/mathjax to v3?
Comment 2 Marko Cupać 2020-08-21 09:33:44 UTC
(In reply to Li-Wen Hsu from comment #1)

I'm not sure that is a good idea from user's point of view.

There's quite lengthy page about upgrading v2 to v3:

http://docs.mathjax.org/en/latest/upgrading/v2.html

TL;DR: "MathJax v3 is a complete rewrite of MathJax from the ground up (see What’s New in MathJax v3.0), and so its internal structure is quite different from that of version 2. That means MathJax v3 is not a drop-in replacement for MathJax v2, and upgrading to version 3 takes some adjustment to your web pages."

In my case, It was quite easy to create new apache vhost (mathjax3.example.org instead of mathjax.example.org) which points to now document root (/usr/local/www/MathJax3/es5 instead of /usr/local/www/MathJax), and to point my websites to new script url (https://mathjax3.example.org/tex-mml-chtml.js instead of https://mathjax.example.org/MathJax.js?config=TeX-AMS-MML_CHTML). But some unsuspecting users will probably end up with broken mathjax on ther websites after pkg upgrade if we just give them v3 instead of v2.

Perhaps we could make the switch further down the road when people get the chance to test new port and get familiar with it.
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2020-08-21 09:35:17 UTC
(In reply to Marko Cupać from comment #2)
Thanks for the explanation, that makes sense to me.
Comment 4 Marko Cupać 2020-10-05 14:48:26 UTC
(In reply to Li-Wen Hsu from comment #3)

Anything else that needs to be done to get port included in official ports tree?
Comment 5 Li-Wen Hsu freebsd_committer freebsd_triage 2020-10-27 02:56:17 UTC
Created attachment 219134 [details]
mathjax3.shar

Sorry for the delay, I update the port to fix some issues. Please check the new attachment and approve it. Thanks!
Comment 6 Marko Cupać 2020-11-24 11:30:06 UTC
Created attachment 219920 [details]
mathjax3 3.1.2 port shar

Hi,

sorry for my late reply. MathJax has in the meantime been updated to 3.1.2.

I have updated the port, it compiles fine on 12.2.

Here's poudriere build log:
http://pkg.kappastar.com/data/12_2:x86:64-default/2020-11-24_12h22m41s/logs/MathJax3-3.1.2.log
Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2020-12-11 16:38:05 UTC
Committed, thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-12-11 16:38:36 UTC
A commit references this bug:

Author: thierry
Date: Fri Dec 11 16:37:59 UTC 2020
New revision: 557750
URL: https://svnweb.freebsd.org/changeset/ports/557750

Log:
  Adding MathJax3.

  Current port www/mathjax is for now legacy version, v2. Current version
  of MathJax is v3. v2 is still supported and gets patch releases, but v3
  is intended for new deployments.

  Upgrading v2 to v3 is not in-place upgrade, url of the script changes,
  which also requires change config of web server which hosts it.
  Therefore I think it is better to introduce new version as mathjax3.

  PR:		248796
  Submitted by:	Marko Cupa? (maintainer)

Changes:
  head/www/Makefile
  head/www/mathjax3/
  head/www/mathjax3/Makefile
  head/www/mathjax3/distinfo