Changeset View
Changeset View
Standalone View
Standalone View
www/firefox/files/patch-bug847568
# Allow building against system-wide graphite2/harfbuzz. | # Allow building against system-wide graphite2/harfbuzz. | ||||
diff --git config/system-headers.mozbuild config/system-headers.mozbuild | diff --git config/system-headers.mozbuild config/system-headers.mozbuild | ||||
index 7620b4d00623..09d3db5ca8c0 100644 | index 7620b4d00623..09d3db5ca8c0 100644 | ||||
--- config/system-headers.mozbuild | --- config/system-headers.mozbuild | ||||
+++ config/system-headers.mozbuild | +++ config/system-headers.mozbuild | ||||
@@ -1295,6 +1295,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: | @@ -1299,6 +1299,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: | ||||
'proxy.h', | 'proxy.h', | ||||
] | ] | ||||
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']: | +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: | ||||
+ system_headers += [ | + system_headers += [ | ||||
+ 'graphite2/Font.h', | + 'graphite2/Font.h', | ||||
+ 'graphite2/Segment.h', | + 'graphite2/Segment.h', | ||||
+ ] | + ] | ||||
+ | + | ||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | ||||
+ system_headers += [ | + system_headers += [ | ||||
+ 'harfbuzz/hb-glib.h', | + 'harfbuzz/hb-glib.h', | ||||
+ 'harfbuzz/hb-ot.h', | + 'harfbuzz/hb-ot.h', | ||||
+ 'harfbuzz/hb.h', | + 'harfbuzz/hb.h', | ||||
+ ] | + ] | ||||
+ | + | ||||
if CONFIG['MOZ_SYSTEM_LIBVPX']: | if CONFIG['MOZ_SYSTEM_LIBVPX']: | ||||
system_headers += [ | system_headers += [ | ||||
'vpx_mem/vpx_mem.h', | 'vpx_mem/vpx_mem.h', | ||||
diff --git dom/base/moz.build dom/base/moz.build | diff --git dom/base/moz.build dom/base/moz.build | ||||
index 8e19020315ae..2fcdbb6f7b42 100644 | index 8e19020315ae..2fcdbb6f7b42 100644 | ||||
--- dom/base/moz.build | --- dom/base/moz.build | ||||
+++ dom/base/moz.build | +++ dom/base/moz.build | ||||
@@ -539,6 +539,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/andr | @@ -543,6 +543,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']: | ||||
if CONFIG['MOZ_X11']: | if CONFIG['MOZ_X11']: | ||||
CXXFLAGS += CONFIG['TK_CFLAGS'] | CXXFLAGS += CONFIG['TK_CFLAGS'] | ||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | ||||
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] | ||||
+ | + | ||||
GENERATED_FILES += [ | GeneratedFile('UseCounterList.h', script='gen-usecounters.py', | ||||
'PropertyUseCounterMap.inc', | entry_point='use_counter_list', inputs=['UseCounters.conf']) | ||||
'UseCounterList.h', | |||||
diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh | diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh | ||||
index faaab1b17971..04eff5f09882 100644 | index faaab1b17971..04eff5f09882 100644 | ||||
--- gfx/graphite2/moz-gr-update.sh | --- gfx/graphite2/moz-gr-update.sh | ||||
+++ gfx/graphite2/moz-gr-update.sh | +++ gfx/graphite2/moz-gr-update.sh | ||||
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | ||||
#!/bin/bash | #!/bin/bash | ||||
# Script used to update the Graphite2 library in the mozilla source tree | # Script used to update the Graphite2 library in the mozilla source tree | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | ||||
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] | ||||
+ | + | ||||
FINAL_LIBRARY = 'xul' | FINAL_LIBRARY = 'xul' | ||||
diff --git netwerk/dns/moz.build netwerk/dns/moz.build | diff --git netwerk/dns/moz.build netwerk/dns/moz.build | ||||
index 79c26e3e7001..c4d93bc5f7dc 100644 | index 79c26e3e7001..c4d93bc5f7dc 100644 | ||||
--- netwerk/dns/moz.build | --- netwerk/dns/moz.build | ||||
+++ netwerk/dns/moz.build | +++ netwerk/dns/moz.build | ||||
@@ -90,3 +90,6 @@ USE_LIBS += ['icu'] | @@ -86,3 +86,6 @@ USE_LIBS += ['icu'] | ||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): | if CONFIG['CC_TYPE'] in ('clang', 'gcc'): | ||||
CXXFLAGS += ['-Wno-error=shadow'] | CXXFLAGS += ['-Wno-error=shadow'] | ||||
+ | + | ||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | ||||
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] | + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] | ||||
diff --git old-configure.in old-configure.in | diff --git old-configure.in old-configure.in | ||||
index 95a58b634593..b614eef85c89 100644 | index 95a58b634593..b614eef85c89 100644 | ||||
--- old-configure.in | --- old-configure.in | ||||
+++ old-configure.in | +++ old-configure.in | ||||
@@ -2665,5 +2665,26 @@ dnl ================================================== | @@ -2639,6 +2639,27 @@ dnl ======================================================== | ||||
AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR) | AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR) | ||||
dnl ======================================================== | +dnl ======================================================== | ||||
+dnl Check for graphite2 | +dnl Check for graphite2 | ||||
+dnl ======================================================== | +dnl ======================================================== | ||||
+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then | +if test -n "$MOZ_SYSTEM_GRAPHITE2"; then | ||||
+ dnl graphite2.pc has bogus version, check manually | + dnl graphite2.pc has bogus version, check manually | ||||
+ _SAVE_CFLAGS=$CFLAGS | + _SAVE_CFLAGS=$CFLAGS | ||||
+ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" | + CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" | ||||
+ AC_TRY_COMPILE([ #include <graphite2/Font.h> | + AC_TRY_COMPILE([ #include <graphite2/Font.h> | ||||
+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ | + #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ | ||||
+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ | + ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ | ||||
+ * 100 + GR2_VERSION_BUGFIX >= \ | + * 100 + GR2_VERSION_BUGFIX >= \ | ||||
+ (major) * 10000 + (minor) * 100 + (bugfix) ) | + (major) * 10000 + (minor) * 100 + (bugfix) ) | ||||
+ ], [ | + ], [ | ||||
+ #if !GR2_VERSION_REQUIRE(1,3,12) | + #if !GR2_VERSION_REQUIRE(1,3,12) | ||||
+ #error "Insufficient graphite2 version." | + #error "Insufficient graphite2 version." | ||||
+ #endif | + #endif | ||||
+ ], [], | + ], [], | ||||
+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) | + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) | ||||
+ CFLAGS=$_SAVE_CFLAGS | + CFLAGS=$_SAVE_CFLAGS | ||||
+fi | +fi | ||||
+ | + | ||||
+dnl ======================================================== | dnl ======================================================== | ||||
dnl Check for pixman and cairo | dnl Check for pixman and cairo | ||||
dnl ======================================================== | dnl ======================================================== | ||||
diff --git toolkit/library/moz.build toolkit/library/moz.build | diff --git toolkit/library/moz.build toolkit/library/moz.build | ||||
index 24f940e1ed7e..079a575adec3 100644 | index 24f940e1ed7e..079a575adec3 100644 | ||||
--- toolkit/library/moz.build | --- toolkit/library/moz.build | ||||
+++ toolkit/library/moz.build | +++ toolkit/library/moz.build | ||||
@@ -254,6 +254,12 @@ if CONFIG['MOZ_SYSTEM_PNG']: | @@ -248,6 +248,12 @@ if CONFIG['MOZ_SYSTEM_PNG']: | ||||
if CONFIG['MOZ_SYSTEM_WEBP']: | if CONFIG['MOZ_SYSTEM_WEBP']: | ||||
OS_LIBS += CONFIG['MOZ_WEBP_LIBS'] | OS_LIBS += CONFIG['MOZ_WEBP_LIBS'] | ||||
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']: | +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: | ||||
+ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] | + OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] | ||||
+ | + | ||||
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: | ||||
+ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS'] | + OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS'] | ||||
+ | + | ||||
if CONFIG['MOZ_SYSTEM_LIBEVENT']: | if CONFIG['MOZ_SYSTEM_LIBEVENT']: | ||||
OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] | OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] | ||||
diff --git toolkit/moz.configure toolkit/moz.configure | diff --git toolkit/moz.configure toolkit/moz.configure | ||||
index 9297e4d6f501..d8e273887e4b 100644 | index 9297e4d6f501..d8e273887e4b 100644 | ||||
--- toolkit/moz.configure | --- toolkit/moz.configure | ||||
+++ toolkit/moz.configure | +++ toolkit/moz.configure | ||||
@@ -927,6 +927,25 @@ add_old_configure_assignment('FT2_LIBS', | @@ -937,6 +937,25 @@ add_old_configure_assignment('FT2_LIBS', | ||||
add_old_configure_assignment('FT2_CFLAGS', | add_old_configure_assignment('FT2_CFLAGS', | ||||
ft2_info.cflags) | ft2_info.cflags) | ||||
+# Graphite2 | +# Graphite2 | ||||
+# ============================================================== | +# ============================================================== | ||||
+option('--with-system-graphite2', | +option('--with-system-graphite2', | ||||
+ help="Use system graphite2 (located with pkgconfig)") | + help="Use system graphite2 (located with pkgconfig)") | ||||
+ | + | ||||
+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', | +system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', | ||||
+ when='--with-system-graphite2') | + when='--with-system-graphite2') | ||||
+ | + | ||||
+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True)) | +set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True)) | ||||
+ | + | ||||
+# HarfBuzz | +# HarfBuzz | ||||
+# ============================================================== | +# ============================================================== | ||||
+option('--with-system-harfbuzz', | +option('--with-system-harfbuzz', | ||||
+ help="Use system harfbuzz (located with pkgconfig)") | + help="Use system harfbuzz (located with pkgconfig)") | ||||
+ | + | ||||
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.6.1', | +system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.6.2', | ||||
+ when='--with-system-harfbuzz') | + when='--with-system-harfbuzz') | ||||
+ | + | ||||
+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) | +set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) | ||||
# Remote agent (part of CDP based remote protocol) | # Remote agent (part of CDP based remote protocol) | ||||
# ============================================================== | # ============================================================== |