Separate ARCH-dependent stuff by files to allow multiarch versions co-exists

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Hubbitus
Posts: 66
Joined: 2010-05-04T10:50:21-07:00
Authentication code: 8675308
Location: Russia, Saint-Petersburg

Separate ARCH-dependent stuff by files to allow multiarch versions co-exists

Post by Hubbitus »

Hello.

Recently by request https://bugzilla.redhat.com/show_bug.cgi?id=1293081 I solve problem of multiarch IM installation on system.
Basically it is not so hard. There 3 files magick/magick-config.h, magick/magick-baseconfig.h, magick/version.h which I just conditionally include (http://pkgs.fedoraproject.org/cgit/rpms ... be612ddd30) on next manner:

Code: Select all

#include <bits/wordsize.h>
 
#if __WORDSIZE == 32
# include "magick-config-32.h"
#elif __WORDSIZE == 64
# include "magick-config-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
And also patch: http://pkgs.fedoraproject.org/cgit/rpms ... be612ddd30 to rely on system pkgconfig path.

I think it will be good idea incorporate such changes to main code. And possibly refactor and put all arch-dependent header stuff on one per arch file. What you think?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Separate ARCH-dependent stuff by files to allow multiarch versions co-exists

Post by magick »

We will add your patches to the GIT master sometime today. Thanks!
Hubbitus
Posts: 66
Joined: 2010-05-04T10:50:21-07:00
Authentication code: 8675308
Location: Russia, Saint-Petersburg

Re: Separate ARCH-dependent stuff by files to allow multiarch versions co-exists

Post by Hubbitus »

Thank you very much!
Post Reply