Bug 1305145 - Move --enable-tree-freetype to Python configure. r=glandium

This commit also removes the option, as it's only known to work
on Android, where it is the default.

MozReview-Commit-ID: JqdC5Q5dwQH
This commit is contained in:
Chris Manchester 2016-10-14 11:06:31 -07:00
Родитель a3e6682857
Коммит f63cec632c
3 изменённых файлов: 29 добавлений и 29 удалений

Просмотреть файл

@ -230,7 +230,6 @@ def old_configure_options(*options):
'--enable-tasktracer',
'--enable-thread-sanitizer',
'--enable-trace-logging',
'--enable-tree-freetype',
'--enable-ui-locale',
'--enable-universalchardet',
'--enable-updater',

Просмотреть файл

@ -2341,7 +2341,6 @@ esac
case "${target}" in
*-android*|*-linuxandroid*)
MOZ_THEME_FASTSTRIPE=1
MOZ_TREE_FREETYPE=1
MOZ_RAW=1
;;
@ -3817,33 +3816,13 @@ if test -n "$MOZ_USE_NATIVE_POPUP_WINDOWS"; then
AC_DEFINE(MOZ_USE_NATIVE_POPUP_WINDOWS)
fi
dnl ========================================================
dnl Build Freetype in the tree
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(tree-freetype,
[ --enable-tree-freetype Enable Tree FreeType],
MOZ_TREE_FREETYPE=1,
MOZ_TREE_FREETYPE= )
if test -n "$MOZ_TREE_FREETYPE"; then
if test -n "$_WIN32_MSVC"; then
AC_ERROR("building with in-tree freetype is not supported on MSVC")
fi
AC_DEFINE(MOZ_TREE_FREETYPE)
AC_SUBST(MOZ_TREE_FREETYPE)
MOZ_ENABLE_CAIRO_FT=1
FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
FT2_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
CAIRO_FT_OSLIBS=''
AC_DEFINE(HAVE_FT_BITMAP_SIZE_Y_PPEM)
AC_DEFINE(HAVE_FT_GLYPHSLOT_EMBOLDEN)
AC_DEFINE(HAVE_FT_LOAD_SFNT_TABLE)
AC_SUBST_LIST(CAIRO_FT_CFLAGS)
fi
AC_SUBST_LIST(FT2_CFLAGS)
AC_SUBST_LIST(FT2_LIBS)
AC_CHECK_PROGS(WGET, wget, "")
AC_SUBST(WGET)
@ -5067,7 +5046,7 @@ if test "$USE_FC_FREETYPE"; then
dnl ========================================================
dnl = Check for freetype2 functionality
dnl ========================================================
if test "$_HAVE_FREETYPE2"; then
if test "$_HAVE_FREETYPE2" -a -z "$MOZ_TREE_FREETYPE"; then
_SAVE_LIBS="$LIBS"
_SAVE_CFLAGS="$CFLAGS"
LIBS="$LIBS $FT2_LIBS"
@ -5215,8 +5194,6 @@ if test "$MOZ_TREE_CAIRO"; then
AC_SUBST(QT_SURFACE_FEATURE)
AC_SUBST(TEE_SURFACE_FEATURE)
MOZ_CAIRO_OSLIBS='${CAIRO_FT_OSLIBS}'
if test "$MOZ_X11"; then
MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_OSLIBS $XLDFLAGS -lXrender"
fi

Просмотреть файл

@ -307,11 +307,35 @@ def freetype2_combined_info(fontconfig_info, freetype2_info):
add_old_configure_assignment('_HAVE_FREETYPE2',
depends_if(freetype2_info)(lambda _: True))
add_old_configure_assignment('FT2_LIBS',
delayed_getattr(freetype2_combined_info, 'libs'))
add_old_configure_assignment('FT2_CFLAGS',
delayed_getattr(freetype2_combined_info, 'cflags'))
# Build Freetype in the tree
# ==============================================================
@depends(target)
def tree_freetype(target):
if target.os == 'Android':
return True
set_define('MOZ_TREE_FREETYPE', tree_freetype)
set_config('MOZ_TREE_FREETYPE', tree_freetype)
add_old_configure_assignment('MOZ_TREE_FREETYPE', tree_freetype)
set_define('HAVE_FT_BITMAP_SIZE_Y_PPEM', tree_freetype)
set_define('HAVE_FT_GLYPHSLOT_EMBOLDEN', tree_freetype)
set_define('HAVE_FT_LOAD_SFNT_TABLE', tree_freetype)
@depends(freetype2_combined_info, tree_freetype, check_build_environment)
def ft2_info(freetype2_combined_info, tree_freetype, build_env):
if tree_freetype:
return namespace(cflags=('-I%s/modules/freetype2/include' % build_env.topsrcdir,),
libs=())
if freetype2_combined_info:
return freetype2_combined_info
set_config('FT2_LIBS', delayed_getattr(ft2_info, 'libs'))
add_old_configure_assignment('FT2_LIBS',
delayed_getattr(ft2_info, 'libs'))
add_old_configure_assignment('FT2_CFLAGS',
delayed_getattr(ft2_info, 'cflags'))
# Apple platform decoder support
# ==============================================================