All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH][meta-oe] php: fix native php when it is from sstate
Date: Mon, 15 Jun 2015 14:08:55 +0200	[thread overview]
Message-ID: <20150615120855.GA2398@jama> (raw)
In-Reply-To: <1433925884-25750-1-git-send-email-rongqing.li@windriver.com>

On Wed, Jun 10, 2015 at 04:44:44PM +0800, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> the native php is used to install the target pear, and native php
> has hard-code path, so make wrapper to override the hard-code path
> 
> the configuration format of pear.conf for native php is like:
> "type:path length:path", path will be replaced when populate sysroot
> setscene, but the path length is not changed, and make php unable to
> work, add a task to SSTATEPOSTINSTFUNCS to fix the path length

Use "class-native" instead of deprecated "virtclass-native".

> 
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>  meta-oe/recipes-devtools/php/php_5.5.24.bb | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/meta-oe/recipes-devtools/php/php_5.5.24.bb b/meta-oe/recipes-devtools/php/php_5.5.24.bb
> index 3e656af..ced3904 100644
> --- a/meta-oe/recipes-devtools/php/php_5.5.24.bb
> +++ b/meta-oe/recipes-devtools/php/php_5.5.24.bb
> @@ -245,3 +245,21 @@ MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp',
>  RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}"
>  RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}"
>  RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}"
> +
> +do_install_append_virtclass-native() {
> +    create_wrapper ${D}${bindir}/php \
> +        PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
> +}
> +
> +SSTATEPOSTINSTFUNCS_append_virtclass-native += " php_sstate_postinst"
> +
> +php_sstate_postinst() {
> +    if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
> +    then
> +        head -n1 ${sysconfdir}/pear.conf > ${sysconfdir}/pear.tmp.conf
> +        for p in `tail -n1  ${sysconfdir}/pear.conf | sed -s 's/;/ /g'`; do
> +            echo $p | awk -F: 'BEGIN {OFS = ":"; ORS = ";"}{if(NF==3){print $1, length($3)-2*match($3, /^"/), $3} else {print $0}}';
> +        done >> ${sysconfdir}/pear.tmp.conf
> +        mv -f ${sysconfdir}/pear.tmp.conf ${sysconfdir}/pear.conf
> +    fi
> +}
> -- 
> 1.9.1
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com


      reply	other threads:[~2015-06-15 12:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  8:44 [PATCH][meta-oe] php: fix native php when it is from sstate rongqing.li
2015-06-15 12:08 ` Martin Jansa [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=20150615120855.GA2398@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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.