Skip to content

Instantly share code, notes, and snippets.

@hgross
Last active August 5, 2020 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgross/67ea67c4fdcf5636ee2dd96e35a154b8 to your computer and use it in GitHub Desktop.
Save hgross/67ea67c4fdcf5636ee2dd96e35a154b8 to your computer and use it in GitHub Desktop.
Downgrade/install graphviz 2.38.0 via MacPorts to resolve PlantUML issues
#!/bin/bash
# PlantUML has "a lot of issues" with graphviz greater 2.38.0 (screwed up layouts and more, check the official PlantUML site)
# so we need to get the old port file
# I tested this with Mac OS 10.15.6
# the update to 2.40.1 was done by this commit https://github.com/macports/macports-ports/commit/937422eaee9e592a79b631ee20cecdbbe33a7375, so the parent on the master is c11df6b3e4867171fff9438ba499e20f31b449e8
# uninstall the current version first - note this might break other things ;-)
sudo port uninstall graphviz
# get the old port file
cd /tmp
git clone --single-branch https://github.com/macports/macports-ports.git
cd macports-ports
git checkout c11df6b3e4867171fff9438ba499e20f31b449e8
# the 2.38.0 distribution is not available from the location defined in the portfile anymore
# additionally also the graphviz.org official site does not provide the tar.gz anymore (http://graphviz.org/download/)
# I found a mirror at http://mirror.pnl.gov/macports/distfiles/graphviz/
# (checksums will be checked, don't panic)
# add that mirror to the portfile
echo "master_sites http://mirror.pnl.gov/macports/distfiles/graphviz/" >> ./Portfile
# install from here
cd graphics/graphviz
sudo port install
# celanup
rm -rf /tmp/macports-ports
@hgross
Copy link
Author

hgross commented Aug 5, 2020

Executing


bash <(curl -s https://gist.githubusercontent.com/hgross/67ea67c4fdcf5636ee2dd96e35a154b8/raw/362d4fc62f2ea65adfa07a139178f3e8ab80aa93/fix-graphviz-for-PlantUML.sh)

from the Terminal should do the trick and install Graphviz 2.38.0 on Mac OS 10.15.6 via MacPorts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment