]> git.wh0rd.org - fontconfig.git/commitdiff
fontconfig build fails if "head" is missing or unusable (bug 14304)
authorRyan Schmidt <freedesktop-2008@ryandesign.com>
Sun, 4 May 2008 02:49:07 +0000 (19:49 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 4 May 2008 02:49:07 +0000 (19:49 -0700)
If the /usr/bin/head program is missing or unusable, or if an unusable head
program is listed first in the PATH, fontconfig fails to build

using "sed -n 1p" instead of "head -1" would be a suitable workaround.

src/makealias

index 1f57742d1c0c55c5278436289d33995ef1c67903..fd9c3fd1fc06880a258fa6a6744a6ce49ca6d1ee 100755 (executable)
@@ -17,7 +17,7 @@ while read name; do
                hattr='__attribute((visibility("hidden")))'
                echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
                echo "#define $name $alias" >> $HEAD
-               grep -l '^'$name'[ (]' "$SRCDIR"/*.c | head -1 | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
+               grep -l '^'$name'[ (]' "$SRCDIR"/*.c | sed -n 1p | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
                echo "#undef $name" >> $TAIL
                cattr='__attribute((alias("'$alias'"), visibility("default")))'
                echo "extern __typeof ($name) $name $cattr;" >> $TAIL