Fix directories returned by freetype-config with modified prefix

Resolves: #1161963
This commit is contained in:
Marek Kasik 2014-11-11 14:13:01 +01:00
parent 365fb730c6
commit ac3b65123c
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,21 @@
--- freetype-2.5.3/builds/unix/freetype-config.in
+++ freetype-2.5.3/builds/unix/freetype-config.in
@@ -114,12 +114,15 @@ if test "$echo_exec_prefix" = "yes" ; th
echo ${SYSROOT}$exec_prefix
fi
+prefix_var=`pkg-config --variable prefix freetype2`
+lib_suffix=`echo ${libdir} | sed -e 's:'$prefix_var'::'`
+
if test "$exec_prefix_set" = "yes" ; then
- libdir=$exec_prefix/lib
+ libdir=${exec_prefix}${lib_suffix}
else
if test "$local_prefix" = "yes" ; then
- includedir=$prefix/include
- libdir=$prefix/lib
+ includedir=`echo ${includedir} | sed -e 's:'$prefix_var':'${prefix}':'`
+ libdir=${prefix}${lib_suffix}
fi
fi

View File

@ -7,7 +7,7 @@
Summary: A free and portable font rendering engine
Name: freetype
Version: 2.5.3
Release: 10%{?dist}
Release: 11%{?dist}
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
Group: System Environment/Libraries
URL: http://www.freetype.org
@ -32,6 +32,9 @@ Patch90: freetype-2.4.12-pkgconfig.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1079302
Patch91: freetype-2.5.3-freetype-config-libs.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1161963
Patch92: freetype-2.5.3-freetype-config-prefix.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
BuildRequires: libX11-devel
@ -97,6 +100,8 @@ popd
%patch91 -p1 -b .freetype-config-libs
%patch92 -p1 -b .freetype-config-prefix
%build
%configure --disable-static \
@ -217,6 +222,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/*
%changelog
* Tue Nov 11 2014 Marek Kasik <mkasik@redhat.com> - 2.5.3-11
- Fix directories returned by freetype-config with modified prefix
- Resolves: #1161963
* Tue Oct 21 2014 Marek Kasik <mkasik@redhat.com> - 2.5.3-10
- Fix patch which enables subpixel rendering
- Resolves: #1154448