################# PINBALL FOR MACOSX #################
# @author: RzR - http://rzr.online.fr/game.htm
########################################################
#
# This is a log when i compiled it trough a ssh session,
# I didnt tested, but my friend cDlm@fr managed to make
it works
# If having trouble contact me url at the top
# I am looking for a mac user that can open me a shell
# (for compiling upcoming version)
########## COMPILING PINBALL ON MACOX ? #############
### Env # bash
echo $OSTYPE $MACHTYPE $HOSTNAME $HOSTTYPE - $HOME $SHELL
# darwin powerpc Aerith.local. macintosh - /Users/guest
/bin/tcsh
cc --version # cc (GCC) 3.1 20020420 (prerelease)
uname -a
# Darwin Aerith.local. 6.4 Darwin Kernel
# Version 6.4: Wed Jan 29 18:50:42 PST 2003;
# root:xnu/xnu-344.26.obj~1/RELEASE_PPC Power
Macintosh powerpc
/usr/X11R6/bin/glxinfo
[ ! -z "$PATH" ] && \
export PATH=$HOME/usr/local/bin:$PATH
[ ! -z "$LD_LIBRARY_PATH" ] && \
export
LD_LIBRARY_PATH=$HOME/usr/local/lib:$LD_LIBRARY_PATH
[ -z "$LD_LIBRARY_PATH" ] && \
export LD_LIBRARY_PATH=$HOME/usr/local/lib
[ -z "$DYLD_LIBRARY_PATH" ] && \
export DYLD_LIBRARY_PATH=$HOME/usr/local/lib
echo PATH=$PATH
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
echo DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
###############################################################################
# PINBALL (that's what we want)
# If you don't have libs see below
###
mkdir -p ~/usr/local/src
cd ~/usr/local/src && \
curl -O
http://switch.dl.sourceforge.net/sourceforge/pinball/pinball-0.1.3.tar.gz
tar xfz pinball-0.1.3.tar.gz
cd ~/usr/local/src/pinball-0.1.3
# apply rzr patch
patch -p < pinball-0.1.3-macosx-rzr.patch
./bootstrap
./configure --prefix=$HOME/usr/local --disable-sdltest
make && make install
# Use #include GL_INCLUDE instead of #include<GL/gl.h>
# find / -name gl.h
ln -fs
/System/Library/Frameworks/AGL.framework/Versions/A/Headers
GL
# shouldn't be nescessary if used autoconf correctly
#! depmods
# depfile='/unittest.Po' tmpdepfile='/unittest.TPo'
#root!!
# DEPDIR undefinied
export DEPDIR=.
make
# Makefile:273: AlignVisitor.Po: No such file or directory
# remove depmods Po or create them touch
# $(CXXDEPMODE) $(depcomp) \
make
# TextureUtil.cpp:21:21: SDL/SDL.h: No such file or
directory
ln -fs . ~/usr/local/include/SDL/SDL
make
cd data/tux
# Check if lib are compiled dyn !
# *** Warning: This library needs some functionality
provided by -lSDLmain.
# *** I have the capability to make that library
automatically link in when
# *** you link to this library. But I can only do this
if you have a
# *** shared version of the library, which you do not
appear to have.
# *** Warning: libtool could not satisfy all declared
inter-library
# *** dependencies of module libModuleTux. Therefore,
libtool will create
# *** a static module, that should work as long as the
dlopening
# *** application is linked with the -dlopen flag.
# -lSDLmain was generated on macosx, not Linux
/bin/sh ../../libtool --mode=link g++ \
-g -W -Wall -O2 -L/sw/lib -L/sw/lib \
-o libModuleTux.la \
-rpath
$HOME/Documents/Development/EmiliaPinball/p/lib/pinball \
-module ModuleTux.lo \
-L/sw/lib -lSDL \
-framework Cocoa -framework OpenGL\
-lSDL_image -lSDL_mixer
# _TO_BE_COMPLETED_
# I didn"t manage to build the dynlib so I turnaround it :
# static linked modules
make install
file ~/usr/local/bin/pinball
otool -L ~/usr/local/bin/pinball
# try to strip the binaries, strip pinball *.so
# that should be over
# controls are 'x' 'n' return esc keys
### binaries
##################################################################
# How to install those pkg in user dir ? well we're
gonna build them later
#
http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.3.pkg.tar.gz
#
http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.3.pkg.tar.gz
#
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.5.pkg.tar.gz
#
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.5.pkg.tar.gz
#
http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.3.pkg.tar.gz
###############################################################################
# Libraries
# If you have those libs skip to the pinball build,
# and add paths with --*prefix options
### LIBSDL @ http://libsdl.org
mkdir -p ~/usr/local/src ; cd ~/usr/local/src
curl -O http://www.libsdl.org/release/SDL-1.2.5.tar.gz
tar xfz SDL-1.2.5.tar.gz && \
cd SDL-1.2.5 && \
./configure --prefix=$HOME/usr/local \
&& make && make install clean
### png @ http://libpng.org
---------------------------------------------------
mkdir -p ~/usr/local/src ; cd ~/usr/local/src && \
curl -O http://libpng.org/pub/png/src/libpng-1.2.5.tar.gz
tar xfz libpng-1.2.5.tar.gz
cd ~/usr/local/src/libpng-1.2.5
make -k -f scripts/makefile.macosx
# make: *** [pngtest] Error 1
# LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -current_version
$(PNGVER) -dynamiclib
cc -o pngtest -fno-common -I../zlib -O pngtest.o -L.
-L../zlib -lpng -lz -current_version 0.1.2.5 -dynamiclib
# cc -o pngtest pngtest.o -lpng -staticlib -L. -lz &&
./pngtest
#sed scripts/makefile.macosx -e s/prefix=/usr/local
$HOME/usr/local
make -k -f scripts/makefile.macosx install
# cp libpng.a ~/usr/local/lib/
# ranlib ~/usr/local/lib/libpng.a
make -k -f scripts/makefile.macosx clean
nm ~/usr/local/lib/libpng* | grep png_create_read_struct
nm libpng* | grep png_create_read_struct
# 00000000 T _png_create_read_struct
rm /Users/guest/usr/local/lib/libpng.
rm /Users/guest/usr/local/lib/libpng.3.
cat > conftest.c <<EOF
#line 2528 "configure"
//#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an
error. */
/* We use char because int might match the return type
of a gcc2
builtin and then its argument prototype would still
apply. */
//char png_create_read_struct();
#include "png.h"
int main() {
png_create_read_struct()
; return 0; }
EOF
cc conftest.c libpng.a
otool -L pngtest
### SDL_image
http://jcatki.no-ip.org/SDL_image/SDL_image_frame.html
mkdir -p ~/usr/local/src
cd ~/usr/local/src && \
curl -O
http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.3.tar.gz
tar xfz SDL_image-1.2.3.tar.gz && \
cd ~/usr/local/src/SDL_image-1.2.3
./configure --prefix=$HOME/usr/local \
--with-sdl-prefix=$HOME/usr/local --disable-sdltest \
--libdir=$HOME/usr/local/lib
# hack for libpng -L$HOME/usr/
ln -fs ~/usr/local/include/png.h ./
ln -fs ~/usr/local/include/pngconf.h ./
make
ranlib /Users/guest/usr/local/lib/libpng.a
make && make install clean
###############################################################################
mkdir -p ~/usr/local/src
cd ~/usr/local/src && \
curl -O
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.5.tar.gz
tar xfz SDL_mixer-1.2.5.tar.gz && \
cd ~/usr/local/src/SDL_mixer-1.2.5
./configure --prefix=$HOME/usr/local
--with-sdl-prefix=$HOME/usr/local --disable-sdltest \
&& make && make install clean
##
----------------------------------------------------------------------------
cd ~/usr/local/src/pinball-0.1.3
make -k clean
cd ~/usr/local/src/SDL_image-1.2.3
make -k clean
cd ~/usr/local/src/SDL_mixer-1.2.5
make -k clean
cd ~/usr/local/src/libpng-1.2.5
make -k -f scripts/makefile.macosx clean
##
----------------------------------------------------------------------------
quick patch (need some autoconf tricks)