bug 631479 (part 2) - compile graphite2 as part of the gfx build. r=jdaggett,khuey

This commit is contained in:
Jonathan Kew 2011-12-09 22:32:29 +00:00
parent 81938a4898
commit ed5870ac14
6 changed files with 109 additions and 2 deletions

View File

@ -474,6 +474,8 @@ endif
QCMS_LIBS = @QCMS_LIBS@ QCMS_LIBS = @QCMS_LIBS@
MOZ_HARFBUZZ_LIBS = @MOZ_HARFBUZZ_LIBS@ MOZ_HARFBUZZ_LIBS = @MOZ_HARFBUZZ_LIBS@
MOZ_GRAPHITE_LIBS = @MOZ_GRAPHITE_LIBS@
MOZ_GRAPHITE = @MOZ_GRAPHITE@
MOZ_OTS_LIBS = @MOZ_OTS_LIBS@ MOZ_OTS_LIBS = @MOZ_OTS_LIBS@
MOZ_SKIA_LIBS = @MOZ_SKIA_LIBS@ MOZ_SKIA_LIBS = @MOZ_SKIA_LIBS@

View File

@ -20,18 +20,20 @@ new
algorithm algorithm
deque deque
iostream iostream
iterator
limits limits
list list
map map
memory memory
set
stack stack
string string
utility
vector vector
set
cassert cassert
climits climits
cstdarg cstdarg
cstdio cstdio
cstdlib cstdlib
cstring cstring
utility cwchar

View File

@ -4653,6 +4653,7 @@ USE_ARM_KUSER=
BUILD_CTYPES=1 BUILD_CTYPES=1
MOZ_USE_NATIVE_POPUP_WINDOWS= MOZ_USE_NATIVE_POPUP_WINDOWS=
MOZ_ANDROID_HISTORY= MOZ_ANDROID_HISTORY=
MOZ_GRAPHITE=1
case "${target}" in case "${target}" in
*darwin*) *darwin*)
@ -8177,6 +8178,18 @@ dnl ========================================================
MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)' MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
AC_SUBST(MOZ_HARFBUZZ_LIBS) AC_SUBST(MOZ_HARFBUZZ_LIBS)
dnl ========================================================
dnl SIL Graphite
dnl ========================================================
if test "$MOZ_GRAPHITE"; then
MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)'
AC_DEFINE(MOZ_GRAPHITE)
else
MOZ_GRAPHITE_LIBS=
fi
AC_SUBST(MOZ_GRAPHITE)
AC_SUBST(MOZ_GRAPHITE_LIBS)
dnl ======================================================== dnl ========================================================
dnl OTS dnl OTS
dnl ======================================================== dnl ========================================================

View File

@ -48,6 +48,10 @@ ifdef MOZ_TREE_CAIRO
DIRS = cairo DIRS = cairo
endif endif
ifdef MOZ_GRAPHITE
DIRS += graphite2/src
endif
DIRS += 2d ycbcr angle src qcms gl layers harfbuzz/src ots/src thebes ipc DIRS += 2d ycbcr angle src qcms gl layers harfbuzz/src ots/src thebes ipc
ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT))) ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT)))

View File

@ -0,0 +1,82 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Gecko-Graphite2 integration.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Jonathan Kew <jfkthame@gmail.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
# parameters for the Graphite2 files.mk fragment
_NS =
_BASE = $(srcdir)/..
ifdef GNU_CC
_MACHINE = direct
else
_MACHINE = call
endif
# get the lists of source files and exported headers
include $(srcdir)/files.mk
MODULE = graphite2
LIBRARY_NAME = mozgraphite2
LIBXUL_LIBRARY = 1
# MSVC doesn't like the paths in _SOURCES, so strip off the prefix
# and leave bare filenames
CPPSRCS = $(subst $($(_NS)_BASE)/src/,,$(_SOURCES))
EXPORTS_NAMESPACES = graphite2
EXPORTS_graphite2 = $(_PUBLIC_HEADERS)
FORCE_STATIC_LIB = 1
FORCE_USE_PIC = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -DPACKAGE_VERSION="\"moz\""
DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
# disable features we don't need in the graphite2 code, to reduce code size
DEFINES += -DDISABLE_FILE_FACE -DDISABLE_TRACING -DDISABLE_SEGCACHE
# Filter out -pedantic so that direct_machine.cpp can use computed goto
CXXFLAGS := $(filter-out -pedantic,$(CXXFLAGS))
CFLAGS := $(filter-out -pedantic,$(CFLAGS))

View File

@ -383,6 +383,10 @@ EXTRA_DSO_LDOPTS += \
$(SQLITE_LIBS) \ $(SQLITE_LIBS) \
$(NULL) $(NULL)
ifdef MOZ_GRAPHITE
EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE_LIBS)
endif
ifdef MOZ_NATIVE_ZLIB ifdef MOZ_NATIVE_ZLIB
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
else else