Skip to contentSkip to conversation

fix for building freetype-native on a symlinked build environment

PATCH In review Alexander Stohr 2 participants 2 messages Sep 30, 2010 – Oct 6, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix for building freetype-native on a symlinked build environment

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.

Signature · 2 lines
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
configure +4 -2
@@ -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'"
#1 lore raw
Quoted 15 lines · Alexander Stohr

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.

Quoted 9 lines

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.

if you can prepate patches for OE to apply this. It will be helpful.

Quoted 11 lines

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

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel