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.
How about copy current www/mathjax to www/mathjax2 and upgrade www/mathjax to v3?
(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.
(In reply to Marko Cupać from comment #2) Thanks for the explanation, that makes sense to me.
(In reply to Li-Wen Hsu from comment #3) Anything else that needs to be done to get port included in official ports tree?
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!
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
Committed, thanks!
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