File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / Attic / how_to_use_pkgsrc_on_mac_os_x.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Thu Feb 7 21:35:50 2013 UTC (8 years, 8 months ago) by schmonz
Branches: MAIN
CVS tags: HEAD
FS case-sensitivity hasn't mattered for years.

In this article I'll explain, how to install and use pkgsrc on Mac OS X (> 10.4.8)




On a stock Mac OS X you are missing a compiler and important tools for development. Therefore you will need to install the Xcode package that Apple provides upfront. The compressed Xcode disk image (.dmg) is rather big and has a size of currently 924 MB. You will need about 3 GB of free disk space to install it.

You can download the Xcode dmg at <> which requires a free membership at ADC.

To install Xcode you will need Administrator privileges.
#Checking out pkgsrc

After you have downloaded and installed Xcode, you have cvs on your system and can now check out the latest pkgsrc tree from your closest mirror.

To do this, please set following environment variables:

    $ export CVS_RSH=ssh
    $ export

and check out using the command:

    $ cvs co -PA pkgsrc

the checkout takes a few minutes and requires currently about 368 MB (growing steadily).
#Bootstrapping Mac OS X

    $ cd pkgsrc/bootstrap
    $ sudo ./bootstrap

If you wish to bootstrap as non-root in your own home folder for testing purposes, please change to your home folder and then change into the bootstrap directory (pkgsrc/bootstrap) and run:
$ ./bootstrap --unprivileged

Please remember to add /Users/Zafer/pkg/bin to your PATH environment variable
and /Users/Zafer/pkg/man to your MANPATH environment variable, if necessary.

An example mk.conf file with the settings you provided to "bootstrap"
has been created for you. It can be found in:


You can find extensive documentation of the NetBSD Packages Collection
in /Users/Zafer/pkgsrc/doc/pkgsrc.txt and packages(7).

Hopefully everything is now complete.
Thank you


===> bootstrap started: Thu Mar  1 13:34:34 CET 2007
===> bootstrap ended:   Thu Mar  1 13:38:20 CET 2007
When done, please add your **pkg/bin** directory to your PATH variable **and** pkg/man to your MANPATH variable as mentioned above.
#Installing a new package

Installing packages is straightforward works like on other platforms. At first, pick a program you wish to install from the pkgsrc repository. For example misc/figlet. Change in that directory and run bmake.
$ cd pkgsrc/misc/figlet
$ bmake install clean
=> Registering installation for figlet-2.2.2
===> Cleaning for figlet-2.2.2

You can now simply run it by entering:

$ figlet MacOS X
 __  __             ___  ____   __  __
|  \/  | __ _  ___ / _ \/ ___|  \ \/ /
| |\/| |/ _` |/ __| | | \___ \   \  / 
| |  | | (_| | (__| |_| |___) |  /  \ 
|_|  |_|\__,_|\___|\___/|____/  /_/\_\

$ uname -a
Darwin 8.8.0 Darwin Kernel Version 8.8.0: Fri Sep  8 17:18:57 PDT 2006;
root:xnu-792.12.6.obj~1/RELEASE_PPC Power Macintosh powerpc
That's it. Have fun.
#See also

* [[pkgsrc/How to use pkgsrc on Solaris]]
* [[pkgsrc/How to use pkgsrc on Linux]]
* [[pkgsrc/The pkgsrc portability guide]]

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb