The these are some general notes about MacPorts.
- autoconf (for autoreconf): https://www.gnu.org/software/autoconf/
- automake (to support autoreconf): https://www.gnu.org/software/automake/
- cargo2port (macports helper for Rust-based ports): https://github.com/l2dy/cargo2port
- cdrtools (make ISOs from CDs): http://cdrtools.sourceforge.net/private/cdrecord.html
- dnscrypt-proxy (encrypted dns): https://github.com/DNSCrypt/dnscrypt-proxy
- dosbox-x (enhanced dosbox): https://dosbox-x.com/
- epy (cli ebook reader): https://github.com/wustho/epy
- gh (git hub CLI): https://docs.github.com/en/github-cli/github-cli/about-github-cli
- gnupg2 (GNU pretty good privacy): https://www.gnupg.org/
- innoextract (extract files from Windows installers): https://constexpr.org/innoextract/
- libpst (extract files from Outlook PST archives): https://www.five-ten-sg.com/libpst/
- ncftp (terminal based ftp client): http://www.ncftpd.com/ncftp/
- newsboat (terminal based RSS reader): https://newsboat.org/
- oksh (portable version of OpenBSD's ksh): https://github.com/ibara/oksh
- py-pipdeptree (python dependencies): https://pypi.org/project/pipdeptree/
- qemu (multi-architecture emulator): https://www.qemu.org/
- rclone (sync files to cloud services): https://rclone.org/
- shellcheck (check the syntax of shell scripts): https://www.shellcheck.net/
- slrn (Usenet news reader): https://slrn.info/
- smartmontools (get SMART status for drives): https://www.smartmontools.org/
- tig (terminal based git history browser): https://jonas.github.io/tig/
- tuir (terminal based reddit browser): https://gitlab.com/ajak/tuir
- unshield (extract Installshield archives): https://github.com/twogood/unshield
- xorriso (cd tools): https://www.gnu.org/software/xorriso/
$ port provides [file]
Create a fork on GitHub
- Clone the fork locally:
$ git clone https://github.com/username/macports-ports.gitwhere username your github username.
- Add the official repository as the upstream:
$ git remote add upstream https://github.com/macports/macports-ports.gitOn GitHub, update the fork to include any upstream changes, for example:
$ gh repo sync username/macports-portswhere username your github username.
See: GitHub Docs, Syncing a fork
- Fetch upstream changes locally:
$ git fetch upstream && git pull- Create a branch for changes:
$ git checkout -b portname-versionwhere portname is the name of the port and version is the version of the port
- After making changes, lint the Portfile:
$ port lint --nitpick -D .- Commit the changes:
$ git commit -a -m "portname: update to version" [-S]where portname is the name of the port, version is the version of the port, and -S is optional (assuming that signing commits is enabled)
- Push the changes upstream:
$ git push --set-upstream origin portname-versionwhere portname is the name of the port and version is the version of the port
Open a pull request on GitHub
- If changes are requested, make the changes, lint the Portfile (see above), and then override the prior commit:
$ git commit --amend -a -m "portname: update to version" [-S] $ git push origin -fwhere portname is the name of the port, version is the version of the port, and -S is optional (assuming that signing commits is enabled).
If the changes require the branch to be rebased to the master, then do the following before amending the prior commit:$ git pull --rebase origin masterSee: https://stackoverflow.com/questions/7929369/.
- Switch back to the main/master branch:
$ git checkout master- Once the pull request is merged, delete the local and remote branches:
- Delete the local branch:
$ git branch -D portname-versionwhere portname is the name of the port and version is the version of the port
- Delete the remote branch:
$ git push origin --delete portname-versionwhere portname is the name of the port and version is the version of the port
- Synchronize local and remote branches:
$ git fetch -p
Based on: https://lists.macports.org/pipermail/macports-users/2022-April/051105.html
- Install cdrools:
$sudo port install cdrtools- Make a mount point for the cd, if it doesn't exist:
$ sudo mkdir /Volumes/cdromFind the non-Mac/HFS partition/slice on the cd using
diskutil list
(often it is slice 1)- Mount the non-Mac/HFS partition on the cdrom:
$ sudo mount_cd9660 -r /dev/disk[X]s[Y] /Volumes/cdromwhere X is the disk number for the cd shown bydiskutil list
and Y is the slice number for the cd shown bydiskutil list
.
- Create the ISO image using
mkisofs
from cdrtools:$ mkisofs -v -J -r -V [VOLNAME] -o [ISO PATH] /Volumes/cdromwhere VOLNAME is the volume name for the ISO and ISO PATH is the location where the ISO should be saved.
- Unmount the cd:
$ umount /Volumes/cdrom- Eject the cd:
$ diskutil eject /dev/disk[X]where X is the disk number shown bydiskutil list
.