From ae39fc8171b2c26d4ae64954a8055732c9241bcc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 4 Feb 2018 20:18:52 -0500 Subject: [PATCH] [subset] Build hb-subset into separate libharfbuzz-subset.so --- src/Makefile.am | 19 +++++++++++++------ src/harfbuzz-subset.pc.in | 12 ++++++++++++ util/Makefile.am | 2 ++ 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 src/harfbuzz-subset.pc.in diff --git a/src/Makefile.am b/src/Makefile.am index dd1c7ae66..59ca64827 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,9 +27,7 @@ HBNONPCLIBS = HBDEPS = HBSOURCES = $(HB_BASE_sources) HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources) -HBSOURCES += $(HB_SUBSET_sources) HBHEADERS = $(HB_BASE_headers) -HBHEADERS += $(HB_SUBSET_headers) HBNODISTHEADERS = $(HB_NODIST_headers) if HAVE_OT @@ -137,6 +135,15 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = harfbuzz.pc EXTRA_DIST += harfbuzz.pc.in +lib_LTLIBRARIES += libharfbuzz-subset.la +libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources) +libharfbuzz_subset_la_CPPFLAGS = $(libharfbuzz_la_CPPFLAGS) +libharfbuzz_subset_la_LDFLAGS = $(libharfbuzz_la_LDFLAGS) +libharfbuzz_subset_la_LIBADD = libharfbuzz.la +pkginclude_HEADERS += $(HB_SUBSET_headers) +pkgconfig_DATA += harfbuzz-subset.pc +EXTRA_DIST += harfbuzz-subset.pc.in + FUZZING_CPPFLAGS = \ -DHB_NDEBUG \ -DHB_MAX_NESTING_LEVEL=3 \ @@ -166,8 +173,8 @@ HBHEADERS += $(HB_ICU_headers) else lib_LTLIBRARIES += libharfbuzz-icu.la libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources) -libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS) -libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined +libharfbuzz_icu_la_CPPFLAGS = $(libharfbuzz_la_CPPFLAGS) $(ICU_CFLAGS) +libharfbuzz_icu_la_LDFLAGS = $(libharfbuzz_la_LDFLAGS) libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la pkginclude_HEADERS += $(HB_ICU_headers) pkgconfig_DATA += harfbuzz-icu.pc @@ -179,8 +186,8 @@ if HAVE_GOBJECT lib_LTLIBRARIES += libharfbuzz-gobject.la libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_sources) nodist_libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_ENUM_sources) -libharfbuzz_gobject_la_CPPFLAGS = $(GOBJECT_CFLAGS) -libharfbuzz_gobject_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined +libharfbuzz_gobject_la_CPPFLAGS = $(libharfbuzz_la_CPPFLAGS) $(GOBJECT_CFLAGS) +libharfbuzz_gobject_la_LDFLAGS = $(libharfbuzz_la_LDFLAGS) libharfbuzz_gobject_la_LIBADD = $(GOBJECT_LIBS) libharfbuzz.la pkginclude_HEADERS += $(HB_GOBJECT_headers) nodist_pkginclude_HEADERS += $(HB_GOBJECT_ENUM_headers) diff --git a/src/harfbuzz-subset.pc.in b/src/harfbuzz-subset.pc.in new file mode 100644 index 000000000..5da64b3f1 --- /dev/null +++ b/src/harfbuzz-subset.pc.in @@ -0,0 +1,12 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: harfbuzz +Description: HarfBuzz font subsetter +Version: %VERSION% + +Requires: harfbuzz +Libs: -L${libdir} -lharfbuzz-subset +Cflags: -I${includedir}/harfbuzz diff --git a/util/Makefile.am b/util/Makefile.am index 283dd91ff..3810e15e5 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -47,6 +47,8 @@ hb_shape_SOURCES = $(HB_SHAPE_sources) bin_PROGRAMS += hb-shape hb_subset_SOURCES = $(HB_SUBSET_sources) +hb_subset_SOURCES = $(HB_SUBSET_sources) +hb_subset_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la bin_PROGRAMS += hb-subset if HAVE_OT