Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [pkg-perl infra V3 09/12] manual: adding packages perl
Date: Tue, 4 Feb 2014 11:57:40 +0100	[thread overview]
Message-ID: <20140204105740.GF3454@free.fr> (raw)
In-Reply-To: <1385198749-6249-10-git-send-email-francois.perrad@gadz.org>

Fran?ois, All,

On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
> diff --git a/docs/manual/adding-packages-perl.txt b/docs/manual/adding-packages-perl.txt
> new file mode 100644
> index 0000000..4efc53a
> --- /dev/null
> +++ b/docs/manual/adding-packages-perl.txt
> @@ -0,0 +1,91 @@
> +// -*- mode:doc; -*-
> +// vim: set syntax=asciidoc:
> +
> +Infrastructure for Perl/CPAN packages
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +[[perl-package-tutorial]]
> +
> ++perl-package+ tutorial
> +^^^^^^^^^^^^^^^^^^^^^^^
> +
> +First, let's see how to NOT write a +.mk+ file for a Perl/CPAN package,
> +with an example :

I don't really like the way you introduce this by stating "how NOT to [...]".

I would prefer that you straight from the start state that they are
generated files, and still describe all the entries later. Maybe
something like:

    ---8<---
    The +.mk+ files for perl packages are generated files, by running
    the script +support/scripts/scancpan+ fron Buildroot's top
    directory:

    ---
    support/scripts/scancpan foo-bar
    ---

    In most cases, this script will generate a correct +.mk+ file,
    but in some cases (eg. when adding a native C dependency), manual
    editing might be needed.

    Here is how a +.mk+ for a perl package might look like:
    ---8<---

... and then continue with the standard layout below:

> +------------------------
> +01: ################################################################################
> +02: #
> +03: # libfoo-bar-perl
> +04: #
> +05: ################################################################################
> +06:
> +07: LIBFOO_BAR_PERL_VERSION = 0.02
> +08: LIBFOO_BAR_PERL_AUTHOR = MONGERS

There is no reason to include/introduce _AUTHORS, since;
  - your perl-infra does even use it
  - no other pkg-infra does it
  - the legal-info does not use it

> +09: LIBFOO_BAR_PERL_SOURCE = Foo-$(LIBFOO_BAR_PERL_VERSION).tar.gz
> +10: LIBFOO_BAR_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MO/MONGER/
> +11: LIBFOO_BAR_PERL_DEPENDENCIES = perl libstrictures-perl
> +12: HOST_LIBFOO_BAR_PERL_DEPENDENCIES = host-libstrictures-perl
> +13: LIBFOO_BAR_PERL_LICENSE = perl_5
> +14:
> +15: $(eval $(perl-package))
> +16: $(eval $(host-perl-package))

How does the scancpan script decide to emit target and/or host variants?

> +------------------------
> +
> +In fact, this file and the Config.in are written by running
> +the script +supports/scripts/scancpan Foo-Bar+ in the +TOPDIR+ directory.
> +This script creates packages for all required Perl/CPAN dependencies.
> +All theses generated files are stored in the +package/cpan+ directory.
> +In very specific case, this Makefile must be modified, for example : for
> +adding a C native dependency.

This hunk should be included in the general description, above.

> +The Perl/CPAN modules are fine-grained, the number of module grows quickly
> +over 100. So, only modified files will be stored in the Buildroot repository,
> +all others can be regenerated by +scancpan+.

After discussing this at the Developpers' Day, we come to the conclusion
that, since it is needed to manually tweak some of the +.mk+ files, we
do prefer that all be committed in the tree, even if they are 100%
automatically generated.

> +[[perl-package-reference]]
> +
> ++perl-package+ reference
> +^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +This infrastructure handles various Perl build systems :
> ++ExtUtils-MakeMaker+, +Module-Build+ and +Module-Build-Tiny+.

From wht I could see in patch 1, you only added two buildsystems:
Build.PL and Makefile.PL, while the sentence above implies there are
three. Did I miss anything?

> +The main macro of the Perl/CPAN package infrastructure is

Since you here mix perl and cpan, I wonder if the best name for this
infra is perl or cpan.

For example, the luarocks infra we recently added is called 'luarocks',
as per the repository of lua paclage, not 'lua' as per the language
name.

So maybe we should call this perl infdra cpan instead. Any comment
against that?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2014-02-04 10:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-23  9:25 [Buildroot] [pkg-perl infra V3 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 01/12] perl: new infrastructure Francois Perrad
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 02/12] cpan: a home for Perl modules Francois Perrad
2014-02-04  9:01   ` Yann E. MORIN
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 03/12] scancpan: a new script Francois Perrad
2014-02-04  9:13   ` Yann E. MORIN
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 04/12] cpanminus: remove it Francois Perrad
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 05/12] perl: remove useless patch Francois Perrad
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 06/12] qemu: add a Config.in.host Francois Perrad
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 07/12] host-libxml-parser-perl: move and refactor with perl infrastructure Francois Perrad
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 08/12] host-libmodule-build-perl: new package Francois Perrad
2014-02-04 10:08   ` Yann E. MORIN
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 09/12] manual: adding packages perl Francois Perrad
2014-02-04 10:57   ` Yann E. MORIN [this message]
2014-02-05 17:45     ` Arnout Vandecappelle
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 10/12] libcurses-perl: new package Francois Perrad
2014-02-04 11:11   ` Yann E. MORIN
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 11/12] libnet-ssleay-perl: " Francois Perrad
2014-02-04 11:31   ` Yann E. MORIN
2013-11-23  9:25 ` [Buildroot] [pkg-perl infra V3 12/12] libxml-libxml-perl: " Francois Perrad
2014-02-04  8:49 ` [Buildroot] [pkg-perl infra V3 00/12] a package infrastructure for Perl/CPAN modules Arnout Vandecappelle
2014-02-04  8:55   ` Arnout Vandecappelle
2014-02-04  9:57   ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140204105740.GF3454@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox