Homebrew is a popular alternative for MacPorts, that is also open source. It is written in Ruby programming language.
Product allows to install new packages on Mac OS computers in an easier way. Is working through command line and installs packages in separate directories.
Source code is available for public and can be downloaded from GitHub, you can contribute with your own ideas to the program development.