Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (efd767d2ce548178e615ad92ebadb4625dd7ef27)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (efd767d2ce548178e615ad92ebadb4625dd7ef27)
  • Date: Wed, 8 Mar 2017 02:57:23 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/HISTORY | 7
http/firefox/patches/2001_system_harfbuzz.patch | 283
++++++++++
http/firefox/patches/2002_system_graphite2.patch | 252
++++++++
http/firefox/patches/firefox-50.0-system_graphite2_harfbuzz-1.patch | 237
--------
4 files changed, 540 insertions(+), 239 deletions(-)

New commits:
commit efd767d2ce548178e615ad92ebadb4625dd7ef27
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: replaced old patch completely with two from FreeBSD

diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 6e1ef25..51a7efd 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,7 +1,10 @@
2017-03-07 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 52.0
- * patches/firefox-50.0-system_graphite2_harfbuzz-1.patch: updated to
- current version
+ * patches/firefox-50.0-system_graphite2_harfbuzz-1.patch: removed
+ obsolete patch, added more adequate patches below
+ * patches/2001_system_harfbuzz.patch,
+ patches/2002_system_graphite2.patch: added patches from FreeBSD
+

2017-02-06 Pavel Vinogradov <public AT sourcemage.org>
* PRE_BUILD: added a libevent 2.1.8 fix from BLFS
diff --git a/http/firefox/patches/2001_system_harfbuzz.patch
b/http/firefox/patches/2001_system_harfbuzz.patch
new file mode 100644
index 0000000..4ca31b3
--- /dev/null
+++ b/http/firefox/patches/2001_system_harfbuzz.patch
@@ -0,0 +1,283 @@
+From: Jan Beich <jbeich AT FreeBSD.org>
+
+Add ability to use system-harfbuzz instead of bundled.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=847568
+
+diff --git a/config/Makefile.in b/config/Makefile.in
+--- a/config/Makefile.in
++++ b/config/Makefile.in
+@@ -36,16 +36,17 @@ ifdef WRAP_SYSTEM_INCLUDES
+ export-preqs = \
+ $(call mkdir_deps,system_wrappers) \
+ $(NULL)
+
+ export:: $(export-preqs)
+ $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
+ -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
+ -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
++ -DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
+ -DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
+ -DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
+ -DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
+ -DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
+ -DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
+ -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
+ -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
+ -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
+diff --git a/config/system-headers b/config/system-headers
+--- a/config/system-headers
++++ b/config/system-headers
+@@ -1260,16 +1260,21 @@ zlib.h
+ #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
+ libsn/sn.h
+ libsn/sn-common.h
+ libsn/sn-launchee.h
+ libsn/sn-launcher.h
+ libsn/sn-monitor.h
+ libsn/sn-util.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
+ #if MOZ_SYSTEM_BZ2==1
+ bzlib.h
+ #endif
+ #ifdef MOZ_ENABLE_GIO
+ gio/gio.h
+diff --git a/dom/base/moz.build b/dom/base/moz.build
+--- a/dom/base/moz.build
++++ b/dom/base/moz.build
+@@ -472,16 +472,19 @@ include('/ipc/chromium/chromium-config.m
+ FINAL_LIBRARY = 'xul'
+
+ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+ DEFINES['HAVE_SIDEBAR'] = True
+
+ if CONFIG['MOZ_X11']:
+ CXXFLAGS += CONFIG['TK_CFLAGS']
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ GENERATED_FILES += [
+ 'PropertyUseCounterMap.inc',
+ 'UseCounterList.h',
+ ]
+
+ countermap = GENERATED_FILES['PropertyUseCounterMap.inc']
+ countermap.script = 'gen-usecounters.py:property_map'
+ countermap.inputs = ['UseCounters.conf']
+diff --git a/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla
+--- a/gfx/harfbuzz/README-mozilla
++++ b/gfx/harfbuzz/README-mozilla
+@@ -14,8 +14,13 @@ this file when updating harfbuzz, and ch
+
+ The normal approach to updating harfbuzz, therefore, is to pull the latest
HB
+ source into a scratch directory and do a local build; then copy the original
+ sources AND the generated header mentioned above from the build directory
into
+ 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 toolkit/moz.configure in
sync
++with checkout version or increment latest tag by one if it's not based
++on upstream release.
+diff --git a/gfx/moz.build b/gfx/moz.build
+--- a/gfx/moz.build
++++ b/gfx/moz.build
+@@ -2,26 +2,28 @@
+ # vim: set filetype=python:
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ if CONFIG['MOZ_TREE_CAIRO']:
+ DIRS += ['cairo']
+
++if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ DIRS += ['harfbuzz/src']
++
+ DIRS += [
+ '2d',
+ 'ycbcr',
+ 'angle',
+ 'src',
+ 'qcms',
+ 'gl',
+ 'layers',
+ 'graphite2/src',
+- 'harfbuzz/src',
+ 'ots/src',
+ 'thebes',
+ 'ipc',
+ 'vr',
+ 'config',
+ ]
+
+ if CONFIG['MOZ_ENABLE_SKIA']:
+diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
+--- a/gfx/skia/generate_mozbuild.py
++++ b/gfx/skia/generate_mozbuild.py
+@@ -135,16 +135,19 @@ if CONFIG['GNU_CXX'] and not CONFIG['CLA
+ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+ CXXFLAGS += [
+ '-Wno-implicit-fallthrough',
+ '-Wno-inconsistent-missing-override',
+ '-Wno-macro-redefined',
+ '-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']
+
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+ """
+
+diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
+--- a/gfx/skia/moz.build
++++ b/gfx/skia/moz.build
+@@ -745,14 +745,17 @@ if CONFIG['GNU_CXX'] and not CONFIG['CLA
+ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+ CXXFLAGS += [
+ '-Wno-implicit-fallthrough',
+ '-Wno-inconsistent-missing-override',
+ '-Wno-macro-redefined',
+ '-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']
+
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
+--- a/gfx/thebes/moz.build
++++ b/gfx/thebes/moz.build
+@@ -263,11 +263,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('and
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+
+ LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
+ LOCAL_INCLUDES += ['/media/libyuv/include']
+
+ DEFINES['GRAPHITE2_STATIC'] = True
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['CLANG_CXX']:
+ # Suppress warnings from Skia header files.
+ SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
+diff --git a/intl/unicharutil/util/moz.build
b/intl/unicharutil/util/moz.build
+--- a/intl/unicharutil/util/moz.build
++++ b/intl/unicharutil/util/moz.build
+@@ -37,9 +37,12 @@ if CONFIG['_MSC_VER']:
+ DEFINES['_USE_ANSI_CPP'] = True
+ # Don't include directives about which CRT to use
+ CFLAGS += ['-Zl']
+ CXXFLAGS += ['-Zl']
+
+ if CONFIG['ENABLE_INTL_API']:
+ USE_LIBS += ['icu']
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ DIST_INSTALL = True
+diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build
+--- a/netwerk/dns/moz.build
++++ b/netwerk/dns/moz.build
+@@ -61,16 +61,19 @@ etld_data = GENERATED_FILES['etld_data.i
+ etld_data.script = 'prepare_tlds.py'
+ etld_data.inputs = ['effective_tld_names.dat']
+
+ # need to include etld_data.inc
+ LOCAL_INCLUDES += [
+ '/netwerk/base',
+ ]
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['ENABLE_INTL_API']:
+ DEFINES['IDNA2008'] = True
+ USE_LIBS += ['icu']
+ else:
+ UNIFIED_SOURCES += [
+ 'nameprep.c',
+ ]
+
+diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
+--- a/toolkit/library/moz.build
++++ b/toolkit/library/moz.build
+@@ -224,16 +224,19 @@ if CONFIG['SERVO_TARGET_DIR']:
+ OS_LIBS += ['-L%s' % CONFIG['SERVO_TARGET_DIR'], '-lgeckoservo']
+
+ if CONFIG['MOZ_SYSTEM_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_PNG']:
+ OS_LIBS += CONFIG['MOZ_PNG_LIBS']
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
++
+ if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+ OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -333,16 +333,30 @@ def ft2_info(freetype2_combined_info, tr
+ return freetype2_combined_info
+
+ set_config('FT2_LIBS', delayed_getattr(ft2_info, 'libs'))
+ add_old_configure_assignment('FT2_LIBS',
+ delayed_getattr(ft2_info, 'libs'))
+ add_old_configure_assignment('FT2_CFLAGS',
+ delayed_getattr(ft2_info, 'cflags'))
+
++# 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.3.3',
++ when=check_for_harfbuzz)
++
++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _:
True))
++
+ # Apple platform decoder support
+ # ==============================================================
+ @depends(toolkit)
+ def applemedia(toolkit):
+ if toolkit in ('cocoa', 'uikit'):
+ return True
+
+ set_config('MOZ_APPLEMEDIA', applemedia)
diff --git a/http/firefox/patches/2002_system_graphite2.patch
b/http/firefox/patches/2002_system_graphite2.patch
new file mode 100644
index 0000000..e76278f
--- /dev/null
+++ b/http/firefox/patches/2002_system_graphite2.patch
@@ -0,0 +1,252 @@
+From: Jan Beich <jbeich AT FreeBSD.org>
+
+Allow building against system-wide graphite2.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=847568
+
+diff --git a/config/Makefile.in b/config/Makefile.in
+--- a/config/Makefile.in
++++ b/config/Makefile.in
+@@ -36,16 +36,17 @@ ifdef WRAP_SYSTEM_INCLUDES
+ export-preqs = \
+ $(call mkdir_deps,system_wrappers) \
+ $(NULL)
+
+ export:: $(export-preqs)
+ $(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) \
+ -DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
+ -DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
+ -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
+ -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
+diff --git a/config/system-headers b/config/system-headers
+--- a/config/system-headers
++++ b/config/system-headers
+@@ -1260,16 +1260,20 @@ zlib.h
+ #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
+ libsn/sn.h
+ libsn/sn-common.h
+ libsn/sn-launchee.h
+ libsn/sn-launcher.h
+ 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 --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh
+--- a/gfx/graphite2/moz-gr-update.sh
++++ b/gfx/graphite2/moz-gr-update.sh
+@@ -1,11 +1,12 @@
+ #!/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.
+
+ # Run as
+ #
+ # ./gfx/graphite2/moz-gr-update.sh RELEASE
+ #
+@@ -32,22 +33,26 @@ echo "This directory contains the Graphi
+ echo "$TARBALL" >> gfx/graphite2/README.mozilla
+ echo ""
+ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
+
+ # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
+ #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
+ echo changes to gfx/graphite2/src/moz.build
+ echo
+
+ echo
+ echo Now use hg commands to create a patch for the mozilla tree.
+diff --git a/gfx/moz.build b/gfx/moz.build
+--- a/gfx/moz.build
++++ b/gfx/moz.build
+@@ -2,28 +2,30 @@
+ # vim: set filetype=python:
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ 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',
+ 'angle',
+ 'src',
+ 'qcms',
+ 'gl',
+ 'layers',
+- 'graphite2/src',
+ 'ots/src',
+ 'thebes',
+ 'ipc',
+ 'vr',
+ 'config',
+ ]
+
+ if CONFIG['MOZ_ENABLE_SKIA']:
+diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
+--- a/gfx/thebes/moz.build
++++ b/gfx/thebes/moz.build
+@@ -261,16 +261,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('and
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+
+ LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
+ LOCAL_INCLUDES += ['/media/libyuv/include']
+
+-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.
+ SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
+diff --git a/old-configure.in b/old-configure.in
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -5018,16 +5018,37 @@ if test "$USE_FC_FREETYPE"; then
+ CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
+ MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
+ [AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)],
[#include <fontconfig/fontconfig.h>])
+ CPPFLAGS="$_SAVE_CPPFLAGS"
+ fi
+ 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 ========================================================
+
+ MOZ_TREE_CAIRO=1
+ MOZ_ARG_ENABLE_BOOL(system-cairo,
+ [ --enable-system-cairo Use system cairo (located with pkgconfig)],
+ MOZ_TREE_CAIRO=,
+ MOZ_TREE_CAIRO=1 )
+diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
+--- a/toolkit/library/moz.build
++++ b/toolkit/library/moz.build
+@@ -224,16 +224,19 @@ if CONFIG['SERVO_TARGET_DIR']:
+ OS_LIBS += ['-L%s' % CONFIG['SERVO_TARGET_DIR'], '-lgeckoservo']
+
+ if CONFIG['MOZ_SYSTEM_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
+ 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']
+
+ if CONFIG['MOZ_SYSTEM_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -333,16 +333,30 @@ def ft2_info(freetype2_combined_info, tr
+ return freetype2_combined_info
+
+ set_config('FT2_LIBS', delayed_getattr(ft2_info, 'libs'))
+ add_old_configure_assignment('FT2_LIBS',
+ delayed_getattr(ft2_info, 'libs'))
+ add_old_configure_assignment('FT2_CFLAGS',
+ delayed_getattr(ft2_info, 'cflags'))
+
++# 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)
diff --git
a/http/firefox/patches/firefox-50.0-system_graphite2_harfbuzz-1.patch
b/http/firefox/patches/firefox-50.0-system_graphite2_harfbuzz-1.patch
deleted file mode 100644
index d315953..0000000
--- a/http/firefox/patches/firefox-50.0-system_graphite2_harfbuzz-1.patch
+++ /dev/null
@@ -1,237 +0,0 @@
-Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
-Date: 2016-11-15
-Initial Package Version: 50.0
-Upstream Status: Waiting for review (mozilla bug 847568)
-Origin: OpenBSD (via gentoo)
-Description: Allow use of system versions of graphite2 and harfbuzz. This
-should be regarded as experimental. Add the options --with-system-graphite2
-and --with-system-harfbuzz to use this (needs recent versions of both).
-The source of this latest version is from
-https://dev.gentoo.org/~axs/mozilla/patchsets/firefox-50.0-patches-01.tar.xz
-
---- a/config/Makefile.in 2016-06-06 16:14:57.000000000 -0400
-+++ b/config/Makefile.in 2016-06-27 13:48:05.161096423 -0400
-@@ -44,16 +44,18 @@
- -DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
- -DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
- -DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
- -DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
- -DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
- -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
- -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
- -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
-+ -DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \
-+ -DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
- $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL)
$(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
- $(INSTALL) system_wrappers $(DIST)
-
- GARBAGE_DIRS += system_wrappers
- endif
-
- ifdef WRAP_STL_INCLUDES
- ifdef GNU_CXX
---- a/config/system-headers
-+++ b/config/system-headers
-@@ -1335,3 +1335,11 @@
- libutil.h
- unwind.h
- fenv.h
-+#if MOZ_SYSTEM_GRAPHITE2==1
-+graphite2/Font.h
-+graphite2/Segment.h
-+#endif
-+#if MOZ_SYSTEM_HARFBUZZ==1
-+harfbuzz/hb-ot.h
-+harfbuzz/hb.h
-+#endif
---- a/gfx/graphite2/moz-gr-update.sh 2016-06-27 15:44:54.734282695 -0400
-+++ b/gfx/graphite2/moz-gr-update.sh 2016-06-27 15:45:49.624228377 -0400
-@@ -1,11 +1,12 @@
- #!/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.
-
- # Run as
- #
- # ./gfx/graphite2/moz-gr-update.sh RELEASE
- #
-@@ -32,22 +33,26 @@
- echo "$TARBALL" >> gfx/graphite2/README.mozilla
- echo ""
- echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
-
- # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
- #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
- echo changes to gfx/graphite2/src/moz.build
- echo
-
- echo
- echo Now use hg commands to create a patch for the mozilla tree.
---- a/old-configure.in 2016-06-27 15:58:22.753483108 -0400
-+++ b/old-configure.in 2016-06-27 15:59:47.073399669 -0400
-@@ -5023,6 +5023,51 @@
- 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)
-+ CFLAGS="$CFLAGS $MOZ_HARFBUZZ_CFLAGS"
-+ CXXFLAGS="$CXXFLAGS $MOZ_HARFBUZZ_CXXFLAGS"
-+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 ========================================================
-
---- a/toolkit/library/moz.build 2016-06-27 16:01:38.693289157 -0400
-+++ b/toolkit/library/moz.build 2016-06-27 16:01:50.413277443 -0400
-@@ -230,16 +230,22 @@
- OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
-
- if not CONFIG['MOZ_TREE_PIXMAN']:
- OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
-
- if CONFIG['MOZ_ALSA']:
- OS_LIBS += CONFIG['MOZ_ALSA_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['HAVE_CLOCK_MONOTONIC']:
- OS_LIBS += CONFIG['REALTIME_LIBS']
-
- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- OS_LIBS += [
- 'GLESv2',
- ]
-
---- a/build/moz.configure/old.configure 2016-06-28 12:49:10.152997194
-0400
-+++ b/build/moz.configure/old.configure 2016-06-28 12:54:11.052774364
-0400
-@@ -320,6 +320,8 @@
- '--with-sixgill',
- '--with-soft-float',
- '--with-system-bz2',
-+ '--with-system-graphite2',
-+ '--with-system-harfbuzz',
- '--with-system-icu',
- '--with-system-jpeg',
- '--with-system-libevent',
---- a/extensions/spellcheck/hunspell/glue/moz.build
-+++ b/extensions/spellcheck/hunspell/glue/moz.build
-@@ -38,4 +38,4 @@ if CONFIG['GNU_CXX']:
-
- # This variable is referenced in configure.in. Make sure to change that
file
- # too if you need to change this variable.
--DEFINES['HUNSPELL_STATIC'] = True
-+DEFINES['HUNSPELL_STATIC'] = not CONFIG['MOZ_SYSTEM_HUNSPELL']
-
---- a/gfx/moz.build 2016-08-01 12:14:28.000000000 -0400
-+++ b/gfx/moz.build 2016-08-31 16:07:28.908707981 -0400
-@@ -2,26 +2,30 @@
- # vim: set filetype=python:
- # This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- 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',
- 'angle',
- 'src',
- 'qcms',
- 'gl',
- 'layers',
-- 'graphite2/src',
-- 'harfbuzz/src',
- 'ots/src',
- 'thebes',
- 'ipc',
- 'vr',
- 'config',
- ]
-
- if CONFIG['MOZ_ENABLE_SKIA']:
---- a/gfx/thebes/moz.build 2016-09-19 12:19:30.000000000 -0400
-+++ b/gfx/thebes/moz.build 2016-10-11 13:17:56.861237732 -0400
-@@ -286,7 +286,10 @@
- LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
- LOCAL_INCLUDES += ['/media/libyuv/include']
-
--DEFINES['GRAPHITE2_STATIC'] = True
-+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
-+else:
-+ DEFINES['GRAPHITE2_STATIC'] = True
-
- if CONFIG['CLANG_CXX']:
- # Suppress warnings from Skia header files.



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (efd767d2ce548178e615ad92ebadb4625dd7ef27), Pavel Vinogradov, 03/07/2017

Archive powered by MHonArc 2.6.24.

Top of Page