From 22ce0961742df0a213f2cc86ca3d5a72453c00b1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 28 May 2013 17:18:30 -0400 Subject: [PATCH] Generate harfbuzz-icu.pc Currently it only works with ICU that has .pc files. I'll wait till someone complains before fixing it for icu-config systems. --- Makefile.am | 3 --- configure.ac | 5 ++--- harfbuzz.pc.in | 11 ----------- src/Makefile.am | 13 +++++++++++++ src/harfbuzz-icu.pc.in | 13 +++++++++++++ src/harfbuzz.pc.in | 11 +++++++++++ 6 files changed, 39 insertions(+), 17 deletions(-) delete mode 100644 harfbuzz.pc.in create mode 100644 src/harfbuzz-icu.pc.in create mode 100644 src/harfbuzz.pc.in diff --git a/Makefile.am b/Makefile.am index 19c209579..3f676399b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,9 +6,6 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src util test -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = harfbuzz.pc - EXTRA_DIST = \ autogen.sh \ harfbuzz.doap \ diff --git a/configure.ac b/configure.ac index 3f1add985..2bf484d80 100644 --- a/configure.ac +++ b/configure.ac @@ -6,10 +6,10 @@ AC_INIT([HarfBuzz], [http://harfbuzz.org/]) AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([harfbuzz.pc.in]) +AC_CONFIG_SRCDIR([src/harfbuzz.pc.in]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.11.1 gnits dist-bzip2 no-dist-gzip -Wall no-define color-tests]) +AM_INIT_AUTOMAKE([1.11.1 gnits dist-bzip2 no-dist-gzip -Wall no-define color-tests -Wno-portability]) AM_SILENT_RULES([yes]) # Initialize libtool @@ -370,7 +370,6 @@ dnl =========================================================================== AC_CONFIG_FILES([ Makefile -harfbuzz.pc src/Makefile src/hb-version.h src/hb-icu-le/Makefile diff --git a/harfbuzz.pc.in b/harfbuzz.pc.in deleted file mode 100644 index e92319e15..000000000 --- a/harfbuzz.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: harfbuzz -Description: Text shaping library -Version: @VERSION@ - -Libs: -L${libdir} -lharfbuzz -Cflags: -I${includedir}/harfbuzz diff --git a/src/Makefile.am b/src/Makefile.am index f7e7e9d67..9334587af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -217,6 +217,8 @@ libharfbuzz_la_LIBADD = $(HBLIBS) EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency) pkginclude_HEADERS = $(HBHEADERS) nodist_pkginclude_HEADERS = $(HBNODISTHEADERS) +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = harfbuzz.pc if HAVE_ICU lib_LTLIBRARIES += libharfbuzz-icu.la @@ -225,8 +227,19 @@ libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS) libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la pkginclude_HEADERS += hb-icu.h +pkgconfig_DATA += harfbuzz-icu.pc endif +%.pc: %.pc.in $(top_builddir)/config.status + $(AM_V_GEN) \ + cat "$<" | \ + $(SED) -e 's@%prefix%@$(prefix)@g;' | \ + $(SED) -e 's@%exec_prefix%@$(exec_prefix)@g;' | \ + $(SED) -e 's@%libdir%@$(libdir)@g;' | \ + $(SED) -e 's@%includedir%@$(includedir)@g;' | \ + $(SED) -e 's@%VERSION%@$(VERSION)@g;' | \ + cat > "$@.tmp" && mv "$@.tmp" "$@" || ( $(RM) "$@.tmp"; false ) + CLEANFILES += harfbuzz.def harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) diff --git a/src/harfbuzz-icu.pc.in b/src/harfbuzz-icu.pc.in new file mode 100644 index 000000000..949869a35 --- /dev/null +++ b/src/harfbuzz-icu.pc.in @@ -0,0 +1,13 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: harfbuzz +Description: HarfBuzz text shaping library ICU integration +Version: %VERSION% + +Requires: harfbuzz +Requires.private: icu-uc +Libs: -L${libdir} -lharfbuzz-icu +Cflags: -I${includedir}/harfbuzz diff --git a/src/harfbuzz.pc.in b/src/harfbuzz.pc.in new file mode 100644 index 000000000..7f27bbbde --- /dev/null +++ b/src/harfbuzz.pc.in @@ -0,0 +1,11 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: harfbuzz +Description: HarfBuzz text shaping library +Version: %VERSION% + +Libs: -L${libdir} -lharfbuzz +Cflags: -I${includedir}/harfbuzz