aboutsummaryrefslogtreecommitdiff
path: root/freetype/builds/unix/unix-def.in
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/builds/unix/unix-def.in')
-rw-r--r--freetype/builds/unix/unix-def.in25
1 files changed, 18 insertions, 7 deletions
diff --git a/freetype/builds/unix/unix-def.in b/freetype/builds/unix/unix-def.in
index 35ea9c86c..4c06a05c7 100644
--- a/freetype/builds/unix/unix-def.in
+++ b/freetype/builds/unix/unix-def.in
@@ -64,7 +64,6 @@ version_info := @version_info@
#
REQUIRES_PRIVATE := @REQUIRES_PRIVATE@
LIBS_PRIVATE := @LIBS_PRIVATE@
-LIBS_CONFIG := @LIBS_CONFIG@
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
build_libtool_libs := @build_libtool_libs@
ft_version := @ft_version@
@@ -102,8 +101,7 @@ NO_OUTPUT := 2> /dev/null
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
rm -f $@ $@.tmp
- sed -e 's|%LIBS_CONFIG%|$(LIBS_CONFIG)|' \
- -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
+ sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
-e 's|%exec_prefix%|$(exec_prefix)|' \
-e 's|%ft_version%|$(ft_version)|' \
@@ -116,16 +114,29 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
chmod a-w $@.tmp
mv $@.tmp $@
+# To support directory names with spaces (as might easily happen on Windows
+# platforms), the right solution would be to surround the pkg-variables in
+# `freetype2.pc' with double quotes. However, doing so ironically disables
+# the prefix override mechanism especially written for Windows. This is a
+# bug in pkg-config version 0.28 and earlier.
+#
+# For this reason, we escape spaces with backslashes.
+
+exec_prefix_x := $(subst $(space),\\$(space),$(exec_prefix))
+includedir_x := $(subst $(space),\\$(space),$(includedir))
+libdir_x := $(subst $(space),\\$(space),$(libdir))
+prefix_x := $(subst $(space),\\$(space),$(prefix))
+
$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
rm -f $@ $@.tmp
sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \
-e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
- -e 's|%exec_prefix%|$(exec_prefix)|' \
+ -e 's|%exec_prefix%|$(exec_prefix_x)|' \
-e 's|%ft_version%|$(ft_version)|' \
- -e 's|%includedir%|$(includedir)|' \
- -e 's|%libdir%|$(libdir)|' \
- -e 's|%prefix%|$(prefix)|' \
+ -e 's|%includedir%|$(includedir_x)|' \
+ -e 's|%libdir%|$(libdir_x)|' \
+ -e 's|%prefix%|$(prefix_x)|' \
$< \
> $@.tmp
chmod a-w $@.tmp