Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 358355

Summary: dev-python/pythonmagick-0.95 build troubles - patch
Product: Gentoo Linux Reporter: Michael Kefeder <m.kefeder>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jmbsvicetto, Martin.vGagern, yamadharma
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: python version set to 2.6 in configure.ac
pythonmagick-0.9.5.ebuild
Move using after include

Description Michael Kefeder 2011-03-11 08:49:24 UTC
pythonmagick-0.9.4 couldn't build cause it wouldn't fetch the source tarball, so i checked and found that 0.95 was released.

pythonmagick-0.95 makes the pythonmagick-0.9.4-ssize_t.patch obsolete, so I thought "yay use that version" - but I was only able to install it after fixing the following:

replace ssize_t with ::ssize_t in these files:

/usr/include/ImageMagick/Magick++/STL.h
/usr/include/ImageMagick/Magick++/Pixels.h
/usr/include/ImageMagick/Magick++/Image.h

and only after applying the attached patch pythonmagick-0.9.5-no_python3.1.patch

So I assume we need to patch ImageMagick aswell for pythonmagick to work? (I have media-gfx/imagemagick-6.6.7.6 installed)

I also tried to patch it in another way that would make it use python3.1 all the way, but this install never really worked ;)

Reproducible: Always
Comment 1 Michael Kefeder 2011-03-11 08:51:51 UTC
Created attachment 265533 [details, diff]
python version set to 2.6 in configure.ac
Comment 2 Michael Kefeder 2011-03-11 08:52:35 UTC
Created attachment 265535 [details]
pythonmagick-0.9.5.ebuild
Comment 3 Martin von Gagern 2011-03-15 14:48:24 UTC
Adjusting the Magick++ headers certainly seems like one good solution.

Another approach might be moving the "using namespace boost::python;" directive in the pythonmagick source files after the inclusion of the Magick++.h header. That would restrict the scope of the fix to the pythonmagick package.
Comment 4 Martin von Gagern 2011-03-15 21:46:51 UTC
Created attachment 266043 [details, diff]
Move using after include

This patch, together with the one from comment #1, made the package compile for me. It moves the "using namespace boost::python" after any #include. That way, boost::python::ssize_t won't be a candidate for the unqualified ssize_t used in the Magick++ headers.
Comment 5 Michael Kefeder 2011-03-16 10:29:37 UTC
moving "using namespace boost::python" is of course much more clever than my approach (i was just looking for an easy quick fix ;)) - so i vote for the "move using after include"-patch you guys came up with.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-03-22 11:24:51 UTC

*** This bug has been marked as a duplicate of bug 358251 ***