# Set up names of common libraries (to avoid forward references in rules)
ifdef CONFIG_CHARSET
-LIBCHARSET=$(o)/charset/libcharset.pc
+LIBCHARSET=$(o)/charset/libucw-charset.pc
endif
# The UCW library
endif
ifdef CONFIG_IMAGES
-LIBIMAGES=$(o)/images/libimages.pc
+LIBIMAGES=$(o)/images/libucw-images.pc
include $(s)/images/Makefile
endif
ifdef CONFIG_SHXML
-LIBSHXML=$(o)/shxml/libshxml.pc
+LIBSHXML=$(o)/shxml/libucw-xml.pc
include $(s)/shxml/Makefile
endif
The package also contains several other libraries from the Sherlock Holmes project, which you might find useful.
So far, they are completely optional and not much documented.
<ul>
- <li><strong>libcharset</strong> – manipulation of character sets and UniCode categories
- <li><strong>libimages</strong> – manipulation of images
- <li><strong>libshxml</strong> – a lightning fast and flexible XML parser
+ <li><strong>libucw-charset</strong> – manipulation of character sets and UniCode categories
+ <li><strong>libucw-images</strong> – manipulation of images
+ <li><strong>libucw-xml</strong> – a lightning fast and flexible XML parser
</ul>
</div>
</div>
LIBCHARSET_MODS=toupper tolower tocat toligatures unaccent charconv setnames fb-charconv stk-charconv mp-charconv
LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h stk-charconv.h mp-charconv.h
-$(o)/charset/libcharset.a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
-$(o)/charset/libcharset-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
-$(o)/charset/libcharset.so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
-$(o)/charset/libcharset.pc: $(LIBUCW)
+$(o)/charset/libucw-charset.a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
+$(o)/charset/libucw-charset-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
+$(o)/charset/libucw-charset.so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
+$(o)/charset/libucw-charset.pc: $(LIBUCW)
ifdef CONFIG_STATIC_PIC
-$(o)/charset/libcharset.pc: $(o)/charset/libcharset-pic.a
+$(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset-pic.a
endif
-API_LIBS+=libcharset
+API_LIBS+=libucw-charset
API_INCLUDES+=$(o)/charset/.include-stamp
$(o)/charset/.include-stamp: $(addprefix $(s)/charset/,$(LIBCHARSET_INCLUDES))
$(o)/charset/.include-stamp: IDST=charset
-run/lib/pkgconfig/libcharset.pc: $(o)/charset/libcharset.pc
+run/lib/pkgconfig/libucw-charset.pc: $(o)/charset/libucw-charset.pc
ifdef CONFIG_CHARSET_UTILS
PROGS+=$(o)/charset/cs2cs
endif
-$(o)/charset/cs2cs: $(o)/charset/cs2cs.o $(LIBUCW) $(o)/charset/libcharset.pc
+$(o)/charset/cs2cs: $(o)/charset/cs2cs.o $(LIBUCW) $(o)/charset/libucw-charset.pc
build_charsets:
cd $(s)/charset && sh misc/generate
clean::
rm -f $(s)/charset/misc/u-*
-INSTALL_TARGETS+=install-libcharset
-install-libcharset:
+INSTALL_TARGETS+=install-libucw-charset
+install-libucw-charset:
install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset
- install -m 644 run/lib/libcharset.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
- install -m 644 run/lib/pkgconfig/libcharset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
+ install -m 644 run/lib/libucw-charset.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/pkgconfig/libucw-charset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
ifdef CONFIG_STATIC_PIC
- install -m 644 run/lib/libcharset-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/libucw-charset-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
endif
-.PHONY: install-libcharset
+.PHONY: install-libucw-charset
+++ /dev/null
-# pkg-config metadata for libcharset
-
-libdir=@LIBDIR@
-incdir=.
-
-# Override if you want to use the -pic version
-picsuffix=
-
-Name: libcharset
-Description: Character set conversion library
-Version: @UCW_VERSION@
-Cflags: -I${incdir}
-Libs: -L${libdir} -lcharset${picsuffix}
-Requires: @DEPS@
--- /dev/null
+# pkg-config metadata for libucw-charset
+
+libdir=@LIBDIR@
+incdir=.
+
+# Override if you want to use the -pic version
+picsuffix=
+
+Name: libucw-charset
+Description: Character set conversion library
+Version: @UCW_VERSION@
+Cflags: -I${incdir}
+Libs: -L${libdir} -lucw-charset${picsuffix}
+Requires: @DEPS@
rm -rf tests
mkdir tests
if [ "$1" == DARWIN ] ; then
- # All tests on Darwin need CONFIG_SHARED, due to libcharset collision
+ # All tests on Darwin need CONFIG_SHARED, due to libucw-charset collision
# only visible with static linking.
FLAGS="CONFIG_SHARED"
try debug/default.cfg $FLAGS CONFIG_UCW_PCRE # `make tests' does not work with non-local builds with shared libs
include $(BUILDSYS)/Maketop
# Set up names of common libraries (to avoid forward references in rules)
-LIBLANG=$(o)/lang/liblang.pc
-LIBCHARSET=$(o)/charset/libcharset.pc
-LIBIMAGES=$(o)/images/libimages.pc
+LIBCHARSET=$(o)/charset/libucw-charset.pc
+LIBIMAGES=$(o)/images/libucw-images.pc
# Include makefiles of libraries we wish to use
include $(s)/ucw/Makefile
include $(s)/charset/Makefile
-include $(s)/lang/Makefile
include $(s)/images/Makefile
# Programs we want to compile
PROGS+=$(o)/test
-$(o)/test: $(o)/test.o $(LIBUCW) $(LIBLANG) $(LIBCHARSET) $(LIBIMAGES)
+$(o)/test: $(o)/test.o $(LIBUCW) $(LIBCHARSET) $(LIBIMAGES)
# All tests (%-t) get automatically linked with libucw
TESTING_DEPS=$(LIBUCW)
endif
ifdef CONFIG_STATIC_PIC
-LIBIMAGES_DEPS+=$(o)/images/libimages-pic.a
+LIBIMAGES_DEPS+=$(o)/images/libucw-images-pic.a
endif
ifdef CONFIG_IMAGES_DUP
PROGS+=$(LIBIMAGES_PROGS)
CONFIGS+=$(LIBIMAGES_CONFIGS)
-$(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
-$(o)/images/libimages-pic.a: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
-$(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
-$(o)/images/libimages.pc: $(LIBIMAGES_DEPS)
+$(o)/images/libucw-images.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
+$(o)/images/libucw-images-pic.a: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
+$(o)/images/libucw-images.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
+$(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS)
$(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES)
$(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES)
$(o)/images/color-t: $(LIBIMAGES)
$(o)/images/color.test: $(o)/images/color-t
-API_LIBS+=libimages
+API_LIBS+=libucw-images
API_INCLUDES+=$(o)/images/.include-stamp
$(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES))
$(o)/images/.include-stamp: IDST=images
-run/lib/pkgconfig/libimages.pc: $(o)/images/libimages.pc
+run/lib/pkgconfig/libucw-images.pc: $(o)/images/libucw-images.pc
-INSTALL_TARGETS+=install-libimages
-install-libimages:
+INSTALL_TARGETS+=install-libucw-images
+install-libucw-images:
install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR) $(INSTALL_CONFIG_DIR))
install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images
- install -m 644 run/lib/libimages.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
- install -m 644 run/lib/pkgconfig/libimages.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
+ install -m 644 run/lib/libucw-images.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR)
ifdef CONFIG_STATIC_PIC
- install -m 644 run/lib/libimages-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/libucw-images-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
endif
-.PHONY: install-libimages
+.PHONY: install-libucw-images
+++ /dev/null
-# pkg-config metadata for libimages
-
-libdir=@LIBDIR@
-incdir=.
-
-# Override if you want to use the -pic version
-picsuffix=
-
-Name: libimages
-Description: Sherlock image library
-Version: @UCW_VERSION@
-Cflags: -I${incdir}
-Libs: -L${libdir} -limages${picsuffix} -lm -lpthread @LIBIMAGES_LIBS@
-Requires: @DEPS@
--- /dev/null
+# pkg-config metadata for libucw-images
+
+libdir=@LIBDIR@
+incdir=.
+
+# Override if you want to use the -pic version
+picsuffix=
+
+Name: libucw-images
+Description: UCW image library
+Version: @UCW_VERSION@
+Cflags: -I${incdir}
+Libs: -L${libdir} -lucw-images${picsuffix} -lm -lpthread @LIBIMAGES_LIBS@
+Requires: @DEPS@
LIBSHXML_MOD_PATHS=$(addprefix $(o)/shxml/,$(LIBSHXML_MODS))
-$(o)/shxml/libshxml.a: $(addsuffix .o,$(LIBSHXML_MOD_PATHS))
-$(o)/shxml/libshxml-pic.a: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
-$(o)/shxml/libshxml.so: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
-$(o)/shxml/libshxml.pc: $(LIBCHARSET)
+$(o)/shxml/libucw-xml.a: $(addsuffix .o,$(LIBSHXML_MOD_PATHS))
+$(o)/shxml/libucw-xml-pic.a: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
+$(o)/shxml/libucw-xml.so: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
+$(o)/shxml/libucw-xml.pc: $(LIBCHARSET)
ifdef CONFIG_STATIC_PIC
-$(o)/shxml/libshxml.pc: $(o)/shxml/libshxml-pic.a
+$(o)/shxml/libucw-xml.pc: $(o)/shxml/libucw-xml-pic.a
endif
$(o)/shxml/common.o: $(o)/shxml/unicat.h
$(o)/shxml/xml-test: $(o)/shxml/xml-test.o $(LIBSHXML)
$(o)/shxml/xml-test.test: $(o)/shxml/xml-test
-API_LIBS+=libshxml
+API_LIBS+=libucw-xml
API_INCLUDES+=$(o)/shxml/.include-stamp
$(o)/shxml/.include-stamp: $(addprefix $(s)/shxml/,$(LIBSHXML_INCLUDES))
$(o)/shxml/.include-stamp: IDST=shxml
-run/lib/pkgconfig/libshxml.pc: $(o)/shxml/libshxml.pc
+run/lib/pkgconfig/libucw-xml.pc: $(o)/shxml/libucw-xml.pc
-INSTALL_TARGETS+=install-sh-xml
+INSTALL_TARGETS+=install-libucw-xml
install-sh-xml:
install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
install -m 644 $(addprefix run/include/shxml/,$(LIBSHXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml
- install -m 644 run/lib/pkgconfig/libshxml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
- install -m 644 run/lib/libshxml.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
+ install -m 644 run/lib/libucw-xml.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
ifdef CONFIG_STATIC_PIC
- install -m 644 run/lib/libshxml-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/libucw-xml-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
endif
-.PHONY: install-sh-xml
+.PHONY: install-libucw-xml
+++ /dev/null
-# pkg-config metadata for libshxml
-
-libdir=@LIBDIR@
-incdir=.
-
-# Override if you want to use the -pic version
-picsuffix=
-
-Name: libshxml
-Description: XML parser for Sherlock project
-Version: @UCW_VERSION@
-Cflags: -I${incdir}
-Libs: -L${libdir} -lshxml${picsuffix}
-Requires: @DEPS@
--- /dev/null
+# pkg-config metadata for libucw-xml
+
+libdir=@LIBDIR@
+incdir=.
+
+# Override if you want to use the -pic version
+picsuffix=
+
+Name: libucw-xml
+Description: XML parser for LibUCW project
+Version: @UCW_VERSION@
+Cflags: -I${incdir}
+Libs: -L${libdir} -lucw-xml${picsuffix}
+Requires: @DEPS@
static void
xml_init_charconv(struct xml_context *ctx, int cs)
{
- // XXX: with a direct access to libcharset tables could be faster
+ // XXX: with a direct access to libucw-charset tables could be faster
struct xml_source *src = ctx->src;
TRACE(ctx, "wrapping charset %s", charset_name(cs));
src->wrapped_fb = src->fb;
kmp1_cleanup(&kmp);
}
-#ifdef CONFIG_CHARSET /* This one depends on libcharset */
+#ifdef CONFIG_CHARSET /* This one depends on libucw-charset */
/* TEST2 - various tracing */