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 (9 years, 10 months ago) by schmonz
Branches: MAIN
CVS tags: HEAD
FS case-sensitivity hasn't mattered for years.

    1: In this article I'll explain, how to install and use pkgsrc on Mac OS X (> 10.4.8)
    2: 
    3: **Contents**
    4: 
    5: [[!toc]]
    6: 
    7: #Requirements
    8: 
    9: 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.
   10: 
   11: You can download the Xcode dmg at <http://developer.apple.com/tools/download/> which requires a free membership at ADC.
   12: 
   13: To install Xcode you will need Administrator privileges.
   14: #Checking out pkgsrc
   15: 
   16: 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.
   17: 
   18: To do this, please set following environment variables:
   19: 
   20:     $ export CVS_RSH=ssh
   21:     $ export CVSROOT=anoncvs@anoncvs.se.netbsd.org:/cvsroot
   22: 
   23: and check out using the command:
   24: 
   25:     $ cvs co -PA pkgsrc
   26: 
   27: the checkout takes a few minutes and requires currently about 368 MB (growing steadily).
   28: #Bootstrapping Mac OS X
   29: 
   30:     $ cd pkgsrc/bootstrap
   31:     $ sudo ./bootstrap
   32: 
   33: 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:
   34: <pre><code>
   35: $ ./bootstrap --unprivileged
   36: ...
   37: ===========================================================================
   38: 
   39: Please remember to add /Users/Zafer/pkg/bin to your PATH environment variable
   40: and /Users/Zafer/pkg/man to your MANPATH environment variable, if necessary.
   41: 
   42: An example mk.conf file with the settings you provided to "bootstrap"
   43: has been created for you. It can be found in:
   44: 
   45:       /Users/Zafer/pkg/etc/mk.conf
   46: 
   47: You can find extensive documentation of the NetBSD Packages Collection
   48: in /Users/Zafer/pkgsrc/doc/pkgsrc.txt and packages(7).
   49: 
   50: Hopefully everything is now complete.
   51: Thank you
   52: 
   53: ===========================================================================
   54: 
   55: ===> bootstrap started: Thu Mar  1 13:34:34 CET 2007
   56: ===> bootstrap ended:   Thu Mar  1 13:38:20 CET 2007
   57: </code></pre>
   58: When done, please add your **pkg/bin** directory to your PATH variable **and** pkg/man to your MANPATH variable as mentioned above.
   59: #Installing a new package
   60: 
   61: 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.
   62: <pre><code>
   63: $ cd pkgsrc/misc/figlet
   64: $ bmake install clean
   65: ..
   66: => Registering installation for figlet-2.2.2
   67: ===> Cleaning for figlet-2.2.2
   68: 
   69: You can now simply run it by entering:
   70: 
   71: $ figlet MacOS X
   72:  __  __             ___  ____   __  __
   73: |  \/  | __ _  ___ / _ \/ ___|  \ \/ /
   74: | |\/| |/ _` |/ __| | | \___ \   \  / 
   75: | |  | | (_| | (__| |_| |___) |  /  \ 
   76: |_|  |_|\__,_|\___|\___/|____/  /_/\_\
   77: 
   78: $ uname -a
   79: Darwin macmini.aydogan.net 8.8.0 Darwin Kernel Version 8.8.0: Fri Sep  8 17:18:57 PDT 2006;
   80: root:xnu-792.12.6.obj~1/RELEASE_PPC Power Macintosh powerpc
   81: </code></pre>
   82: That's it. Have fun.
   83: #See also
   84: 
   85: * [[pkgsrc/How to use pkgsrc on Solaris]]
   86: * [[pkgsrc/How to use pkgsrc on Linux]]
   87: * [[pkgsrc/The pkgsrc portability guide]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb