diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 688c83d1ad6..d8a401e264b 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -474,6 +474,8 @@ endif QCMS_LIBS = @QCMS_LIBS@ MOZ_HARFBUZZ_LIBS = @MOZ_HARFBUZZ_LIBS@ +MOZ_GRAPHITE_LIBS = @MOZ_GRAPHITE_LIBS@ +MOZ_GRAPHITE = @MOZ_GRAPHITE@ MOZ_OTS_LIBS = @MOZ_OTS_LIBS@ MOZ_SKIA_LIBS = @MOZ_SKIA_LIBS@ diff --git a/config/stl-headers b/config/stl-headers index 92f20dcb55a..b0d44c6d01e 100644 --- a/config/stl-headers +++ b/config/stl-headers @@ -20,18 +20,20 @@ new algorithm deque iostream +iterator limits list map memory +set stack string +utility vector -set cassert climits cstdarg cstdio cstdlib cstring -utility +cwchar diff --git a/configure.in b/configure.in index 571bc888795..54684cad9d2 100644 --- a/configure.in +++ b/configure.in @@ -4653,6 +4653,7 @@ USE_ARM_KUSER= BUILD_CTYPES=1 MOZ_USE_NATIVE_POPUP_WINDOWS= MOZ_ANDROID_HISTORY= +MOZ_GRAPHITE=1 case "${target}" in *darwin*) @@ -8177,6 +8178,18 @@ dnl ======================================================== MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)' 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 OTS dnl ======================================================== diff --git a/gfx/Makefile.in b/gfx/Makefile.in index ffb9747c139..d1d57023f7c 100644 --- a/gfx/Makefile.in +++ b/gfx/Makefile.in @@ -48,6 +48,10 @@ ifdef MOZ_TREE_CAIRO DIRS = cairo endif +ifdef MOZ_GRAPHITE +DIRS += graphite2/src +endif + DIRS += 2d ycbcr angle src qcms gl layers harfbuzz/src ots/src thebes ipc ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT))) diff --git a/gfx/graphite2/src/Makefile.in b/gfx/graphite2/src/Makefile.in new file mode 100644 index 00000000000..3ed1ce9711c --- /dev/null +++ b/gfx/graphite2/src/Makefile.in @@ -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 +# +# 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)) + diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index e59f3976bc6..fdea4fc092b 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -383,6 +383,10 @@ EXTRA_DSO_LDOPTS += \ $(SQLITE_LIBS) \ $(NULL) +ifdef MOZ_GRAPHITE +EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE_LIBS) +endif + ifdef MOZ_NATIVE_ZLIB EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) else