Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 358355 - dev-python/pythonmagick-0.95 build troubles - patch
Summary: dev-python/pythonmagick-0.95 build troubles - patch
Status: RESOLVED DUPLICATE of bug 358251
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 08:49 UTC by Michael Kefeder
Modified: 2011-03-22 11:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
python version set to 2.6 in configure.ac (pythonmagick-0.9.5-no_python3.1.patch,357 bytes, patch)
2011-03-11 08:51 UTC, Michael Kefeder
Details | Diff
pythonmagick-0.9.5.ebuild (pythonmagick-0.9.5.ebuild,1.41 KB, text/plain)
2011-03-11 08:52 UTC, Michael Kefeder
Details
Move using after include (LateImportBoostPython.patch,57.42 KB, patch)
2011-03-15 21:46 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ***