encyclopegia.org

MacPorts

MacPorts, formerly DarwinPorts, is a package manager for macOS and Darwin.[src] It is an open-source software project that aims to simplify the installation of other open source software.[src] It is similar in function to Fink and the BSD ports collections.[src] MacPorts supports universal binaries for PowerPC, Intel-based, and Apple silicon versions of macOS, but migrating from a PowerPC installation of MacPorts to a version on an Intel Mac requires reinstalling all installed ports.[src]

MacPorts, formerly DarwinPorts, is a package manager for macOS and Darwin.[src] It is an open-source software project that aims to simplify the installation of other open source software.[src] It is similar in function to Fink and the BSD ports collections.[src] MacPorts supports universal binaries for PowerPC, Intel-based, and Apple silicon versions of macOS, but migrating from a PowerPC installation of MacPorts to a version on an Intel Mac requires reinstalling all installed ports.[src] As an example, one common task is to update outdated ports.[src] This can be done by running the following: sudo port selfupdate sudo port upgrade outdated MacPorts supports logical operators such as and, or and not, as well as glob patterns (enabled by default) and regex (enabled via --regex ).[src] For instance, to update outdated ports excluding all PHP versions, change the above command to the following: sudo port selfupdate sudo port upgrade outdated and not php* Users can indicate one or more packages that they wish to install via the install mode, and MacPorts will aim to install them and its dependencies.[src] For example, both LibreOffice and Texmaker can be installed by running the following: sudo port install libreoffice texmaker Note that this will install the latest version as indicated by the local ports tree.[src] Running selfupdate beforehand will make sure that the downloaded package is the newest version in MacPorts.[src] For instance, the youtube-dl port provides an ffmpeg variant that is enabled by default.[src] In return for adding two extra dependencies, this then allows for audio to be extracted.[src] Variants can be included or removed using the + or - symbols, so the ffmpeg variant can be disabled by running the following: sudo port install youtube-dl -ffmpeg Multiple variants can be listed one after another by separating them with a space.[src] As an example, it is possible to disable the default prefork MPM in the apache2 port in favour of worker MPM: sudo port install apache2 -preforkmpm +workermpm The variants of a port can be determined by running port variants packagename , or by searching for the port on the MacPorts website.[src] For example, this is the portfile for Hashcat: -*- coding: utf-8; mode: _tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2 PortSystem 1.0 PortGroup github 1.0 PortGroup makefile 1.0 github.setup hashcat hashcat 6.2.3 v github.tarball_from archive categories security license MIT platforms darwin maintainers @gaming-hacker openmaintainer description World's fastest and most advanced password recovery utility.[src] long_description hashcat is the world's fastest and most advanced \ password recovery utility, supporting five unique modes \ of attack for over 200 highly-optimized hashing algorithms.[src] \ hashcat currently supports CPUs, GPUs, and other hardware \ accelerators on Linux, Windows, and macOS, and has \ facilities to help enable distributed password cracking homepage https://hashcat.net/hashcat/ build.target {} checksums rmd160 8bb501834a320aaac3de149c5ab39c2eb89ee968 \ sha256 c0be1c6693ee1f35c7bef1f79bf9e30a954f717ef42d00e37787aaeff3271e51 \ size 6222424 Each portfile has pre-defined stages that can be manually configured via the portfile.[src] These include the following: Fetch First, MacPorts retrieves and downloads all the relevant files for the port from upstream.[src] These are known as distfiles.[src] In the case of hashcat, these files are retrieved from GitHub.[src] They are removed, along with temporary build files, when the installation is complete.[src] Checksum Checksums are always defined within the portfile, since they are different for different files.[src] The checksums of the downloaded files are compared to those in the portfile to see whether they match.[src] Only one compressed file is downloaded for Hashcat, so only one checksum is required in the portfile.[src] Patch Sometimes, the code might need to be modified to make it installable via MacPorts.[src] This could be for a variety of reasons, such as it installing in the wrong location by default.[src] Patch files can be used to modify the source code in a readable format.[src] In the above portfile, Hashcat does not require any changes to the code for the installation to work.[src] Hence, there are no patch files required.[src] When patches are required, the patch file would be stored with the portfile, and it would be referenced like the following (from wget): patchfiles prefix.patch Configure The project's configure script is run to prepare for the build process.[src] Part of this involves determining whether the required libraries are present.[src] For ports that do not have a configure script, this stage (as well as others when required) can be disabled.[src] Since the configure stage is not referenced in the Portfile, hashcat is using the default configure setup as defined by MacPorts.[src] This involves running the configure script via ./configure .[src] Build The instructions in the portfile are then used to build the port.[src] The commands that are executed can vary for different languages.[src] The portfile for hashcat shows that it should be treated as a Makefile project.[src] It will therefore be built by running make .[src] Test Some ports define a test to verify that the build has succeeded.[src] This is an optional phase that is only run if the user executes port test packagename .[src] It is therefore not executed when installing a port.[src] This hashcat port has not defined a test stage.[src] When defined, it might look like the following (from ImageMagick): test.run yes test.target check test.env DYLD_LIBRARY_PATH=${worksrcpath}/magick/.libs Destroot The destroot stage is the first step in moving the built files into the correct location.[src] MacPorts takes the approach of first staging the installation into an intermediate location (destroot) before placing the files in their correct positions (install).[src] One advantage of this is that it makes it easy to record what files were created, allowing them to be cleanly uninstalled.[src] As an example, a file that would normally be installed to /opt/local/lib/libfoo.a might first be installed to /tmp/stage/opt/local/lib/libfoo.a during the destroot stage, maintaining the relative directory structure.[src] For hashcat, this is done by running make install , where one of the arguments ( DESTDIR ) specifies where to temporarily store the files.[src] Note that in the majority of scenarios, only the stages below occur on the user's machine.[src] This is because binaries for the ports are pre-built so that they do not need to be built from source locally.[src] Install The destrooted files are archived safely.[src] Since these files have not been activated yet, this allows for multiple different versions of the same port to be archived without interfering with each other.[src] Activate When activating a port, the files in the destroot directory are moved to their correct location.[src] This makes them accessible to the user, completing the installation process.[src] If they wish to try a different version of the port, they can deactivate their current version and activate the new one.[src] This does not uninstall the old port since it can easily be activated again from the archived files.[src] When upgrading a port, MacPorts deactivates but does not uninstall the current version as a safety feature.[src] This allows the user to easily revert to the old version if the update causes breaking changes.[src] ==Data collection== By default, MacPorts does not collect any statistics.[src] However, users can optionally submit information by running sudo port install mpstats .[src] This sends details once a week on which ports are installed, as well as various system properties.[src] The information is then used to determine which hardware to support and to understand how quickly new MacPorts releases are adopted.[src] Users can view analytics data on the MacPorts website.[src] ==See also== Fink Gentoo/Alt Homebrew Nix pkgsrc FreeBSD Ports Ports collection ==References== ==External links== MacPorts Guide The MacPorts Wiki List of available ports[src]

66 sentences · 66 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"MacPorts." encyclopegia.org, 2026, https://encyclopegia.org/wiki/macports. Accessed 25 November 2026.

Chicago

"MacPorts." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/macports.

APA

encyclopegia.org. (2026). MacPorts. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/macports

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1375162812 · 0.5 · snapshot enwiki-001375162812

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.