bug 631479 (part 2) - compile graphite2 as part of the gfx build. r=jdaggett,khuey
authorJonathan Kew <jfkthame@gmail.com>
Fri, 09 Dec 2011 22:32:29 +0000
changeset 82403 c25e81047a9e
parent 82402 0973ce3ecd5d
child 82404 f51fc55403ba
push id21592
push userbmo@edmorley.co.uk
push dateSun, 11 Dec 2011 04:01:06 +0000
treeherdermozilla-central@f5578fdc50ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett, khuey
bugs631479
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 631479 (part 2) - compile graphite2 as part of the gfx build. r=jdaggett,khuey
config/autoconf.mk.in
config/stl-headers
configure.in
gfx/Makefile.in
gfx/graphite2/src/Makefile.in
toolkit/library/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -469,16 +469,18 @@ else
 PNG_CFLAGS	= @MOZ_PNG_CFLAGS@
 PNG_LIBS	= @MOZ_PNG_LIBS@
 PNG_REQUIRES	= png
 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@
 
 MOZ_NATIVE_SQLITE = @MOZ_NATIVE_SQLITE@
 SQLITE_CFLAGS     = @SQLITE_CFLAGS@
 SQLITE_LIBS       = @SQLITE_LIBS@
 
 NSPR_CONFIG	= @NSPR_CONFIG@
--- a/config/stl-headers
+++ b/config/stl-headers
@@ -15,23 +15,25 @@
 new
 
 # FIXME: these headers haven't been reviewed yet, but we use them
 # unsafely in Gecko, so we might as well prevent them from
 # throwing exceptions
 algorithm
 deque
 iostream
+iterator
 limits
 list
 map
 memory
+set
 stack
 string
+utility
 vector
-set
 cassert
 climits
 cstdarg
 cstdio
 cstdlib
 cstring
-utility
+cwchar
--- a/configure.in
+++ b/configure.in
@@ -4648,16 +4648,17 @@ MOZ_DISABLE_DOMCRYPTO=
 NSS_DISABLE_DBM=
 NECKO_WIFI=1
 NECKO_COOKIES=1
 NECKO_PROTOCOLS_DEFAULT="about data file ftp http res viewsource websocket wyciwyg device"
 USE_ARM_KUSER=
 BUILD_CTYPES=1
 MOZ_USE_NATIVE_POPUP_WINDOWS=
 MOZ_ANDROID_HISTORY=
+MOZ_GRAPHITE=1
 
 case "${target}" in
 *darwin*)
     ACCESSIBILITY=
     ;;
 *)
     ACCESSIBILITY=1
     ;;
@@ -8173,16 +8174,28 @@ AC_SUBST(QCMS_LIBS)
 
 dnl ========================================================
 dnl HarfBuzz
 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 ========================================================
 MOZ_OTS_LIBS='$(DEPTH)/gfx/ots/src/$(LIB_PREFIX)mozots.$(LIB_SUFFIX)'
 AC_SUBST(MOZ_OTS_LIBS)
 
 dnl ========================================================
 dnl Skia 
 dnl ========================================================
--- a/gfx/Makefile.in
+++ b/gfx/Makefile.in
@@ -43,16 +43,20 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= gfx
 
 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)))
 DIRS        += skia
 endif
 
 ifdef ENABLE_TESTS
 TOOL_DIRS	+= tests
new file mode 100644
--- /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 <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))
+
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -378,16 +378,20 @@ EXTRA_DSO_LDOPTS += \
   $(NSS_LIBS) \
   $(MOZ_CAIRO_LIBS) \
   $(MOZ_HARFBUZZ_LIBS) \
   $(MOZ_OTS_LIBS) \
   $(MOZ_APP_EXTRA_LIBS) \
   $(SQLITE_LIBS) \
   $(NULL)
 
+ifdef MOZ_GRAPHITE
+EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE_LIBS)
+endif
+
 ifdef MOZ_NATIVE_ZLIB
 EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
 else
 EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
 endif
 
 ifdef MOZ_NATIVE_HUNSPELL
 EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)