Build freetype and fontconfig statically for Android

This commit is contained in:
Tor Lillqvist
2012-04-19 21:10:00 +03:00
parent d83e45ae9c
commit 0d1c24e5f6
6 changed files with 23 additions and 4 deletions

View File

@@ -183,6 +183,12 @@ $(call gb_LinkTarget__use_expat,$(1),expat_xmlparse)
endef
ifeq ($(OS),ANDROID)
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
fontconfig \
freetype \
))
endif
ifeq ($(SYSTEM_HUNSPELL),YES)
@@ -478,7 +484,12 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(FREETYPE_CFLAGS) \
)
ifneq ($(OS),ANDROID)
$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
else
$(call gb_LinkTarget_use_static_libraries,$(1),freetype)
endif
endef
@@ -487,7 +498,12 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(FONTCONFIG_CFLAGS) \
)
ifneq ($(OS),ANDROID)
$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
else
$(call gb_LinkTarget_use_static_libraries,$(1),fontconfig)
endif
endef

View File

@@ -47,8 +47,10 @@ CONFIGURE_ACTION=./configure
CONFIGURE_ACTION!:=CFLAGS=-g $(CONFIGURE_ACTION)
.ENDIF
# This "bundled" fontconfig is built only when cross-compiling for Android
CONFIGURE_FLAGS=\
--disable-static \
--disable-shared \
--with-arch=arm \
--with-expat-includes=$(SOLARVER)/$(INPATH)/inc/external \
--with-expat-lib=$(SOLARVER)/$(INPATH)/lib \

View File

@@ -1,4 +1,4 @@
..\%__SRC%\misc\build\fontconfig*\src\.libs\*.so %_DEST%\lib
..\%__SRC%\misc\build\fontconfig*\src\.libs\*.a %_DEST%\lib
mkdir: %_DEST%\inc\external\fontconfig
..\%__SRC%\misc\build\fontconfig*\fontconfig\*.h %_DEST%\inc\external\fontconfig

View File

@@ -44,7 +44,7 @@ PATCH_FILES=$(TARFILE_NAME).patch
CONFIGURE_ACTION=./configure
CONFIGURE_FLAGS=\
--disable-static \
--disable-shared \
--without-zlib \
--without-bzip2 \
--prefix=$(SOLARVER)/$(INPATH) --includedir=$(SOLARVER)/$(INPATH)/inc/external \

View File

@@ -1,4 +1,4 @@
..\%__SRC%\misc\build\freetype*\objs\.libs\*.so %_DEST%\lib
..\%__SRC%\misc\build\freetype*\objs\.libs\*.a %_DEST%\lib
..\%__SRC%\misc\build\freetype*\builds\unix\freetype-config %_DEST%\bin

View File

@@ -501,6 +501,7 @@ $(eval $(call gb_Library_use_libraries,vcl,\
$(eval $(call gb_Library_use_externals,vcl,\
fontconfig \
freetype \
expat_utf8 \
))
endif