Add Libs.private and Requires.private to harfbuzz.pc

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=64501
pull/114/head
Behdad Esfahbod 10 years ago
parent c7dfe316f8
commit 539a610e2e
  1. 12
      configure.ac
  2. 15
      src/Makefile.am
  3. 2
      src/harfbuzz.pc.in

@ -145,8 +145,10 @@ AC_ARG_WITH(glib,
[Use glib @<:@default=auto@:>@])],, [Use glib @<:@default=auto@:>@])],,
[with_glib=auto]) [with_glib=auto])
have_glib=false have_glib=false
GLIB_DEPS="glib-2.0 >= 2.16"
AC_SUBST(GLIB_DEPS)
if test "x$with_glib" = "xyes" -o "x$with_glib" = "xauto"; then if test "x$with_glib" = "xyes" -o "x$with_glib" = "xauto"; then
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, :) PKG_CHECK_MODULES(GLIB, $GLIB_DEPS, have_glib=true, :)
fi fi
if test "x$with_glib" = "xyes" -a "x$have_glib" != "xtrue"; then if test "x$with_glib" = "xyes" -a "x$have_glib" != "xtrue"; then
AC_MSG_ERROR([glib support requested but glib-2.0 not found]) AC_MSG_ERROR([glib support requested but glib-2.0 not found])
@ -296,8 +298,10 @@ AC_ARG_WITH(graphite2,
[Use the graphite2 library @<:@default=no@:>@])],, [Use the graphite2 library @<:@default=no@:>@])],,
[with_graphite2=no]) [with_graphite2=no])
have_graphite2=false have_graphite2=false
GRAPHITE2_DEPS="graphite2"
AC_SUBST(GRAPHITE2_DEPS)
if test "x$with_graphite2" = "xyes" -o "x$with_graphite2" = "xauto"; then if test "x$with_graphite2" = "xyes" -o "x$with_graphite2" = "xauto"; then
PKG_CHECK_MODULES(GRAPHITE2, graphite2, have_graphite2=true, :) PKG_CHECK_MODULES(GRAPHITE2, $GRAPHITE2_DEPS, have_graphite2=true, :)
fi fi
if test "x$with_graphite2" = "xyes" -a "x$have_graphite2" != "xtrue"; then if test "x$with_graphite2" = "xyes" -a "x$have_graphite2" != "xtrue"; then
AC_MSG_ERROR([graphite2 support requested but libgraphite2 not found]) AC_MSG_ERROR([graphite2 support requested but libgraphite2 not found])
@ -314,9 +318,11 @@ AC_ARG_WITH(freetype,
[Use the FreeType library @<:@default=auto@:>@])],, [Use the FreeType library @<:@default=auto@:>@])],,
[with_freetype=auto]) [with_freetype=auto])
have_freetype=false have_freetype=false
FREETYPE_DEPS="freetype2 >= 12.0.6"
AC_SUBST(FREETYPE_DEPS)
if test "x$with_freetype" = "xyes" -o "x$with_freetype" = "xauto"; then if test "x$with_freetype" = "xyes" -o "x$with_freetype" = "xauto"; then
# See freetype/docs/VERSION.DLL; 12.0.6 means freetype-2.4.2 # See freetype/docs/VERSION.DLL; 12.0.6 means freetype-2.4.2
PKG_CHECK_MODULES(FREETYPE, freetype2 >= 12.0.6, have_freetype=true, :) PKG_CHECK_MODULES(FREETYPE, $FREETYPE_DEPS, have_freetype=true, :)
fi fi
if test "x$with_freetype" = "xyes" -a "x$have_freetype" != "xtrue"; then if test "x$with_freetype" = "xyes" -a "x$have_freetype" != "xtrue"; then
AC_MSG_ERROR([FreeType support requested but libfreetype2 not found]) AC_MSG_ERROR([FreeType support requested but libfreetype2 not found])

@ -20,6 +20,8 @@ lib_LTLIBRARIES = libharfbuzz.la
HBCFLAGS = HBCFLAGS =
HBLIBS = HBLIBS =
HBNONPCLIBS =
HBDEPS =
HBSOURCES = \ HBSOURCES = \
hb-atomic-private.hh \ hb-atomic-private.hh \
hb-blob.cc \ hb-blob.cc \
@ -133,12 +135,13 @@ endif
if HAVE_PTHREAD if HAVE_PTHREAD
HBCFLAGS += $(PTHREAD_CFLAGS) HBCFLAGS += $(PTHREAD_CFLAGS)
HBLIBS += $(PTHREAD_LIBS) HBNONPCLIBS += $(PTHREAD_LIBS)
endif endif
if HAVE_GLIB if HAVE_GLIB
HBCFLAGS += $(GLIB_CFLAGS) HBCFLAGS += $(GLIB_CFLAGS)
HBLIBS += $(GLIB_LIBS) HBLIBS += $(GLIB_LIBS)
HBDEPS += $(GLIB_DEPS)
HBSOURCES += hb-glib.cc HBSOURCES += hb-glib.cc
HBHEADERS += hb-glib.h HBHEADERS += hb-glib.h
endif endif
@ -146,6 +149,7 @@ endif
if HAVE_FREETYPE if HAVE_FREETYPE
HBCFLAGS += $(FREETYPE_CFLAGS) HBCFLAGS += $(FREETYPE_CFLAGS)
HBLIBS += $(FREETYPE_LIBS) HBLIBS += $(FREETYPE_LIBS)
HBDEPS += $(FREETYPE_DEPS)
HBSOURCES += hb-ft.cc HBSOURCES += hb-ft.cc
HBHEADERS += hb-ft.h HBHEADERS += hb-ft.h
endif endif
@ -153,20 +157,21 @@ endif
if HAVE_GRAPHITE2 if HAVE_GRAPHITE2
HBCFLAGS += $(GRAPHITE2_CFLAGS) HBCFLAGS += $(GRAPHITE2_CFLAGS)
HBLIBS += $(GRAPHITE2_LIBS) HBLIBS += $(GRAPHITE2_LIBS)
HBDEPS += $(GRAPHITE2_DEPS)
HBSOURCES += hb-graphite2.cc HBSOURCES += hb-graphite2.cc
HBHEADERS += hb-graphite2.h HBHEADERS += hb-graphite2.h
endif endif
if HAVE_UNISCRIBE if HAVE_UNISCRIBE
HBCFLAGS += $(UNISCRIBE_CFLAGS) HBCFLAGS += $(UNISCRIBE_CFLAGS)
HBLIBS += $(UNISCRIBE_LIBS) HBNONPCLIBS += $(UNISCRIBE_LIBS)
HBSOURCES += hb-uniscribe.cc HBSOURCES += hb-uniscribe.cc
HBHEADERS += hb-uniscribe.h HBHEADERS += hb-uniscribe.h
endif endif
if HAVE_CORETEXT if HAVE_CORETEXT
HBCFLAGS += $(CORETEXT_CFLAGS) HBCFLAGS += $(CORETEXT_CFLAGS)
HBLIBS += $(CORETEXT_LIBS) HBNONPCLIBS += $(CORETEXT_LIBS)
HBSOURCES += hb-coretext.cc HBSOURCES += hb-coretext.cc
HBHEADERS += hb-coretext.h HBHEADERS += hb-coretext.h
endif endif
@ -182,6 +187,8 @@ DIST_SUBDIRS += hb-ucdn
# Put the library together # Put the library together
HBLIBS += $(HBNONPCLIBS)
if OS_WIN32 if OS_WIN32
export_symbols = -export-symbols harfbuzz.def export_symbols = -export-symbols harfbuzz.def
harfbuzz_def_dependency = harfbuzz.def harfbuzz_def_dependency = harfbuzz.def
@ -256,6 +263,8 @@ EXTRA_DIST += \
-e 's@%exec_prefix%@$(exec_prefix)@g' \ -e 's@%exec_prefix%@$(exec_prefix)@g' \
-e 's@%libdir%@$(libdir)@g' \ -e 's@%libdir%@$(libdir)@g' \
-e 's@%includedir%@$(includedir)@g' \ -e 's@%includedir%@$(includedir)@g' \
-e 's@%libs_private%@$(HBNONPCLIBS)@g' \
-e 's@%requires_private%@$(HBDEPS)@g' \
-e 's@%VERSION%@$(VERSION)@g' \ -e 's@%VERSION%@$(VERSION)@g' \
"$<" > "$@" \ "$<" > "$@" \
|| ($(RM) "$@"; false) || ($(RM) "$@"; false)

@ -8,4 +8,6 @@ Description: HarfBuzz text shaping library
Version: %VERSION% Version: %VERSION%
Libs: -L${libdir} -lharfbuzz Libs: -L${libdir} -lharfbuzz
Libs.private: %libs_private%
Requires.private: %requires_private%
Cflags: -I${includedir}/harfbuzz Cflags: -I${includedir}/harfbuzz

Loading…
Cancel
Save