Merge branch 'master' of https://github.com/kmcdonell/pcp into kenj-merge
[pcp.git] / README.osx
blob5f79eabcab235643f9f66d1034db2b6f109e0535
1 These notes are for building and installing PCP on Mac OS X
3 The recipe is known to work with PCP 3.10.9 and Mac OS X 10.8
4 (Mountain Lion).
6 Prelminaries
7 ============
9 I don't know how these bits were installed (that pre-dates keeping
10 records of the build pain).  But, they are not optional.
12 - XCode  (as always, needs an Apple developer ID now too)
13 - Auxillary Tools for XCode  (for packagemaker)
14 - MacPorts.org  (now needed for pkg-config, gnutar)
15 - Qt  (install and set QTDIR, as before)
17 Other prerequisites
18 ===================
20 Based on http://cairographics.org/end_to_end_build_for_mac_os_x/
22 But skipping the pkg-config stuff there and installing directly
23 into /usr/local rather than some local staging area.
25 For each package below, poke around in the ftp download area to find
26 an appropriate setting for LATEST.
28 $ export MACOSX_DEPLOYMENT_TARGET=10.5
30 # we don't care about -arch ppc and -arch ppc64 so omit these
32 $ export LDFLAGS="-arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
33 $ export CFLAGS="-Os -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
35 Latest cario tarball is compressed with xz, so need to get, make and
36 install that first.
38 $ LATEST=5.2.2
39 $ curl http://tukaani.org/xz/xz-$LATEST.tar.gz -o xz.tgz
40 $ tar xpf xz.tgz
41 $ rm -rf xz
42 $ mv xz-$LATEST xz
43 $ cd xz
44 $ ./configure --disable-dependency-tracking
45 $ make
46 $ sudo make install
47 $ cd ..
49 $ LATEST=1.6.17
50 $ DIR=`echo $LATEST | sed -e 's/\.[^.]*$//' -e 's/\.//' -e 's/^/libpng/'`
51 # should be libpng16 for LATEST=1.6.17
52 $ curl ftp://ftp.simplesystems.org/pub/libpng/png/src/$DIR/libpng-$LATEST.tar.gz -o libpng.tgz
53 $ tar zxpf libpng.tgz
54 $ rm -rf libpng
55 $ mv libpng-$LATEST libpng
56 $ cd libpng
57 $ ./configure --disable-dependency-tracking
58 $ make
59 $ sudo make install
60 $ cd ..
62 $ LATEST=0.32.8
63 $ curl http://www.cairographics.org/releases/pixman-$LATEST.tar.gz -o pixman.tgz
64 $ tar zxpf pixman.tgz
65 $ rm -rf pixman
66 $ mv pixman-$LATEST pixman
67 $ cd pixman
68 $ ./configure --disable-dependency-tracking
69 $ make
70 $ sudo make install
71 $ cd ..
73 $ LATEST=1.14.4
74 $ curl http://www.cairographics.org/releases/cairo-$LATEST.tar.xz -o cairo.txz
75 $ xzcat cairo.txz | tar xpf -
76 $ rm -rf cairo
77 $ mv cairo-$LATEST cairo
78 $ cd cairo
79 $ ./configure --disable-dependency-tracking
80 $ make
81 $ sudo make install
82 $ cd ..
84 $ LATEST=0.9.46
85 $ curl ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-$LATEST.tar.gz -o libmicrohttpd.tgz
86 $ tar zxpf libmicrohttpd.tgz 
87 $ rm -rf libmicrohttpd
88 $ mv libmicrohttpd-$LATEST libmicrohttpd
89 $ cd libmicrohttpd
90 $ ./configure --disable-dependency-tracking
91 $ make
92 $ sudo make install
93 $ cd ..
95 PCP Build
96 =========
98 $ unset LDFLAGS
99 $ unset CFLAGS
100 $ cd <to top of PCP tree>
101 $ ./Makepkgs
103 Good luck!
105 Ken McDonell, Dec 2015