diff --git a/.gitignore b/.gitignore index c7e7186332..3bfa5d9510 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ icu4c/source/config.cache icu4c/source/config.log icu4c/source/config.status icu4c/source/config/Makefile.inc +icu4c/source/config/icu-*.pc icu4c/source/config/icu-config icu4c/source/config/icu-config.1 icu4c/source/config/icu.pc diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in index 10e529998c..f2b37cbf07 100644 --- a/icu4c/source/Makefile.in +++ b/icu4c/source/Makefile.in @@ -42,8 +42,11 @@ DOCZIP = icu-docs.zip ## Files to remove for 'make clean' CLEANFILES = *~ +ALL_PKGCONFIG_SUFFIX=uc i18n io le lx +ALL_PKGCONFIG_FILES=$(ALL_PKGCONFIG_SUFFIX:%=$(top_builddir)/config/icu-%.pc) + ## Files built (autoconfed) and installed -INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc $(top_builddir)/config/icu-config @platform_make_fragment@ $(EXTRA_DATA:%=$(DESTDIR)$(pkglibdir)/%) $(top_builddir)/config/icu.pc.out $(top_builddir)/config/icu.pc +INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc $(top_builddir)/config/icu-config @platform_make_fragment@ $(EXTRA_DATA:%=$(DESTDIR)$(pkglibdir)/%) $(ALL_PKGCONFIG_FILES) ## Files built (autoconfed) but not installed LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk @@ -145,7 +148,7 @@ install-icu: $(INSTALLED_BUILT_FILES) $(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig - $(INSTALL_DATA) $(top_builddir)/config/icu.pc.out $(DESTDIR)$(libdir)/pkgconfig/icu.pc + $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/ $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc @@ -176,10 +179,11 @@ clean-local: test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) -$(RMV) "test-*.xml" -$(RMV) "perf-*.xml" + -$(RMV) $(ALL_PKGCONFIG_FILES) $(RMV) Doxyfile doc $(DOCZIP) distclean-local: clean-local - $(RMV) $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc $(top_builddir)/config/icu-config $(top_builddir)/config/icu.pc $(top_builddir)/config/icu.pc.out + $(RMV) $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc $(top_builddir)/config/icu-config $(top_builddir)/config/icu.pc $(ALL_PKGCONFIG_FILES) $(RMV) config.cache config.log config.status $(top_builddir)/config/icucross.mk autom4te.cache $(RMV) Makefile config/Makefile icudefs.mk $(LIBDIR) $(BINDIR) -$(RMV) dist @@ -217,13 +221,47 @@ config/icu.pc: $(srcdir)/config/icu.pc.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status -config/icu.pc.out: config/icu.pc config/icu-config +config/icu-uc.pc: config/icu.pc Makefile icudefs.mk @cat config/icu.pc > $@ - @echo "Libs:" '-L$${libdir}' $(shell config/icu-config --noverify --ldflags-libsonly) >> $@ - @echo "Libs.private: " $(shell config/icu-config --noverify --ldflags-system) >> $@ -# @echo "Cflags: " $(shell config/icu-config --noverify --cppflags) >> $@ + @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data libraries" >> $@ + @echo "Name: $(PACKAGE)-uc" >> $@ + @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" >> $@ + @echo "Libs.private:" '$${baselibs}' >> $@ @echo $@ updated. +config/icu-i18n.pc: config/icu.pc Makefile icudefs.mk + @cat config/icu.pc > $@ + @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Internationalization library" >> $@ + @echo "Name: $(PACKAGE)-i18n" >> $@ + @echo "Requires: icu-uc" >> $@ + @echo "Libs:" "${ICULIBS_I18N}" >> $@ + @echo $@ updated. + +config/icu-io.pc: config/icu.pc Makefile icudefs.mk + @cat config/icu.pc > $@ + @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Stream and I/O Library" >> $@ + @echo "Name: $(PACKAGE)-io" >> $@ + @echo "Requires: icu-i18n" >> $@ + @echo "Libs:" "${ICULIBS_IO}" >> $@ + @echo $@ updated. + +config/icu-le.pc: config/icu.pc Makefile icudefs.mk + @cat config/icu.pc > $@ + @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Layout library" >> $@ + @echo "Name: $(PACKAGE)-le" >> $@ + @echo "Requires: icu-uc" >> $@ + @echo "Libs:" "${ICULIBS_LE}" >> $@ + @echo $@ updated. + +config/icu-lx.pc: config/icu.pc Makefile icudefs.mk + @cat config/icu.pc > $@ + @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library" >> $@ + @echo "Name: $(PACKAGE)-lx" >> $@ + @echo "Requires: icu-le" >> $@ + @echo "Libs:" "${ICULIBS_LX}" >> $@ + @echo $@ updated. + + Makefile: $(srcdir)/Makefile.in icudefs.mk $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/icu4c/source/config/icu.pc.in b/icu4c/source/config/icu.pc.in index 9ca2648bbe..406b196986 100644 --- a/icu4c/source/config/icu.pc.in +++ b/icu4c/source/config/icu.pc.in @@ -2,31 +2,30 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ -bindir = @bindir@ +#bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ -datarootdir = @datarootdir@ -datadir = @datadir@ -sbindir = @sbindir@ -mandir = @mandir@ -sysconfdir = @sysconfdir@ +baselibs = @LIBS@ +#datarootdir = @datarootdir@ +#datadir = @datadir@ +#sbindir = @sbindir@ +#mandir = @mandir@ +#sysconfdir = @sysconfdir@ CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ +#CXXFLAGS = @CXXFLAGS@ DEFS = @DEFS@ UNICODE_VERSION=@UNICODE_VERSION@ ICUPREFIX=icu ICULIBSUFFIX=@ICULIBSUFFIX@ LIBICU=lib${ICUPREFIX} -SHAREDLIBCFLAGS=-fPIC +#SHAREDLIBCFLAGS=-fPIC pkglibdir=${libdir}/@PACKAGE@${ICULIBSUFFIX}/@VERSION@ -pkgdatadir=${datadir}/@PACKAGE@${ICULIBSUFFIX}/@VERSION@ +#pkgdatadir=${datadir}/@PACKAGE@${ICULIBSUFFIX}/@VERSION@ ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@ -ICUPKGDATA_DIR=@libdir@ -ICUDATA_DIR=${pkgdatadir} +#ICUPKGDATA_DIR=@libdir@ +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode -Name: @PACKAGE@ -Description: International Components for Unicode -URL: http://icu-project.org Version: @VERSION@ -# end of icu.pc.in Cflags: -I${includedir} +# end of icu.pc.in diff --git a/icu4c/source/icudefs.mk.in b/icu4c/source/icudefs.mk.in index 5bef35cfef..e0dcb244b1 100644 --- a/icu4c/source/icudefs.mk.in +++ b/icu4c/source/icudefs.mk.in @@ -34,6 +34,8 @@ cross_buildroot = @cross_buildroot@ # Package information +PACKAGE_ICU_DESCRIPTION = "International Components for Unicode" +PACKAGE_ICU_URL = "http://icu-project.org" PACKAGE = @PACKAGE@ VERSION = @VERSION@ UNICODE_VERSION = @UNICODE_VERSION@ @@ -234,15 +236,28 @@ IO_STUBNAME = io TOOLUTIL_STUBNAME = tu CTESTFW_STUBNAME = test +# Just the libs. +ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_LE = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) # Link commands to link to ICU libs -LIBICUDT= -L$(LIBDIR) -L$(top_builddir)/stubdata -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) -LIBICUUC= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) $(LIBICUDT) -LIBICUI18N= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) -LIBICULE= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) -LIBICULX= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) -LIBCTESTFW= -L$(top_builddir)/tools/ctestfw -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) -LIBICUTOOLUTIL= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) -LIBICUIO= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) +LLIBDIR = -L$(LIBDIR) +LSTUBDIR = -L$(top_builddir)/stubdata +LCTESTFW = -L$(top_builddir)/tools/ctestfw + +LIBICUDT = $(LLIBDIR) $(LSTUBDIR) $(ICULIBS_DT) +LIBICUUC = $(LLIBDIR) $(ICULIBS_UC) $(LSTUBDIR) $(ICULIBS_DT) +LIBICUI18N = $(LLIBDIR) $(ICULIBS_I18N) +LIBICULE = $(LLIBDIR) $(ICULIBS_LE) +LIBICULX = $(LLIBDIR) $(ICULIBS_LX) +LIBCTESTFW = $(LCTESTFW) $(ICULIBS_CTESTFW) +LIBICUTOOLUTIL = $(LLIBDIR) $(ICULIBS_TOOLUTIL) +LIBICUIO = $(LLIBDIR) $(ICULIBS_IO) # Invoke, set library path for all ICU libraries. # overridden by icucross.mk