Update a port to a newer version

So, you know a new version of a software has been released, but the port maintainer isn’t fast enough to satisfy your bleeding edge need; here’s how you’d do it:

  1. Update Makefile, variables like PORTVERSION and any other variables used to identify the package to download.
  2. Make sure that it is possible to download the new package and generate distinfo:
    make makesum
  3. Generate the pkg-plist file so that all the new files is correctly pointed out:
    make makeplist > pkg-plist
    awk '/etc\/rc.d\/plexmediaserver/,/^$/' pkg-plist > tmp && mv tmp pkg-plist
    
  4. Then it’s just a matter of re-installing the ports:
    make distclean && make && make reinstall clean

Courtesy of mikec_pt on the Plex Forums [plex.tv].