[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fink-devel
Subject:    [Fink-devel] pygame-py24-1.7.1release-1
From:       "James P. Crutchfield" <chaos () cse ! ucdavis ! edu>
Date:       2006-05-28 23:55:26
Message-ID: 589D9036-891B-41F9-8B37-D0488B6C01BF () cse ! ucdavis ! edu
[Download RAW message or body]

Dear Ben and fink-devel,

	Ran into the following problems installing pygame onto Tiger today.
First problem:
	o pygame: src/display.c references a field in a struct that doesn't  
exist.
Second:
	o sdl-ttf not linking to -framework OpenGL.

	Below are my diagnoses and fixes.
	I'm not the least bit experienced with this sort of problem and fix. I
assume you're the ones who should get this information. Please  
forward to
others, as appropriate.
	Also, my fixes are hacks, coming under time-pressure to use pygame in
a physics programming class. I'm sure there are proper ways to have  
addressed
the problems. I'd like to hear about what you do.

	Regards,

		Jim

	James P. Crutchfield                        Professor
	Computational Science & Engineering Center
	Physics Department                         chaos@cse.ucdavis.edu
	University of California                    cse.ucdavis.edu/~chaos
	One Shields Avenue                        530-752-0600 or 297-4620,  
754-4885 (fax)
	Davis, California 95616-8572
	Center Manager: Linda Potoski     lrpotoski@ucdavis.edu; 530-754-4405

--
Package manager version: 0.24.15
Distribution version: 0.8.0.rsync
Mac OS X version: 10.4.6
Xcode version: 2.2.1
gcc version: 4.0.1 (Apple Computer, Inc. build 5250)
make version: 3.80
Feedback Courtesy of FinkCommander



["pygame-1.7.1release.28may06.fix.txt" (pygame-1.7.1release.28may06.fix.txt)]

Issue:
	Installing pygame-py24 using fink on OS X 10.4
Problem:
	Compile time error in src/display.c:
		Paraphrase: 'no field "data" in SDL_WM_INFO'
Diagnosis:
	Series of ifdefs in that file not properly parsed; half dozen contingencies!
	Leads to:
		(i) a "data" field being referenced for a window manager struct that has no such component;
		(ii) X11 window manager setup code ignored.
Temporary fix:
	(i) Commented out a single line containing the "data" field code.
	(ii) Pulled out the WM setup code, moved it sooner to guarantee execution.
	(iii) Immediate return---return dict;---out of enclosing function.

Repair method with fink:
	(i) Copy /sw/src/pygame-py24... to temp dir
	(ii) Un-tar'd, patched src/display.c
	(iii) Re-tar'd and moved back to /sw/src/
	(iv) Fink->Source->Install
	(v) Fink complains MD5 checksum differs. Respond: Use existing file anyway.
	

["sdl-config.28may06.fix.txt" (sdl-config.28may06.fix.txt)]

##
##
#!/bin/sh
# JPC (chaos@cse.ucdavis.edu) 28 May 2006:
#	Fix to get sdl_ttf to link to -framework OpenGL
# Original problem:
#   Using fink to install pygame-py24,
#		which depends on SDL,
#			which depends on sdl-ttf (True Type Fonts),
#				which depends on OpenGL.
#	Error: Undefined symbols .... _glBegin... and the like
#	Observation: Only -Wl,framework,Cocoa was being provided as SDL_LIBS
#   Source of problem:
#		sdl-config not returning proper SDL compile/linker flags
#   	Note below: --libs case appears twice!
#	Temporary fix for the above particular problem: added -Wl,framework,OpenGL
#		to first --libs case.
# Remaining status: the following should be properly fixed for the general case.

prefix=/sw
exec_prefix=${prefix}
exec_prefix_set=no

#usage="\
#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] \
[--libs]" usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] \
[--libs] [--static-libs]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo 1.2.10
      ;;
    --cflags)
      echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE
      ;;
    --libs)
      echo -L${exec_prefix}/lib  -lSDLmain -lSDL -Wl,-framework,Cocoa \
-Wl,-framework,OpenGL  ;;
    --static-libs)
#    --libs|--static-libs)
      echo -L${exec_prefix}/lib  ${exec_prefix}/lib/libSDLmain.a \
${exec_prefix}/lib/libSDL.a  -Wl,-framework,OpenGL  -Wl,-framework,IOKit \
-Wl,-framework,Cocoa -Wl,-framework,QuickTime -Wl,-framework,ApplicationServices \
-Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit  ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done




-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic