script via ./configure. Build The instructions in the portfile are then used to build the port. The commands that are executed can vary for different languages. The portfile for hashcat shows that it should be treated as a Makefile project. It will therefore be built by running make. Test Some ports define a test to verify that the build has succeeded. This is an optional phase that is only run if the user executes port test packagename. It is therefore not executed when installing a port. This hashcat port has not defined a test stage. When defined, it might look like the following (from ImageMagick):test.run yes test.target check test.env DYLD_LIBRARY_PATH=${worksrcpath}/magick/.libsDestroot The destroot stage is the first step in moving the built files into the correct location. MacPorts takes the approach of first staging the installation into an intermediate location (destroot) before placing the files in their correct positions (install). One advantage of this is that it makes it easy to record what files were created, allowing them to be cleanly uninstalled. 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. For hashcat, this is done by running make install, where one of the arguments (DESTDIR) specifies where to temporarily store the files. Note that in the majority of scenarios, only the stages below occur on the user's machine. This is because binaries for the ports are pre-built so that they do not need to be built from source locally. Install The destrooted files are archived safely. 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. Activate When activating a port, the files in the destroot directory are moved to their correct location. This makes them accessible to the user, completing the installation process. If they wish to try a different version of the port, they can deactivate their current version and activate the new one. This does not uninstall the old port since it can easily be activated again from the archived files. When upgrading a port, MacPorts deactivates but does not uninstall the current version as a safety feature. This allows the user to easily revert to the old version if the update causes breaking changes. Development Packages are the responsibility of individual maintainers,