App-Staticperl

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


        To simply include the whole unicode database, use:

           --incglob '/unicore/**.pl'

    AnyEvent
        AnyEvent needs a backend implementation that it will load in a
        delayed fashion. The AnyEvent::Impl::Perl backend is the default
        choice for AnyEvent if it can't find anything else, and is usually a
        safe fallback. If you plan to use e.g. EV (POE...), then you need to
        include the AnyEvent::Impl::EV (AnyEvent::Impl::POE...) backend as
        well.

        If you want to handle IRIs or IDNs (AnyEvent::Util punycode and idn
        functions), you also need to include "AnyEvent/Util/idna.pl" and
        "AnyEvent/Util/uts46data.pl".

        Or you can use "--usepacklists" and specify "-MAnyEvent" to include
        everything.

    Cairo
        See Glib, same problem, same solution.

    Carp
        Carp had (in older versions of perl) a dependency on Carp::Heavy. As
        of perl 5.12.2 (maybe earlier), this dependency no longer exists.

    Config
        The perl -V switch (as well as many modules) needs Config, which in
        turn might need "Config_heavy.pl". Including the latter gives you
        both.

    Glib
        Glib literally requires Glib to be installed already to build - it
        tries to fake this by running Glib out of the build directory before
        being built. staticperl tries to work around this by forcing
        "MAN1PODS" and "MAN3PODS" to be empty via the "PERL_MM_OPT"
        environment variable.

    Gtk2
        See Pango, same problems, same solution.

    Net::SSLeay
        This module hasn't been significantly updated since OpenSSL is
        called OpenSSL, and fails to properly link against dependent
        libraries, most commonly, it forgets to specify -ldl when linking.

        On GNU/Linux systems this usually goes undetected, as perl usually
        links against -ldl itself and OpenSSL just happens to pick it up
        that way, by chance.

        For static builds, you either have to configure -ldl manually, or
        you cna use the following snippet in your "postinstall" hook which
        patches Net::SSLeay after installation, which happens to work most
        of the time:

           postinstall() {
              # first install it
              instcpan Net::SSLeay
              # then add -ldl for future linking
              chmod u+w "$PERL_PREFIX"/lib/auto/Net/SSLeay/extralibs.ld
              echo " -ldl" >>"$PERL_PREFIX"/lib/auto/Net/SSLeay/extralibs.ld
           }

    Pango
        In addition to the "MAN3PODS" problem in Glib, Pango also routes
        around ExtUtils::MakeMaker by compiling its files on its own.
        staticperl tries to patch ExtUtils::MM_Unix to route around Pango.

    Term::ReadLine::Perl
        Also needs Term::ReadLine::readline, or "--usepacklists".

    URI URI implements schemes as separate modules - the generic URL scheme
        is implemented in URI::_generic, HTTP is implemented in URI::http.
        If you need to use any of these schemes, you should include these
        manually, or use "--usepacklists".

  RECIPES
    Just link everything in
        To link just about everything installed in the perl library into a
        new perl, try this (the first time this runs it will take a long
        time, as a lot of files need to be parsed):

           staticperl mkperl -v --strip ppi --incglob '*'

        If you don't mind the extra megabytes, this can be a very effective
        way of creating bundles without having to worry about forgetting any
        modules.

        You get even more useful variants of this method by first selecting
        everything, and then excluding stuff you are reasonable sure not to
        need - bigperl <http://staticperl.schmorp.de/bigperl.html> uses this
        approach.

    Getting rid of netdb functions
        The perl core has lots of netdb functions ("getnetbyname",
        "getgrent" and so on) that few applications use. You can avoid
        compiling them in by putting the following fragment into a
        "preconfigure" hook:

           preconfigure() {
              for sym in \
                 d_getgrnam_r d_endgrent d_endgrent_r d_endhent \
                 d_endhostent_r d_endnent d_endnetent_r d_endpent \
                 d_endprotoent_r d_endpwent d_endpwent_r d_endsent \
                 d_endservent_r d_getgrent d_getgrent_r d_getgrgid_r \
                 d_getgrnam_r d_gethbyaddr d_gethent d_getsbyport \
                 d_gethostbyaddr_r d_gethostbyname_r d_gethostent_r \
                 d_getlogin_r d_getnbyaddr d_getnbyname d_getnent \
                 d_getnetbyaddr_r d_getnetbyname_r d_getnetent_r \
                 d_getpent d_getpbyname d_getpbynumber d_getprotobyname_r \
                 d_getprotobynumber_r d_getprotoent_r d_getpwent \
                 d_getpwent_r d_getpwnam_r d_getpwuid_r d_getsent \
                 d_getservbyname_r d_getservbyport_r d_getservent_r \
                 d_getspnam_r d_getsbyname
                 # d_gethbyname
              do
                 PERL_CONFIGURE="$PERL_CONFIGURE -U$sym"
              done
           }



( run in 0.717 second using v1.01-cache-2.11-cpan-39bf76dae61 )