Alien-IUP

 view release on metacpan or  search on metacpan

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

package Alien::IUP;

use warnings;
use strict;

use Alien::IUP::ConfigData;
use File::ShareDir qw(dist_dir);
use File::Spec::Functions qw(catdir catfile rel2abs);

=head1 NAME

Alien::IUP - Building, finding and using iup + related libraries - L<http://www.tecgraf.puc-rio.br/iup/>

=cut

our $VERSION = "0.711";

=head1 VERSION

=over

=item * I<iup> library 3.19.1 - see L<http://www.tecgraf.puc-rio.br/iup/>

=item * I<im> library 3.11 - see L<http://www.tecgraf.puc-rio.br/im/>

=item * I<cd> library 5.10 - see L<http://www.tecgraf.puc-rio.br/cd/>

=back

=head1 SYNOPSIS

B<IMPORTANT:> This module is not a perl binding for I<iup + related> libraries; it is just
a helper module. The real perl binding is implemented by L<IUP|IUP> module,
which is using Alien::IUP to locate I<iup + related> libraries on your system (or build it from source codes).

Alien::IUP installation comprise of:

=over

=item * Downloading I<iup> & co. source code tarballs

=item * Building I<iup> & co. binaries from source codes (note: static libraries are build)

=item * Installing libs and dev files (*.h, *.a) into I<share> directory of Alien::IUP
distribution - I<share> directory is usually something like this: /usr/lib/perl5/site_perl/5.18/auto/share/dist/Alien-IUP

=back

Later on you can use Alien::IUP in your module that needs to link with
I<iup> and/or related libs like this:

 # Sample Makefile.pl
 use ExtUtils::MakeMaker;
 use Alien::IUP;
 
 WriteMakefile(
   NAME         => 'Any::IUP::Module',
   VERSION_FROM => 'lib/Any/IUP/Module.pm',
   LIBS         => Alien::IUP->config('LIBS'),
   INC          => Alien::IUP->config('INC'),
   # + additional params
 );

B<IMPORTANT:> As Alien::IUP builds static libraries the modules using Alien::IUP (e.g. L<IUP|IUP>)
need to have Alien::IUP just for building, not for later use. In other words Alien:IUP is just
"build dependency" not "run-time dependency".

=head1 METHODS

=head2 config()

This function is the main public interface to this module.

 Alien::IUP->config('LIBS');

Returns a string like: '-L/path/to/iupdir/lib -liup -lim -lcd'

 Alien::IUP->config('INC');

Returns a string like: '-I/path/to/iupdir/include'

 Alien::IUP->config('PREFIX');

Returns a string like: '/path/to/iupdir' (note: if using the already installed
I<iup> config('PREFIX') returns undef)



( run in 1.108 second using v1.01-cache-2.11-cpan-df04353d9ac )