Kaydet (Commit) 75aacd87 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Download and build FreeType and fontconfig for Android

It will probably be simplest to just use FreeType on Android,
too. (Android uses it itself, but doesn't provide its API publicly.)

Probably fontconfig, too, although there shouldn't be much
configuration per se that a LibreOffice-baed app would have to do at
run-time; it will have to bundle all fonts it is going to use anyway,
I think, so all font information is known a priori. But maybe in the
future there will be user-installable system fonts on Android, or
something.
üst 6a43a6c1
...@@ -263,6 +263,10 @@ linux-androideabi*) ...@@ -263,6 +263,10 @@ linux-androideabi*)
AC_MSG_ERROR([You need to set the $var environment variable in a cross-compilation for Android. See README.cross for an example.]) AC_MSG_ERROR([You need to set the $var environment variable in a cross-compilation for Android. See README.cross for an example.])
fi fi
done done
BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
FREETYPE_TARBALL=dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.bz2
FONTCONFIG_TARBALL=77e15a92006ddc2adbb06f840d591c0e-fontconfig-2.8.0.tar.gz
;; ;;
*) *)
...@@ -282,6 +286,8 @@ AC_SUBST(OSVERSION) ...@@ -282,6 +286,8 @@ AC_SUBST(OSVERSION)
AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_LIBS)
AC_SUBST(FREETYPE_TARBALL)
AC_SUBST(FONTCONFIG_TARBALL)
############################################################################### ###############################################################################
# Extensions switches --enable/--disable # Extensions switches --enable/--disable
......
--- misc/build/fontconfig-2.8.0/config.sub
+++ misc/build/fontconfig-2.8.0/config.sub
@@ -120,7 +120,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ nto-qnx* | linux-androideabi* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -1272,7 +1272,7 @@
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -udi* | -androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
--- misc/build/fontconfig-2.8.0/configure
+++ misc/build/fontconfig-2.8.0/configure
@@ -14073,7 +14073,7 @@
no)
;;
*)
- EXPAT_LIBS="-L$expat_lib -lexpat"
+ EXPAT_LIBS="-L$expat_lib -lexpat_xmlparse -lexpat_xmltok"
;;
esac
--- misc/build/fontconfig-2.8.0/src/fcxml.c
+++ misc/build/fontconfig-2.8.0/src/fcxml.c
@@ -1123,6 +1123,7 @@
* Have to swap the decimal point to match the current locale
* if that locale doesn't use 0x2e
*/
+#ifndef __ANDROID__
if ((dot = strchr (s, 0x2e)) &&
(locale_data = localeconv ()) &&
(locale_data->decimal_point[0] != 0x2e ||
@@ -1158,6 +1158,7 @@
}
}
else
+#endif
v = strtod (s, end);
return v;
}
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME=fontconfig
TARGET=fontconfig
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
TARFILE_NAME=fontconfig-2.8.0
TARFILE_MD5=77e15a92006ddc2adbb06f840d591c0e
PATCH_FILES=$(TARFILE_NAME).patch
CONFIGURE_ACTION=./configure
CONFIGURE_FLAGS=\
--disable-static \
--with-arch=arm \
--with-expat-includes=$(SOLARVER)/$(INPATH)/inc/external \
--with-expat-lib=$(SOLARVER)/$(INPATH)/lib \
--with-freetype-config=$(SOLARVER)/$(INPATH)/bin/freetype-config \
--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
BUILD_ACTION=$(GNUMAKE)
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
fc libfontconfig : FREETYPE:freetype NULL
fc libfontconfig usr1 - u fc_mkout NULL
fc libfontconfig nmake - u fc_libfontconfig NULL
..\%__SRC%\misc\build\fontconfig*\src\.libs\*.so %_DEST%\lib
mkdir: %_DEST%\inc\external\fontconfig
..\%__SRC%\misc\build\fontconfig*\fontconfig\*.h %_DEST%\inc\external\fontconfig
--- misc/build/freetype-2.4.8/builds/unix/configure
+++ misc/build/freetype-2.4.8/builds/unix/configure
@@ -3619,7 +3619,7 @@
if test "x$GCC" = xyes; then
XX_CFLAGS="-Wall"
- XX_ANSIFLAGS="-pedantic -ansi"
+ XX_ANSIFLAGS=
else
case "$host" in
*-dec-osf*)
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME=freetype
TARGET=freetype
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
TARFILE_NAME=freetype-2.4.8
TARFILE_MD5=dbf2caca1d3afd410a29217a9809d397
PATCH_FILES=$(TARFILE_NAME).patch
CONFIGURE_ACTION=./configure
CONFIGURE_FLAGS=\
--disable-static \
--without-zlib \
--without-bzip2 \
--prefix=$(SOLARVER)/$(INPATH) --includedir=$(SOLARVER)/$(INPATH)/inc/external \
--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
BUILD_ACTION=chmod +x builds/unix/freetype-config && $(GNUMAKE)
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
ft libfreetype : NULL
ft libfreetype usr1 - u ft_mkout NULL
ft libfreetype nmake - u ft_libfreetype NULL
..\%__SRC%\misc\build\freetype*\objs\.libs\*.so %_DEST%\lib
..\%__SRC%\misc\build\freetype*\builds\unix\freetype-config %_DEST%\bin
mkdir: %_DEST%\inc\external\freetype2\freetype\config
..\%__SRC%\misc\build\freetype*\include\ft2build.h %_DEST%\inc\external\freetype2
..\%__SRC%\misc\build\freetype*\include\freetype\*.h %_DEST%\inc\external\freetype2\freetype
..\%__SRC%\misc\build\freetype*\include\freetype\config\*.h %_DEST%\inc\external\freetype2\freetype\config
...@@ -93,6 +93,8 @@ a8b25a0bf696fd126a08319d88998492-libvisio-0.0.11.tar.bz2 ...@@ -93,6 +93,8 @@ a8b25a0bf696fd126a08319d88998492-libvisio-0.0.11.tar.bz2
7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz 7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz
cc8eb870d6a324d36575420efd856319-libcdr-0.0.0.tar.bz2 cc8eb870d6a324d36575420efd856319-libcdr-0.0.0.tar.bz2
@GOOGLE_DOCS_EXTENSION_PACK@ @GOOGLE_DOCS_EXTENSION_PACK@
@FREETYPE_TARBALL@
@FONTCONFIG_TARBALL@
http://dev-www.libreoffice.org/extern http://dev-www.libreoffice.org/extern
185d60944ea767075d27247c3162b3bc-unowinreg.dll 185d60944ea767075d27247c3162b3bc-unowinreg.dll
http://ooo.itc.hu/oxygenoffice/download/libreoffice/ http://ooo.itc.hu/oxygenoffice/download/libreoffice/
...@@ -119,4 +121,3 @@ http://ooo.itc.hu/oxygenoffice/download/libreoffice/ ...@@ -119,4 +121,3 @@ http://ooo.itc.hu/oxygenoffice/download/libreoffice/
@SUNTEMPLATES_FR_PACK@ @SUNTEMPLATES_FR_PACK@
@SUNTEMPLATES_HU_PACK@ @SUNTEMPLATES_HU_PACK@
@SUNTEMPLATES_IT_PACK@ @SUNTEMPLATES_IT_PACK@
vc vcl : TRANSLATIONS:translations apple_remote BOOST:boost DESKTOP:rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offapi basegfx basebmp tools DESKTOP:l10ntools icc cpputools svl LIBXSLT:libxslt CAIRO:cairo NULL vc vcl : TRANSLATIONS:translations apple_remote BOOST:boost DESKTOP:rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offapi basegfx basebmp tools DESKTOP:l10ntools icc cpputools svl LIBXSLT:libxslt CAIRO:cairo FREETYPE:freetype FONTCONFIG:fontconfig NULL
vc vcl usr1 - all vc_mkout NULL vc vcl usr1 - all vc_mkout NULL
vc vcl\prj nmake - all vc_prj NULL vc vcl\prj nmake - all vc_prj NULL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment