ref: bcca86af30967d7d93590f2241b84d02f083d54e
parent: a2c7eb188892c6f02cd10cfa814672f3f2820ca8
author: Werner Lemberg <[email protected]>
date: Fri Feb 8 07:49:41 EST 2013
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2013-02-02 Werner Lemberg <[email protected]>
+
+ 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 <[email protected]>
* src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables.
--- 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 @@
# 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
#
--- 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 @@
echo_exec_prefix=yes
;;
--version)
- echo @ft_version@
+ echo %ft_version%
exit 0
;;
--ftversion)
@@ -143,12 +141,9 @@
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
--- 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}
--- 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 @@
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.
#
@@ -81,5 +88,49 @@
#
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 $@ [email protected]
+ 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)|' \
+ $< \
+ > [email protected]
+ chmod +x [email protected]
+ chmod a-w [email protected]
+ mv [email protected] $@
+
+$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
+ rm -f $@ [email protected]
+ 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)|' \
+ $< \
+ > [email protected]
+ chmod +x [email protected]
+ chmod a-w [email protected]
+ mv [email protected] $@
+
+all: $(OBJ_BUILD)/freetype-config \
+ $(OBJ_BUILD)/freetype2.pc
# EOF