From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/pcre: install headers in legacy location
Date: Tue, 23 Dec 2014 13:54:21 +0100 [thread overview]
Message-ID: <20141223125421.GB4152@free.fr> (raw)
In-Reply-To: <1418490513-10957-1-git-send-email-yann.morin.1998@free.fr>
All,
On 2014-12-13 18:08 +0100, Yann E. MORIN spake thusly:
> nmap is looking for pcre headers in pcre/pcre.h which our current
> version of pcre does not populates.
>
> So, just create those as symlinks to the actual headers.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@openwide.fr>
I've marked this patch as "Rejected" in Patchwork, because it is in fact
not needed.
nmap's configure.ac has:
AC_CHECK_HEADERS(pcre/pcre.h)
which seems to imply it is only checking for pcre/pcre.h but that is not
the case. A little bit above, we can see:
AC_CHECK_HEADER(pcre.h,
AC_CHECK_LIB(pcre, pcre_version, [have_pcre=yes ]),
[AC_CHECK_HEADER(pcre/pcre.h,
[AC_CHECK_LIB(pcre, pcre_version, [have_pcre=yes])]
)]
)
which means it also checks for just pcre.h which we have. But that is
misleading, as only pcre/pcre.h appears in the configure log, as Romain
quoted in his reply.
But then, the code that includes pcre/pcre.h (present in two files) has
this construct:
#ifdef HAVE_PCRE_PCRE_H
# include <pcre/pcre.h>
#else
# include <pcre.h>
#endif
HAVE_PCRE_PCRE_H is defined by AC_CHECK_HEADERS(pcre/pcre.h), so if it
does not find pcre/pcre.h, it falls back to including pcre.h.
So, this patch is in fact not needed.
Regards,
Yann E. MORIN.
> ---
> package/pcre/pcre.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk
> index 4ff7abd..f2cf02d 100644
> --- a/package/pcre/pcre.mk
> +++ b/package/pcre/pcre.mk
> @@ -22,5 +22,13 @@ PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32)
> PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UTF),--enable-utf,--disable-utf)
> PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UCP),--enable-unicode-properties,--disable-unicode-properties)
>
> +define PCRE_LEGACY_PATHS
> + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/pcre
> + for h in $(STAGING_DIR)/usr/include/pcre*.h; do \
> + ln -sf ../$${h##*/} $(STAGING_DIR)/usr/include/pcre/ || exit 1; \
> + done
> +endef
> +PCRE_POST_INSTALL_STAGING_HOOKS += PCRE_LEGACY_PATHS
> +
> $(eval $(autotools-package))
> $(eval $(host-autotools-package))
> --
> 1.9.1
>
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2014-12-23 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 17:08 [Buildroot] [PATCH] package/pcre: install headers in legacy location Yann E. MORIN
2014-12-14 13:32 ` Romain Naour
2014-12-21 22:19 ` Thomas Petazzoni
2014-12-23 11:21 ` Yann E. MORIN
2014-12-23 11:39 ` Thomas Petazzoni
2014-12-23 12:54 ` Yann E. MORIN [this message]
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=20141223125421.GB4152@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