User:Jacek Antonelli/Mac Notes

Xcode tools
Installed from the Mac OS X installer disk.

git
Download and install git

openal-soft
git clone git://repo.or.cz/openal-soft.git openal-soft

Edit openal-soft/CMakeLists.txt to change this: SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_BUILD_VERSION}") to this: SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}")

Then, in the openal-soft directory:

cmake. && make && sudo make install

Installed to /usr/local.

freealut
freealut-1.1.0.tar.gz.

./configure && make && sudo make install

Alternatively, to use the builtin OpenAL framework instead of openal-soft:

./configure CFLAGS="-framework OpenAL" LDFLAGS="-framework OpenAL /System/Library/Frameworks/OpenAL.framework/OpenAL" make sudo make install

(The "hello world" example might fail to build, but you can copy the dylib from src/.libs/)

fink
Fink is for installing other stuff. Download fink package and install it.

Then to get package listings: sudo fink scanpackages sudo fink index Then to update fink, maybe not necessary: sudo apt-get update sudo apt-get install fink

pkgconfig
This helps things find the packages. sudo fink install pkgconfig

gettext
Provides libintl, needed by glib2. Fink autoinstalls it, if you're going that route.

gettext-0.14.5.tar.gz

./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" make && sudo make install

glib2
Needed by gstreamer. sudo fink install glib2

Second try, based on fink:

glib-2.12.0.tar.bz2

patch -p1 < /sw/fink/10.5/stable/main/finkinfo/gnome/glib2.patch ./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" make && sudo make install

Install might fail with a symlink error, but the important libs are installed already anyway.

libxml2
Needed by gstreamer. sudo fink install libxml2

Update: OSX has this built in, maybe gstreamer just needs a little help finding it?

gstreamer
gstreamer-0.10.22.tar.bz2 ./configure && make && sudo make install

liboil
Needed by gst-plugins-base. liboil-0.3.15.tar.gz ./configure && make && sudo make install

libogg
Optionally used by gst-plugins-base. sudo fink install libogg

Second try, based on fink:

libogg-1.1.3.tar.gz

patch -p1 < /sw/fink/10.5/stable/main/finkinfo/sound/libogg.patch ./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" make && sudo make install

libvorbis
Optionally used by gst-plugins-base. sudo fink install libvorbis0

Second try, based on fink:

libvorbis-1.1.0.tar.gz

patch -p1 < /sw/fink/10.5/stable/main/finkinfo/sound/libvorbis0.patch ./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" make && sudo make install

libtheora
Optionally used by gst-plugins-base. sudo fink install libtheora0

Second try, based on fink:

libtheora-1.0alpha5.tar.bz2

patch -p1 < /sw/fink/10.5/stable/main/finkinfo/graphics/libtheora0.patch ./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" make && sudo make install

pango
Optionally used by gst-plugins-base. sudo fink install pango1 pango1-dev

Second try, based on fink:

pango-1.10.1.tar.bz2

patch -p1 < /sw/fink/10.5/stable/main/finkinfo/gnome/pango1-xft2.patch ./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" make && sudo make install

XQuartz
X11-2.3.2.1.dmg

I needed it for gst-plugins-base to find the libfontconfig.la

gst-plugins-base
gst-plugins-base-0.10.22.tar.bz2 ./configure && make && sudo make install

libjpeg
Optionally used by gst-plugins-good. sudo fink install libjpeg

Second try, based on how fink does it:

jpegsrc.v6b.tar.gz

patch -p1 < /sw/fink/10.5/stable/main/finkinfo/graphics/libjpeg.patch # Update configure stuff, libjpeg's is from 1998 and doesn't work on Mac OS X cp /usr/share/libtool/config.*. ./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" \ --enable-shared --enable-static # Remove some problematic compile flags? Dunno exactly what's going on, but fink does it. perl -pi.bak -e 's,-undefined suppress,,g; s,-flat_namespace,,g' libtool make && sudo make install

flac
Optionally used by gst-plugins-good.

flac-1.1.4.dmg

(Fink's flac packages aren't recognized by gst-plugins-good's configure script.)

Second try:

flac-1.2.1.tar.gz

./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" \ --disable-asm-optimizations make sudo make install

gst-plugins-good
gst-plugins-good-0.10.14.tar.bz2

Need to use some special flags to help it find libjpeg, since it doesn't have a pkg-config entry.

./configure CFLAGS="-I/sw/include" LDFLAGS="-L/sw/lib" make && sudo make install

gst-plugins-bad
gst-plugins-bad-0.10.10.tar.bz2

./configure && make && sudo make install

gst-ffmpeg
gst-ffmpeg-0.10.6.tar.bz2

./configure && make && sudo make install

Second try:

./configure CFLAGS="-I/usr/local/include/ -I/sw/include/" \ LDFLAGS="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" pushd gst-libs/ext/ffmpeg/ ./configure --extra-cflags="-I/usr/local/include/ -I/sw/include/" \ --extra-ldflags="-L/usr/local/lib/ -L/sw/lib/ -headerpad_max_install_names" \ --disable-vhook --disable-ffserver --disable-ffplay --enable-postproc \ --enable-swscale --enable-gpl --enable-static --enable-shared \ --disable-encoder=flac --disable-decoder=cavs --disable-protocols \ --disable-devices --disable-network --disable-mmx --disable-altivec popd make sudo make install
 * 1) Configure the included ffmpeg separately because it doesn't like CFLAGS/LDFLAGS.

Copying/Linking Libraries and Headers
From the imprudence directory:

cd linden/libraries/include/ ln -s /usr/local/include/AL ./AL ln -s /sw/include/glib-2.0/glib ./glib ln -s /sw/include/glib-2.0/glib-object.h. ln -s /sw/include/glib-2.0/glib.h. ln -s /sw/include/glib-2.0/gmodule.h. ln -s /sw/include/glib-2.0/gobject. ln -s /sw/lib/glib-2.0/include/glibconfig.h. ln -s /sw/include/libxml2/libxml ./libxml
 * 1) Headers, okay to link these.

cd linden/libraries/universal-darwin/lib_release/ cp /sw/lib/libglib-2.0.dylib. cp /sw/lib/libgmodule-2.0.dylib. cp /sw/lib/libgobject-2.0.dylib. cp /sw/lib/libgthread-2.0.dylib. cp /usr/local/lib/libgstapp-0.10.dylib. cp /usr/local/lib/libgstaudio-0.10.dylib. cp /usr/local/lib/libgstbase-0.10.dylib. cp /usr/local/lib/libgstcdda-0.10.dylib. cp /usr/local/lib/libgstcontroller-0.10.dylib. cp /usr/local/lib/libgstdataprotocol-0.10.dylib. cp /usr/local/lib/libgstfft-0.10.dylib. cp /usr/local/lib/libgstinterfaces-0.10.dylib. cp /usr/local/lib/libgstnet-0.10.dylib. cp /usr/local/lib/libgstnetbuffer-0.10.dylib. cp /usr/local/lib/libgstpbutils-0.10.dylib. cp /usr/local/lib/libgstreamer-0.10.dylib. cp /usr/local/lib/libgstriff-0.10.dylib. cp /usr/local/lib/libgstrtp-0.10.dylib. cp /usr/local/lib/libgstrtsp-0.10.dylib. cp /usr/local/lib/libgstsdp-0.10.dylib. cp /usr/local/lib/libgsttag-0.10.dylib. cp /usr/local/lib/libgstvideo-0.10.dylib. cd linden/libraries/universal-darwin/lib_release/gstreamer-plugins/ cp /usr/local/lib/gstreamer-0.10/libgstaacparse.so. cp /usr/local/lib/gstreamer-0.10/libgstadder.so. cp /usr/local/lib/gstreamer-0.10/libgstaiffparse.so. cp /usr/local/lib/gstreamer-0.10/libgstamrparse.so. cp /usr/local/lib/gstreamer-0.10/libgstapp.so. cp /usr/local/lib/gstreamer-0.10/libgstaudioconvert.so. cp /usr/local/lib/gstreamer-0.10/libgstaudiorate.so. cp /usr/local/lib/gstreamer-0.10/libgstaudioresample.so. cp /usr/local/lib/gstreamer-0.10/libgstautodetect.so. cp /usr/local/lib/gstreamer-0.10/libgstavi.so. cp /usr/local/lib/gstreamer-0.10/libgstcoreelements.so. cp /usr/local/lib/gstreamer-0.10/libgstcoreindexers.so. cp /usr/local/lib/gstreamer-0.10/libgstdebug.so. cp /usr/local/lib/gstreamer-0.10/libgstdecodebin2.so. cp /usr/local/lib/gstreamer-0.10/libgstdeinterlace2.so. cp /usr/local/lib/gstreamer-0.10/libgstequalizer.so. cp /usr/local/lib/gstreamer-0.10/libgstffmpeg.so. cp /usr/local/lib/gstreamer-0.10/libgstffmpegcolorspace.so. cp /usr/local/lib/gstreamer-0.10/libgstffmpegscale.so. cp /usr/local/lib/gstreamer-0.10/libgstflac.so. cp /usr/local/lib/gstreamer-0.10/libgstflv.so. cp /usr/local/lib/gstreamer-0.10/libgstgdp.so. cp /usr/local/lib/gstreamer-0.10/libgsth264parse.so. cp /usr/local/lib/gstreamer-0.10/libgsticydemux.so. cp /usr/local/lib/gstreamer-0.10/libgstid3demux.so. cp /usr/local/lib/gstreamer-0.10/libgstinterleave.so. cp /usr/local/lib/gstreamer-0.10/libgstjpeg.so. cp /usr/local/lib/gstreamer-0.10/libgstlevel.so. cp /usr/local/lib/gstreamer-0.10/libgstmetadata.so. cp /usr/local/lib/gstreamer-0.10/libgstmpeg4videoparse.so. cp /usr/local/lib/gstreamer-0.10/libgstmpegdemux.so. cp /usr/local/lib/gstreamer-0.10/libgstmpegvideoparse.so. cp /usr/local/lib/gstreamer-0.10/libgstmultipart.so. cp /usr/local/lib/gstreamer-0.10/libgstneonhttpsrc.so. cp /usr/local/lib/gstreamer-0.10/libgstogg.so. cp /usr/local/lib/gstreamer-0.10/libgstosxaudio.so. cp /usr/local/lib/gstreamer-0.10/libgstosxvideosink.so. cp /usr/local/lib/gstreamer-0.10/libgstpango.so. cp /usr/local/lib/gstreamer-0.10/libgstplaybin.so. cp /usr/local/lib/gstreamer-0.10/libgstpng.so. cp /usr/local/lib/gstreamer-0.10/libgstpostproc.so. cp /usr/local/lib/gstreamer-0.10/libgstqtdemux.so. cp /usr/local/lib/gstreamer-0.10/libgstqueue2.so. cp /usr/local/lib/gstreamer-0.10/libgstreal.so. cp /usr/local/lib/gstreamer-0.10/libgstrtp.so. cp /usr/local/lib/gstreamer-0.10/libgstrtpmanager.so. cp /usr/local/lib/gstreamer-0.10/libgstrtsp.so. cp /usr/local/lib/gstreamer-0.10/libgstsdpelem.so. cp /usr/local/lib/gstreamer-0.10/libgstselector.so. cp /usr/local/lib/gstreamer-0.10/libgsttcp.so. cp /usr/local/lib/gstreamer-0.10/libgsttheora.so. cp /usr/local/lib/gstreamer-0.10/libgsttypefindfunctions.so. cp /usr/local/lib/gstreamer-0.10/libgstudp.so. cp /usr/local/lib/gstreamer-0.10/libgstvideoscale.so. cp /usr/local/lib/gstreamer-0.10/libgstvolume.so. cp /usr/local/lib/gstreamer-0.10/libgstvorbis.so. cp /usr/local/lib/gstreamer-0.10/libgstwavparse.so.
 * 1) Libraries, not good to link, so copy instead.
 * 1) Glib
 * 1) Gstreamer
 * 1) Gstreamer plugins

Configuring & Compiling
In imprudence/linden/indra, run ./develop.py

Open imprudence/linden/indra/build-darwin-i386/Imprudence.xcodeproj in Xcode.

Project > Edit Project. In the "Build" tab, "Architectures" section, set "Architectures" to "Standard (32-bit Universal)" and "Base SDK" to "Mac OS X 10.4" if it's not already.

Then go back to the main window and press "Build and Go"!