All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>,
	<richard.purdie@linuxfoundation.org>
Subject: [PATCH 2/4] groff: fix native perl path
Date: Mon, 29 Dec 2014 13:47:23 +0800	[thread overview]
Message-ID: <6dc05eff356ab8452cbf946c611aaacd0cf98ae1.1419823474.git.hongxu.jia@windriver.com> (raw)
In-Reply-To: <cover.1419823473.git.hongxu.jia@windriver.com>

Build groff on a machine with /bin/perl, it gave an error at rootfs time:
...
|ERROR: Unable to install packages. Command 'tmp/sysroots/x86_64-linux/
usr/bin/smart --quiet --data-dir=tmp/work/qemux86-poky-linux/core-image
-minimal/1.0-r0/rootfs/var/lib/smart install -y groff@i586 run-postinsts@all
packagegroup-core-boot@qemux86 perl@i586' returned 1:
|error: Can't install groff-1.22.3-r1@i586: no package provides /bin/perl

ERROR: Function failed: do_rootfs
...

Previously (From OE-Core rev: 79fc557683d4eeadaebeb00dfba53762956e4910 and
103d668cece420447c12987119459ebd49c208df), we manually edit perl scripts
with replacing '/usr/bin/perl' or '/bin/perl' with '/usr/bin/env perl'.
If new perl scripts added after groff upgraded, we have to manually
do the modification on them.

The groff did the above modification according the value of PERL,
so we set it correctly could fix it.

We also add perl and ghostscript to groff DEPENDS, because it requres
perl >= v5.6.1 and ghostscript, see README:
...
 52 Depending on your requirements, you may need at least some of the
 53 following tools to build `groff' directly from its source:
 54
 55   perl >= v5.6.1 (see macro GROFF_PERL in file `m4/groff.m4')
 56   ghostscript
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-extended/groff/groff_1.22.3.bb | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-extended/groff/groff_1.22.3.bb b/meta/recipes-extended/groff/groff_1.22.3.bb
index 22c0946..12a260c 100644
--- a/meta/recipes-extended/groff/groff_1.22.3.bb
+++ b/meta/recipes-extended/groff/groff_1.22.3.bb
@@ -15,8 +15,11 @@ SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
 SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
 SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5"
 
-DEPENDS = "groff-native"
-DEPENDS_class-native = ""
+DEPENDS = "groff-native perl ghostscript"
+DEPENDS_class-native = "perl-native ghostscript-native"
+
+export PERL = "${bindir}/perl"
+PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
 
 inherit autotools texinfo
 
@@ -44,16 +47,6 @@ do_configure_append() {
     cd ${olddir}
 }
 
-do_install_append() {
-	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
-	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
-	for i in afmtodit mmroff gropdf pdfmom; do
-		if [ -f ${D}${bindir}/$i ]; then
-			sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
-		fi
-	done
-}
-
 do_install_append_class-native() {
 	create_cmdline_wrapper ${D}/${bindir}/groff \
 		-F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
-- 
1.9.1



  parent reply	other threads:[~2014-12-29  5:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29  5:47 [PATCH V2 0/4] Packages upgrade: groff and directfb Hongxu Jia
2014-12-29  5:47 ` [PATCH 1/4] groff: upgrade 1.22.3 Hongxu Jia
2014-12-29  5:47 ` Hongxu Jia [this message]
2014-12-29  5:47 ` [PATCH 3/4] directfb: upgrade to 1.7.6 Hongxu Jia
2014-12-29  5:47 ` [PATCH 4/4] qt4-embedded: support c++0x stand for directfb Hongxu Jia
2015-01-09 11:50 ` [PATCH V2 0/4] Packages upgrade: groff and directfb Hongxu Jia
2015-01-09 12:42 ` Burton, Ross
2015-01-12  2:04   ` Hongxu Jia

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=6dc05eff356ab8452cbf946c611aaacd0cf98ae1.1419823474.git.hongxu.jia@windriver.com \
    --to=hongxu.jia@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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.