All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Stohr" <Alexander.Stohr@gmx.de>
To: openembedded-devel@lists.openembedded.org
Cc: freetype-devel@nongnu.org
Subject: [patch] fix for building freetype-native on a symlinked build environment
Date: Thu, 30 Sep 2010 14:30:29 +0200	[thread overview]
Message-ID: <20100930123029.23600@gmx.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]

in an environment where the "/home" partition had not enough space
for holding a complete open embedded project i created a symlink to
an adequate partition on a second drive for hosting the build environment.

this turned out to badly impact on misc build steps.
the most recent problem i found is the build step used for freetype.

in the seemingly hand written configure script there is
a directory names comparison where some extra actions
are needed in case the directory is not the base dir of freetype build.
in my setup the names were different for some reasons in the embedding tools
(not caring whats the exact origin). in fact both were the very same dir object.
this lead to execution of parts of the script that were not intended
so that this mis-detection finally stopped the build.

the attached patch fixes that problem by changing the comparisonn code so that it
uses the inode numbers of the relevant paths for the comparison.

the patch further applies a check for an already existing subdir.
this suppresses a message on the console in a benign case.

the patch applies to freetype-2.3.6 but should be quite easily portable
to any known later release including the relatively fresh 2.4.2 version.

regards, Alex.
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

[-- Attachment #2: fix-configure-symlink.patch --]
[-- Type: text/x-patch, Size: 674 bytes --]

--- freetype-2.3.6.orig/configure	2007-12-06 17:19:34.000000000 +0100
+++ freetype-2.3.6/configure	2010-09-30 13:43:30.000000000 +0200
@@ -68,9 +68,11 @@
 abs_ft2_dir=`cd "$ft2_dir" && pwd`
 
 # build a dummy Makefile if we are not building in the source tree
+inode_src=`ls -id $abs_ft2_dir | cut -d " " -f 1 || echo -1`
+inode_dst=`ls -id $abs_curr_dir | cut -d " " -f 1 || echo -2`
 
-if test "$abs_curr_dir" != "$abs_ft2_dir"; then
-  mkdir reference
+if test $inode_src -ne $inode_dst; then
+  if [ ! -d reference ]; then mkdir reference; fi
   echo "Copying \`modules.cfg'"
   cp $abs_ft2_dir/modules.cfg $abs_curr_dir
   echo "Generating \`Makefile'"

             reply	other threads:[~2010-09-30 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 12:30 Alexander Stohr [this message]
2010-10-06 21:25 ` [patch] fix for building freetype-native on a symlinked build environment Khem Raj
  -- strict thread matches above, loose matches on Subject: below --
2010-10-05 17:08 Alexander Stohr
2010-10-07 15:27 Alexander Stohr

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=20100930123029.23600@gmx.net \
    --to=alexander.stohr@gmx.de \
    --cc=freetype-devel@nongnu.org \
    --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.