linux 交叉编译fontconfig,freetype,libxml2,uuid

本文只要介绍fontconfig的交叉编译,以及其依赖库

Fontconfig官方介绍

Fontconfig is a library for configuring and customizing font access.

About Fontconfig

Fontconfig can:

discover new fonts when installed automatically, removing a common source of configuration problems.
perform font name substitution, so that appropriate alternative fonts can be selected if fonts are missing.
identify the set of fonts required to completely cover a set of languages.
have GUI configuration tools built as it uses an XML-based configuration file (though with autodiscovery, we believe this need is minimized).
efficiently and quickly find the fonts you need among the set of fonts you have installed, even if you have installed thousands of fonts, while minimzing memory usage.
be used in concert with the X Render Extension and FreeType to implement high quality, anti-aliased and subpixel rendered text on a display.

首先编译其依赖库

本文使用的交叉编译器

arm-himix200-linux

交叉编译freetype

https://mirror.yongbok.net/nongnu/freetype/freetype-2.10.1.tar.xz

./configure --with-zlib=no --with-png=no  --enable-freetype-config \
CC=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-gcc \
CXX=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-g++ \
--host=arm-himix200-linux  \
--prefix=/opt/hisi-linux/x86-arm/lib/freetype

make 

make install

交叉编译libxml2

ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz

./configure --without-python --without-zlib \
CC=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-gcc \
CXX=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-g++ \
--host=arm-himix200-linux  \
--prefix=/opt/hisi-linux/x86-arm/lib/xml2

make 

make install

交叉编译uuid

https://nchc.dl.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz

./configure --prefix=/opt/hisi-linux/x86-arm/lib/uuid \
--host=arm-himix200-linux \
CC=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-gcc \
CXX=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-g++

make 

make install

交叉编译expat

交叉编译dbus

将以上几个依赖库中/lib/pkgconfig中的 .pc 文件拷贝到PKG_CONFIG_PATH所指定的目录里,
本文中为/opt/hisi-linux/x86-arm/arm-himix200-linux/target/lib/pkgconfig.

交叉编译fontconfig

https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.1.tar.bz2

./configure --with-arch=arm --disable-docs \
--host=arm-himix200-linux \
--prefix=/opt/hisi-linux/x86-arm/lib/fontconfig \
CC=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-gcc \
CXX=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin/arm-himix200-linux-g++ \
--with-expat=/opt/hisi-linux/x86-arm/lib/expat \
--with-expat-lib=-L/opt/hisi-linux/x86-arm/lib/expat/lib \
--with-expat-includes=-I/opt/hisi-linux/x86-arm/lib/expat/include \
--with-xmldir=/opt/hisi-linux/lib/libxml2/ \
--with-freetype-config=/opt/hisi-linux/x86-arm/lib/freetype/bin/freetype-config \
--with-pkgconfigdir=/opt/hisi-linux/x86-arm/arm-himix200-linux/target/lib/pkgconfig \
FREETYPE_LIBS=-L/opt/hisi-linux/x86-arm/lib/freetype/lib \
FREETYPE_CFLAGS=-I/opt/hisi-linux/x86-arm/lib/freetype/include/freetype2/freetype \
--enable-libxml2  \
UUID_LIBS=-L/opt/hisi-linux/x86-arm/lib/uuid/lib \
UUID_CFLAGS=-I/opt/hisi-linux/x86-arm/lib/uuid/include/uuid

make 

make install 

记得把fontconfig安装目录中的fontconfig.pc文件也拷贝到PKG_CONFIG_PATH方便其他软件查找.
至此,fontconfig库已经交叉编译完成.

发布了7 篇原创文章 · 获赞 0 · 访问量 356

猜你喜欢

转载自blog.csdn.net/qq_21438461/article/details/104360373
今日推荐