MacPorts
If you already know all about MacPorts and Apple's Xcode Tools, you can skip down to
Installing.
The
MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system. The result: ready to build, open-source software packages modified to compile and run on Mac OS X. The MacPorts project provides a TCL command line tool to manage installation, update and activation of the port packages. Useful information that may not exist at MacPorts is maintained among other places on our MacPorts
More Info page.
Porticus provides a GUI front-end to this tool, and is recommended for anyone shy of the command line.
Advanced: Various discussions of MacPorts (formerly "Darwin Ports") – as contrasted to an alternative project ("Fink") – are collected for reference
here.
These are Apple's free proprietary tools which allow various special or advanced features to be performed on the Macintosh. Garden variety Mac users seldom need these Xcode Tools whereas those who would develop or use special software in their Mac will need to do this extra installation.
While Apple's Xcode Tools do not need to be in place for
every aspect of MacPorts, Xcode's tools are depended on at any point where MacPorts would, upon selfupdating need to compile a new base version of itself, or would install any of numerous ports, including a non-Mac OS version of python.
Lack of an installed Xcode Tools commonly underlies the MacPorts error message error: no acceptable C compiler found in $PATH.
The version of Apple's Xcode Tools required by MacPorts is given
here.
It's easy to tell if you have them installed. In Terminal, type
open -a Xcode. If it tells you "Unable to find application named 'Xcode'" then they're probably not installed. Alternatively, in the Finder, open your startup disk hard drive, and identify the presence of a folder Developer, within which there should be a sub-folder Applications (distinct from main /Applications). Within this, you should find Xcode, if it's installed.
If Xcode is not yet installed, but your Mac is sufficiently new, the Apple-included (but as-yet uninstalled) version of Xcode Tools may suffice. Locate on your Mac OS X Install DVD, in the folder "Optional Installs", subfolder Xcode Tools, a file "About Xcode Tools.pdf" which should give the version number. Within this same subfolder, it is only the package
XcodeTools.mpkg which needs installing; the
WebObjects.mpkg is needed only for webobjects related projects and
Dashcode.mpkg for those who would make Dashboard applications.
If you do not have your Apple install disk, or need a newer version, it is available free from Apple, linked from the [http://www.macports.org/install.php][MacPorts install]] page, for which Apple requires only a basic registration on the part of the person downloading.
To identify an installed Xcode's version, you can launch it, and look in Xcode > About Xcode. Before installing newer versions, you may like to use Apple's uninstaller to remove the existing tools, like so:
sudo /Developer/Library/uninstall-devtools --mode=all
Advanced: it's possible, if necessary, to install multiple versions of Xcode into separate directories. Suggested best practice is to install the version that came with your Mac first, and then install downloaded versions, but it probably doesn't make a big difference. Details on xcode coexistence are given at
Apple Developer Connection page.
- Install Apple's Xcode Tools (~ 750 Mb – 1 Gb) from:
- the Apple Developer Connection Member Site (free online membership required) or
- if the Xcode provided with your Mac is sufficiently recent, from your
Mac OS X Install DVD/Optional Installs/Xcode Tools/XcodeTools.mpkg= version identifiable in the About Xcode Tools pdf.
Go to the MacPorts site, either to their
installer instructions page or directly to their
distfiles directory listing. Unless you have a reason to do otherwise, download the disk image (.dmg) file that is most suitable for your current Mac OS. It may (or may not) still be MacPorts-1.8.2-10.5-Leopard.dmg or MacPorts-1.8.2-10.6-SnowLeopard.dmg.
The package will download automatically, and you will later be prompted to accept the installation with your user account password.
If you had installed MacPorts, yet when trying to use it get a log message "port: command not found", this may indicate that MacPorts had been installed from source, and/or suitable lines had otherwise failed to be added to the user's home directory file
.bash_profile, as should have been achieved by a "postflight script". More on this at the
MacPorts Guide.
Optional install of Porticus
Download v 1.8.1 of
Porticus (GUI to MacPorts) drop it into your main /Applications folder. On opening it, let its Preference "At startup" to "Update everything" (do a MacPorts selfupdate).
Budget adequate time
Depending on your network's bandwidth and reliability, and on your computer's processing power and state of heaviness of usage, quite a bit of time (many minutes, but less than an hour) may be required for a complete, first-time install, including compile time. If you desire to devote only one of two cores to this activity in order to better use your Mac for concurrent tasks, refer to
the bottom of this section.
Setup for GNUmed using Porticus
- Select "All Ports" from the Porticus directory, within which to search (and install), in order:
-
py26-psycopg2 (Version 2.0.13_0 used)
- select variant
postgresql84
- result: 45 ports installed (these include python26)
-
py26-mx-base (Version 3.1.3.0 used)
- no selection to make
- result: 46 ports installed
-
py26-wxpython
- no selection to make
- result: 64 ports installed, including wxWidgets
-
texlive-latex-base
- no selection to make
- result: XX ports installed, including YY
- future:
gnumed-client (PortFile under development)
- Note: with each selection, Porticus will open and present a combination pending Command display and Variants selection window. Porticus suffers a small bug in which – even in the absence of Variants – the progress spinner can spin endlessly. After a few seconds, you can ignore this, and click 'Install".
It is not yet possible to fully avoid using Apple's Terminal application within your /Applications/Utilities folder. Provided you are logged into your Mac in an account of type "Admin", launch Terminal, and do (copy, paste)
sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 python
In response to having issued the
sudo command, the prompt "Password:" will be for the account from which you are logged-in, not any root password.
Download GNUmed
- Download, to your User's Downloads folder, the GNUmed client from tarball, and double-click on it to unarchive it.
- from a Terminal command line, do
-
cd ~/Downloads/GNUmed-0.5.0/client
-
./gm-from-vcs.sh
- after you login (userid = pw = any-doc), hide the (debug ) STDOUT/STDERR log window, and fix the window size using the GNUmed
Window > Zoom menu item
- Enjoy! Next, modify your
gm-from-vcs.conf as desired, create GUI aliases, and more.
Setup for GNUmed from the command line
If you are comfortable with the command line, do the following using e.g. the Terminal application. If you are new to the command line, understand that in response to having issued the
sudo command, the password prompt will be for the account from which you are logged-in, not any root password. Use of sudo does depend on your account being of type "Admin".
sudo port selfupdate
sudo port install py26-psycopg2 +postgresql84
sudo port install py26-wxpython
sudo port install py26-mx-base
sudo port install texlive +doc +letter
-- more to be added
# To fully complete your installation and make python 2.6 the default, please run:
sudo port install python_select
sudo python_select python26
On account of GNUmed calling 'python' (and not python2.6), do
sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 python
Download GNUmed as outlined in the section above.
After installing py26-psycopg2
MacBook:~ djb$ port contents py26-psycopg2
Port py26-psycopg2 contains:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/__init__.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/__init__.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/_psycopg.so
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/errorcodes.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/errorcodes.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/extensions.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/extensions.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/extras.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/extras.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/pool.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/pool.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/psycopg1.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/psycopg1.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/tz.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/tz.pyc
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2-2.0.13-py2.6.egg-info
MacBook:~ djb$
MacBook:~ djb$ port installed
The following ports are currently installed:
bison @2.4.1_0 (active)
bzip2 @1.0.5_3+darwin (active)
db46 @4.6.21_6 (active)
expat @2.0.1_0 (active)
fontconfig @2.8.0_0+macosx (active)
freetype @2.3.11_1+macosx (active)
gdbm @1.8.3_2 (active)
gettext @0.17_4 (active)
gperf @3.0.4_0 (active)
groff @1.20.1_1 (active)
libiconv @1.13_0 (active)
libxml2 @2.7.6_0 (active)
libxslt @1.1.26_0 (active)
m4 @1.4.13_0 (active)
ncurses @5.7_0+darwin_10 (active)
ncursesw @5.7_0+darwin_10 (active)
openssl @0.9.8l_0+darwin (active)
ossp-uuid @1.6.2_0 (active)
pkgconfig @0.23_1 (active)
postgresql84 @8.4.2_0 (active)
py26-psycopg2 @2.0.13_0+postgresql84 (active)
python26 @2.6.4_0+darwin (active)
readline @6.1.000_1+darwin (active)
sqlite3 @3.6.22_0 (active)
tcl @8.5.8_0+darwin (active)
tk @8.5.8_0+darwin (active)
Xft2 @2.1.14_0 (active)
xorg-bigreqsproto @1.1.0_0 (active)
xorg-inputproto @2.0_0 (active)
xorg-kbproto @1.0.4_0 (active)
xorg-libX11 @1.3.2_0 (active)
xorg-libXau @1.0.5_0 (active)
xorg-libXdmcp @1.0.3_0 (active)
xorg-libXext @1.1.1_0 (active)
xorg-libXScrnSaver @1.2.0_0 (active)
xorg-renderproto @0.11_0 (active)
xorg-scrnsaverproto @1.2.0_0 (active)
xorg-util-macros @1.4.1_0 (active)
xorg-xcmiscproto @1.2.0_0 (active)
xorg-xextproto @7.1.1_0 (active)
xorg-xf86bigfontproto @1.2.0_0 (active)
xorg-xproto @7.0.16_0 (active)
xorg-xtrans @1.2.5_0 (active)
xrender @0.9.5_0 (active)
zlib @1.2.3_4 (active)