Reference

参考:using port

Command

コマンド説明
sudo port selfupdateto sync the local ports tree with the global Mac Ports ports repository .
port listto get a list of all available ports.
port installedto display installed ports.
port search emacsto find port names by partial matches.
port info emacsto get information about a port: description, maintainer, etc.
port deps emacsto show the dependencies of a port; dependencies are explicitly declared in Portfiles.
port variants emacsto check what variations of a port are available before you install it.
sudo port install emacs (+variants)to install a port.
sudo port (-f) uninstall emacsto uninstall a port
sudo port (-pf) uninstall inactiveto uninstall a port
sudo port clean (--all) emacsto delete all intermediate files that Mac Ports creates while building a port.
sudo port clean --all installedto delete all intermediate files that Mac Ports creates while building a port.
sudo port upgrade emacsto upgrade a port
sudo port upgrade outdatedto upgrade outdated ports
-v
verbose option
-d
debug option

Install specific version

find revision you want to install from here and download

svn co -r 90242 http://svn.macports.org/repository/macports/trunk/dports/aqua/emacs-app
A    emacs-app/files
A    emacs-app/files/patch-macemacsjp-inline.diff
A    emacs-app/files/patch-src_emacs.c.diff
A    emacs-app/files/patch-lion-fullscreen.diff
A    emacs-app/files/patch-macemacsjp-jpfont.diff
A    emacs-app/files/patch-fullscreen.diff
A    emacs-app/files/patch-clang.diff
A    emacs-app/files/patch-fix-title-bar.diff
A    emacs-app/files/site-start.el
A    emacs-app/Portfile

change ownership of the directory

sudo chown -R macports:macports emacs-app

move the directory under / opt

sudo mv emacs-app/ /opt/

move to the directory and install

cd /opt/emacs-app/
sudo port install
--->  Computing dependencies for emacs-app
--->  Fetching archive for emacs-app
--->  Attempting to fetch emacs-app-23.4_1.darwin_10.x86_64.tbz2 from http://packages.macports.org/emacs-app
--->  Attempting to fetch emacs-app-23.4_1.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/emacs-app
--->  Installing emacs-app @23.4_1
--->  Deactivating emacs-app @24.3_3+inline
--->  Cleaning emacs-app
--->  Activating emacs-app @23.4_1
--->  Cleaning emacs-app
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.

remove the directory

cd ../
rm -rf emacs-app

check version

port installed emacs-app
 emacs-app @23.4_1 (active)
 emacs-app @24.3_3+inline

remove if needed

sudo port uninstall emacs-app @24.3_3+inline
--->  Uninstalling emacs-app @24.3_3+inline
--->  Cleaning emacs-app
sudo port uninstalled
port installed emacs-app
The following ports are currently installed:
  emacs-app @23.4_1 (active)