Group :: Sistema/Bibliotecas
RPM: libfreetype-infinality
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: freetype-2.4.10-alt-freetype-config.patch
Download
Download
--- freetype/builds/unix/freetype-config.in
+++ freetype/builds/unix/freetype-config.in
@@ -9,14 +9,11 @@
# indicate that you have read the license and understand and accept it
# fully.
-prefix=@prefix@
-exec_prefix=@exec_prefix@
+prefix=$(pkg-config freetype2 --variable prefix)
+exec_prefix=$(pkg-config freetype2 --variable 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@'
+includedir=$(pkg-config freetype2 --variable includedir)
+libdir=$(pkg-config freetype2 --variable libdir)
usage()
{
@@ -34,6 +31,7 @@ Options:
--version display libtool version of the FreeType library
--ftversion display FreeType version number
--libs display flags for linking with the FreeType library
+ --static display linker flags for static linking
--libtool display library name for linking with libtool
--cflags display flags for compiling with the FreeType
library
@@ -72,7 +70,7 @@ while test $# -gt 0 ; do
echo_exec_prefix=yes
;;
--version)
- echo @ft_version@
+ pkg-config freetype2 --modversion
exit 0
;;
--ftversion)
@@ -84,6 +82,9 @@ while test $# -gt 0 ; do
--libs)
echo_libs=yes
;;
+ --static)
+ echo_static=yes
+ ;;
--libtool)
echo_libtool=yes
;;
@@ -131,24 +132,14 @@ if test "$echo_ft_version" = "yes" ; then
fi
if test "$echo_cflags" = "yes" ; then
- cflags="-I${SYSROOT}$includedir/freetype2"
- if test "${SYSROOT}$includedir" != "/usr/include" ; then
- echo $cflags -I${SYSROOT}$includedir
- else
- echo $cflags
- fi
+ pkg-config freetype2 --cflags
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
- echo -L${SYSROOT}$libdir $libs
+ if test "$echo_static" = "yes" ; then
+ pkg-config freetype2 --libs --static
else
- echo $libs
+ pkg-config freetype2 --libs
fi
fi