package Cpanel::Easy::PHP5::XSL;

# cpanel - Cpanel/Easy/PHP5/XSL.pm                Copyright(c) 2014 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

our $easyconfig = {
    'name'   => "XSL",
    'url'    => 'http://www.php.net/manual/en/book.xsl.php',
    'dryrun' => {
        '0' => {
            'name'    => 'Install libxml2 for PHP 5',
            'command' => sub {
                my ($self) = @_;
                my ( $path, @text ) = $self->get_path_installed('Cpanel::Easy::OptLib::libxml2');
                if ($path) {
                    $self->{'__'}{'LibXML2Path'} = $path;
                    return ( 1, 'Ok' );
                }
                else {
                    return $path, @text;
                }
            },
        },
        '1' => {
            'name'    => 'Find libxslt path for PHP 5',
            'command' => sub {
                my ($self) = @_;
                my ( $path, @text ) = $self->get_path_installed('Cpanel::Easy::OptLib::libxslt');

                if ($path) {
                    $self->{'__'}{'XSLTPath'} = $path;
                    return ( 1, 'Ok' );
                }
                else {
                    return $path, @text;
                }
            },
        },
    },
    'step' => {
        '0' => {
            'name'    => 'to config options',
            'command' => sub {
                my ($self) = @_;
                $self->add_to_configure( { '--with-xsl' => $self->{'__'}{'XSLTPath'} } );
                return ( 1, 'Ok' );
            },
        },
    },
};

1;
