From 47fbd170b9d3718ff3a343ff362b6c9ca2150fa6 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 5 Apr 2018 16:34:50 -0400 Subject: [PATCH] WIP: gnu: Add icedove. --- gnu/local.mk | 5 + gnu/packages/gnuzilla.scm | 216 +++++++++- gnu/packages/patches/icedove-CVE-2018-5148.patch | 53 +++ .../patches/icedove-avoid-bundled-libraries.patch | 35 ++ gnu/packages/patches/icedove-libre.patch | 448 +++++++++++++++++++++ .../patches/icedove-use-system-graphite2.patch | 250 ++++++++++++ .../patches/icedove-use-system-harfbuzz.patch | 281 +++++++++++++ 7 files changed, 1287 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/icedove-CVE-2018-5148.patch create mode 100644 gnu/packages/patches/icedove-avoid-bundled-libraries.patch create mode 100644 gnu/packages/patches/icedove-libre.patch create mode 100644 gnu/packages/patches/icedove-use-system-graphite2.patch create mode 100644 gnu/packages/patches/icedove-use-system-harfbuzz.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7697a37b1..6cf49ad07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -793,6 +793,11 @@ dist_patch_DATA = \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ %D%/packages/patches/icecat-use-system-graphite2.patch \ %D%/packages/patches/icecat-use-system-harfbuzz.patch \ + %D%/packages/patches/icedove-CVE-2018-5148.patch \ + %D%/packages/patches/icedove-avoid-bundled-libraries.patch \ + %D%/packages/patches/icedove-libre.patch \ + %D%/packages/patches/icedove-use-system-graphite2.patch \ + %D%/packages/patches/icedove-use-system-harfbuzz.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b4789d687..52ff09745 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -31,6 +31,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages autotools) @@ -563,10 +564,18 @@ security standards.") #:validate-runpath? #f #:configure-flags '("--enable-default-toolkit=cairo-gtk3" + + "--with-distribution-id=org.gnu" + "--enable-gio" "--enable-startup-notification" "--enable-pulseaudio" + "--disable-tests" + "--disable-updater" + "--disable-crashreporter" + "--disable-maintenance-service" + "--disable-eme" "--disable-gconf" "--disable-gnomeui" @@ -639,7 +648,7 @@ security standards.") (close-port out)) #t)) (add-after - 'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlopen + 'unpack 'link-libxul-with-libraries (lambda _ ;; libxul.so dynamically opens libraries, so here we explicitly ;; link them into libxul.so instead. @@ -754,3 +763,208 @@ features built-in privacy-protecting features.") `((ftp-directory . "/gnu/gnuzilla") (cpe-name . "firefox_esr") (cpe-version . ,(first (string-split version #\-))))))) + +(define-public icedove + (package + (name "icedove") + (version "52.7.0") + (source (origin + (method url-fetch) + (uri (string-append "https://ftp.mozilla.org/pub/mozilla.org/" + "thunderbird/releases/" version "/source/" + "thunderbird-" version ".source.tar.xz")) + (sha256 + (base32 "18rf576mhx9sf4g0gdb22mnpnssrcrhlm4i66b07ivcksf82hil2")) + (patches (search-patches "icedove-avoid-bundled-libraries.patch" + "icedove-use-system-harfbuzz.patch" + "icedove-use-system-graphite2.patch" + "icedove-libre.patch" + "icedove-CVE-2018-5148.patch")) + (modules (origin-modules (package-source icecat))) + (snippet + `(begin + (with-directory-excursion "mozilla" + ,(origin-snippet (package-source icecat))))))) + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments icecat) + ((#:configure-flags icecat-configure-flags) + `(append (list "--enable-application=mail" + "--enable-calendar" + "--enable-release" + "--disable-official-branding" + "--with-branding=mail/branding/icedove" + "--disable-safe-browsing" + "--disable-url-classifier" + "--disable-webrtc" + "--disable-elf-hack") + (delete "--enable-official-branding" + ,icecat-configure-flags))) + ((#:make-flags icecat-make-flags ''()) + `(append (list "-f" "client.mk" + "SH=sh") + ,icecat-make-flags)) + ((#:out-of-source? icecat-out-of-source?) + #f) + ((#:phases icecat-phases) + `(let ((icecat-phases ,icecat-phases)) + (modify-phases %standard-phases + (add-after 'unpack 'unpack-branding + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (define (first-file directory) + (car (scandir directory + (lambda (name) + (not (member name '("." ".."))))))) + (with-directory-excursion ".." + (let* ((native-inputs (or native-inputs inputs)) + (tar (assoc-ref native-inputs "tar")) + (branding (assoc-ref native-inputs "branding")) + (tmp ".tmp-unpack")) + (mkdir tmp) + (with-directory-excursion tmp + (invoke (string-append tar "/bin/tar") "xf" branding) + (rename-file (first-file ".") "../branding")) + (rmdir tmp))) + #t)) + + (add-after 'unpack-branding 'apply-branding + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((native-inputs (or native-inputs inputs)) + (branding "../branding")) + + ;; Populate mail/branding/icedove. + (copy-recursively (string-append branding "/icedove-branding") + "mail/branding/icedove") + + ;; Copy the icons. + (let ((icons-dir (string-append branding "/app-icons"))) + (define (copy-icons target-fmt sizes) + (for-each (lambda (size) + (copy-file (format #f "~a/icedove~a.png" + icons-dir size) + (format #f target-fmt size))) + sizes)) + (copy-icons "mail/branding/icedove/mailicon~a.png" + '(16 22 24 32 48 64 128 256)) + (copy-icons "mail/branding/icedove/content/icon~a.png" + '(48 64)) + (copy-file (string-append branding "/preview.png") + "mail/themes/linux/mail/preview.png")) + + ;; Fix branding in migration wizard, etc. + (substitute* "mail/app/profile/all-thunderbird.js" + (("%APP%") "thunderbird")) + + ;; Apply the included patches. + (let* ((patch (assoc-ref native-inputs "patch")) + (patch-dir (string-append branding "/patches")) + (series-file (string-append patch-dir "/series")) + (file-contents (call-with-input-file series-file + read-string)) + (patches (filter (negate string-null?) + (string-split file-contents + #\newline)))) + (for-each (lambda (file) + (unless (string-contains file "migration-wizard") + (invoke (string-append patch "/bin/patch") + "--force" "--no-backup-if-mismatch" + "-p1" "--input" + (string-append patch-dir "/" file)))) + patches)) + #t))) + + (add-after 'apply-branding 'replace-search-plugins + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace the default search plugins with those of IceCat. + (let* ((native-inputs (or native-inputs inputs)) + (gnuzilla (assoc-ref native-inputs "gnuzilla")) + (plugins-dir "mail/locales/en-US/searchplugins")) + (delete-file-recursively plugins-dir) + (mkdir plugins-dir) + (copy-recursively (string-append gnuzilla "/data/searchplugins") + plugins-dir)) + #t)) + + (add-before 'configure 'link-libxul-with-libraries + (lambda args + (with-directory-excursion "mozilla" + (apply (assoc-ref icecat-phases 'link-libxul-with-libraries) + args)))) + + (add-before 'configure 'ensure-no-mtimes-pre-1980 + (assoc-ref icecat-phases 'ensure-no-mtimes-pre-1980)) + + (replace 'configure + ;; configure does not work followed by both "SHELL=..." and + ;; "CONFIG_SHELL=..."; set environment variables instead + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags (cons (string-append "--prefix=" out) + configure-flags))) + (format #t "configure flags: ~s~%" flags) + (call-with-output-file ".mozconfig" + (lambda (port) + (for-each (lambda (flag) + (format port "ac_add_options ~a~%" flag)) + flags))) + (setenv "SHELL" bash) + (setenv "CONFIG_SHELL" bash) + (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13 + (substitute* "configure" + (("^SRCDIR=.*") (format #f "SRCDIR=~s~%" (getcwd)))) + ;; The configure script is run during the 'build' phase. + #t))) + + ;; FIXME: Implement these phases, if needed. + (delete 'install-desktop-entry) + (delete 'install-icons) + (delete 'wrap-program)))))) + (inputs (package-inputs icecat)) + (native-inputs + `(,@(package-native-inputs icecat) + ("patch" ,patch) + ("tar" ,tar) + ("xz" ,xz) + ("gnuzilla" + ,(let ((commit "95d8edd62741b0ef504f0c47e374c8af90650458")) + (origin + (method git-fetch) + (uri (git-reference (url "git://git.savannah.gnu.org/gnuzilla.git") + (commit commit))) + (file-name (string-append "gnuzilla-source-" + (string-take commit 7) + "-checkout")) + (sha256 + (base32 "0qlwad45ln318ifhh29q2aafa3g0lfhmcbdqh7ny1nzzf9i4z2ca"))))) + ("branding" + ,(let ((branding-version "52.1-1")) + (origin + (method url-fetch) + (uri (string-append "https://repomirror.parabola.nu/other/icedove/" + "icedove_" branding-version ".branding.tar.xz")) + (file-name (string-append "icedove-branding" branding-version)) + (sha256 + (base32 "0rgwvv68xbk1apkrrpqfbv2d9y12fgwjfqlyp7aymyr4cnbihr14"))))) + ("desktop-file" + ,(origin + (method url-fetch) + (uri (string-append + "https://git.parabola.nu/abslibre.git" + "/plain/libre/icedove/icedove.desktop" + "?id=053755d6cabfc82cc3cf83042ea7b09e91d83bde")) + (sha256 + (base32 "1w1jcsjli9194gf23l8f87rsyw805lgbsn1l2jfih2dy5shrk0dg")))))) + (home-page "https://directory.fsf.org/wiki/Icedove") + (synopsis "Mail/news client with RSS and integrated spam filter support") + (description + "Icedove is an unbranded Thunderbird mail client suitable for free +distribution. It supports different mail accounts (POP, IMAP, Gmail), has an +integrated learning Spam filter, and offers easy organization of mails with +tagging and virtual folders. More features can be added by installing +extensions.") + ;; TODO: Check licensing more carefully. + (license (list license:mpl1.1 + license:mpl2.0 + license:gpl2+ + license:lgpl2.1+)))) diff --git a/gnu/packages/patches/icedove-CVE-2018-5148.patch b/gnu/packages/patches/icedove-CVE-2018-5148.patch new file mode 100644 index 000000000..a5afe64c5 --- /dev/null +++ b/gnu/packages/patches/icedove-CVE-2018-5148.patch @@ -0,0 +1,53 @@ +This changeset from the upstream mozilla-esr52 repository was adapted +to apply to icedove, by prepending "mozilla/" to the file names. + +# HG changeset patch +# User Nicolas Silva +# Date 1520858160 -3600 +# Node ID c3e447e07077412b9cfaacb2ea91974655ed753b +# Parent bb8ae7990f45dd295b80a347b779bcc4690205fa +Bug 1440717 - Use RefPtr for CompositingRenderTargetOGL::mGL. r=Bas, a=ritu + +--- a/mozilla/gfx/layers/opengl/CompositingRenderTargetOGL.cpp ++++ b/mozilla/gfx/layers/opengl/CompositingRenderTargetOGL.cpp +@@ -55,17 +55,17 @@ CompositingRenderTargetOGL::BindRenderTa + mGL->RenewSurface(mCompositor->GetWidget()->RealWidget()); + result = mGL->fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER); + } + if (result != LOCAL_GL_FRAMEBUFFER_COMPLETE) { + nsAutoCString msg; + msg.AppendPrintf("Framebuffer not complete -- CheckFramebufferStatus returned 0x%x, " + "GLContext=%p, IsOffscreen()=%d, mFBO=%d, aFBOTextureTarget=0x%x, " + "aRect.width=%d, aRect.height=%d", +- result, mGL, mGL->IsOffscreen(), mFBO, mInitParams.mFBOTextureTarget, ++ result, mGL.get(), mGL->IsOffscreen(), mFBO, mInitParams.mFBOTextureTarget, + mInitParams.mSize.width, mInitParams.mSize.height); + NS_WARNING(msg.get()); + } + } + + needsClear = mClearOnBind; + } + +--- a/mozilla/gfx/layers/opengl/CompositingRenderTargetOGL.h ++++ b/mozilla/gfx/layers/opengl/CompositingRenderTargetOGL.h +@@ -179,17 +179,17 @@ private: + + InitParams mInitParams; + /** + * There is temporary a cycle between the compositor and the render target, + * each having a strong ref to the other. The compositor's reference to + * the target is always cleared at the end of a frame. + */ + RefPtr mCompositor; +- GLContext* mGL; ++ RefPtr mGL; + GLuint mTextureHandle; + GLuint mFBO; + }; + + } // namespace layers + } // namespace mozilla + + #endif /* MOZILLA_GFX_SURFACEOGL_H */ + diff --git a/gnu/packages/patches/icedove-avoid-bundled-libraries.patch b/gnu/packages/patches/icedove-avoid-bundled-libraries.patch new file mode 100644 index 000000000..56b263702 --- /dev/null +++ b/gnu/packages/patches/icedove-avoid-bundled-libraries.patch @@ -0,0 +1,35 @@ +Fixes needed when avoiding bundled libraries. + +--- icedove-52.7.0/mozilla/xpcom/build/moz.build.orig ++++ icedove-52.7.0/mozilla/xpcom/build/moz.build +@@ -93,10 +93,5 @@ + '/docshell/base', + ] + +-if CONFIG['MOZ_VPX']: +- LOCAL_INCLUDES += [ +- '/media/libvpx', +- ] +- + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': + CXXFLAGS += CONFIG['TK_CFLAGS'] +--- icedove-52.7.0/mozilla/storage/moz.build.orig ++++ icedove-52.7.0/mozilla/storage/moz.build +@@ -114,7 +114,6 @@ + DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True + + LOCAL_INCLUDES += [ +- '/db/sqlite3/src', + '/dom/base', + ] + +--- icedove-52.7.0/mozilla/dom/indexedDB/moz.build.orig ++++ icedove-52.7.0/mozilla/dom/indexedDB/moz.build +@@ -101,7 +101,6 @@ + CXXFLAGS += ['-Wno-error=shadow'] + + LOCAL_INCLUDES += [ +- '/db/sqlite3/src', + '/dom/base', + '/dom/storage', + '/dom/workers', diff --git a/gnu/packages/patches/icedove-libre.patch b/gnu/packages/patches/icedove-libre.patch new file mode 100644 index 000000000..6e2197a4b --- /dev/null +++ b/gnu/packages/patches/icedove-libre.patch @@ -0,0 +1,448 @@ +Based on the following patch from Parabola: + + +with additional changes to mail/installer/package-manifest.in and +mail/app/profile/all-thunderbird.js based on similar changes made by +Parabola's PKGBUILD using 'sed'. + +--- a/mail/locales/search/list.json ++++ b/mail/locales/search/list.json +@@ -1,315 +1,315 @@ + { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + }, + "locales": { + "en-US": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ar": { + "default": { + "visibleDefaultEngines": [ +- "bing", "yahoo", "twitter", "wikipedia-ar", "amazondotcom" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ast": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "twitter", "wikipedia-ast", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "be": { + "default": { + "visibleDefaultEngines": [ +- "google", "be.wikipedia.org", "be-x-old.wikipedia.org", "ru.wikipedia.org-be", "tut.by", "yahoo", "yandex.by" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "br": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "google", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ca": { + "default": { + "visibleDefaultEngines": [ +- "bing", "huubs", "diec2", "wikipedia-ca", "llibres" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "cs": { + "default": { + "visibleDefaultEngines": [ +- "google", "seznam-cz", "duckduckgo-cz", "heureka-cz", "mapy-cz", "wikipedia-cz" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "da": { + "default": { + "visibleDefaultEngines": [ +- "amazon-co-uk", "bing", "google", "wikipedia-da" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "de": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom-de", "bing", "twitter-de", "wikipedia-de", "yahoo-de" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "en-GB": { + "default": { + "visibleDefaultEngines": [ +- "amazon-en-GB", "aol-en-GB", "bing", "google", "twitter", "wikipedia", "yahoo-en-GB" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "es-AR": { + "default": { + "visibleDefaultEngines": [ +- "google", "yahoo-ar", "amazondotcom", "mercadolibre-ar", "drae", "wikipedia-es" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "es-ES": { + "default": { + "visibleDefaultEngines": [ +- "google", "yahoo-es", "bing", "drae", "twitter", "wikipedia-es" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "et": { + "default": { + "visibleDefaultEngines": [ +- "google", "neti-ee", "osta-ee", "eki-ee", "wikipedia-et" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "fi": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "bing", "twitter", "wikipedia-fi", "yahoo-fi" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "fr": { + "default": { + "visibleDefaultEngines": [ +- "amazon-france", "bing", "wikipedia-fr", "yahoo-france", "cnrtl-tlfi-fr" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ga-IE": { + "default": { + "visibleDefaultEngines": [ +- "google", "twitter", "yahoo-en-GB", "amazon-en-GB", "focal", "wikipedia-ga-IE" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "gd": { + "default": { + "visibleDefaultEngines": [ +- "google", "yahoo-en-GB", "bbc-alba", "amazon-en-GB", "faclair-beag", "wikipedia-gd" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "he": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "google", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "hr": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "google", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "hu": { + "default": { + "visibleDefaultEngines": [ +- "google", "sztaki-en-hu", "vatera", "wikipedia-hu" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "id": { + "default": { + "visibleDefaultEngines": [ +- "google", "yahoo-id", "wikipedia-id" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "is": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "bing", "leit-is", "wikipedia-is", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "it": { + "default": { + "visibleDefaultEngines": [ +- "amazon-it", "bing", "google", "twitter", "wikipedia-it", "yahoo-it" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ja-JP-mac": { + "default": { + "visibleDefaultEngines": [ +- "google-jp", "yahoo-jp", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ja": { + "default": { + "visibleDefaultEngines": [ +- "google-jp", "yahoo-jp", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "kab": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ko": { + "default": { + "visibleDefaultEngines": [ +- "danawa-kr", "daum-kr", "google","naver-kr", "wikipedia-kr" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "lt": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "bing", "google", "twitter", "wikipedia-lt" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "nb-NO": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "google", "twitter", "wikipedia", "yahoo", "gulesider-NO" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "nl": { + "default": { + "visibleDefaultEngines": [ +- "bing", "yahoo", "google", "twitter", "wikipedia-nl", "marktplaats-nl" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "nn-NO": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "twitter", "wikipedia", "yahoo", "gulesider-NO" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "pl": { + "default": { + "visibleDefaultEngines": [ +- "allegro-pl", "google", "pwn-pl", "wikipedia-pl", "wolnelektury-pl" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "pt-PT": { + "default": { + "visibleDefaultEngines": [ +- "google", "sapo", "priberam", "wikipedia-ptpt", "amazon-en-GB" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "rm": { + "default": { + "visibleDefaultEngines": [ +- "bing", "google", "leo_ende_de", "pledarigrond", "wikipedia-rm", "yahoo-ch" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ro": { + "default": { + "visibleDefaultEngines": [ +- "yahoo", "bing", "amazondotcom", "wikipediaro" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "ru": { + "default": { + "visibleDefaultEngines": [ +- "google", "bing", "duckduckgo-ru", "ozonru", "priceru", "wikipedia-ru", "yandex" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "sk": { + "default": { + "visibleDefaultEngines": [ +- "atlas-sk", "azet-sk", "bing", "google", "slovnik-sk", "wikipedia-sk", "zoznam-sk" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "sl": { + "default": { + "visibleDefaultEngines": [ +- "najdi-si", "ceneji", "google", "odpiralni", "twitter", "wikipedia-sl" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "sq": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "bing", "twitter", "wikipedia-sq", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "sv-SE": { + "default": { + "visibleDefaultEngines": [ +- "google", "bing", "yahoo", "wikipedia-sv-SE", "tyda-sv-SE", "prisjakt-sv-SE" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "tr": { + "default": { + "visibleDefaultEngines": [ +- "google", "yandex-tr", "wikipedia-tr" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "uk": { + "default": { + "visibleDefaultEngines": [ +- "google", "yandex", "meta-ua", "metamarket", "wikipedia-uk" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "vi": { + "default": { + "visibleDefaultEngines": [ +- "amazondotcom", "aol-web-search", "bing", "google", "twitter", "wikipedia", "yahoo" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + }, + "zh-TW": { + "default": { + "visibleDefaultEngines": [ +- "google", "yahoo-zh-TW", "yahoo-bid-zh-TW", "wikipedia-zh-TW", "chunghwapost-zh-TW", "google-maps-zh-TW", "ipeen-zh-TW", "findbook-zh-TW" ++ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki-en", "searx", "seeks", "wikipedia-en", "yacy" + ] + } + } +diff --git a/mail/locales/en-US/chrome/messenger-region/region.properties b/mail/locales/en-US/chrome/messenger-region/region.properties +index fcc870d..f810450 100644 +--- a/mail/locales/en-US/chrome/messenger-region/region.properties ++++ b/mail/locales/en-US/chrome/messenger-region/region.properties +@@ -3,12 +3,12 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + # Default search engine +-browser.search.defaultenginename=Bing ++browser.search.defaultenginename=searx + + # Search engine order (order displayed in the search bar dropdown)s +-browser.search.order.1=Bing +-browser.search.order.2=Yahoo +-browser.search.order.3= ++browser.search.order.1=searx ++browser.search.order.2=DuckDuckGo HTML ++browser.search.order.3=DuckDuckGo Lite + + # To make mapit buttons to disappear in the addressbook, specify empty string. For example: + # mail.addr_book.mapit_url.format= +@@ -23,14 +23,12 @@ browser.search.order.3= + # @ZI == zip code + # @CO == country + # Default map service: +-mail.addr_book.mapit_url.format=https://maps.google.com/maps?q=@A1%20@A2%20@CI%20@ST%20@ZI%20@CO ++mail.addr_book.mapit_url.format=https://nominatim.openstreetmap.org/search.php?polygon=1&q=@A1%2C@A2%2C@CI%2C@ST%2C@ZI%2C@CO + # List of available map services (up to 5 can be defined here): +-mail.addr_book.mapit_url.1.name=Google Maps +-mail.addr_book.mapit_url.1.format=https://maps.google.com/maps?q=@A1%20@A2%20@CI%20@ST%20@ZI%20@CO +-mail.addr_book.mapit_url.2.name=OpenStreetMap +-mail.addr_book.mapit_url.2.format=https://nominatim.openstreetmap.org/search.php?polygon=1&q=@A1%2C@A2%2C@CI%2C@ST%2C@ZI%2C@CO ++mail.addr_book.mapit_url.1.name=OpenStreetMap ++mail.addr_book.mapit_url.1.format=https://nominatim.openstreetmap.org/search.php?polygon=1&q=@A1%2C@A2%2C@CI%2C@ST%2C@ZI%2C@CO + +-mailnews.messageid_browser.url=http://groups.google.com/search?as_umsgid=%mid ++mailnews.messageid_browser.url= + + # Recognize non-standard versions of "Re:" in subjects from localized versions of MS Outlook et al. + # Specify a comma-separated list without spaces. For example: mailnews.localizedRe=AW,SV +--- a/mail/installer/package-manifest.in ++++ b/mail/installer/package-manifest.in +@@ -696,12 +696,6 @@ + ; Modules + @RESPATH@/modules/* + +-@RESPATH@/components/nsURLClassifier.manifest +-@RESPATH@/components/nsUrlClassifierHashCompleter.js +-@RESPATH@/components/nsUrlClassifierListManager.js +-@RESPATH@/components/nsUrlClassifierLib.js +-@RESPATH@/components/url-classifier.xpt +- + ; Security Reports + @RESPATH@/components/SecurityReporter.manifest + @RESPATH@/components/SecurityReporter.js +--- a/mail/app/profile/all-thunderbird.js ++++ b/mail/app/profile/all-thunderbird.js +@@ -156,13 +156,13 @@ + // Preferences for AMO integration + pref("extensions.getAddons.cache.enabled", true); + pref("extensions.getAddons.maxResults", 15); +-pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=thunderbird&appOS=%OS%&appVersion=%VERSION%"); +-pref("extensions.getAddons.getWithPerformance.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=thunderbird&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%"); +-pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/%APP%/"); +-pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=thunderbird"); +-pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/%APP%/search?q=%TERMS%"); +-pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=thunderbird"); +-pref("extensions.webservice.discoverURL", "https://services.addons.mozilla.org/%LOCALE%/%APP%/discovery/pane/%VERSION%/%OS%"); ++pref("extensions.getAddons.get.url", "https://directory.fsf.org/wiki/Icedove"); ++pref("extensions.getAddons.getWithPerformance.url", "https://directory.fsf.org/wiki/Icedove"); ++pref("extensions.getAddons.link.url", "https://directory.fsf.org/wiki/Icedove"); ++pref("extensions.getAddons.recommended.url", "https://directory.fsf.org/wiki/Icedove"); ++pref("extensions.getAddons.search.browseURL", "https://directory.fsf.org/wiki/Icedove"); ++pref("extensions.getAddons.search.url", "https://directory.fsf.org/wiki/Icedove"); ++pref("extensions.webservice.discoverURL", "https://directory.fsf.org/wiki/Icedove"); + + // Blocklist preferences + pref("extensions.blocklist.enabled", true); diff --git a/gnu/packages/patches/icedove-use-system-graphite2.patch b/gnu/packages/patches/icedove-use-system-graphite2.patch new file mode 100644 index 000000000..9794bbe63 --- /dev/null +++ b/gnu/packages/patches/icedove-use-system-graphite2.patch @@ -0,0 +1,250 @@ +Copied from +See + +Adapted for Icedove. + +diff --git a/mozilla/config/Makefile.in b/config/Makefile.in +--- a/mozilla/config/Makefile.in ++++ b/mozilla/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/mozilla/config/system-headers b/config/system-headers +--- a/mozilla/config/system-headers ++++ b/mozilla/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/mozilla/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh +--- a/mozilla/gfx/graphite2/moz-gr-update.sh ++++ b/mozilla/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///;s/Windows.h/windows.h/;" {} \; + #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s///;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/mozilla/gfx/moz.build b/gfx/moz.build +--- a/mozilla/gfx/moz.build ++++ b/mozilla/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/mozilla/gfx/thebes/moz.build b/gfx/thebes/moz.build +--- a/mozilla/gfx/thebes/moz.build ++++ b/mozilla/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/mozilla/moz.configure b/moz.configure +--- a/mozilla/moz.configure ++++ b/mozilla/moz.configure +@@ -260,16 +260,28 @@ def extra_programs(target): + + check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'), + allow_missing=True) + check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'), + allow_missing=True) + 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', depends_if(system_graphite2)(lambda _: True)) ++ + 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.3.3', +diff --git a/mozilla/old-configure.in b/old-configure.in +--- a/mozilla/old-configure.in ++++ b/mozilla/old-configure.in +@@ -5060,16 +5060,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 ]) + 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 ++ #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/mozilla/toolkit/library/moz.build b/toolkit/library/moz.build +--- a/mozilla/toolkit/library/moz.build ++++ b/mozilla/toolkit/library/moz.build +@@ -221,16 +221,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/gnu/packages/patches/icedove-use-system-harfbuzz.patch b/gnu/packages/patches/icedove-use-system-harfbuzz.patch new file mode 100644 index 000000000..89670a8fd --- /dev/null +++ b/gnu/packages/patches/icedove-use-system-harfbuzz.patch @@ -0,0 +1,281 @@ +Copied from +See + +Adapted for Icedove. + +diff --git a/mozilla/config/Makefile.in b/config/Makefile.in +--- a/mozilla/config/Makefile.in ++++ b/mozilla/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/mozilla/config/system-headers b/config/system-headers +--- a/mozilla/config/system-headers ++++ b/mozilla/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/mozilla/dom/base/moz.build b/dom/base/moz.build +--- a/mozilla/dom/base/moz.build ++++ b/mozilla/dom/base/moz.build +@@ -474,16 +474,19 @@ for var in ('MOZ_B2G_RIL'): + DEFINES[var] = True + + 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/mozilla/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla +--- a/mozilla/gfx/harfbuzz/README-mozilla ++++ b/mozilla/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 old-configure.in in sync ++with checkout version or increment latest tag by one if it's not based ++on upstream release. +diff --git a/mozilla/gfx/moz.build b/gfx/moz.build +--- a/mozilla/gfx/moz.build ++++ b/mozilla/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/mozilla/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py +--- a/mozilla/gfx/skia/generate_mozbuild.py ++++ b/mozilla/gfx/skia/generate_mozbuild.py +@@ -138,16 +138,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/mozilla/gfx/skia/moz.build b/gfx/skia/moz.build +--- a/mozilla/gfx/skia/moz.build ++++ b/mozilla/gfx/skia/moz.build +@@ -748,14 +748,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/mozilla/gfx/thebes/moz.build b/gfx/thebes/moz.build +--- a/mozilla/gfx/thebes/moz.build ++++ b/mozilla/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/mozilla/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build +--- a/mozilla/intl/unicharutil/util/moz.build ++++ b/mozilla/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/mozilla/moz.configure b/moz.configure +--- a/mozilla/moz.configure ++++ b/mozilla/moz.configure +@@ -260,16 +260,28 @@ def extra_programs(target): + + check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'), + allow_missing=True) + check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'), + allow_missing=True) + check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'), + allow_missing=True) + ++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.3.3', ++ check_for_harfbuzz) ++ ++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) ++ + option('--enable-system-hunspell', + help="Use system hunspell (located with pkgconfig)") + + @depends('--enable-system-hunspell', compile_environment) + def check_for_hunspell(value, compile_env): + return value and compile_env + + system_hunspell = pkg_check_modules('MOZ_HUNSPELL', 'hunspell', +diff --git a/mozilla/netwerk/dns/moz.build b/netwerk/dns/moz.build +--- a/mozilla/netwerk/dns/moz.build ++++ b/mozilla/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/mozilla/toolkit/library/moz.build b/toolkit/library/moz.build +--- a/mozilla/toolkit/library/moz.build ++++ b/mozilla/toolkit/library/moz.build +@@ -221,16 +221,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'] + -- 2.16.3