All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/7] package/libedit2: new package
Date: Wed, 6 Feb 2013 20:00:10 +0100	[thread overview]
Message-ID: <201302062000.10836.yann.morin.1998@free.fr> (raw)
In-Reply-To: <5110390A.1040708@mind.be>

Arnout, All,

On Monday 04 February 2013 Arnout Vandecappelle wrote:
> On 04/02/13 17:01, Yann E. MORIN wrote:
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > ---
> >   package/Config.in                                  |    1 +
> >   package/libedit2/Config.in                         |    9 +++
> >   package/libedit2/libedit2-01-Makefile.patch        |   25 +++++++
> >   package/libedit2/libedit2-02-el.c-issetugid.patch  |   24 ++++++
> >   package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch |   40 +++++++++++
> >   .../libedit2/libedit2-04-readline.h-stdio.patch    |   17 +++++
> >   .../libedit2/libedit2-08-readline-history.h.patch  |   20 +++++
> >   .../libedit2/libedit2-10-define_SIZE_T_MAX.patch   |   18 +++++
> >   .../libedit2/libedit2-12-libedit-Makefile.patch    |   54 ++++++++++++++
> >   package/libedit2/libedit2-20-fortify.patch         |   23 ++++++
> 
>   Any chance of using libedit_2.11-20080614-5.debian.tar.bz2 instead?

Hey! ;-)
Yes, I'll look at it.

> > diff --git a/package/libedit2/libedit2.mk b/package/libedit2/libedit2.mk
> > new file mode 100644
> > index 0000000..b9ca41e
> > --- /dev/null
> > +++ b/package/libedit2/libedit2.mk
[--SNIP--]
> > +define POST_PATCH_PERMISSIONS
>   Start the name with LIBEDIT2

Done.

> > +	chmod +x $(@D)/libedit/makelist
> > +endef
> > +
> > +LIBEDIT2_POST_PATCH_HOOKS += POST_PATCH_PERMISSIONS
> > +
> > +define LIBEDIT2_FIX_VIS_H_INCLUDE
> > +	$(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/filecomplete.c
> 
>   If you use s,foo,bar, instead of s/foo/bar/ you don't need to quote /. 

Granted. I usualy do not do that, as I sometime have paths that do contain
commas, and would broke anyway, so I always explicitly quote '/'.

> Also, the ; is redundant.

I like it that all my sed expressions are properly terminated, even if
it is not mandatory. It is very annoying to me that, when there are two
or more expressions, they are all terminated, save for the last one...

> > +	$(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/history.c
> > +	$(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/readline.c
>   Three times the same sed rule => just apply once to all files.

Done.

> > +endef
> > +LIBEDIT2_POST_PATCH_HOOKS += LIBEDIT2_FIX_VIS_H_INCLUDE
> > +
> > +LIBEDIT2_PMAKE_ARGS = MKPROFILE=no MKCATPAGES=no MLINKS= MANPAGES= NOGCCERROR=1         \
>   We normally use _OPTS, not _ARGS.  (There is TARGET_CONFIGURE_ARGS but 
> it's just plain wrong.)

OK, although I disagree. Those are really 'arguments' to the command (as
we have when we declare in C: "main( int argc, char** argv )" ). But OK,
I'll change to keep in sync with the Buildroot naming scheme. ;-)

> > +                      SHLIB_SHFLAGS="-Wl,-soname,libedit.so.${LIBEDIT2_VERSION_MAJOR}"  \
>   Redundant trailing \.

Yep.

[--SNIP--]
> > +# $1: DESTDIR to install into
> > +# Can't use pmake to install, it wants to be root. sigh... :-(
> > +define LIBEDIT2_INSTALL_CMDS
> > +	$(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pc
> > +	ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc
> > +	$(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a
> > +	$(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a
> > +	$(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11
> > +	$(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h
> > +	ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR)
>   This doesn't seem right: LIBEDIT2_VERSION is 2.11-20080614, but you 
> just installed 2.11...

Hmmm... Lemme check...

> > +	ln -sf libedit.so.$(LIBEDIT2_VERSION_MAJOR) $(1)/usr/lib/libedit.so
> > +	$(INSTALL) -D -m 0644 $(@D)/libedit/readline/readline.h $(1)/usr/include/editline/readline.h
> > +	if [ "$(BR2_HAVE_DOCUMENTATION)" = "y" ]; then                                              \
>   This condition is redundant, because the finalize step will remove man 
> anyway if !BR2_HAVE_DOCUMENTATION.

OK.

> > +	    $(INSTALL) -v -D -m 0644 $(@D)/libedit/editline.3 $(1)/usr/share/man/man3/editline.3el; \
> > +	    $(INSTALL) -v -D -m 0644 $(@D)/libedit/editrc.3 $(1)/usr/share/man/man5/editrc.5el;     \
> > +	    for lnk in $(LIBEDIT2_MAN_LINKS); do                                                    \
> > +	        ln -sfv editline.3el $(1)/usr/share/man/man3/$${lnk}.3el;                           \
> > +	    done;                                                                                   \
> > +	fi
> > +endef
>   A perfect candidate to use the unified TARGET/STAGING install commands!

But for now, we do not have this option. ;-)

> > +#	cd $(@D)/libedit; pmake install incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS)
> > +#	cd $(@D)/libedit/readline; pmake incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS)
>   Redundant comments.

Yep, Thomas already mentionned it, but I forgot to remove them. Sorry.

Thank you!

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:[~2013-02-06 19:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 16:01 [Buildroot] [pull request v5] Pull request for branch yem-new-packages Yann E. MORIN
2013-02-04 16:01 ` [Buildroot] [PATCH 1/7] package/usbredir: update to version 0.6 Yann E. MORIN
2013-02-04 23:14   ` Peter Korsgaard
2013-02-04 16:01 ` [Buildroot] [PATCH 2/7] package/pmake: add host pmake Yann E. MORIN
2013-02-04 18:54   ` Arnout Vandecappelle
2013-02-06 18:51     ` Yann E. MORIN
2013-02-04 16:01 ` [Buildroot] [PATCH 3/7] package/libbsd: new package Yann E. MORIN
2013-02-04 16:01 ` [Buildroot] [PATCH 4/7] package/libedit2: " Yann E. MORIN
2013-02-04 22:41   ` Arnout Vandecappelle
2013-02-06 19:00     ` Yann E. MORIN [this message]
2013-02-06 19:17       ` Yann E. MORIN
2013-02-06 19:33         ` Arnout Vandecappelle
2013-02-06 20:16           ` Yann E. MORIN
2013-02-06 19:40       ` Arnout Vandecappelle
2013-02-04 16:01 ` [Buildroot] [PATCH 5/7] package/ceph: " Yann E. MORIN
2013-02-04 22:56   ` Arnout Vandecappelle
2013-02-06 21:07     ` Yann E. MORIN
2013-02-04 16:01 ` [Buildroot] [PATCH 6/7] package/dtc: " Yann E. MORIN
2013-02-05  7:16   ` Arnout Vandecappelle
2013-02-06 21:34     ` Yann E. MORIN
2013-02-04 16:01 ` [Buildroot] [PATCH 7/7] package/dtc: add option to install programs Yann E. MORIN
2013-02-05  7:23   ` Arnout Vandecappelle
2013-02-07 22:13     ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2013-02-03 13:40 [Buildroot] [pull request v4] Pull request for branch yem-new-packages Yann E. MORIN
2013-02-03 13:40 ` [Buildroot] [PATCH 4/7] package/libedit2: new package Yann E. MORIN
2013-01-29 22:33 [Buildroot] [pull request v3] Pull request for branch yem-new-packages Yann E. MORIN
2013-01-29 22:33 ` [Buildroot] [PATCH 4/7] package/libedit2: new package Yann E. MORIN

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=201302062000.10836.yann.morin.1998@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.