[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: pygame sdl_image png/jpeg support



Hi,

Try the attached Setup file. Just put it in the same directory as setup.py.

Lenard Lindstrom

On 14/02/12 01:23 PM, AntCox wrote:
Thank you for your reply Lenard. I have read the post you linked and I
am unsure which file needs editing. Setup.in does not seem to exist in
the pygame directory after checking it out from the repo. Is that
another system file, a Python file or a typo? I haven't used Python
very much, and pygame not at all so I am quite unfamiliar with the
structure. If you or anyone else could be a little more verbose/
specific with your suggestions it would be appreciated.
Thanks in advance.
Ant

On Feb 14, 8:57 pm, Lenard Lindstrom<le...@xxxxxxxxx>  wrote:
Hi,

The solution would be to use ldconfig in config_unix.py to determine if
a library is available, then let ld find it. So for libraries such as
png and jpeg Setup would only have -l<lib>  directives, but no
corresponding -L<lib-paths>.

The relevant pygame-user thread is here:

<http://article.gmane.org/gmane.comp.python.pygame/23502>

Lenard Lindstrom

On 14/02/12 09:32 AM, Ren Dudfield wrote:




#This Setup file is used by the setup.py script to configure the
#python extensions. You will likely use the "config.py" which will
#build a correct Setup file for you based on your system settings.
#If not, the format is simple enough to edit by hand. First change
#the needed commandline flags for each dependency, then comment out
#any unavailable optional modules in the first optional section.


SDL = -I/usr/X11R6/include -I/usr/include/SDL -D_REENTRANT -lSDL 
FONT = -I/usr/include/SDL -lSDL_ttf
IMAGE = -I/usr/include/SDL -lSDL_image
MIXER = -I/usr/include/SDL -lSDL_mixer
SMPEG = -I/usr/include/smpeg -I/usr/include/SDL -D_REENTRANT -lsmpeg -L/usr/lib -lSDL 
PNG = -I/usr/include -lpng
JPEG = -I/usr/include -ljpeg
SCRAP = -L/usr/lib -lX11
PORTMIDI = -I/usr/include -lportmidi
PORTTIME = -I/usr/include -lporttime
FREETYPE = -I/usr/include/freetype2 -I/usr/include -lfreetype -lz -lbz2 

DEBUG = 

#the following modules are optional. you will want to compile
#everything you can, but you can ignore ones you don't have
#dependencies for, just comment them out

imageext src/imageext.c $(SDL) $(IMAGE) $(PNG) $(JPEG) $(DEBUG)
font src/font.c $(SDL) $(FONT) $(DEBUG)
mixer src/mixer.c $(SDL) $(MIXER) $(DEBUG)
mixer_music src/music.c $(SDL) $(MIXER) $(DEBUG)
_numericsurfarray src/_numericsurfarray.c $(SDL) $(DEBUG)
_numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
#_movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c $(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)
scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG)

GFX = src/SDL_gfx/SDL_gfxPrimitives.c 
#GFX = src/SDL_gfx/SDL_gfxBlitFunc.c src/SDL_gfx/SDL_gfxPrimitives.c 
gfxdraw src/gfxdraw.c $(SDL) $(GFX) $(DEBUG)

#optional freetype module (do not break in multiple lines
#or the configuration script will choke!)
_freetype src/freetype/ft_cache.c src/freetype/ft_wrap.c src/freetype/ft_render.c  src/freetype/ft_render_cb.c src/freetype/ft_layout.c src/freetype/ft_unicode.c src/_freetype.c $(SDL) $(FREETYPE) $(DEBUG)

#these modules are required for pygame to run. they only require
#SDL as a dependency. these should not be altered

base src/base.c $(SDL) $(DEBUG)
cdrom src/cdrom.c $(SDL) $(DEBUG)
color src/color.c $(SDL) $(DEBUG)
constants src/constants.c $(SDL) $(DEBUG)
display src/display.c $(SDL) $(DEBUG)
event src/event.c $(SDL) $(DEBUG)
fastevent src/fastevent.c src/fastevents.c $(SDL) $(DEBUG)
key src/key.c $(SDL) $(DEBUG)
mouse src/mouse.c $(SDL) $(DEBUG)
rect src/rect.c $(SDL) $(DEBUG)
rwobject src/rwobject.c $(SDL) $(DEBUG)
surface src/surface.c src/alphablit.c src/surface_fill.c $(SDL) $(DEBUG)
surflock src/surflock.c $(SDL) $(DEBUG)
time src/time.c $(SDL) $(DEBUG)
joystick src/joystick.c $(SDL) $(DEBUG)
draw src/draw.c $(SDL) $(DEBUG)
image src/image.c $(SDL) $(DEBUG)
overlay src/overlay.c $(SDL) $(DEBUG)
transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG) -D_NO_MMX_FOR_X86_64
mask src/mask.c src/bitmask.c $(SDL) $(DEBUG)
bufferproxy src/bufferproxy.c $(SDL) $(DEBUG)
pixelarray src/pixelarray.c $(SDL) $(DEBUG)
math src/math.c $(SDL) $(DEBUG)
_view src/_view.c $(SDL) $(DEBUG)
pixelcopy src/pixelcopy.c $(SDL) $(DEBUG)

#This file defines platform specific modules for linux
_camera src/_camera.c src/camera_v4l2.c $(SDL) $(DEBUG)