support/script/scancpan: populates Config.in with homepage

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-mojolicious: new package

[Thomas: as noted by Arnout, remove trailing whitespace, and fix the
license to Artistic-2.0. Also, adjust the indentation in
package/Config.in to the new standard.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-mojolicious: bump to version 5.08

- switch to BackPan in order to prevent build breakage
(like http://autobuild.buildroot.net/results/358/358f531f2db90b9bc3b1e4e2158c68d2bf6587fc/)
- add license file

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/script/cpan: improve Makefile generation

- remove trailing space after perl when it's the only dependency
- license: substitution of perl name by BR name
- add a tabulation before source

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-net-ssleay: new package

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-xml-namespacesupport: new package

[Thomas: split from the original patch of Francois.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-xml-sax-base: new package

[Thomas: split from the original patch of Francois.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-xml-sax: new package

[Thomas: split from the original patch of Francois.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-xml-libxml: new package

[Thomas: split from the original patch of Francois.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-net-ssleay: fix build

cc_runtime.h is present in old perl distribution
see http://autobuild.buildroot.net/results/6dd/6dd6bf7d0a814aa508062636fd72de1d07c1816a/

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
perl: remove documentation in target tree

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
perl-xml-libxml: fix build

see http://autobuild.buildroot.net/results/f80/f809c99ce4db80e64ca46865fcd9b75b0dcc1fcd/

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
infra/pkg-perl: add possibility to pass extra env at configure time

Some perl packages may use environment variables as a hint to know how
to be configured.

That's for example the case for perl-net-ssleay that uses
OPENSSL_PREFIX, if it is set in the environment, as the prefix to
openssl.

Add a new variable that packages can set if they need extra environment
variables. Update the manual accordingly.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr: enhance the commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/perl-net-ssleay: fix buildsystem for cross-compilation

The buildsystem for perl-net-ssleay is totally brain-damaged: it tries
to execute the openssl program. It uses that to check the openssl
version, detect the prefix to openssl, and set the include and library
search paths.

Of course, it does not handle the destdir idiom, so it ends up finding
the host system's openssl (not even ours!), so it sets search paths to
/usr/inlcude and /usr/lib and /lib.

Well, guess what? It does not work.

Fix that by:
  - passing the prefix to openssl in the environment, so it does not go
    hunting for the host-system openssl;
  - not checking the version string, since we can't run, and Buildroot
    has the correct version anyway;
  - not setting any -I or -L paths since our compiler/linker already
    know where to look for for includes and libs.

Fixes:
    http://autobuild.buildroot.net/results/135/135867ef85535863e3647cc5fb82accb6f77612c/

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[me: enhance commit log, add patch to avoid running openssl and setting
 wrong include and library search paths]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/perl-net-ssleay: not available for static link

Perl extensions are loaded at runtime with dlopen(), so it does not
make sense to even build extensions that are written in C.

perl-net-ssleay is (partly) written in C, so it is not available when
doing a static build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Francois Perrad <francois.perrad@gadz.org>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/perl-xml-libxml: not available for static link

Perl extensions are loaded at runtime with dlopen(), so it does not
make sense to even build extensions that are written in C.

perl-xml-libxml is written in C, so it is not available when doing a
static build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Francois Perrad <francois.perrad@gadz.org>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl-net-ssleay: fix configure

When TARGET_LDFLAGS contains more than one option, the generated
Makefile contains this definition of LDDLFLAGS:
        LDDLFLAGS = '--option-1 --option-2'

Which when passed to gcc is interpreted as a single option, and gcc
(rightfully) barfs on it, like with:
        arm-linux-gnueabihf-gcc: error: unrecognized command line
        option ‘-shared -g’

This is because perl-net-ssleay's buildsystem is really completely
brain-damaged. Other perl extensions do not behave like that, and
instead are doing the only sane thing to do: not add single quotes
around the definition, and just use what they were provided for
LDDLFLAGS.

So, just do the same for perl-net-ssleay. Since tweaking (yet once
more) their buildsystem is too complex, we just use a post-configure
hook to fix up the mess, by removing single quotes around the definition
of LDDLFLAGS.

Note: if only one option is specified, no single quotes are added,
but our hook is a no-op in this case.

See also:
    http://lists.busybox.net/pipermail/buildroot/2014-July/101782.html
and the previous message for even more entertainment. ;-)

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[me: find the real cause of the issue, tweak the sed expression to not
 force -shared and instead just trim the single quotes, enhance commit
 log]
[Thomas: fix minor typos in the commit log, add comment above hook
 definition]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
perl: skip some tests which need the toolchain
perl: skip one test for DynaLoader
perl: check date in harness