shithub: freetype+ttf2subf

Download patch

ref: c32637222f0eea3d1aec8063ec08241a07d47745
parent: 5758688e87a6d1aa4595011b5324463051c6deeb
author: Werner Lemberg <[email protected]>
date: Tue Jan 6 16:00:47 EST 2009

Don't rely on GNU sed.

* autogen.sh: Don't use GNUisms while calling sed.  Problem reported
by Sean McBride.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-01-06  Werner Lemberg  <[email protected]>
 
+	* autogen.sh: Don't use GNUisms while calling sed.  Problem reported
+	by Sean McBride.
+
+2009-01-06  Werner Lemberg  <[email protected]>
+
 	* src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
 	and FT_PIXEL_MODE_LCD_V.  Problem reported by Chi Nguyen
 	<[email protected]>.
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright 2005, 2006, 2007, 2008 by
+# Copyright 2005, 2006, 2007, 2008, 2009 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -22,12 +22,12 @@
 
 get_major_version ()
 {
-  echo $1 | sed -e 's/\([0-9]\+\)\..*/\1/g'
+  echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g'
 }
 
 get_minor_version ()
 {
-  echo $1 | sed -e 's/[0-9]\+\.\([0-9]\+\).*/\1/g'
+  echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'
 }
 
 get_patch_version ()
@@ -34,9 +34,9 @@
 {
   # tricky: some version numbers don't include a patch
   # separated with a point, but something like 1.4-p6
-  patch=`echo $1 | sed -e 's/[0-9]\+\.[0-9]\+\.\([0-9]\+\).*/\1/g'`
+  patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'`
   if test "$patch" = "$1"; then
-    patch=`echo $1 | sed -e 's/[0-9]\+\.[0-9]\+\-p\([0-9]\+\).*/\1/g'`
+    patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'`
     # if there isn't any patch number, default to 0
     if test "$patch" = "$1"; then
       patch=0
@@ -110,9 +110,9 @@
 }
 
 if test ! -f ./builds/unix/configure.raw; then
- echo "You must be in the same directory as \`autogen.sh'."
- echo "Bootstrapping doesn't work if srcdir != builddir."
- exit 1
+  echo "You must be in the same directory as \`autogen.sh'."
+  echo "Bootstrapping doesn't work if srcdir != builddir."
+  exit 1
 fi
 
 # On MacOS X, the GNU libtool is named `glibtool'.
@@ -146,7 +146,7 @@
 
 echo "generating \`configure.ac'"
 sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
-    < configure.raw > configure.ac
+  < configure.raw > configure.ac
 
 run aclocal -I . --force
 run $LIBTOOLIZE --force --copy --install