Author: ken Date: Wed Sep 27 17:11:55 2017 New Revision: 3641 Log: firefox: Update versions in system graphite2_harfbuzz patch to match 56.0.
Added: trunk/firefox/firefox-56.0-system_graphite2_harfbuzz-1.patch Added: trunk/firefox/firefox-56.0-system_graphite2_harfbuzz-1.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/firefox/firefox-56.0-system_graphite2_harfbuzz-1.patch Wed Sep 27 17:11:55 2017 (r3641) @@ -0,0 +1,276 @@ +Submitted By: Ken Moffat <ken at linuxfromscratch dot org> +Date: 2017-09-28 +Initial Package Version: 56.0 +Upstream Status: Waiting for review (mozilla bug 847568) +Origin: OpenBSD (via gentoo), plain text version at +https://svnweb.freebsd.org/ports/head/www/firefox/files/patch-bug847568?revision=447501&view=co +Description: Allow use of system versions of graphite2 and harfbuzz. +Add the options --with-system-graphite2 and --with-system-harfbuzz to use this. +Originally taken from gentoo, +https://dev.gentoo.org/~anarchy/mozilla/patchsets/ and +https://dev.gentoo.org/~axs/mozilla/patchsets/. +Version for harfbuzz increased for 56.0 + +diff -Naur a/config/Makefile.in b/config/Makefile.in +--- a/config/Makefile.in 2017-06-15 21:52:02.000000000 +0100 ++++ b/config/Makefile.in 2017-09-25 22:54:40.446215992 +0100 +@@ -41,6 +41,8 @@ + $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \ + -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \ + -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \ ++ -DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \ ++ -DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \ + -DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \ + -DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \ + -DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \ +diff -Naur a/config/system-headers b/config/system-headers +--- a/config/system-headers 2017-09-14 21:15:53.000000000 +0100 ++++ b/config/system-headers 2017-09-25 22:54:40.446215992 +0100 +@@ -1268,6 +1268,15 @@ + libsn/sn-monitor.h + libsn/sn-util.h + #endif ++#if MOZ_SYSTEM_GRAPHITE2==1 ++graphite2/Font.h ++graphite2/Segment.h ++#endif ++#if MOZ_SYSTEM_HARFBUZZ==1 ++harfbuzz/hb-glib.h ++harfbuzz/hb-ot.h ++harfbuzz/hb.h ++#endif + #if MOZ_SYSTEM_HUNSPELL==1 + hunspell.hxx + #endif +diff -Naur a/dom/base/moz.build b/dom/base/moz.build +--- a/dom/base/moz.build 2017-09-14 21:15:55.000000000 +0100 ++++ b/dom/base/moz.build 2017-09-25 22:54:40.446215992 +0100 +@@ -476,6 +476,9 @@ + if CONFIG['MOZ_X11']: + CXXFLAGS += CONFIG['TK_CFLAGS'] + ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + GENERATED_FILES += [ + 'PropertyUseCounterMap.inc', + 'UseCounterList.h', +diff -Naur a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh +--- a/gfx/graphite2/moz-gr-update.sh 2017-06-15 21:52:35.000000000 +0100 ++++ b/gfx/graphite2/moz-gr-update.sh 2017-09-25 22:54:40.447216493 +0100 +@@ -1,6 +1,7 @@ + #!/bin/bash + + # Script used to update the Graphite2 library in the mozilla source tree ++# and bump version for --with-system-graphite2 + + # 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 @@ + #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/;" {} \; + ++# chase version for --with-system-graphite2 ++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \ ++ if /GR2_VERSION_REQUIRE/" old-configure.in ++ + # summarize what's been touched + echo Updated to $RELEASE. + echo Here is what changed in the gfx/graphite2 directory: + echo + +-hg stat gfx/graphite2 ++hg stat old-configure.in gfx/graphite2 + + echo + echo If gfx/graphite2/src/files.mk has changed, please make corresponding +diff -Naur a/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla +--- a/gfx/harfbuzz/README-mozilla 2017-09-14 21:15:57.000000000 +0100 ++++ b/gfx/harfbuzz/README-mozilla 2017-09-25 22:54:40.447216493 +0100 +@@ -19,3 +19,8 @@ + + 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 toolkit/moz.configure in sync ++with checkout version or increment latest tag by one if it's not based ++on upstream release. +diff -Naur a/gfx/moz.build b/gfx/moz.build +--- a/gfx/moz.build 2017-06-15 21:52:35.000000000 +0100 ++++ b/gfx/moz.build 2017-09-25 22:54:40.447216493 +0100 +@@ -10,6 +10,12 @@ + if CONFIG['MOZ_TREE_CAIRO']: + DIRS += ['cairo'] + ++if not CONFIG['MOZ_SYSTEM_GRAPHITE2']: ++ DIRS += ['graphite2/src' ] ++ ++if not CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ DIRS += ['harfbuzz/src'] ++ + DIRS += [ + '2d', + 'ycbcr', +@@ -18,8 +24,6 @@ + 'qcms', + 'gl', + 'layers', +- 'graphite2/src', +- 'harfbuzz/src', + 'ots/src', + 'thebes', + 'ipc', +diff -Naur a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py +--- a/gfx/skia/generate_mozbuild.py 2017-07-31 17:20:55.000000000 +0100 ++++ b/gfx/skia/generate_mozbuild.py 2017-09-25 22:54:40.447216493 +0100 +@@ -133,6 +133,9 @@ + '-Wno-unused-private-field', + ] + ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'): + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] +diff -Naur a/gfx/skia/moz.build b/gfx/skia/moz.build +--- a/gfx/skia/moz.build 2017-07-31 17:20:55.000000000 +0100 ++++ b/gfx/skia/moz.build 2017-09-25 22:54:40.447216493 +0100 +@@ -775,6 +775,9 @@ + '-Wno-unused-private-field', + ] + ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'): + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] +diff -Naur a/gfx/thebes/moz.build b/gfx/thebes/moz.build +--- a/gfx/thebes/moz.build 2017-09-14 21:15:58.000000000 +0100 ++++ b/gfx/thebes/moz.build 2017-09-25 22:54:40.447216493 +0100 +@@ -271,7 +271,13 @@ + + LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] + +-DEFINES['GRAPHITE2_STATIC'] = True ++if CONFIG['MOZ_SYSTEM_GRAPHITE2']: ++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] ++else: ++ DEFINES['GRAPHITE2_STATIC'] = True ++ ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + + if CONFIG['CLANG_CXX']: + # Suppress warnings from Skia header files. +diff -Naur a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build +--- a/intl/unicharutil/util/moz.build 2017-06-15 21:51:57.000000000 +0100 ++++ b/intl/unicharutil/util/moz.build 2017-09-25 22:54:40.447216493 +0100 +@@ -29,4 +29,7 @@ + 'ICUUtils.cpp', + ] + ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + FINAL_LIBRARY = 'xul' +diff -Naur a/netwerk/dns/moz.build b/netwerk/dns/moz.build +--- a/netwerk/dns/moz.build 2017-06-15 21:52:27.000000000 +0100 ++++ b/netwerk/dns/moz.build 2017-09-25 22:54:40.447216493 +0100 +@@ -69,6 +69,9 @@ + '/netwerk/base', + ] + ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['ENABLE_INTL_API']: + DEFINES['IDNA2008'] = True + USE_LIBS += ['icu'] +diff -Naur a/old-configure.in b/old-configure.in +--- a/old-configure.in 2017-09-14 21:15:53.000000000 +0100 ++++ b/old-configure.in 2017-09-25 22:54:40.447216493 +0100 +@@ -4396,6 +4396,27 @@ + AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR) + + 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,10) ++ #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 -Naur a/toolkit/library/moz.build b/toolkit/library/moz.build +--- a/toolkit/library/moz.build 2017-09-14 21:16:01.000000000 +0100 ++++ b/toolkit/library/moz.build 2017-09-25 22:54:40.447216493 +0100 +@@ -212,6 +212,12 @@ + if CONFIG['MOZ_SYSTEM_PNG']: + OS_LIBS += CONFIG['MOZ_PNG_LIBS'] + ++if CONFIG['MOZ_SYSTEM_GRAPHITE2']: ++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] ++ ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS'] ++ + if CONFIG['MOZ_SYSTEM_HUNSPELL']: + OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] + +diff -Naur a/toolkit/moz.configure b/toolkit/moz.configure +--- a/toolkit/moz.configure 2017-09-14 21:16:01.000000000 +0100 ++++ b/toolkit/moz.configure 2017-09-25 22:54:40.447216493 +0100 +@@ -314,6 +314,34 @@ + add_old_configure_assignment('_HAVE_FREETYPE2', + depends_if(freetype2_info)(lambda _: True)) + ++# Graphite2 ++# ============================================================== ++option('--with-system-graphite2', ++ help="Use system graphite2 (located with pkgconfig)") ++ ++@depends('--with-system-graphite2') ++def check_for_graphite2(value): ++ return bool(value) ++ ++system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', ++ when=check_for_graphite2) ++ ++set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True)) ++ ++# HarfBuzz ++# ============================================================== ++option('--with-system-harfbuzz', ++ help="Use system harfbuzz (located with pkgconfig)") ++ ++@depends('--with-system-harfbuzz') ++def check_for_harfbuzz(value): ++ return bool(value) ++ ++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.7', ++ when=check_for_harfbuzz) ++ ++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) ++ + # Apple platform decoder support + # ============================================================== + @depends(toolkit) -- http://lists.linuxfromscratch.org/listinfo/patches FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page