summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2013-02-08 12:49:41 +0100
committerWerner Lemberg <wl@gnu.org>2013-02-08 12:49:41 +0100
commitbcca86af30967d7d93590f2241b84d02f083d54e (patch)
tree47c9950e9f9f029eaeec2d2d5932fb4001ce464d
parenta2c7eb188892c6f02cd10cfa814672f3f2820ca8 (diff)
downloadfreetype2-bcca86af30967d7d93590f2241b84d02f083d54e.tar.gz
Fix Savannah bug #38235.
* builds/unix/configure.raw: Don't generate `freetype-config' and `freetype.pc'. * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ, build_libtool_libs, ft_version): New variables to be substituted. (freetype-config, freetype.pc): New rules to generate those files. * builds/unix/freetype-config.in: Remove code for handling `rpath'. The use of $rpath has been accidentally removed in a patch from 2009-12-22, and apparently noone has missed it since. Use `%' instead of `@' as a variable substitution marker. Use quotes. * builds/unix/freetype.in: Use `%' instead of `@' as a variable substitution marker. Use quotes.
-rw-r--r--ChangeLog21
-rw-r--r--builds/unix/configure.raw6
-rw-r--r--builds/unix/freetype-config.in25
-rw-r--r--builds/unix/freetype2.in12
-rw-r--r--builds/unix/unix-def.in61
5 files changed, 95 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index b42df169b..fad4a8c20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2013-02-02 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38235.
+
+ * builds/unix/configure.raw: Don't generate `freetype-config' and
+ `freetype.pc'.
+
+ * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ,
+ build_libtool_libs, ft_version): New variables to be substituted.
+ (freetype-config, freetype.pc): New rules to generate those files.
+
+ * builds/unix/freetype-config.in: Remove code for handling `rpath'.
+ The use of $rpath has been accidentally removed in a patch from
+ 2009-12-22, and apparently noone has missed it since.
+ Use `%' instead of `@' as a variable substitution marker.
+ Use quotes.
+
+ * builds/unix/freetype.in: Use `%' instead of `@' as a variable
+ substitution marker.
+ Use quotes.
+
2013-02-07 Werner Lemberg <wl@gnu.org>
* src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index bf26061f0..5ddedc31d 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
-# Copyright 2001-2012 by
+# Copyright 2001-2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -727,9 +727,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
# and `builds/unix/unix-cc.mk' that will be used by the build system
#
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
- unix-def.mk:unix-def.in
- freetype-config
- freetype2.pc:freetype2.in])
+ unix-def.mk:unix-def.in])
# re-generate the Jamfile to use libtool now
#
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
index 1c0cc077e..2edcd1135 100644
--- a/builds/unix/freetype-config.in
+++ b/builds/unix/freetype-config.in
@@ -12,14 +12,12 @@
LC_ALL=C
export LC_ALL
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-exec_prefix_set=no
-includedir=@includedir@
-libdir=@libdir@
-enable_shared=@build_libtool_libs@
-wl=@wl@
-hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@'
+prefix="%prefix%"
+exec_prefix="%exec_prefix%"
+exec_prefix_set="no"
+includedir="%includedir%"
+libdir="%libdir%"
+enable_shared="%build_libtool_libs%"
usage()
{
@@ -75,7 +73,7 @@ while test $# -gt 0 ; do
echo_exec_prefix=yes
;;
--version)
- echo @ft_version@
+ echo %ft_version%
exit 0
;;
--ftversion)
@@ -143,12 +141,9 @@ if test "$echo_cflags" = "yes" ; then
fi
if test "$echo_libs" = "yes" ; then
- rpath=
- if test "$enable_shared" = "yes" ; then
- eval "rpath=\"$hardcode_libdir_flag_spec\""
- fi
- libs="-lfreetype @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@"
- if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then
+ libs="-lfreetype %LIBZ% %LIBBZ2% %FT2_EXTRA_LIBS%"
+ if test "${SYSROOT}$libdir" != "/usr/lib" &&
+ test "${SYSROOT}$libdir" != "/usr/lib64"; then
echo -L${SYSROOT}$libdir $libs
else
echo $libs
diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in
index b73180049..c5c30276e 100644
--- a/builds/unix/freetype2.in
+++ b/builds/unix/freetype2.in
@@ -1,12 +1,12 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+prefix="%prefix%"
+exec_prefix="%exec_prefix%"
+libdir="%libdir%"
+includedir="%includedir%"
Name: FreeType 2
Description: A free, high-quality, and portable font engine.
-Version: @ft_version@
+Version: %ft_version%
Requires:
Libs: -L${libdir} -lfreetype
-Libs.private: @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@
+Libs.private: %LIBZ% %LIBBZ2% %FT2_EXTRA_LIBS%
Cflags: -I${includedir}/freetype2 -I${includedir}
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index d3ebc8b26..9c5e94138 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2004, 2006, 2008 by
+# Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,10 +15,10 @@
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
-DELETE := rm -f
-DELDIR := @RMDIR@
-CAT := cat
-SEP := /
+DELETE := rm -f
+DELDIR := @RMDIR@
+CAT := cat
+SEP := /
# this is used for `make distclean' and `make install'
OBJ_BUILD ?= $(BUILD_DIR)
@@ -57,6 +57,13 @@ datadir := @datadir@
version_info := @version_info@
+# Variables needed for `freetype-config' and `freetype.pc'.
+#
+FT2_EXTRA_LIBS := @FT2_EXTRA_LIBS@
+LIBBZ2 := @LIBBZ2@
+LIBZ := @LIBZ@
+build_libtool_libs := @build_libtool_libs@
+ft_version := @ft_version@
# The directory where all library files are placed.
#
@@ -82,4 +89,48 @@ SYSTEM_ZLIB := @SYSTEM_ZLIB@
NO_OUTPUT := 2> /dev/null
+# To support calls like
+#
+# configure --includedir='${libdir}'/freetype2/include
+#
+# we generate `freetype-config' and `freetype.pc' at compile time so that
+# those variables are properly expanded.
+
+$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
+ rm -f $@ $@.tmp
+ sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \
+ -e 's|%LIBBZ2%|$(LIBBZ2)|' \
+ -e 's|%LIBZ%|$(LIBZ)|' \
+ -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
+ -e 's|%exec_prefix%|$(exec_prefix)|' \
+ -e 's|%ft_version%|$(ft_version)|' \
+ -e 's|%includedir%|$(includedir)|' \
+ -e 's|%libdir%|$(libdir)|' \
+ -e 's|%prefix%|$(prefix)|' \
+ $< \
+ > $@.tmp
+ chmod +x $@.tmp
+ chmod a-w $@.tmp
+ mv $@.tmp $@
+
+$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
+ rm -f $@ $@.tmp
+ sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \
+ -e 's|%LIBBZ2%|$(LIBBZ2)|' \
+ -e 's|%LIBZ%|$(LIBZ)|' \
+ -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
+ -e 's|%exec_prefix%|$(exec_prefix)|' \
+ -e 's|%ft_version%|$(ft_version)|' \
+ -e 's|%includedir%|$(includedir)|' \
+ -e 's|%libdir%|$(libdir)|' \
+ -e 's|%prefix%|$(prefix)|' \
+ $< \
+ > $@.tmp
+ chmod +x $@.tmp
+ chmod a-w $@.tmp
+ mv $@.tmp $@
+
+all: $(OBJ_BUILD)/freetype-config \
+ $(OBJ_BUILD)/freetype2.pc
+
# EOF