Build Fontconfig 2.11 in-tree on Linux

After applying this patch, on Linux you will need to

    ../configure
    make clean-rust-azure clean-fontconfig clean-rust-fontconfig

Fixes #1752.
This commit is contained in:
Keegan McAllister 2014-02-25 13:25:03 -08:00
parent ab72c473cd
commit ff189fca9b
7 changed files with 27 additions and 5 deletions

3
.gitmodules vendored
View file

@ -61,6 +61,9 @@
[submodule "src/platform/linux/rust-xlib"] [submodule "src/platform/linux/rust-xlib"]
path = src/platform/linux/rust-xlib path = src/platform/linux/rust-xlib
url = https://github.com/mozilla-servo/rust-xlib.git url = https://github.com/mozilla-servo/rust-xlib.git
[submodule "src/platform/linux/fontconfig"]
path = src/platform/linux/fontconfig
url = https://github.com/mozilla-servo/fontconfig.git
[submodule "src/support/skia/skia"] [submodule "src/support/skia/skia"]
path = src/support/skia/skia path = src/support/skia/skia
url = https://github.com/mozilla-servo/skia.git url = https://github.com/mozilla-servo/skia.git

View file

@ -25,8 +25,8 @@ On Debian-based Linuxes:
``` sh ``` sh
sudo apt-get install autoconf2.13 curl freeglut3-dev libtool \ sudo apt-get install autoconf2.13 curl freeglut3-dev libtool \
libfreetype6-dev libfontconfig1-dev libgl1-mesa-dri libglib2.0-dev \ libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
xorg-dev msttcorefonts msttcorefonts gperf
``` ```
On Debian-based Linuxes (cross-compilation for Android): On Debian-based Linuxes (cross-compilation for Android):

10
configure vendored
View file

@ -524,6 +524,7 @@ if [ $CFG_OSTYPE = "unknown-linux-gnu" ]
then then
CFG_SUBMODULES="\ CFG_SUBMODULES="\
platform/linux/rust-xlib \ platform/linux/rust-xlib \
platform/linux/fontconfig \
support/glfw/glfw \ support/glfw/glfw \
support/glfw/glfw-rs \ support/glfw/glfw-rs \
platform/linux/rust-fontconfig \ platform/linux/rust-fontconfig \
@ -621,7 +622,7 @@ then
cd ${CFG_BUILD_DIR} cd ${CFG_BUILD_DIR}
fi fi
#fontconfig expects to use an installed freetype, but we want to override that behavior to use our version # fontconfig expects to use an installed freetype, but we want to use our version on Android
if [ $CFG_OSTYPE = "linux-androideabi" ] if [ $CFG_OSTYPE = "linux-androideabi" ]
then then
export FREETYPE_CFLAGS="-I${CFG_SRC_DIR}src/platform/android/libfreetype2/include -I${CFG_BUILD_DIR}src/platform/android/libfreetype2/include" export FREETYPE_CFLAGS="-I${CFG_SRC_DIR}src/platform/android/libfreetype2/include -I${CFG_BUILD_DIR}src/platform/android/libfreetype2/include"
@ -681,6 +682,13 @@ do
CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-zlib" CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-zlib"
CONFIGURE_ARGS="${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}" CONFIGURE_ARGS="${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}"
;; ;;
platform/linux/fontconfig)
CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --sysconfdir=/etc"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --localstatedir=/var"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-shared" # work around Rust #12557
CONFIGURE_ARGS="${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}"
;;
platform/android/fontconfig) platform/android/fontconfig)
CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh" CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux-androideabi" CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux-androideabi"

View file

@ -156,6 +156,7 @@ ifeq ($(CFG_OSTYPE),unknown-linux-gnu)
DEPS_rust-azure += \ DEPS_rust-azure += \
rust-freetype \ rust-freetype \
rust-fontconfig \ rust-fontconfig \
fontconfig \
rust-xlib \ rust-xlib \
rust \ rust \
$(NULL) $(NULL)
@ -167,6 +168,15 @@ DEPS_rust-layers += \
rust-xlib \ rust-xlib \
rust \ rust \
$(NULL) $(NULL)
DEPS_rust-fontconfig += \
fontconfig \
rust \
$(NULL)
NATIVE_BUILD += \
fontconfig \
$(NULL)
endif endif
ifeq ($(CFG_OSTYPE),linux-androideabi) ifeq ($(CFG_OSTYPE),linux-androideabi)

@ -0,0 +1 @@
Subproject commit b2cfb1f4b3561e01a58359cd18929457a0486db7

@ -1 +1 @@
Subproject commit f3d71aa708eb44736c4fe526fbf1bb55010c623b Subproject commit 34f83d9c614d5e1cc10bff4628450db3a4807902

@ -1 +1 @@
Subproject commit e632b98a30eb84c333852e0bc0a68b1b6a7faf02 Subproject commit 3dd39e85d326a4704367166c106643e8780a8a34