Compiling on macOS using MacPorts: Difference between revisions
(Update example using latest GRASS version port 'grass') |
(Update reflecting port changes) |
||
Line 12: | Line 12: | ||
port info grass | port info grass | ||
grass @8. | grass @8.3.0_4 (gis) | ||
Variants: debug, gui, mysql57, mysql8, openblas, openmpi, postgresql10, postgresql11, postgresql12, postgresql13, [+] | Variants: debug, debugoptimized, gui, mysql57, mysql8, openblas, | ||
openmpi, postgresql10, postgresql11, postgresql12, | |||
postgresql13, postgresql14, [+]postgresql15, proj6, proj7, | |||
proj8, [+]proj9, python310, [+]python311, python37, | |||
python38, python39, universal | |||
Description: GRASS is a Geographic Information System (GIS) used for geospatial data management and analysis. | Description: GRASS is a Geographic Information System (GIS) used for | ||
Homepage: | geospatial data management and analysis. | ||
Homepage: https://grass.osgeo.org/ | |||
Build Dependencies: pkgconfig | Build Dependencies: pkgconfig | ||
Library Dependencies: bzip2, freetype, fftw-3, gdal, pdal, geos, tiff, libpng, liblas, cairo, zlib, readline, | Library Dependencies: bzip2, freetype, fftw-3, gdal, pdal, geos, tiff, libpng, | ||
Runtime Dependencies: | liblas, cairo, zlib, sqlite3, readline, python311, | ||
py311-Pillow, py311-numpy, py311-six, proj9, postgresql15 | |||
Runtime Dependencies: py311-psycopg2 | |||
Platforms: darwin | Platforms: darwin | ||
License: GPL-2+ | License: GPL-2+ | ||
Maintainers: | Maintainers: Email: n_larsson yahoo com, GitHub: nilason | ||
Policy: openmaintainer | |||
</pre> | </pre> | ||
Line 33: | Line 40: | ||
sudo port install grass | sudo port install grass | ||
</pre> | </pre> | ||
will download, compile and install GRASS with dependencies '' | will download, compile and install GRASS with dependencies ''postgresql15'', ''proj9'' and ''python311''. | ||
However, a customized installation may look like: | However, a customized installation may look like: | ||
<pre> | <pre> | ||
sudo port install grass +gui + | sudo port install grass +gui +python39 | ||
</pre> | </pre> | ||
which will replace the default '' | which will replace the default ''python311'' with ''python39'' and include also the ''gui'' dependency. The default variants ''postgresql14'' and ''proj8'' will in this case also be included. | ||
'''Note:''' you need to add '''+gui''' to install wxPython for GRASS graphical user interface, this in not included by default. | '''Note:''' you need to add '''+gui''' to install wxPython for GRASS graphical user interface, this in not included by default. | ||
Line 45: | Line 52: | ||
To check if any of the installed ports (or dependencies) have been updated: | To check if any of the installed ports (or dependencies) have been updated: | ||
<pre> | <pre> | ||
sudo port selfupdate | |||
port outdated | port outdated | ||
</pre> | </pre> | ||
Line 62: | Line 70: | ||
Installation with the variant ''+gui'' will also install an app bundle at: | Installation with the variant ''+gui'' will also install an app bundle at: | ||
<pre> | <pre> | ||
/Applications/MacPorts/GRASS-8. | /Applications/MacPorts/GRASS-8.3.app | ||
</pre> | </pre> | ||
Latest revision as of 08:38, 22 September 2023
Installing GRASS GIS with MacPorts
MacPorts is a package management system for macOS. It makes it easy to install and update any supported software — dependencies (that can be either executables or libraries) are installed and updated automatically. It is recommended to install the MacPort base software with the package installer available at macports.org where also detailed installation and usage instructions can be found. Note that Xcode is a prerequisite and that MacPorts is controlled through the Terminal with the port command.
Assuming you succeeded with the installation of the MacPorts base, the base software can be updated with:
sudo port selfupdate
Information on software, i.e. ports, that can be installed can be retrieved with the info action, this is an example with the port grass (which is the latest version):
port info grass grass @8.3.0_4 (gis) Variants: debug, debugoptimized, gui, mysql57, mysql8, openblas, openmpi, postgresql10, postgresql11, postgresql12, postgresql13, postgresql14, [+]postgresql15, proj6, proj7, proj8, [+]proj9, python310, [+]python311, python37, python38, python39, universal Description: GRASS is a Geographic Information System (GIS) used for geospatial data management and analysis. Homepage: https://grass.osgeo.org/ Build Dependencies: pkgconfig Library Dependencies: bzip2, freetype, fftw-3, gdal, pdal, geos, tiff, libpng, liblas, cairo, zlib, sqlite3, readline, python311, py311-Pillow, py311-numpy, py311-six, proj9, postgresql15 Runtime Dependencies: py311-psycopg2 Platforms: darwin License: GPL-2+ Maintainers: Email: n_larsson yahoo com, GitHub: nilason Policy: openmaintainer
The variants are options for a port that can be chosen at installation. The variants marked with a +, are included by default.
Installing GRASS with default variants:
sudo port install grass
will download, compile and install GRASS with dependencies postgresql15, proj9 and python311.
However, a customized installation may look like:
sudo port install grass +gui +python39
which will replace the default python311 with python39 and include also the gui dependency. The default variants postgresql14 and proj8 will in this case also be included.
Note: you need to add +gui to install wxPython for GRASS graphical user interface, this in not included by default.
To check if any of the installed ports (or dependencies) have been updated:
sudo port selfupdate port outdated
To update outdated ports:
sudo port upgrade outdated
Using GRASS GIS installed with MacPorts
A standard installation of MacPorts will install ports at:
/opt/local/
Installation with the variant +gui will also install an app bundle at:
/Applications/MacPorts/GRASS-8.3.app
You can start GRASS GIS from terminal with command:
grass
or
/opt/local/bin/grass