Alien-MariaDB

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


SYNOPSIS
        use Alien::MariaDB;
        use ExtUtils::MakeMaker;

        WriteMakefile(
            ...
            CONFIGURE_REQUIRES => {
                'Alien::MariaDB' => 0,
            },
            CCFLAGS => Alien::MariaDB->cflags,
            LIBS    => Alien::MariaDB->libs,
        );

DESCRIPTION
    This module provides the MariaDB Connector/C client library
    (libmariadb). It will use the system library if available, or download
    and build from source if necessary.

METHODS
    Inherits all methods from Alien::Base.

  libs
    Overridden to add "-Wl,-rpath" flags on macOS share installs so the
    dynamic linker can find the bundled libmariadb at runtime.

SEE ALSO
    Alien::Base, <https://mariadb.com/kb/en/mariadb-connector-c/>

AUTHOR
    vividsnow

LICENSE
    This is free software; you can redistribute it and/or modify it under

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

=head1 SYNOPSIS

    use Alien::MariaDB;
    use ExtUtils::MakeMaker;

    WriteMakefile(
        ...
        CONFIGURE_REQUIRES => {
            'Alien::MariaDB' => 0,
        },
        CCFLAGS => Alien::MariaDB->cflags,
        LIBS    => Alien::MariaDB->libs,
    );

=head1 DESCRIPTION

This module provides the MariaDB Connector/C client library (libmariadb).
It will use the system library if available, or download and build
from source if necessary.

=head1 METHODS

Inherits all methods from L<Alien::Base>.

=head2 libs

Overridden to add C<-Wl,-rpath> flags on macOS share installs so the
dynamic linker can find the bundled libmariadb at runtime.

=head1 SEE ALSO

L<Alien::Base>, L<https://mariadb.com/kb/en/mariadb-connector-c/>

=head1 AUTHOR

vividsnow

t/01-basic.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Alien;

use_ok('Alien::MariaDB');

alien_ok 'Alien::MariaDB';

diag 'cflags: ' . Alien::MariaDB->cflags;
diag 'libs: ' . Alien::MariaDB->libs;
diag 'install_type: ' . Alien::MariaDB->install_type;

like(Alien::MariaDB->install_type, qr/^(system|share)$/, 'install_type is valid');

# On macOS share installs, the dylib uses @rpath install name but
# Test::Alien's xs_ok doesn't pass -Wl,-rpath to the linker.
# Temporarily set the install name to the absolute blib path so
# dlopen can find the library, then restore @rpath afterward.
my @_fixup;



( run in 3.476 seconds using v1.01-cache-2.11-cpan-cdf2f3d4e48 )