Currently, these flags are recursively propagated. This behavior is
not expected by users, because it can cause dependencies explosively.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Currently, without the flag -recommend, scancpan takes as dependency
only one which has the relationship "requires"; this mode works fine.
And, with the flag -recommend, scancpan takes all ones (ie. with
relationship "requires" or "recommends") in the same way; this mode
never works fine, because it is too simplistic.
With this commit, the "not required" dependencies are handled as
optional BR package or skipped if a cyclic dependency is detected.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
add this heuristic when no specific license file is found
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
the perl dependency of cpan module is no longer generated by scancpan,
but added at the infrastructure level
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
When a module is native or depends of a native module, it must be
disabled for static builds via its Config.in
We detect native modules by looking at the filenames listed in the
MANIFEST. If there is a file which looks like it contains code that
much be compiled (e.g. .c, .h and so on...), then we exclude that
module (and its dependencies) from static builds.
That's what we tried to do so far, but failed when there was a
comment on the same line as the filename in the manifest, like so:
foo-bar.c # Bla bla bla
Fix that by detecting either endof-line (as currently done) or
end-of-string.
For an example of failed build of perl-html-parser, see
http://autobuild.buildroot.net/results/128/128671dfa23d843698a63220c2fac1f44e1d5845/
[Thomas: use better commit log proposed by Yann E. Morin.]
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
with Perl 5.22, Module-Build is no longer a core module
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
underscore is not allowed in BR package name.
this problem was found with the Perl module DB_File
which must give the BR package perl-db-file.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.
As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.
This also helps preparing the addition of other options to select
shared, shared+static or just static.
Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Dependencies from metacpan comes as a list of modules which is
transformed in a list of distribution for BR. Different modules could
be included in the same distribution, so duplication is possible.
This can for example be seen with the HTTP-Daemon module, which would
get two times the dependencies on HTTP-Message without this commit.
[Thomas: slightly extend commit log.]
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
module could be removed of the core,
so check if the module is currently in the core,
but not if the module was once time included in the core.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
retrieve MD5 and SHA256 from metacpan.org, and store them in the hash
file for each package.
[Thomas: remove the odd indentation of the filename for the md5 hash
lines in the hash file.]
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Perl modules can have three different types of dependencies:
- configure/build time dependency which becomes host dependency
- runtime dependency which becomes target dependency
- test time dependency which is useless in a cross-compiling context like BR
Before this patch, test time dependencies are handled like runtime
dependencies.
After this patch, test time dependencies are ignored by default. The
newly added -test option allows to add them anyway if needed.
[Thomas: reword commit log using Francois proposal.]
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- typo in comment
- remove trailing space in _HOST_DEPENCENCIES when no dependency
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit improves the scancpan script to automatically populate the
LICENSE_FILES variable using informations available in the Perl
package MANIFEST file.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Perl extensions are loaded at runtime with dlopen(), so it does not
make sense to even build extensions that are written in C when
BR2_PREFER_STATIC_LIB is enabled. A Perl module written in C or with a
dependency on a module written in C is not available when doing a
static build.
Therefore, this commit adapts the scancpan script to automatically
generate a dependency on !BR2_PREFER_STATIC_LIB when the Perl module
would not work in a static-only configuration.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- 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>
in order to avoid spurious diff when updating packages
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>