Alien-ImageMagick

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

                             q|perl -pi -e 's:^(\s*.INSTALL_BASE.*$):#$1:' PerlMagick/Makefile.PL|,
                             q|perl -pi -e 's:-L\.\./magick(.*?)/\.libs:-L|.$siteprefix.q|/lib:gi' PerlMagick/Makefile.PL|,
                             q|perl -pi -e 's:-L\.\./\.\./magick(.*?)/\.libs:-L|.$siteprefix.q|/lib:gi' PerlMagick/quantum/Makefile.PL|,
                             q|perl -pi -e 's:-L\.\./\.\./magick(.*?)/\.libs:-L|.$siteprefix.q|/lib:gi' PerlMagick/default/Makefile.PL|,
                             ,
                             'make',
    ],
    alien_install_commands => [
        'LDFLAGS='.$LDFLAGS.' make install', # This will build the included PerlMagick package.
        $ldconfig // "",
        $perlbin.' -e "use Image::Magick; print Image::Magick->QuantumDepth"', # This checks Image magick is there fine.

    ],
    meta_merge => {
        resources  => {
            repository => "https://github.com/jeteve/Alien-ImageMagick",
        },
    }
);

$builder->create_build_script();

META.json  view on Meta::CPAN

{
   "abstract" : "cpanm compatible Image::Magick packaging.",
   "author" : [
      "Jerome Eteve <jerome.eteve@gmail.com>"
   ],
   "dynamic_config" : 1,
   "generated_by" : "Module::Build version 0.4234",
   "license" : [
      "perl_5"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",

META.yml  view on Meta::CPAN

---
abstract: 'cpanm compatible Image::Magick packaging.'
author:
  - 'Jerome Eteve <jerome.eteve@gmail.com>'
build_requires:
  Alien::Base: '0.009'
  IO::Socket::SSL: '2.07'
  Net::SSLeay: '1.49'
  Test::More: '1.001014'
configure_requires:
  Alien::Base::ModuleBuild: '1.15'
  Module::Build: '0.38'

lib/Alien/ImageMagick.pm  view on Meta::CPAN

package Alien::ImageMagick;

use 5.006;
use strict;
use warnings;

use parent 'Alien::Base';

=head1 NAME

Alien::ImageMagick - cpanm compatible Image::Magick packaging.

=head1 VERSION

Version 0.10

=cut

our $VERSION = '0.10';

=head1 DESCRIPTION

lib/Alien/ImageMagick.pm  view on Meta::CPAN

from the official Image Magick website ( See L<http://www.imagemagick.org/script/install-source.php> )
in a way that is compatible with perlbrew and/or cpanm.

Alternatively, you may use the environment variable C<PERL_ALIEN_IMAGEMAGICK_VERSION>
to pin a particular version of Image Magick (e.g. "7.1.1-30").

If you use cpanm or perlbrew, this will not conflict with your system's Image Magick installation.

=head1 INSTALLATION

To use this package and use Image::Magick from your application code:

Instead of depending on 'Image::Magick', just B<depend on 'Alien::ImageMagick'>.

Then see L<http://www.imagemagick.org/script/perl-magick.php#overview> for more on using image magic with perl.

=over

=item With System Perl

If you need to use Image::Magick and use system perl and system PerlMagick, you only
need this package if you want the freshest version of Image Magick.

Install Alien::ImageMagick with your favorite package manager.

=item With cpanm

If you need to use Image::Magick and use cpanm, you only need this package
if you want the freshest version of Image Magick. Otherwise you can install
your system's one.

   cpanm Alien::ImageMagick

=item With perlbrew + cpanm

If you need to use Image::Magick and use perlbrew w/ cpanm, you will need this
package.

   cpanm Alien::ImageMagick

=back

To install a specific version of ImageMagick run C<Build.PL> with the C<PERL_ALIEN_IMAGEMAGICK_VERSION> environment variable:

   PERL_ALIEN_IMAGEMAGICK_VERSION=7.1.1-29 perl Build.PL

=head1 SYNOPSIS

  use Image::Magick
  ...

=head1 AUTHOR

Jerome Eteve, C<< <jerome.eteve at gmail.com> >>

=head1 ACKNOWLEDGEMENTS

This is inspired by David Farrell's post on perltricks.com L<http://perltricks.com/article/57/2014/1/1/Shazam-Use-Image-Magick-with-Perlbrew-in-minutes>



( run in 0.919 second using v1.01-cache-2.11-cpan-beeb90c9504 )