summaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug847568
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/files/patch-bug847568')
-rw-r--r--www/firefox/files/patch-bug847568216
1 files changed, 109 insertions, 107 deletions
diff --git a/www/firefox/files/patch-bug847568 b/www/firefox/files/patch-bug847568
index db4ae1da1fb8..79de8056823b 100644
--- a/www/firefox/files/patch-bug847568
+++ b/www/firefox/files/patch-bug847568
@@ -1,20 +1,7 @@
# Allow building against system-wide graphite2/harfbuzz.
-diff --git build/moz.configure/old.configure build/moz.configure/old.configure
-index 4cbefd5..42ab554 100644
---- build/moz.configure/old.configure
-+++ build/moz.configure/old.configure
-@@ -312,6 +312,8 @@ def old_configure_options(*options):
- '--with-sixgill',
- '--with-soft-float',
- '--with-system-bz2',
-+ '--with-system-graphite2',
-+ '--with-system-harfbuzz',
- '--with-system-icu',
- '--with-system-jpeg',
- '--with-system-libevent',
diff --git config/Makefile.in config/Makefile.in
-index 14bfc0d..5383399 100644
+index 10807cf..f4b8587 100644
--- config/Makefile.in
+++ config/Makefile.in
@@ -49,6 +49,8 @@ export:: $(export-preqs)
@@ -23,14 +10,14 @@ index 14bfc0d..5383399 100644
-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
+ -DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \
+ -DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
- $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
+ $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)
diff --git config/system-headers config/system-headers
-index 18e8703..bdc5f82 100644
+index 48afa0f..61612f6 100644
--- config/system-headers
+++ config/system-headers
-@@ -1344,3 +1344,11 @@ unicode/utypes.h
+@@ -1331,3 +1331,12 @@ unicode/utypes.h
#endif
libutil.h
unwind.h
@@ -39,79 +26,26 @@ index 18e8703..bdc5f82 100644
+graphite2/Segment.h
+#endif
+#if MOZ_SYSTEM_HARFBUZZ==1
++harfbuzz/hb-glib.h
+harfbuzz/hb-ot.h
+harfbuzz/hb.h
+#endif
-diff --git old-configure.in configure.in
-index ac38f40..87536b7 100644
---- old-configure.in
-+++ old-configure.in
-@@ -7989,6 +7989,49 @@ if test "$USE_FC_FREETYPE"; then
- fi
-
- dnl ========================================================
-+dnl Check for harfbuzz
-+dnl ========================================================
-+
-+MOZ_ARG_WITH_BOOL(system-harfbuzz,
-+[ --with-system-harfbuzz Use system harfbuzz (located with pkgconfig)],
-+MOZ_SYSTEM_HARFBUZZ=1,
-+MOZ_SYSTEM_HARFBUZZ=)
-+
-+if test -n "$MOZ_SYSTEM_HARFBUZZ"; then
-+ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 1.2.6)
-+fi
-+
-+AC_SUBST(MOZ_SYSTEM_HARFBUZZ)
-+
-+dnl ========================================================
-+dnl Check for graphite2
-+dnl ========================================================
-+
-+MOZ_ARG_WITH_BOOL(system-graphite2,
-+[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
-+MOZ_SYSTEM_GRAPHITE2=1,
-+MOZ_SYSTEM_GRAPHITE2=)
-+
-+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
-+ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
-+
-+ dnl graphite2.pc has bogus version, check manually
-+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
-+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
-+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
-+ * 100 + GR2_VERSION_BUGFIX >= \
-+ (major) * 10000 + (minor) * 100 + (bugfix) )
-+ ], [
-+ #if !GR2_VERSION_REQUIRE(1,3,8)
-+ #error "Insufficient graphite2 version."
-+ #endif
-+ ], [],
-+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
-+fi
-+
-+AC_SUBST(MOZ_SYSTEM_GRAPHITE2)
-+
-+dnl ========================================================
- dnl Check for pixman and cairo
- dnl ========================================================
-
diff --git dom/base/moz.build dom/base/moz.build
-index a660ba4..6b2f602 100644
+index 6e0d4f5..0770717 100644
--- dom/base/moz.build
+++ dom/base/moz.build
-@@ -397,6 +397,9 @@ if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES += ['nsTextFragmentSSE2.cpp']
- SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
+@@ -457,6 +457,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+ if CONFIG['MOZ_X11']:
+ CXXFLAGS += CONFIG['TK_CFLAGS']
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
- EXTRA_COMPONENTS += [
- 'ConsoleAPI.manifest',
- 'ConsoleAPIStorage.js',
+ GENERATED_FILES += [
+ 'PropertyUseCounterMap.inc',
+ 'UseCounterList.h',
diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
-index f3d76ea..a9e7fb6 100644
+index faaab1b..04eff5f 100644
--- gfx/graphite2/moz-gr-update.sh
+++ gfx/graphite2/moz-gr-update.sh
@@ -1,6 +1,7 @@
@@ -122,7 +56,7 @@ index f3d76ea..a9e7fb6 100644
# This script lives in gfx/graphite2, along with the library source,
# but must be run from the top level of the mozilla-central tree.
-@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >>
+@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
@@ -141,20 +75,20 @@ index f3d76ea..a9e7fb6 100644
echo
echo If gfx/graphite2/src/files.mk has changed, please make corresponding
diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
-index ca57d16..1ce21fe 100644
+index 24e6cbb..0b7a5df 100644
--- gfx/harfbuzz/README-mozilla
+++ gfx/harfbuzz/README-mozilla
-@@ -18,3 +18,8 @@ the mozilla tree.
- In addition, the src/Makefile.in file here is NOT from upstream, nor is it
- generated from src/Makefile.am (the original harfbuzz version); it is a mozilla-
- specific makefile that is maintained by hand.
+@@ -20,3 +20,8 @@ the mozilla tree.
+
+ If the collection of source files changes, manual updates to moz.build may be
+ needed, as we don't use the upstream makefiles.
+
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
+Make sure to keep pkg-config version check within old-configure.in in sync
+with checkout version or increment latest tag by one if it's not based
+on upstream release.
diff --git gfx/moz.build gfx/moz.build
-index 519aa46..6929751 100644
+index 2509198..5cc4663 100644
--- gfx/moz.build
+++ gfx/moz.build
@@ -7,6 +7,12 @@
@@ -180,38 +114,38 @@ index 519aa46..6929751 100644
'thebes',
'ipc',
diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
-index 28fa6b5..240dced 100755
+index ab1365f..8897c27 100755
--- gfx/skia/generate_mozbuild.py
+++ gfx/skia/generate_mozbuild.py
-@@ -134,6 +134,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_
+@@ -140,6 +140,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
diff --git gfx/skia/moz.build gfx/skia/moz.build
-index 1d0c2f9..adb8941 100644
+index a2f914b..d3759b0 100644
--- gfx/skia/moz.build
+++ gfx/skia/moz.build
-@@ -752,6 +752,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_
+@@ -664,6 +664,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
-index d5852fa..aeeab25 100644
+index bbbce6fd..db0ceb1 100644
--- gfx/thebes/moz.build
+++ gfx/thebes/moz.build
-@@ -306,7 +306,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk
+@@ -289,7 +289,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
@@ -226,19 +160,55 @@ index d5852fa..aeeab25 100644
if CONFIG['CLANG_CXX']:
# Suppress warnings from Skia header files.
-index d736943..41a931f 100644
+diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
+index 9754753..768cc7d 100644
--- intl/unicharutil/util/moz.build
+++ intl/unicharutil/util/moz.build
-@@ -44,4 +44,7 @@ if CONFIG['ENABLE_INTL_API']:
- LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
+@@ -42,4 +42,7 @@ if CONFIG['_MSC_VER']:
+ if CONFIG['ENABLE_INTL_API']:
USE_LIBS += ['icu']
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
DIST_INSTALL = True
+diff --git moz.configure moz.configure
+index e762576..196dafd 100644
+--- moz.configure
++++ moz.configure
+@@ -216,6 +216,30 @@ check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
+ check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
+ allow_missing=True)
+
++option('--with-system-graphite2',
++ help="Use system graphite2 (located with pkgconfig)")
++
++@depends('--with-system-graphite2', compile_environment)
++def check_for_graphite2(value, compile_env):
++ return value and compile_env
++
++system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
++ check_for_graphite2)
++
++set_config('MOZ_SYSTEM_GRAPHITE2', system_graphite2)
++
++option('--with-system-harfbuzz',
++ help="Use system harfbuzz (located with pkgconfig)")
++
++@depends('--with-system-harfbuzz', compile_environment)
++def check_for_harfbuzz(value, compile_env):
++ return value and compile_env
++
++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.2.6',
++ check_for_harfbuzz)
++
++set_config('MOZ_SYSTEM_HARFBUZZ', system_harfbuzz)
++
+ option('--enable-system-hunspell',
+ help="Use system hunspell (located with pkgconfig)")
+
diff --git netwerk/dns/moz.build netwerk/dns/moz.build
-index 0b0717a..2e665c9 100644
+index f788d9a..5662301 100644
--- netwerk/dns/moz.build
+++ netwerk/dns/moz.build
@@ -66,6 +66,9 @@ LOCAL_INCLUDES += [
@@ -248,16 +218,48 @@ index 0b0717a..2e665c9 100644
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19':
- LOCAL_INCLUDES += ['%' + '%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']]
+ if CONFIG['ENABLE_INTL_API']:
+ DEFINES['IDNA2008'] = True
+ USE_LIBS += ['icu']
+diff --git old-configure.in old-configure.in
+index 0070d48..9d1129f 100644
+--- old-configure.in
++++ old-configure.in
+@@ -5764,6 +5764,27 @@ if test "$USE_FC_FREETYPE"; then
+ fi
+
+ dnl ========================================================
++dnl Check for graphite2
++dnl ========================================================
++if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
++ dnl graphite2.pc has bogus version, check manually
++ _SAVE_CFLAGS=$CFLAGS
++ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
++ AC_TRY_COMPILE([ #include <graphite2/Font.h>
++ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
++ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
++ * 100 + GR2_VERSION_BUGFIX >= \
++ (major) * 10000 + (minor) * 100 + (bugfix) )
++ ], [
++ #if !GR2_VERSION_REQUIRE(1,3,8)
++ #error "Insufficient graphite2 version."
++ #endif
++ ], [],
++ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
++ CFLAGS=$_SAVE_CFLAGS
++fi
++
++dnl ========================================================
+ dnl Check for pixman and cairo
+ dnl ========================================================
diff --git toolkit/library/moz.build toolkit/library/moz.build
-index 67f0db9..d42137a 100644
+index a3d5450..2c684a7e 100644
--- toolkit/library/moz.build
+++ toolkit/library/moz.build
-@@ -231,6 +231,12 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']:
- if not CONFIG['MOZ_TREE_PIXMAN']:
- OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+@@ -217,6 +217,12 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
+ if CONFIG['MOZ_SYSTEM_PNG']:
+ OS_LIBS += CONFIG['MOZ_PNG_LIBS']
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
+ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
@@ -265,6 +267,6 @@ index 67f0db9..d42137a 100644
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
+
- if CONFIG['MOZ_OSS']:
- OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+ if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+ OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']