Merge pull request #3201 from glennw/fc-platform-fixup

Unify fontconfig source code so that one branch builds on both linux + android
This commit is contained in:
glennw 2014-09-04 15:01:14 +10:00
commit 941d9402af
5 changed files with 30 additions and 37 deletions

10
.gitmodules vendored
View file

@ -61,10 +61,6 @@
[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/servo/rust-xlib.git url = https://github.com/servo/rust-xlib.git
[submodule "src/platform/linux/fontconfig"]
path = src/platform/linux/fontconfig
url = https://github.com/servo/fontconfig.git
ignore = dirty
[submodule "src/support/skia/skia"] [submodule "src/support/skia/skia"]
path = src/support/skia/skia path = src/support/skia/skia
url = https://github.com/servo/skia.git url = https://github.com/servo/skia.git
@ -86,9 +82,6 @@
[submodule "src/support/png/libpng"] [submodule "src/support/png/libpng"]
path = src/support/png/libpng path = src/support/png/libpng
url = https://github.com/servo/libpng.git url = https://github.com/servo/libpng.git
[submodule "src/platform/android/fontconfig"]
path = src/platform/android/fontconfig
url = https://github.com/servo/fontconfig.git
[submodule "src/platform/android/libexpat"] [submodule "src/platform/android/libexpat"]
path = src/platform/android/libexpat path = src/platform/android/libexpat
url = https://github.com/servo/libexpat.git url = https://github.com/servo/libexpat.git
@ -127,3 +120,6 @@
[submodule "src/support/ssl/rust-openssl"] [submodule "src/support/ssl/rust-openssl"]
path = src/support/ssl/rust-openssl path = src/support/ssl/rust-openssl
url = https://github.com/servo/rust-openssl.git url = https://github.com/servo/rust-openssl.git
[submodule "src/platform/fontconfig/fontconfig"]
path = src/platform/fontconfig/fontconfig
url = https://github.com/servo/fontconfig.git

54
configure vendored
View file

@ -411,7 +411,7 @@ case ${TARGET_OSTYPE} in
probe CFG_CXX arm-linux-androideabi-g++ probe CFG_CXX arm-linux-androideabi-g++
probe CFG_LD arm-linux-androideabi-ld probe CFG_LD arm-linux-androideabi-ld
probe CFG_AR arm-linux-androideabi-ar probe CFG_AR arm-linux-androideabi-ar
probe CFG_RANLIB arm-linux-androideabi-ranlib probe CFG_RANLIB arm-linux-androideabi-ranlib
export PATH=${OLD_PATH} export PATH=${OLD_PATH}
;; ;;
@ -426,7 +426,7 @@ case ${TARGET_OSTYPE} in
fi fi
probe CFG_LD ld probe CFG_LD ld
probe CFG_AR ar probe CFG_AR ar
probe CFG_RANLIB ranlib probe CFG_RANLIB ranlib
CFG_RUSTC_FLAGS="" CFG_RUSTC_FLAGS=""
;; ;;
esac esac
@ -560,7 +560,7 @@ if [ $CFG_OSTYPE = "unknown-linux-gnu" ]
then then
CFG_SUBMODULES="\ CFG_SUBMODULES="\
platform/linux/rust-xlib \ platform/linux/rust-xlib \
platform/linux/fontconfig \ platform/fontconfig/fontconfig \
support/glfw/glfw \ support/glfw/glfw \
support/glfw/glfw-rs \ support/glfw/glfw-rs \
platform/linux/rust-fontconfig \ platform/linux/rust-fontconfig \
@ -576,7 +576,7 @@ CFG_SUBMODULES="\
support/egl/rust-egl \ support/egl/rust-egl \
platform/android/libexpat \ platform/android/libexpat \
platform/android/libfreetype2 \ platform/android/libfreetype2 \
platform/android/fontconfig \ platform/fontconfig/fontconfig \
platform/linux/rust-fontconfig \ platform/linux/rust-fontconfig \
platform/linux/rust-freetype \ platform/linux/rust-freetype \
${CFG_SUBMODULES}" ${CFG_SUBMODULES}"
@ -665,7 +665,7 @@ for i in ${CFG_SUBMODULES}
do do
if [ -d ${CFG_BUILD_DIR}src/${i} ] if [ -d ${CFG_BUILD_DIR}src/${i} ]
then then
cd ${CFG_BUILD_DIR}src/${i} cd ${CFG_BUILD_DIR}src/${i}
fi fi
CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/configure" CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/configure"
CONFIGURE_ARGS="" CONFIGURE_ARGS=""
@ -682,33 +682,31 @@ do
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot" CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-zlib" CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-zlib"
;; ;;
platform/linux/fontconfig) platform/fontconfig/fontconfig)
CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh" CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --sysconfdir=/etc" if [ ${CFG_OSTYPE} = "linux-androideabi" ]; then
CONFIGURE_ARGS="${CONFIGURE_ARGS} --localstatedir=/var" CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux-androideabi"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-docs" CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-arch=arm"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-shared" # work around Rust #12557 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat-includes=${CFG_SRC_DIR}src/platform/android/libexpat/expat/lib"
if [ -f /etc/redhat-release ]; then CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat-lib=${CFG_BUILD_DIR}src/platform/android/libexpat/.libs"
# Some RedHat-based distros (including our CentOS 6 build machines) are missing CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot"
# pkg-config files for expat: https://bugzilla.redhat.com/show_bug.cgi?id=833338 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-cache-dir=${CFG_ANDROID_RESOURCE_PATH}/.fccache"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat=/usr" CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-confdir=${CFG_ANDROID_RESOURCE_PATH}/.fcconfig"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-default-fonts=${CFG_ANDROID_FONT_PATH}"
else
CONFIGURE_ARGS="${CONFIGURE_ARGS} --sysconfdir=/etc"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --localstatedir=/var"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-docs"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-shared" # work around Rust #12557
if [ -f /etc/redhat-release ]; then
# Some RedHat-based distros (including our CentOS 6 build machines) are missing
# pkg-config files for expat: https://bugzilla.redhat.com/show_bug.cgi?id=833338
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat=/usr"
fi
fi fi
# --enable-debug isn't supported by fontconfig # --enable-debug isn't supported by fontconfig
ENABLE_DEBUG= ENABLE_DEBUG=
;; ;;
platform/android/fontconfig)
CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/autogen.sh"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --host=arm-linux-androideabi"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-arch=arm"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat-includes=${CFG_SRC_DIR}src/platform/android/libexpat/expat/lib"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-expat-lib=${CFG_BUILD_DIR}src/platform/android/libexpat/.libs"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-sysroot=${CFG_ANDROID_CROSS_PATH}/sysroot"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-cache-dir=${CFG_ANDROID_RESOURCE_PATH}/.fccache"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-confdir=${CFG_ANDROID_RESOURCE_PATH}/.fcconfig"
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-default-fonts=${CFG_ANDROID_FONT_PATH}"
# --enable-debug isn't supported by fontconfig
ENABLE_DEBUG=
;;
support/spidermonkey/mozjs) support/spidermonkey/mozjs)
# needed because Spidermonkey configure is in non-standard location # needed because Spidermonkey configure is in non-standard location
CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/js/src/configure" CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/${i}/js/src/configure"
@ -764,7 +762,7 @@ do
fi fi
if [ -f ${CONFIGURE_SCRIPT} ]; then if [ -f ${CONFIGURE_SCRIPT} ]; then
(sh -c "${EXTRA_CONFIGURE_ARGS} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}") || exit $? (sh -c "${EXTRA_CONFIGURE_ARGS} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}") || exit $?
fi fi
done done

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

@ -0,0 +1 @@
Subproject commit 23161fabaa1505bfc21cf663be9447f4e720cb76

@ -1 +0,0 @@
Subproject commit 0450af3d92f1fb4f269cc64e58647871a5bf7288