TABLE OF CONTENTS


perl.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

  [CPAN_AUTHOR="username"]
  inherit perl

DESCRIPTION

Perl is an interpreted programming language used in a variety of software, particularly text processing, network programming, system administration, and CGI scripting. It is easily extendible with modules written in Perl and/or C/C++. Thousands of such modules are centrally hosted on the Comprehensive Perl Archive Network (CPAN).

This cygclass provides definitions for building Perl dependent packages, and functions for building Perl module packages.

EXAMPLES

A typical CPAN extension package looks like this:

    CPAN_AUTHOR=adamk
    inherit perl
    
    NAME="perl-Archive-Zip"
    VERSION=1.30
    RELEASE=1
    CATEGORY="Perl"
    SUMMARY="Perl module for working with Zip archives"
    DESCRIPTION="This module allows a Perl program to create, manipulate, read,
    and write Zip archive files. Zip archives can be created, or you can read
    from existing zip files. Once created, they can be written to files, streams,
    or strings."

Occasionaly, a CPAN module tries to ask questions while configuring the build, in which case you can override that in src_compile:

    src_compile() {
      lndirs
      cd ${B}
      # answer 'y' to all questions from Makefile.PL
      yes | perl_compile
    }

Perl modules which provide XML::SAX parser engines require an additional step during src_install, e.g.:

    src_install() {
      cd ${B}
      perl_install
      perl_sax_parser_register XML::LibXML::SAX
    }

INHERITED BY

gtk2-perl.cygclass

REQUIRES

perl


PERL

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Perl interpreter.


PERL_VERSION

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

The major.minor version of the Perl interpreter.


PERL_LIB

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Perl arch-independent standard library.

NOTE

Third-party packages must not be installed here; use PERL_VENDORLIB instead.


PERL_ARCHLIB

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Perl arch-specific standard library.

NOTE

Third-party packages must not be installed here; use PERL_VENDORARCH instead.


PERL_VENDORLIB

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for third-party arch-independent Perl modules.


PERL_VENDORARCH

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for third-party arch-specific Perl modules.


LIBPERL

[ Top ] [ perl.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for the Perl C library.


CPAN_AUTHOR

[ Top ] [ perl.cygclass ] [ Variables ]

DESCRIPTION

The CPAN username of the Perl module's author. This variable must be set before inherit()ing perl.cygclass to have any effect. If set, the package HOMEPAGE and SRC_URI are set to their usual locations on CPAN.


CPAN_VERSION

[ Top ] [ perl.cygclass ] [ Variables ]

DESCRIPTION

The published version of the Perl module on CPAN. It is sometimes necessary for VERSION to not match due to CPAN versioning not conforming to the version rules used elsewhere. For example, a package may go from 0.12->0.1201->0.1202...->0.13, instead of 0.12->0.12.1->0.12.2...->0.13 as one would expect elsewhere. The last change would be viewed as a downgrade (1202 > 13) by setup. Depending on what currently exists in the distribution, either use e.g. CPAN_VERSION=0.1201 with VERSION=0.12.1, or CPAN_VERSION=0.13 with VERSION=0.1300, in order to workaround this.

This variable, when needed, must be set before inherit()ing perl.cygclass to have any effect. If set, this overrides VERSION in SRC_URI and SRC_DIR.


CATEGORY (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DEFINITION

CATEGORY="Perl"

NOTE

This variable is set only if CPAN_AUTHOR is defined before inherit()ing perl.cygclass.


SUMMARY (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DEFINITION

SUMMARY="Perl distribution ${ORIG_PN}"

NOTE

This variable is set only if CPAN_AUTHOR is defined before inherit()ing perl.cygclass.


HOMEPAGE (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DESCRIPTION

Web address for the Perl module on CPAN.

NOTE

This variable is set only if CPAN_AUTHOR is defined before inherit()ing perl.cygclass.


SRC_URI (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DESCRIPTION

Download location for the Perl module on CPAN.

NOTE

This variable is set only if CPAN_AUTHOR is defined before inherit()ing perl.cygclass.

SEE ALSO

mirror_cpan


perl_compile

[ Top ] [ perl.cygclass ] [ Compile Functions ]

SYNOPSIS

  cd $B
  perl_compile [OPTIONS]

DESCRIPTION

Configures and builds a Perl module package. Options, if any, are passed during the configure phase.


perl_test

[ Top ] [ perl.cygclass ] [ Testsuite Functions ]

SYNOPSIS

  cd $B
  perl_test

DESCRIPTION

Runs the test suite for the Perl module.


perl_install

[ Top ] [ perl.cygclass ] [ Install Functions ]

SYNOPSIS

  cd $B
  perl_install [OPTIONS]

DESCRIPTION

Installs the Perl module into $D. Options, if any, are passed to the install command.


perl_fix_shebang

[ Top ] [ perl.cygclass ] [ Install Functions ]

SYNOPSIS

  perl_fix_shebang SCRIPT [SCRIPT ...]

DESCRIPTION

Fixes the designated interpreter of SCRIPT to PERL. This would be necessary if the original uses an incorrect path (e.g. /usr/local/bin) or an incorrectly versioned binary. SCRIPT need not be prefixed by $D.


perl_sax_parser_register

[ Top ] [ perl.cygclass ] [ Install Functions ]

SYNOPSIS

  perl_sax_parser_register PARSER_CLASS [PARSER_CLASS ...]

DESCRIPTION

Generates postinstall and preremove scripts to handle registration of XML::SAX parser drivers with XML::SAX's ParserDetails.ini file.


src_compile (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DEFINITION

src_compile() {
        lndirs
        cd ${B}
        perl_compile
}

src_test (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DEFINITION

src_test() {
        cd ${B}
        perl_test
}

src_install (perl)

[ Top ] [ perl.cygclass ] [ Overloads ]

DEFINITION

src_install() {
        cd ${B}
        perl_install
}