diff options
author | ryoon <ryoon@pkgsrc.org> | 2018-12-16 08:12:15 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2018-12-16 08:12:15 +0000 |
commit | d97df85ea800d22b092a21f5cb9c4169371aa79a (patch) | |
tree | b11df37d0e82b611dbcc06de690d674996b904a6 /mail/thunderbird/patches | |
parent | b6951027166d5f5c9d57f8b280061e58030a074a (diff) | |
download | pkgsrc-d97df85ea800d22b092a21f5cb9c4169371aa79a.tar.gz |
Update to 60.3.3
Changelog:
60.3.3:
mitigated
Thunderbird 60 will migrate security databases (key3.db, cert8.db to
key4.db, cert9.db). Thunderbird 60.3.2 and earlier contained a fault
that potentially deleted saved passwords and private certificate keys
for users using a master password. Version 60.3.3 will prevent the loss
of data; affected users who have already upgraded to version 60.3.2 or
earlier can restore the deleted key3.db file from backup to complete
the migration.
fixed
Address book search and auto-complete slowness introduced in
Thunderbird 60.3.2
Plain text markup with * for bold, / for italics, _ for underline and |
for code did not work when the enclosed text contained non-ASCII
characters
While composing a message, a link not removed when link location was
removed in the link properties panel
60.3.2:
fixed
Under some circumstances Thunderbird on Mac will send attachments using
the so-called AppleDouble format which can lead to problems with mail
servers and recipients
Encoding problems when exporting address books or messages using the
system charset. Messages are now always exported using the UTF-8 encoding.
If the "Date" header of a message was invalid, Jan 1970 or Dec 1969 was
displayed. Now using date from "Received" header instead.
Body search/filtering didn't reliably ignore content of tags
Inappropriate warning "Thunderbird prevented the site
(addons.thunderbird.net) from asking you to install software on your
computer" when installing add-ons
Incorrect display of correspondents column since own email address was
not always detected
Spurious 
 (encoded newline) inserted into drafts and sent email
New email not inserted in correct sort order in threaded unified view
or search folder
60.3.1:
fixed
Double-clicking on a word in the Write window sometimes launched the
Advanced Property Editor or Link Properties dialog
Cookie removal (not working since Thunderbird version 52)
"Download rest of message" not working if global inbox was used
Encoding problems for users (especially in Poland) when a file was sent
via a folder using "Sent to > Mail recipient" due to a problem in the
Thunderbird MAPI interface
According to RFC 4616 and RFC 5721, passwords containing non-ASCII
characters are encoded using UTF-8 which can lead to problems with
non-compliant providers, for example office365.com. The SMTP LOGIN
and POP3 USER/PASS authentication methods are now using a Latin-1
encoding again to work around this issue.
Shutdown crash/hang after entering an empty IMAP password
60.3.0:
fixed
Various Theme fixes where incorrect colors, backgrounds, etc. were
displayed
Add-on Options menu not working on Mac
Shift+PageUp/PageDown in Write window
Saving content of Write windows didn't overwrite existing file
Issues related to "Edit Template" command
Gloda attachment filtering
Mailing list address auto-complete enter/return handling
Thunderbird hung if HTML signature references non-existent image
Filters not working for headers that appear more than once
Various security fixes
Secirity fixes:
#CVE-2018-12391: HTTP Live Stream audio data is accessible cross-origin
#CVE-2018-12392: Crash with nested event loops
#CVE-2018-12393: Integer overflow during Unicode conversion while loading JavaScript
#CVE-2018-12389: Memory safety bugs fixed in Firefox ESR 60.3 and Thunderbird 60.3
#CVE-2018-12390: Memory safety bugs fixed in Firefox 63, Firefox ESR 60.3, and Thunderbird 60.3
60.2.1:
Changed
Calendar: Default values for the first day of the week and working days
are now derived from the selected datetime formatting locale (restart
after changing locale in the OS required)
Calendar: Switch to a Photon-style icon set for all platforms
Multiple requests for master password when Google Mail or Calendar
OAuth2 is enabled
Scrollbar of the address entry auto-complete popup does not work
Security info dialog in compose window does not show certificate status
Links in the Add-on Manager's search results and theme browsing tabs
open in external browser
Localized versions of Thunderbird didn't show a localized name for
the "Drafts" and "Sent" folders for certain IMAP providers
(particularly in France)
Replying to a message with an empty subject inserted Re: twice (not
working in Thunderbird 60.0)
Spellcheck marks disappeared erroneously for words with an apostrophe
(not working in Thunderbird 60.0)
Calendar: First day of the week cannot be set
Calendar: Several fixes related to cutting/deleting of events and email
scheduling
Various security fixes
Security fixes:
#CVE-2018-12377: Use-after-free in refresh driver timers
#CVE-2018-12378: Use-after-free in IndexedDB
#CVE-2018-12379: Out-of-bounds write with malicious MAR file
#CVE-2017-16541: Proxy bypass using automount and autofs
#CVE-2018-12385: Crash in TransportSecurityInfo due to cached data
#CVE-2018-12383: Setting a master password post-Firefox 58 does not delete unencrypted previously stored passwords
#CVE-2018-12376: Memory safety bugs fixed in Firefox 62, Firefox ESR 60.2, and Thunderbird 60.2.1
60.0:
new
When writing a message, a delete button now allows the removal of a
recipient. This delete button is displayed when hovering the To/Cc/Bcc
selector.
Many improvements to attachments handling during compose: Attachments
can now be reordered using a dialog, keyboard shortcuts, or drag and
drop. The "Attach" button moved to the right to be above the attachment
pane. The access key of the attachment pane (e.g. Alt+M, may vary
depending on localization, Ctrl+M on Mac) now also works to show or
hide the pane. The attachment pane can also be shown initially when
composing a new message. Right-click on the header to enable this
option. Hiding a non-empty attachment pane will now show a placeholder
paperclip to indicate the presence of attachments and avoid sending
them accidentally.
"Edit Template" command. This also solves various problems when saving
as template (duplicates created, message ID lost).
"New Message from Template" command
Allow changing the Spellcheck Language from status bar
Light and Dark themes
WebExtension themes are now enabled in Thunderbird
A default startup directory in the address book window can now be
configured
Individual feed update interval
An option under "Tools > Options, Advanced, General" now allows to
select whether date/time display will follow the application locale
(adjusted by operating system's format settings for that locale) or
the locale selected in the operating system's regional settings.
In other words, an US English Thunderbird can use, for example,
German formats.
OAuth2 authentication for Yahoo and AOL
FIDO U2F support
Thunderbird now allows the conversion of folders from mbox to maildir
format and vice versa. This is an experimental feature that needs to
be enabled by setting the preference mail.store_conversion_enabled.
Note that this functionality does not not work if the option "Allow
Windows Search/Spotlight to search messages" is selected.
Calendar: Allow copying, cutting or deleting of a selected occurrence
or the entire series for recurring events
Calendar: Provide an option to display locations for events in calendar
day and week views
Calendar: Provide the ability for sending/not sending meeting
notifications directly instead of showing a popup
Calendar: Option to select the target calendar when pasting an event
or task
Calendar: Allow email scheduling for CalDAV servers supporting
server-side scheduling
Thunderbird Chat now contains multiple built-in message themes
changed
IMPORTANT: Add-ons not marked as compatible with Thunderbird 60
by their authors will be disabled (this can be reverted via preference
extensions.strictCompatibility)
IMAP: When after sending a message storing that sent message fails,
the message can now be stored in a local folder
Add-on options can no longer be configured from the Add-on Manager page.
A new menu item "Add-on Options" is now available on the Tools menu.
When messages are composed in paragraph format, "body text" and split
mail quotes are converted to paragraphs when pressing the enter key
"Edit As New Message" will now use the account's default compose format,
either HTML or plain text ignoring the format of the message. Plain
text messages will be converted to HTML and vice versa. Then using
the modifier, the format choice will be reverted.
The "Edit Draft" command now also honors the use of the shift key to
convert HTML to plain text or vice versa when editing a draft
The plain text to HTML conversion has been improved where such a
conversion is necessary for "Edit As New Message" or when the shift
modifier is used for "Edit Draft" or "New Message from Template".
During address entry, the matching part of the address is now shown in
bold. Preference mail.autoComplete.commentColumn allows to display
the address book where the address is stored.
When attaching a message via drag and drop, the subject of the message
is now used as attachment name instead of "Attached Message"
Better address book photo handling: Photos can be added by drag and
drop and a copy of all photos will be stored in the Thunderbird profile
On first start, Thunderbird now shows the account setup dialog, no longer
the account provisioner dialog
Thunderbird follows Firefox' Photon design with rectangular tabs and
many other theme improvements
When customizing the From: address, Thunderbird will now use this address
for the SMTP "MAIL FROM" command. Previously the address configured
in the identity was used. The preference
mail.smtp.useSenderForSmtpMailFrom allows return to the previous
behavior.
Native notifications on Linux are now re-enabled
Thunderbird now uses Mozilla's latest proxy technology (add-on FoxyProxy
now supported)
Thunderbird now uses the latest Rust-based Mozilla technology, including
Quantum's CSS engine (based on Servo) and encoding_rs, for displaying
and encoding messages
All certificates issued by Symantec roots before 2016-06-01 are
distrusted for use in TLS secured traffic in Thunderbird 60 and above.
This applies to all brands Symantec operated: Thawte, RapidSSL,
GeoTrust, Verisign, and Symantec. For usage in S/MIME the certificates
remain valid. Details here.
Calendar: Removal of capability to send email invitations compatible
to Outlook 2002 and earlier
Calendar: Reminders on read-only calendars can now be dismissed, while
reminders for missed events will now only be displayed for writable
calendars if option "Show missed reminders for writable calendars" is
selected
Thunderbird Chat: Nicknames inside of messages are colored to match
the participants list
fixed
When many Thunderbird clients or other email clients accessed the same
IMAP draft folder, messages were sometimes sent with the wrong
identity. This has been corrected and the user will be notified if
none of their identities matches the draft.
Various problems related to handling the IMAP trash folder: Under
certain circumstances the selection of the trash folder didn't persist,
for example when the name contained non-ASCII characters, or in
localized versions of Thunderbird. At times unwanted adtext menu behavior
Better error handling for Gmail authentication to avoid re-downloading
of folders
Thunderbird used a stale cached password after user edited a saved
password
Calendar: Wrong time formatting for some time zones
Calendar: Can't copy information from event dialog for received invitations
Various security fixes
Security fixes:
#CVE-2018-12359: Buffer overflow using computed size of canvas element
#CVE-2018-12360: Use-after-free when using focus()
#CVE-2018-12361: Integer overflow in SwizzleData
#CVE-2018-12362: Integer overflow in SSSE3 scaler
#CVE-2018-5156: Media recorder segmentation fault when track type is changed during capture
#CVE-2018-12363: Use-after-free when appending DOM nodes
#CVE-2018-12364: CSRF attacks through 307 redirects and NPAPI plugins
#CVE-2018-12365: Compromised IPC child process can list local filenames
#CVE-2018-12371: Integer overflow in Skia library during edge builder allocation
#CVE-2018-12366: Invalid data handling during QCMS transformations
#CVE-2018-12367: Timing attack mitigation of PerformanceNavigationTiming
#CVE-2018-12368: No warning when opening executable SettingContent-ms files
#CVE-2018-5187: Memory safety bugs fixed in Firefox 61, Firefox ESR 60.1, and Thunderbird 60
#CVE-2018-5188: Memory sa60
Diffstat (limited to 'mail/thunderbird/patches')
149 files changed, 1023 insertions, 3675 deletions
diff --git a/mail/thunderbird/patches/patch-Makefile.in b/mail/thunderbird/patches/patch-Makefile.in new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mail/thunderbird/patches/patch-Makefile.in diff --git a/mail/thunderbird/patches/patch-browser_app_profile_firefox.js b/mail/thunderbird/patches/patch-browser_app_profile_firefox.js new file mode 100644 index 00000000000..234f75f9da9 --- /dev/null +++ b/mail/thunderbird/patches/patch-browser_app_profile_firefox.js @@ -0,0 +1,14 @@ +$NetBSD: patch-browser_app_profile_firefox.js,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- browser/app/profile/firefox.js.orig 2018-12-04 23:11:44.000000000 +0000 ++++ browser/app/profile/firefox.js +@@ -1748,3 +1748,9 @@ pref("app.shield.optoutstudies.enabled", + #else + pref("app.shield.optoutstudies.enabled", false); + #endif ++ ++// Select UI locale from LANG/LC_MESSAGE environmental variables ++pref("intl.locale.requested", ""); ++ ++// Disable multiprocess window support. Workaround for PR 53273. ++pref("browser.tabs.remote.autostart", false); diff --git a/mail/thunderbird/patches/patch-build_moz.configure_old.configure b/mail/thunderbird/patches/patch-build_moz.configure_old.configure new file mode 100644 index 00000000000..ef275b4a40f --- /dev/null +++ b/mail/thunderbird/patches/patch-build_moz.configure_old.configure @@ -0,0 +1,12 @@ +$NetBSD: patch-build_moz.configure_old.configure,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- build/moz.configure/old.configure.orig 2018-12-04 23:11:44.000000000 +0000 ++++ build/moz.configure/old.configure +@@ -262,6 +262,7 @@ def old_configure_options(*options): + '--with-nspr-prefix', + '--with-nss-exec-prefix', + '--with-nss-prefix', ++ '--with-oss', + '--with-pthreads', + '--with-qemu-exe', + '--with-sixgill', diff --git a/mail/thunderbird/patches/patch-build_moz.configure_rust.configure b/mail/thunderbird/patches/patch-build_moz.configure_rust.configure new file mode 100644 index 00000000000..0741eaf92ff --- /dev/null +++ b/mail/thunderbird/patches/patch-build_moz.configure_rust.configure @@ -0,0 +1,13 @@ +$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- build/moz.configure/rust.configure.orig 2018-12-04 23:11:44.000000000 +0000 ++++ build/moz.configure/rust.configure +@@ -119,6 +119,8 @@ def rust_supported_targets(rustc): + ambiguous = set() + per_raw_os = {} + for t in out: ++ if t == 'aarch64-fuchsia' or t == 'x86_64-fuchsia': ++ t = t.replace('-', '--') + t = split_triplet(t, allow_unknown=True) + key = (t.cpu, t.endianness, t.os) + if key in per_os: diff --git a/mail/thunderbird/patches/patch-calendar_lightning_Makefile.in b/mail/thunderbird/patches/patch-calendar_lightning_Makefile.in deleted file mode 100644 index 85fb948df65..00000000000 --- a/mail/thunderbird/patches/patch-calendar_lightning_Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-calendar_lightning_Makefile.in,v 1.4 2016/04/17 18:33:50 ryoon Exp $ - ---- calendar/lightning/Makefile.in.orig 2016-04-07 21:14:23.000000000 +0000 -+++ calendar/lightning/Makefile.in -@@ -5,7 +5,7 @@ - # Calendar builders currently use STRIP_XPI to reduce the binary component in - # Lightning. - --XPI_PKGNAME = lightning-$(LIGHTNING_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM) -+XPI_PKGNAME = lightning - XPI_VERSION = $(LIGHTNING_VERSION) - - XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41df1933103} diff --git a/mail/thunderbird/patches/patch-calendar_lightning_build_universal.mk b/mail/thunderbird/patches/patch-calendar_lightning_build_universal.mk deleted file mode 100644 index 38b2f36ed64..00000000000 --- a/mail/thunderbird/patches/patch-calendar_lightning_build_universal.mk +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-calendar_lightning_build_universal.mk,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- calendar/lightning/build/universal.mk.orig 2016-04-07 21:14:23.000000000 +0000 -+++ calendar/lightning/build/universal.mk -@@ -19,7 +19,7 @@ include $(topsrcdir)/mozilla/toolkit/moz - - THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt) - LIGHTNING_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION))) --XPI_PKGNAME = lightning-$(LIGHTNING_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM) -+XPI_PKGNAME = lightning - - STANDALONE_MAKEFILE := 1 - include $(TOPSRCDIR)/config/config.mk diff --git a/mail/thunderbird/patches/patch-comm_calendar_lightning_Makefile.in b/mail/thunderbird/patches/patch-comm_calendar_lightning_Makefile.in new file mode 100644 index 00000000000..732799141e3 --- /dev/null +++ b/mail/thunderbird/patches/patch-comm_calendar_lightning_Makefile.in @@ -0,0 +1,13 @@ +$NetBSD: patch-comm_calendar_lightning_Makefile.in,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- comm/calendar/lightning/Makefile.in.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/calendar/lightning/Makefile.in +@@ -5,7 +5,7 @@ + # Calendar builders currently use STRIP_XPI to reduce the binary component in + # Lightning. + +-XPI_PKGNAME = lightning-$(LIGHTNING_VERSION).$(AB_CD) ++XPI_PKGNAME = lightning + XPI_VERSION = $(LIGHTNING_VERSION) + + XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41df1933103} diff --git a/mail/thunderbird/patches/patch-calendar_providers_gdata_Makefile.in b/mail/thunderbird/patches/patch-comm_calendar_providers_gdata_Makefile.in index 95b62a41001..65c1af4c050 100644 --- a/mail/thunderbird/patches/patch-calendar_providers_gdata_Makefile.in +++ b/mail/thunderbird/patches/patch-comm_calendar_providers_gdata_Makefile.in @@ -1,7 +1,7 @@ -$NetBSD: patch-calendar_providers_gdata_Makefile.in,v 1.4 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-comm_calendar_providers_gdata_Makefile.in,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- calendar/providers/gdata/Makefile.in.orig 2016-04-07 21:14:23.000000000 +0000 -+++ calendar/providers/gdata/Makefile.in +--- comm/calendar/providers/gdata/Makefile.in.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/calendar/providers/gdata/Makefile.in @@ -2,7 +2,7 @@ # 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/. @@ -9,5 +9,5 @@ $NetBSD: patch-calendar_providers_gdata_Makefile.in,v 1.4 2016/04/17 18:33:50 ry -XPI_PKGNAME = gdata-provider-$(GDATA_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM) +XPI_PKGNAME = gdata-provider XPI_VERSION = $(GDATA_VERSION) - XPI_NO_UNIVERSAL = 1 XPI_EM_ID = {a62ef8ec-5fdc-40c2-873c-223b8a6925cc} + XPI_INSTALL_EXTENSION = $(XPI_EM_ID) diff --git a/mail/thunderbird/patches/patch-ldap_c-sdk_include_portable.h b/mail/thunderbird/patches/patch-comm_ldap_c-sdk_include_portable.h index 73bc57cfef5..3b45bd6344f 100644 --- a/mail/thunderbird/patches/patch-ldap_c-sdk_include_portable.h +++ b/mail/thunderbird/patches/patch-comm_ldap_c-sdk_include_portable.h @@ -1,7 +1,7 @@ -$NetBSD: patch-ldap_c-sdk_include_portable.h,v 1.1 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-comm_ldap_c-sdk_include_portable.h,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- ldap/c-sdk/include/portable.h.orig 2016-04-07 21:14:24.000000000 +0000 -+++ ldap/c-sdk/include/portable.h +--- comm/ldap/c-sdk/include/portable.h.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/ldap/c-sdk/include/portable.h @@ -122,7 +122,7 @@ * some systems don't have the BSD re_comp and re_exec routines */ diff --git a/mail/thunderbird/patches/patch-mail_app_nsMailApp.cpp b/mail/thunderbird/patches/patch-comm_mail_app_nsMailApp.cpp index cd4e6323a45..19cba77affa 100644 --- a/mail/thunderbird/patches/patch-mail_app_nsMailApp.cpp +++ b/mail/thunderbird/patches/patch-comm_mail_app_nsMailApp.cpp @@ -1,7 +1,7 @@ -$NetBSD: patch-mail_app_nsMailApp.cpp,v 1.2 2017/04/27 13:32:40 ryoon Exp $ +$NetBSD: patch-comm_mail_app_nsMailApp.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- mail/app/nsMailApp.cpp.orig 2017-04-14 04:52:45.000000000 +0000 -+++ mail/app/nsMailApp.cpp +--- comm/mail/app/nsMailApp.cpp.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/mail/app/nsMailApp.cpp @@ -14,6 +14,26 @@ #include <sys/resource.h> #include <unistd.h> @@ -29,11 +29,11 @@ $NetBSD: patch-mail_app_nsMailApp.cpp,v 1.2 2017/04/27 13:32:40 ryoon Exp $ #include <stdio.h> #include <stdarg.h> -@@ -261,6 +281,7 @@ FileExists(const char *path) +@@ -235,6 +255,7 @@ static int do_main(int argc, char* argv[ static nsresult - InitXPCOMGlue(const char *argv0, nsIFile **xreDirectory) + InitXPCOMGlue() { + netbsd_fixrlimit(); - char exePath[MAXPATHLEN]; - - nsresult rv = mozilla::BinaryPath::Get(argv0, exePath); + UniqueFreePtr<char> exePath = BinaryPath::Get(); + if (!exePath) { + Output("Couldn't find the application directory.\n"); diff --git a/mail/thunderbird/patches/patch-mail_components_shell_nsMailGNOMEIntegration.cpp b/mail/thunderbird/patches/patch-comm_mail_components_shell_nsMailGNOMEIntegration.cpp index 2ba01659608..2c93219f10e 100644 --- a/mail/thunderbird/patches/patch-mail_components_shell_nsMailGNOMEIntegration.cpp +++ b/mail/thunderbird/patches/patch-comm_mail_components_shell_nsMailGNOMEIntegration.cpp @@ -1,7 +1,7 @@ -$NetBSD: patch-mail_components_shell_nsMailGNOMEIntegration.cpp,v 1.3 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-comm_mail_components_shell_nsMailGNOMEIntegration.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- mail/components/shell/nsMailGNOMEIntegration.cpp.orig 2016-04-07 21:14:23.000000000 +0000 -+++ mail/components/shell/nsMailGNOMEIntegration.cpp +--- comm/mail/components/shell/nsMailGNOMEIntegration.cpp.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/mail/components/shell/nsMailGNOMEIntegration.cpp @@ -50,16 +50,16 @@ struct AppTypeAssociation { static const AppTypeAssociation sAppTypes[] = { diff --git a/mail/thunderbird/patches/patch-comm_mail_installer_package-manifest.in b/mail/thunderbird/patches/patch-comm_mail_installer_package-manifest.in new file mode 100644 index 00000000000..47d4723e901 --- /dev/null +++ b/mail/thunderbird/patches/patch-comm_mail_installer_package-manifest.in @@ -0,0 +1,13 @@ +$NetBSD: patch-comm_mail_installer_package-manifest.in,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- comm/mail/installer/package-manifest.in.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/mail/installer/package-manifest.in +@@ -807,7 +807,7 @@ + #endif + + ; for Solaris SPARC +-#ifdef SOLARIS ++#if defined(SOLARIS) && defined(SPARC) + @BINPATH@/@DLL_PREFIX@freebl_32fpu_3@DLL_SUFFIX@ + @BINPATH@/@DLL_PREFIX@freebl_32int_3@DLL_SUFFIX@ + @BINPATH@/@DLL_PREFIX@freebl_32int64_3@DLL_SUFFIX@ diff --git a/mail/thunderbird/patches/patch-mail_installer_removed-files.in b/mail/thunderbird/patches/patch-comm_mail_installer_removed-files.in index 94241f7985a..f3873e2bfd8 100644 --- a/mail/thunderbird/patches/patch-mail_installer_removed-files.in +++ b/mail/thunderbird/patches/patch-comm_mail_installer_removed-files.in @@ -1,8 +1,20 @@ -$NetBSD: patch-mail_installer_removed-files.in,v 1.3 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-comm_mail_installer_removed-files.in,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- mail/installer/removed-files.in.orig 2016-04-07 21:14:23.000000000 +0000 -+++ mail/installer/removed-files.in -@@ -196,42 +196,6 @@ +--- comm/mail/installer/removed-files.in.orig 2018-12-04 23:12:16.000000000 +0000 ++++ comm/mail/installer/removed-files.in +@@ -186,51 +186,15 @@ + @DIR_RESOURCES@extensions/ + @DIR_RESOURCES@extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/* + #else +-@DIR_RESOURCES@distribution/ +-@DIR_RESOURCES@distribution/extensions/ +-@DIR_RESOURCES@distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/* ++@DIR_RESOURCES@bin/distribution/ ++@DIR_RESOURCES@bin/distribution/extensions/ ++@DIR_RESOURCES@bin/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/* + #endif + + @DIR_MACOS@greprefs/all.js @DIR_MACOS@greprefs/security-prefs.js @DIR_MACOS@greprefs/xpinstall.js @DIR_MACOS@greprefs/ diff --git a/mail/thunderbird/patches/patch-dom_fetch_FetchConsumer.cpp b/mail/thunderbird/patches/patch-dom_fetch_FetchConsumer.cpp new file mode 100644 index 00000000000..33bb2f63dbb --- /dev/null +++ b/mail/thunderbird/patches/patch-dom_fetch_FetchConsumer.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-dom_fetch_FetchConsumer.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- dom/fetch/FetchConsumer.cpp.orig 2018-12-04 23:11:45.000000000 +0000 ++++ dom/fetch/FetchConsumer.cpp +@@ -616,7 +616,7 @@ FetchBodyConsumer<Derived>::ContinueCons + RefPtr<Promise> localPromise = mConsumePromise.forget(); + + RefPtr<FetchBodyConsumer<Derived>> self = this; +- auto autoReleaseObject = mozilla::MakeScopeExit([&] { ++ auto autoReleaseObject = mozilla::MakeScopeExit([self] { + self->ReleaseObject(); + }); + diff --git a/mail/thunderbird/patches/patch-dom_media_CubebUtils.cpp b/mail/thunderbird/patches/patch-dom_media_CubebUtils.cpp new file mode 100644 index 00000000000..7ef1535faea --- /dev/null +++ b/mail/thunderbird/patches/patch-dom_media_CubebUtils.cpp @@ -0,0 +1,14 @@ +$NetBSD: patch-dom_media_CubebUtils.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- dom/media/CubebUtils.cpp.orig 2018-12-04 23:11:46.000000000 +0000 ++++ dom/media/CubebUtils.cpp +@@ -152,7 +152,8 @@ const char* AUDIOSTREAM_BACKEND_ID_STR[] + "sndio", + "opensl", + "audiotrack", +- "kai" ++ "kai", ++ "oss", + }; + /* Index for failures to create an audio stream the first time. */ + const int CUBEB_BACKEND_INIT_FAILURE_FIRST = diff --git a/mail/thunderbird/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp b/mail/thunderbird/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp new file mode 100644 index 00000000000..da95ac3d3c1 --- /dev/null +++ b/mail/thunderbird/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp.orig 2018-12-04 23:11:47.000000000 +0000 ++++ gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp +@@ -91,7 +91,7 @@ on big endian machines, or a byte-by-byt + /* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __), + * or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */ + #if !defined(__BYTE_ORDER) +- #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN==1 ++ #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__-0==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN-0==1 + #define __BYTE_ORDER __LITTLE_ENDIAN + #elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN==1 + #define __BYTE_ORDER __BIG_ENDIAN diff --git a/mail/thunderbird/patches/patch-gfx_webrender_src_query.rs b/mail/thunderbird/patches/patch-gfx_webrender_src_query.rs new file mode 100644 index 00000000000..9e082338668 --- /dev/null +++ b/mail/thunderbird/patches/patch-gfx_webrender_src_query.rs @@ -0,0 +1,25 @@ +$NetBSD: patch-gfx_webrender_src_query.rs,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- gfx/webrender/src/query.rs.orig 2018-12-04 23:11:47.000000000 +0000 ++++ gfx/webrender/src/query.rs +@@ -274,17 +274,20 @@ pub struct GpuMarker { + + impl GpuMarker { + fn new(gl: &Rc<gl::Gl>, message: &str) -> Self { ++#[cfg(not(target_arch = "x86"))] + gl.push_group_marker_ext(message); + GpuMarker { gl: Rc::clone(gl) } + } + + fn fire(gl: &Rc<gl::Gl>, message: &str) { ++#[cfg(not(target_arch = "x86"))] + gl.insert_event_marker_ext(message); + } + } + + impl Drop for GpuMarker { + fn drop(&mut self) { ++#[cfg(not(target_arch = "x86"))] + self.gl.pop_group_marker_ext(); + } + } diff --git a/mail/thunderbird/patches/patch-mozilla_image_decoders_nsJPEGDecoder.cpp b/mail/thunderbird/patches/patch-image_decoders_nsJPEGDecoder.cpp index 6c825858aad..b3ebadfb583 100644 --- a/mail/thunderbird/patches/patch-mozilla_image_decoders_nsJPEGDecoder.cpp +++ b/mail/thunderbird/patches/patch-image_decoders_nsJPEGDecoder.cpp @@ -1,8 +1,8 @@ -$NetBSD: patch-mozilla_image_decoders_nsJPEGDecoder.cpp,v 1.4 2017/04/27 13:32:40 ryoon Exp $ +$NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- mozilla/image/decoders/nsJPEGDecoder.cpp.orig 2017-04-14 04:53:09.000000000 +0000 -+++ mozilla/image/decoders/nsJPEGDecoder.cpp -@@ -28,13 +28,28 @@ +--- image/decoders/nsJPEGDecoder.cpp.orig 2018-12-04 23:11:48.000000000 +0000 ++++ image/decoders/nsJPEGDecoder.cpp +@@ -29,13 +29,28 @@ extern "C" { #include "iccjpeg.h" @@ -32,7 +32,7 @@ $NetBSD: patch-mozilla_image_decoders_nsJPEGDecoder.cpp,v 1.4 2017/04/27 13:32:4 static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width); -@@ -360,6 +375,7 @@ nsJPEGDecoder::ReadJPEGData(const char* +@@ -354,6 +369,7 @@ nsJPEGDecoder::ReadJPEGData(const char* case JCS_GRAYSCALE: case JCS_RGB: case JCS_YCbCr: @@ -40,7 +40,7 @@ $NetBSD: patch-mozilla_image_decoders_nsJPEGDecoder.cpp,v 1.4 2017/04/27 13:32:4 // if we're not color managing we can decode directly to // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB if (mCMSMode != eCMSMode_All) { -@@ -368,6 +384,9 @@ nsJPEGDecoder::ReadJPEGData(const char* +@@ -362,6 +378,9 @@ nsJPEGDecoder::ReadJPEGData(const char* } else { mInfo.out_color_space = JCS_RGB; } @@ -50,7 +50,7 @@ $NetBSD: patch-mozilla_image_decoders_nsJPEGDecoder.cpp,v 1.4 2017/04/27 13:32:4 break; case JCS_CMYK: case JCS_YCCK: -@@ -439,6 +458,16 @@ nsJPEGDecoder::ReadJPEGData(const char* +@@ -436,6 +455,16 @@ nsJPEGDecoder::ReadJPEGData(const char* return Transition::ContinueUnbuffered(State::JPEG_DATA); // I/O suspension } @@ -67,7 +67,7 @@ $NetBSD: patch-mozilla_image_decoders_nsJPEGDecoder.cpp,v 1.4 2017/04/27 13:32:4 // If this is a progressive JPEG ... mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; -@@ -636,7 +665,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus +@@ -633,7 +662,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus MOZ_ASSERT(imageRow, "Should have a row buffer here"); @@ -79,7 +79,7 @@ $NetBSD: patch-mozilla_image_decoders_nsJPEGDecoder.cpp,v 1.4 2017/04/27 13:32:4 // Special case: scanline will be directly converted into packed ARGB if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) { *suspend = true; // suspend -@@ -960,6 +993,282 @@ term_source (j_decompress_ptr jd) +@@ -965,6 +998,282 @@ term_source (j_decompress_ptr jd) } // namespace image } // namespace mozilla diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_base_lock__impl__posix.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_lock__impl__posix.cc new file mode 100644 index 00000000000..3d482d8160f --- /dev/null +++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_lock__impl__posix.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-ipc_chromium_src_base_lock__impl__posix.cc,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- ipc/chromium/src/base/lock_impl_posix.cc.orig 2018-12-04 23:11:48.000000000 +0000 ++++ ipc/chromium/src/base/lock_impl_posix.cc +@@ -22,7 +22,7 @@ namespace internal { + // Lock::PriorityInheritanceAvailable still must be checked as the code may + // compile but the underlying platform still may not correctly support priority + // inheritance locks. +-#if defined(OS_NACL) || defined(OS_ANDROID) ++#if defined(OS_NACL) || defined(OS_ANDROID) || (defined(__NetBSD__) && !defined(PTHREAD_PRIO_INHERIT)) + #define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0 + #else + #define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1 diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_message__pump__libevent.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc index f105831d9d0..485cd367366 100644 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_message__pump__libevent.cc +++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc @@ -1,8 +1,8 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_message__pump__libevent.cc,v 1.4 2017/03/26 04:05:40 ryoon Exp $ +$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.1 2018/12/16 08:12:15 ryoon Exp $ ---- mozilla/ipc/chromium/src/base/message_pump_libevent.cc.orig 2017-03-05 20:58:25.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc -@@ -20,6 +20,7 @@ +--- ipc/chromium/src/base/message_pump_libevent.cc.orig 2018-12-04 23:11:48.000000000 +0000 ++++ ipc/chromium/src/base/message_pump_libevent.cc +@@ -22,6 +22,7 @@ // This macro checks that the _EVENT_SIZEOF_* constants defined in // ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct. @@ -10,7 +10,7 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_message__pump__libevent.cc,v 1.4 20 #if defined(_EVENT_SIZEOF_SHORT) #define CHECK_EVENT_SIZEOF(TYPE, type) \ static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \ -@@ -38,6 +39,7 @@ CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t) +@@ -41,6 +42,7 @@ CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t) CHECK_EVENT_SIZEOF(SHORT, short); CHECK_EVENT_SIZEOF(SIZE_T, size_t); CHECK_EVENT_SIZEOF(VOID_P, void*); diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc new file mode 100644 index 00000000000..5a8046fd312 --- /dev/null +++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc @@ -0,0 +1,23 @@ +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.10 2018/12/16 08:12:15 ryoon Exp $ + +--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2018-12-04 23:11:48.000000000 +0000 ++++ ipc/chromium/src/base/platform_thread_posix.cc +@@ -12,7 +12,9 @@ + #if defined(OS_MACOSX) + #include <mach/mach.h> + #elif defined(OS_NETBSD) ++_Pragma("GCC visibility push(default)") + #include <lwp.h> ++_Pragma("GCC visibility pop") + #elif defined(OS_LINUX) + #include <sys/syscall.h> + #include <sys/prctl.h> +@@ -103,7 +105,7 @@ void PlatformThread::SetName(const char* + pthread_setname_np(pthread_self(), "%s", (void *)name); + #elif defined(OS_BSD) && !defined(__GLIBC__) + pthread_set_name_np(pthread_self(), name); +-#elif defined(OS_SOLARIS) ++#elif defined(notOS_SOLARIS) + pthread_setname_np(pthread_self(), name); + #else + #endif diff --git a/mail/thunderbird/patches/patch-ipc_glue_CrossProcessSemaphore.h b/mail/thunderbird/patches/patch-ipc_glue_CrossProcessSemaphore.h new file mode 100644 index 00000000000..f37c1564eef --- /dev/null +++ b/mail/thunderbird/patches/patch-ipc_glue_CrossProcessSemaphore.h @@ -0,0 +1,18 @@ +$NetBSD: patch-ipc_glue_CrossProcessSemaphore.h,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- ipc/glue/CrossProcessSemaphore.h.orig 2018-12-04 23:11:48.000000000 +0000 ++++ ipc/glue/CrossProcessSemaphore.h +@@ -93,7 +93,13 @@ private: + HANDLE mSemaphore; + #elif !defined(OS_MACOSX) + RefPtr<mozilla::ipc::SharedMemoryBasic> mSharedBuffer; ++#if defined(__NetBSD__) ++ pthread_mutex_t* mMutex; ++ pthread_cond_t* mNotZero; ++ uint32_t* mValue; ++#else + sem_t* mSemaphore; ++#endif + mozilla::Atomic<int32_t>* mRefCount; + #endif + }; diff --git a/mail/thunderbird/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp b/mail/thunderbird/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp new file mode 100644 index 00000000000..03452349435 --- /dev/null +++ b/mail/thunderbird/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp @@ -0,0 +1,188 @@ +$NetBSD: patch-ipc_glue_CrossProcessSemaphore__posix.cpp,v 1.1 2018/12/16 08:12:15 ryoon Exp $ + +--- ipc/glue/CrossProcessSemaphore_posix.cpp.orig 2018-12-04 23:11:48.000000000 +0000 ++++ ipc/glue/CrossProcessSemaphore_posix.cpp +@@ -9,6 +9,11 @@ + #include "nsDebug.h" + #include "nsISupportsImpl.h" + #include <errno.h> ++#if defined(__NetBSD__) ++#include <iostream> ++#include <unistd.h> ++#include <limits> ++#endif + + static const uint64_t kNsPerMs = 1000000; + static const uint64_t kNsPerSec = 1000000000; +@@ -17,7 +22,13 @@ namespace { + + + struct SemaphoreData { ++#if defined(__NetBSD__) ++ pthread_mutex_t mMutex; ++ pthread_cond_t mNotZero; ++ uint32_t mValue; ++#else + sem_t mSemaphore; ++#endif + mozilla::Atomic<int32_t> mRefCount; + uint32_t mInitialValue; + }; +@@ -44,13 +55,27 @@ CrossProcessSemaphore::Create(const char + return nullptr; + } + ++#if defined(__NetBSD__) ++ data->mValue = aInitialValue; ++ if (pthread_mutex_init(&data->mMutex, NULL) || ++ pthread_cond_init(&data->mNotZero, NULL) ) { ++ return nullptr; ++ } ++#else + if (sem_init(&data->mSemaphore, 1, aInitialValue)) { + return nullptr; + } ++#endif + + CrossProcessSemaphore* sem = new CrossProcessSemaphore; + sem->mSharedBuffer = sharedBuffer; ++#if defined(__NetBSD__) ++ sem->mMutex = &data->mMutex; ++ sem->mNotZero = &data->mNotZero; ++ sem->mValue = &data->mValue; ++#else + sem->mSemaphore = &data->mSemaphore; ++#endif + sem->mRefCount = &data->mRefCount; + *sem->mRefCount = 1; + +@@ -86,24 +111,44 @@ CrossProcessSemaphore::Create(CrossProce + + int32_t oldCount = data->mRefCount++; + if (oldCount == 0) { ++#if defined(__NetBSD__) ++ if (pthread_mutex_init(&data->mMutex, NULL) || ++ pthread_cond_init(&data->mNotZero, NULL) ) { ++ data->mRefCount--; ++ return nullptr; ++ } ++#else + // The other side has already let go of their CrossProcessSemaphore, so now + // mSemaphore is garbage. We need to re-initialize it. + if (sem_init(&data->mSemaphore, 1, data->mInitialValue)) { + data->mRefCount--; + return nullptr; + } ++#endif + } + + CrossProcessSemaphore* sem = new CrossProcessSemaphore; + sem->mSharedBuffer = sharedBuffer; ++#if defined(__NetBSD__) ++ sem->mMutex = &data->mMutex; ++ sem->mNotZero = &data->mNotZero; ++ sem->mValue = &data->mValue; ++#else + sem->mSemaphore = &data->mSemaphore; ++#endif + sem->mRefCount = &data->mRefCount; + return sem; + } + + + CrossProcessSemaphore::CrossProcessSemaphore() ++#if defined(__NetBSD__) ++ : mMutex (nullptr) ++ , mNotZero (nullptr) ++ , mValue (nullptr) ++#else + : mSemaphore(nullptr) ++#endif + , mRefCount(nullptr) + { + MOZ_COUNT_CTOR(CrossProcessSemaphore); +@@ -115,17 +160,58 @@ CrossProcessSemaphore::~CrossProcessSema + + if (oldCount == 0) { + // Nothing can be done if the destroy fails so ignore return code. ++#if defined(__NetBSD__) ++ (void)pthread_cond_destroy(mNotZero); ++ (void)pthread_mutex_destroy(mMutex); ++#else + Unused << sem_destroy(mSemaphore); ++#endif + } + + MOZ_COUNT_DTOR(CrossProcessSemaphore); + } + ++#if defined(__NetBSD__) ++static struct timespec ++makeAbsTime(const Maybe<TimeDuration>& aWaitTime) { ++ struct timespec ts; ++ if (aWaitTime.isSome()) { ++ clock_gettime(CLOCK_REALTIME, &ts); ++ ts.tv_nsec += (kNsPerMs * aWaitTime->ToMilliseconds()); ++ ts.tv_sec += ts.tv_nsec / kNsPerSec; ++ ts.tv_nsec %= kNsPerSec; ++ } ++ else { ++ ts.tv_sec = std::numeric_limits<time_t>::max(); ++ ts.tv_nsec = 0; ++ } ++ return ts; ++} ++#endif ++ + bool + CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime) + { + MOZ_ASSERT(*mRefCount > 0, "Attempting to wait on a semaphore with zero ref count"); + int ret; ++#if defined(__NetBSD__) ++ struct timespec ts = makeAbsTime(aWaitTime); ++ ++ ret = pthread_mutex_lock(mMutex); ++ ++ if (ret == 0) { ++ while (ret == 0 && mValue == 0) { ++ ret = pthread_cond_timedwait(mNotZero, mMutex, &ts); ++ while (ret == -1 && errno == EINTR) { ++ ret = pthread_cond_timedwait(mNotZero, mMutex, &ts); ++ } ++ } ++ if (ret == 0) { ++ --(*mValue); ++ } ++ pthread_mutex_unlock(mMutex); ++ } ++#else + if (aWaitTime.isSome()) { + struct timespec ts; + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { +@@ -142,6 +228,7 @@ CrossProcessSemaphore::Wait(const Maybe< + while ((ret = sem_wait(mSemaphore)) == -1 && errno == EINTR) { + } + } ++#endif + return ret == 0; + } + +@@ -149,7 +236,17 @@ void + CrossProcessSemaphore::Signal() + { + MOZ_ASSERT(*mRefCount > 0, "Attempting to signal a semaphore with zero ref count"); ++#if defined(__NetBSD__) ++ int ret; ++ ret = pthread_mutex_lock(mMutex); ++ if (ret == 0) { ++ ++(*mValue); ++ pthread_cond_signal(mNotZero); ++ pthread_mutex_unlock(mMutex); ++ } ++#else + sem_post(mSemaphore); ++#endif + } + + CrossProcessSemaphoreHandle diff --git a/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp b/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp new file mode 100644 index 00000000000..51c8442addd --- /dev/null +++ b/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp @@ -0,0 +1,18 @@ +$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.9 2018/12/16 08:12:15 ryoon Exp $ + +--- ipc/glue/GeckoChildProcessHost.cpp.orig 2018-12-04 23:11:48.000000000 +0000 ++++ ipc/glue/GeckoChildProcessHost.cpp +@@ -4,7 +4,13 @@ + * 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 defined(__NetBSD__) ++_Pragma("GCC visibility push(default)") ++#endif + #include "GeckoChildProcessHost.h" ++#if defined(__NetBSD__) ++_Pragma("GCC visibility pop") ++#endif + + #include "base/command_line.h" + #include "base/string_util.h" diff --git a/mail/thunderbird/patches/patch-js_src_gc_Memory.cpp b/mail/thunderbird/patches/patch-js_src_gc_Memory.cpp new file mode 100644 index 00000000000..ad3a1e44a0b --- /dev/null +++ b/mail/thunderbird/patches/patch-js_src_gc_Memory.cpp @@ -0,0 +1,21 @@ +$NetBSD: patch-js_src_gc_Memory.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- js/src/gc/Memory.cpp.orig 2018-12-04 23:11:48.000000000 +0000 ++++ js/src/gc/Memory.cpp +@@ -504,6 +504,7 @@ MapMemoryAt(void* desired, size_t length + { + + #if defined(__ia64__) || defined(__aarch64__) || \ ++ (defined(__sun) && defined(__x86_64__)) || \ + (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__))) + MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0); + #endif +@@ -554,7 +555,7 @@ MapMemory(size_t length, int prot = PROT + return nullptr; + } + return region; +-#elif defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) ++#elif defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__)) + /* + * There might be similar virtual address issue on arm64 which depends on + * hardware and kernel configurations. But the work around is slightly diff --git a/mail/thunderbird/patches/patch-js_src_threading_posix_Thread.cpp b/mail/thunderbird/patches/patch-js_src_threading_posix_Thread.cpp new file mode 100644 index 00000000000..4eea7a00992 --- /dev/null +++ b/mail/thunderbird/patches/patch-js_src_threading_posix_Thread.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-js_src_threading_posix_Thread.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- js/src/threading/posix/Thread.cpp.orig 2018-12-04 23:11:52.000000000 +0000 ++++ js/src/threading/posix/Thread.cpp +@@ -194,6 +194,8 @@ js::ThisThread::SetName(const char* name + rv = 0; + #elif defined(__NetBSD__) + rv = pthread_setname_np(pthread_self(), "%s", (void*)name); ++#elif defined(__sun) ++ rv = 0; + #else + rv = pthread_setname_np(pthread_self(), name); + #endif diff --git a/mail/thunderbird/patches/patch-js_src_util_NativeStack.cpp b/mail/thunderbird/patches/patch-js_src_util_NativeStack.cpp new file mode 100644 index 00000000000..d5be43bdbd7 --- /dev/null +++ b/mail/thunderbird/patches/patch-js_src_util_NativeStack.cpp @@ -0,0 +1,21 @@ +$NetBSD: patch-js_src_util_NativeStack.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- js/src/util/NativeStack.cpp.orig 2018-12-04 23:11:52.000000000 +0000 ++++ js/src/util/NativeStack.cpp +@@ -32,7 +32,7 @@ js::GetNativeStackBaseImpl() + return static_cast<void*>(pTib->StackBase); + } + +-#elif defined(SOLARIS) ++#elif defined(__sun) + + #include <ucontext.h> + +@@ -78,6 +78,7 @@ js::GetNativeStackBaseImpl() + # elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD) + /* e.g. on FreeBSD 4.8 or newer, neundorf@kde.org */ + pthread_attr_get_np(thread, &sattr); ++# elif defined(__sun) + # else + /* + * FIXME: this function is non-portable; diff --git a/mail/thunderbird/patches/patch-js_src_wasm_WasmSignalHandlers.cpp b/mail/thunderbird/patches/patch-js_src_wasm_WasmSignalHandlers.cpp new file mode 100644 index 00000000000..5f0cd42062b --- /dev/null +++ b/mail/thunderbird/patches/patch-js_src_wasm_WasmSignalHandlers.cpp @@ -0,0 +1,12 @@ +$NetBSD: patch-js_src_wasm_WasmSignalHandlers.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- js/src/wasm/WasmSignalHandlers.cpp.orig 2018-12-04 23:11:52.000000000 +0000 ++++ js/src/wasm/WasmSignalHandlers.cpp +@@ -135,6 +135,7 @@ struct AutoSignalHandler + # define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP]) + # define ESP_sig(p) ((p)->uc_mcontext.gregs[REG_ESP]) + # else ++# include <sys/regset.h> + # define XMM_sig(p,i) ((p)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[i]) + # define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_PC]) + # define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP]) diff --git a/mail/thunderbird/patches/patch-mail_installer_package-manifest.in b/mail/thunderbird/patches/patch-mail_installer_package-manifest.in deleted file mode 100644 index 98cb5f42b0c..00000000000 --- a/mail/thunderbird/patches/patch-mail_installer_package-manifest.in +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mail_installer_package-manifest.in,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mail/installer/package-manifest.in.orig 2016-04-07 21:14:23.000000000 +0000 -+++ mail/installer/package-manifest.in -@@ -804,7 +804,7 @@ - #endif - - ; for Solaris SPARC --#ifdef SOLARIS -+#if defined(SOLARIS) && defined(SPARC) - @BINPATH@/@DLL_PREFIX@freebl_32fpu_3@DLL_SUFFIX@ - @BINPATH@/@DLL_PREFIX@freebl_32int_3@DLL_SUFFIX@ - @BINPATH@/@DLL_PREFIX@freebl_32int64_3@DLL_SUFFIX@ diff --git a/mail/thunderbird/patches/patch-mailnews_compose_src_nsMsgCompose.cpp b/mail/thunderbird/patches/patch-mailnews_compose_src_nsMsgCompose.cpp deleted file mode 100644 index b3d6011f41c..00000000000 --- a/mail/thunderbird/patches/patch-mailnews_compose_src_nsMsgCompose.cpp +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-mailnews_compose_src_nsMsgCompose.cpp,v 1.1 2018/03/23 05:29:11 rin Exp $ - -Fix from upstream for Bug 1444371: -mail.label_ascii_only_mail_as_us_ascii does not work with ISO-2022-JP - ---- mailnews/compose/src/nsMsgCompose.cpp.orig 2018-03-23 13:59:55.545701174 +0900 -+++ mailnews/compose/src/nsMsgCompose.cpp 2018-03-23 14:00:30.158529214 +0900 -@@ -1321,12 +1321,11 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_ - } - if (!msgBody.IsEmpty()) - { -+ bool isAsciiOnly = NS_IsAscii(static_cast<const char16_t*>(msgBody.get())); - // Convert body to mail charset - nsCString outCString; - rv = nsMsgI18NConvertFromUnicode(m_compFields->GetCharacterSet(), - msgBody, outCString, false, true); -- bool isAsciiOnly = NS_IsAscii(outCString.get()) && -- !nsMsgI18Nstateful_charset(m_compFields->GetCharacterSet()); - if (m_compFields->GetForceMsgEncoding()) - isAsciiOnly = false; - if (NS_SUCCEEDED(rv) && !outCString.IsEmpty()) diff --git a/mail/thunderbird/patches/patch-mailnews_compose_src_nsMsgSend.cpp b/mail/thunderbird/patches/patch-mailnews_compose_src_nsMsgSend.cpp deleted file mode 100644 index 66492a0afd2..00000000000 --- a/mail/thunderbird/patches/patch-mailnews_compose_src_nsMsgSend.cpp +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-mailnews_compose_src_nsMsgSend.cpp,v 1.1 2018/03/23 05:29:11 rin Exp $ - -Fix from upstream for Bug 1444371: -mail.label_ascii_only_mail_as_us_ascii does not work with ISO-2022-JP - ---- mailnews/compose/src/nsMsgSend.cpp.orig 2018-03-23 14:00:40.325824595 +0900 -+++ mailnews/compose/src/nsMsgSend.cpp 2018-03-23 14:01:05.961104275 +0900 -@@ -1591,9 +1591,8 @@ nsMsgComposeAndSend::GetBodyFromEditor() - - if (aCharset && *aCharset) - { -+ bool isAsciiOnly = NS_IsAscii(bodyText); - rv = nsMsgI18NConvertFromUnicode(aCharset, nsDependentString(bodyText), outCString, false, true); -- bool isAsciiOnly = NS_IsAscii(outCString.get()) && -- !nsMsgI18Nstateful_charset(mCompFields->GetCharacterSet()); - if (mCompFields->GetForceMsgEncoding()) - isAsciiOnly = false; - mCompFields->SetBodyIsAsciiOnly(isAsciiOnly); diff --git a/mail/thunderbird/patches/patch-media_libcubeb_gtest_moz.build b/mail/thunderbird/patches/patch-media_libcubeb_gtest_moz.build new file mode 100644 index 00000000000..9fd5679172c --- /dev/null +++ b/mail/thunderbird/patches/patch-media_libcubeb_gtest_moz.build @@ -0,0 +1,12 @@ +$NetBSD: patch-media_libcubeb_gtest_moz.build,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/libcubeb/gtest/moz.build.orig 2018-12-04 23:11:52.000000000 +0000 ++++ media/libcubeb/gtest/moz.build +@@ -72,7 +72,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD': + 'sndio', + ] + else: +- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] + OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS'] + + if CONFIG['CC_TYPE'] in ('clang', 'gcc'): diff --git a/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb.c b/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb.c new file mode 100644 index 00000000000..8b034a51527 --- /dev/null +++ b/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb.c @@ -0,0 +1,35 @@ +$NetBSD: patch-media_libcubeb_src_cubeb.c,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/libcubeb/src/cubeb.c.orig 2018-12-04 23:11:52.000000000 +0000 ++++ media/libcubeb/src/cubeb.c +@@ -60,6 +60,9 @@ int audiotrack_init(cubeb ** context, ch + #if defined(USE_KAI) + int kai_init(cubeb ** context, char const * context_name); + #endif ++#if defined(USE_OSS) ++int oss_init(cubeb ** context, char const * context_name); ++#endif + + static int + validate_stream_params(cubeb_stream_params * input_stream_params, +@@ -160,6 +163,10 @@ cubeb_init(cubeb ** context, char const + #if defined(USE_KAI) + init_oneshot = kai_init; + #endif ++ } else if (!strcmp(backend_name, "oss")) { ++#if defined(USE_OSS) ++ init_oneshot = oss_init; ++#endif + } else { + /* Already set */ + } +@@ -204,6 +211,9 @@ cubeb_init(cubeb ** context, char const + #if defined(USE_KAI) + kai_init, + #endif ++#if defined(USE_OSS) ++ oss_init, ++#endif + }; + int i; + diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb__alsa.c b/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c index 9f0f9dfaa4a..5cc28a92c05 100644 --- a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb__alsa.c +++ b/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb__alsa.c @@ -1,14 +1,12 @@ -$NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:41 ryoon Exp $ +$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/media/libcubeb/src/cubeb_alsa.c.orig 2017-04-14 04:53:17.000000000 +0000 -+++ mozilla/media/libcubeb/src/cubeb_alsa.c -@@ -7,11 +7,15 @@ +--- media/libcubeb/src/cubeb_alsa.c.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/libcubeb/src/cubeb_alsa.c +@@ -7,11 +7,13 @@ #undef NDEBUG #define _DEFAULT_SOURCE #define _BSD_SOURCE -+#if defined(__NetBSD__) +#define _NETBSD_SOURCE -+#endif #define _XOPEN_SOURCE 500 #include <pthread.h> #include <sys/time.h> @@ -18,7 +16,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 #include <poll.h> #include <unistd.h> #include <alsa/asoundlib.h> -@@ -25,6 +29,50 @@ +@@ -25,6 +27,52 @@ #define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin" @@ -58,8 +56,10 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 +MAKE_TYPEDEF(snd_pcm_poll_descriptors); +MAKE_TYPEDEF(snd_pcm_poll_descriptors_count); +MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents); ++MAKE_TYPEDEF(snd_pcm_readi); +MAKE_TYPEDEF(snd_pcm_recover); +MAKE_TYPEDEF(snd_pcm_set_params); ++MAKE_TYPEDEF(snd_pcm_start); +MAKE_TYPEDEF(snd_pcm_state); +MAKE_TYPEDEF(snd_pcm_writei); + @@ -78,53 +78,85 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 }; enum stream_state { -@@ -260,10 +310,10 @@ alsa_refill_stream(cubeb_stream * stm) +@@ -245,8 +295,8 @@ set_timeout(struct timeval * timeout, un + static void + stream_buffer_decrement(cubeb_stream * stm, long count) + { +- char * bufremains = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, count); +- memmove(stm->buffer, bufremains, snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes - count)); ++ char * bufremains = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, count); ++ memmove(stm->buffer, bufremains, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes - count)); + stm->bufframes -= count; + } - pthread_mutex_lock(&stm->mutex); +@@ -278,9 +328,9 @@ alsa_process_stream(cubeb_stream * stm) + /* Call _poll_descriptors_revents() even if we don't use it + to let underlying plugins clear null events. Otherwise poll() + may wake up again and again, producing unnecessary CPU usage. */ +- snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents); ++ WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents); - avail = snd_pcm_avail_update(stm->pcm); + avail = WRAP(snd_pcm_avail_update)(stm->pcm); - if (avail < 0) { -- snd_pcm_recover(stm->pcm, avail, 1); -- avail = snd_pcm_avail_update(stm->pcm); -+ WRAP(snd_pcm_recover)(stm->pcm, avail, 1); -+ avail = WRAP(snd_pcm_avail_update)(stm->pcm); - } - - /* Failed to recover from an xrun, this stream must be broken. */ -@@ -286,7 +336,7 @@ alsa_refill_stream(cubeb_stream * stm) - return RUNNING; - } -- p = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, avail)); -+ p = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, avail)); - assert(p); + /* Got null event? Bail and wait for another wakeup. */ + if (avail == 0) { +@@ -303,7 +353,7 @@ alsa_process_stream(cubeb_stream * stm) + // TODO: should it be marked as DRAINING? + } - pthread_mutex_unlock(&stm->mutex); -@@ -312,10 +362,10 @@ alsa_refill_stream(cubeb_stream * stm) - b[i] *= stm->volume; +- got = snd_pcm_readi(stm->pcm, stm->buffer+stm->bufframes, avail); ++ got = WRAP(snd_pcm_readi)(stm->pcm, stm->buffer+stm->bufframes, avail); + + if (got < 0) { + avail = got; // the error handler below will recover us +@@ -347,7 +397,7 @@ alsa_process_stream(cubeb_stream * stm) + (!stm->other_stream || stm->other_stream->bufframes > 0)) { + long got = avail - stm->bufframes; + void * other_buffer = stm->other_stream ? stm->other_stream->buffer : NULL; +- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes); ++ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes); + + /* Correct read size to the other stream available frames */ + if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) { +@@ -374,8 +424,8 @@ alsa_process_stream(cubeb_stream * stm) + long drain_frames = avail - stm->bufframes; + double drain_time = (double) drain_frames / stm->params.rate; + +- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes); +- memset(buftail, 0, snd_pcm_frames_to_bytes(stm->pcm, drain_frames)); ++ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes); ++ memset(buftail, 0, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, drain_frames)); + stm->bufframes = avail; + + /* Mark as draining, unless we're waiting for capture */ +@@ -402,7 +452,7 @@ alsa_process_stream(cubeb_stream * stm) } } -- wrote = snd_pcm_writei(stm->pcm, p, got); -+ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); - if (wrote < 0) { -- snd_pcm_recover(stm->pcm, wrote, 1); -- wrote = snd_pcm_writei(stm->pcm, p, got); -+ WRAP(snd_pcm_recover)(stm->pcm, wrote, 1); -+ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); - } - assert(wrote >= 0 && wrote == got); - stm->write_position += wrote; -@@ -327,7 +377,7 @@ alsa_refill_stream(cubeb_stream * stm) - /* Fill the remaining buffer with silence to guarantee one full period - has been written. */ -- snd_pcm_writei(stm->pcm, (char *) p + got, avail - got); -+ WRAP(snd_pcm_writei)(stm->pcm, (char *) p + got, avail - got); +- wrote = snd_pcm_writei(stm->pcm, stm->buffer, avail); ++ wrote = WRAP(snd_pcm_writei)(stm->pcm, stm->buffer, avail); + if (wrote < 0) { + avail = wrote; // the error handler below will recover us + } else { +@@ -415,13 +465,13 @@ alsa_process_stream(cubeb_stream * stm) - set_timeout(&stm->drain_timeout, buffer_time * 1000); + /* Got some error? Let's try to recover the stream. */ + if (avail < 0) { +- avail = snd_pcm_recover(stm->pcm, avail, 0); ++ avail = WRAP(snd_pcm_recover)(stm->pcm, avail, 0); + + /* Capture pcm must be started after initial setup/recover */ + if (avail >= 0 && + stm->stream_type == SND_PCM_STREAM_CAPTURE && +- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) { +- avail = snd_pcm_start(stm->pcm); ++ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) { ++ avail = WRAP(snd_pcm_start)(stm->pcm); + } + } -@@ -440,26 +490,26 @@ get_slave_pcm_node(snd_config_t * lconf, +@@ -537,26 +587,26 @@ get_slave_pcm_node(snd_config_t * lconf, slave_def = NULL; @@ -156,7 +188,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { break; } -@@ -468,7 +518,7 @@ get_slave_pcm_node(snd_config_t * lconf, +@@ -565,7 +615,7 @@ get_slave_pcm_node(snd_config_t * lconf, if (r < 0 || r > (int) sizeof(node_name)) { break; } @@ -165,7 +197,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { break; } -@@ -477,7 +527,7 @@ get_slave_pcm_node(snd_config_t * lconf, +@@ -574,7 +624,7 @@ get_slave_pcm_node(snd_config_t * lconf, } while (0); if (slave_def) { @@ -174,7 +206,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 } return NULL; -@@ -500,22 +550,22 @@ init_local_config_with_workaround(char c +@@ -597,22 +647,22 @@ init_local_config_with_workaround(char c lconf = NULL; @@ -201,7 +233,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { break; } -@@ -524,7 +574,7 @@ init_local_config_with_workaround(char c +@@ -621,7 +671,7 @@ init_local_config_with_workaround(char c if (r < 0 || r > (int) sizeof(node_name)) { break; } @@ -210,7 +242,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { break; } -@@ -535,12 +585,12 @@ init_local_config_with_workaround(char c +@@ -632,12 +682,12 @@ init_local_config_with_workaround(char c } /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */ @@ -225,7 +257,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { break; } -@@ -551,18 +601,18 @@ init_local_config_with_workaround(char c +@@ -648,18 +698,18 @@ init_local_config_with_workaround(char c /* Don't clobber an explicit existing handle_underrun value, set it only if it doesn't already exist. */ @@ -247,7 +279,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { break; } -@@ -570,7 +620,7 @@ init_local_config_with_workaround(char c +@@ -667,7 +717,7 @@ init_local_config_with_workaround(char c return lconf; } while (0); @@ -256,19 +288,19 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 return NULL; } -@@ -582,9 +632,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, s +@@ -679,9 +729,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, c pthread_mutex_lock(&cubeb_alsa_mutex); if (local_config) { -- r = snd_pcm_open_lconf(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config); -+ r = WRAP(snd_pcm_open_lconf)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config); +- r = snd_pcm_open_lconf(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config); ++ r = WRAP(snd_pcm_open_lconf)(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config); } else { -- r = snd_pcm_open(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK); -+ r = WRAP(snd_pcm_open)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK); +- r = snd_pcm_open(pcm, pcm_name, stream, SND_PCM_NONBLOCK); ++ r = WRAP(snd_pcm_open)(pcm, pcm_name, stream, SND_PCM_NONBLOCK); } pthread_mutex_unlock(&cubeb_alsa_mutex); -@@ -597,7 +647,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm) +@@ -694,7 +744,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm) int r; pthread_mutex_lock(&cubeb_alsa_mutex); @@ -277,7 +309,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 pthread_mutex_unlock(&cubeb_alsa_mutex); return r; -@@ -660,12 +710,65 @@ alsa_init(cubeb ** context, char const * +@@ -757,12 +807,65 @@ alsa_init(cubeb ** context, char const * pthread_attr_t attr; snd_pcm_t * dummy; @@ -344,7 +376,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 cubeb_alsa_error_handler_set = 1; } pthread_mutex_unlock(&cubeb_alsa_mutex); -@@ -673,6 +776,8 @@ alsa_init(cubeb ** context, char const * +@@ -770,6 +873,8 @@ alsa_init(cubeb ** context, char const * ctx = calloc(1, sizeof(*ctx)); assert(ctx); @@ -353,7 +385,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 ctx->ops = &alsa_ops; r = pthread_mutex_init(&ctx->mutex, NULL); -@@ -722,7 +827,7 @@ alsa_init(cubeb ** context, char const * +@@ -819,7 +924,7 @@ alsa_init(cubeb ** context, char const * config fails with EINVAL, the PA PCM is too old for this workaround. */ if (r == -EINVAL) { pthread_mutex_lock(&cubeb_alsa_mutex); @@ -362,7 +394,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 pthread_mutex_unlock(&cubeb_alsa_mutex); ctx->local_config = NULL; } else if (r >= 0) { -@@ -762,9 +867,13 @@ alsa_destroy(cubeb * ctx) +@@ -859,9 +964,13 @@ alsa_destroy(cubeb * ctx) pthread_mutex_destroy(&ctx->mutex); free(ctx->fds); @@ -377,16 +409,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 pthread_mutex_unlock(&cubeb_alsa_mutex); } -@@ -844,13 +953,16 @@ alsa_stream_init(cubeb * ctx, cubeb_stre - r = pthread_mutex_init(&stm->mutex, NULL); - assert(r == 0); - -+ r = pthread_cond_init(&stm->cond, NULL); -+ assert(r == 0); -+ - r = alsa_locked_pcm_open(&stm->pcm, SND_PCM_STREAM_PLAYBACK, ctx->local_config); - if (r < 0) { - alsa_stream_destroy(stm); +@@ -948,7 +1057,7 @@ alsa_stream_init_single(cubeb * ctx, cub return CUBEB_ERROR; } @@ -395,7 +418,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 assert(r == 0); latency_us = latency_frames * 1e6 / stm->params.rate; -@@ -863,7 +975,7 @@ alsa_stream_init(cubeb * ctx, cubeb_stre +@@ -961,7 +1070,7 @@ alsa_stream_init_single(cubeb * ctx, cub latency_us = latency_us < min_latency ? min_latency: latency_us; } @@ -404,7 +427,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 stm->params.channels, stm->params.rate, 1, latency_us); if (r < 0) { -@@ -871,20 +983,17 @@ alsa_stream_init(cubeb * ctx, cubeb_stre +@@ -969,20 +1078,20 @@ alsa_stream_init_single(cubeb * ctx, cub return CUBEB_ERROR_INVALID_FORMAT; } @@ -412,6 +435,12 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 + r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &period_size); assert(r == 0); + /* Double internal buffer size to have enough space when waiting for the other side of duplex connection */ + stm->buffer_size *= 2; +- stm->buffer = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, stm->buffer_size)); ++ stm->buffer = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->buffer_size)); + assert(stm->buffer); + - stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm); + stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm); assert(stm->nfds > 0); @@ -422,13 +451,8 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 + r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds); assert((nfds_t) r == stm->nfds); -- r = pthread_cond_init(&stm->cond, NULL); -- assert(r == 0); -- if (alsa_register_stream(ctx, stm) != 0) { - alsa_stream_destroy(stm); - return CUBEB_ERROR; -@@ -910,7 +1019,7 @@ alsa_stream_destroy(cubeb_stream * stm) +@@ -1054,7 +1163,7 @@ alsa_stream_destroy(cubeb_stream * stm) pthread_mutex_lock(&stm->mutex); if (stm->pcm) { if (stm->state == DRAINING) { @@ -437,9 +461,9 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 } alsa_locked_pcm_close(stm->pcm); stm->pcm = NULL; -@@ -952,12 +1061,12 @@ alsa_get_max_channel_count(cubeb * ctx, - return CUBEB_ERROR; - } +@@ -1100,12 +1209,12 @@ alsa_get_max_channel_count(cubeb * ctx, + + assert(stm); - r = snd_pcm_hw_params_any(stm->pcm, hw_params); + r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); @@ -452,7 +476,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 if (r < 0) { return CUBEB_ERROR; } -@@ -978,34 +1087,34 @@ alsa_get_preferred_sample_rate(cubeb * c +@@ -1126,34 +1235,34 @@ alsa_get_preferred_sample_rate(cubeb * c /* get a pcm, disabling resampling, so we get a rate the * hardware/dmix/pulse/etc. supports. */ @@ -495,16 +519,21 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 return CUBEB_OK; } -@@ -1030,7 +1139,7 @@ alsa_stream_start(cubeb_stream * stm) - ctx = stm->context; - +@@ -1186,10 +1295,10 @@ alsa_stream_start(cubeb_stream * stm) pthread_mutex_lock(&stm->mutex); + /* Capture pcm must be started after initial setup/recover */ + if (stm->stream_type == SND_PCM_STREAM_CAPTURE && +- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) { +- snd_pcm_start(stm->pcm); ++ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) { ++ WRAP(snd_pcm_start)(stm->pcm); + } - snd_pcm_pause(stm->pcm, 0); + WRAP(snd_pcm_pause)(stm->pcm, 0); gettimeofday(&stm->last_activity, NULL); pthread_mutex_unlock(&stm->mutex); -@@ -1064,7 +1173,7 @@ alsa_stream_stop(cubeb_stream * stm) +@@ -1229,7 +1338,7 @@ alsa_stream_stop(cubeb_stream * stm) pthread_mutex_unlock(&ctx->mutex); pthread_mutex_lock(&stm->mutex); @@ -513,7 +542,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 pthread_mutex_unlock(&stm->mutex); return CUBEB_OK; -@@ -1080,14 +1189,15 @@ alsa_stream_get_position(cubeb_stream * +@@ -1245,8 +1354,8 @@ alsa_stream_get_position(cubeb_stream * pthread_mutex_lock(&stm->mutex); delay = -1; @@ -524,15 +553,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__alsa.c,v 1.4 2017/04/27 13:32:4 *position = stm->last_position; pthread_mutex_unlock(&stm->mutex); return CUBEB_OK; - } - -- assert(delay >= 0); -+ // Comment out to enable alsa-plugins-oss audio playback -+ // assert(delay >= 0); - - *position = 0; - if (stm->write_position >= (snd_pcm_uframes_t) delay) { -@@ -1106,7 +1216,7 @@ alsa_stream_get_latency(cubeb_stream * s +@@ -1271,7 +1380,7 @@ alsa_stream_get_latency(cubeb_stream * s snd_pcm_sframes_t delay; /* This function returns the delay in frames until a frame written using snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */ diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb__oss.c b/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb__oss.c index 42eb4874a70..d0c58dd5ddd 100644 --- a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb__oss.c +++ b/mail/thunderbird/patches/patch-media_libcubeb_src_cubeb__oss.c @@ -1,8 +1,8 @@ -$NetBSD: patch-mozilla_media_libcubeb_src_cubeb__oss.c,v 1.3 2017/04/27 13:32:41 ryoon Exp $ +$NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/media/libcubeb/src/cubeb_oss.c.orig 2017-04-25 12:22:46.009415040 +0000 -+++ mozilla/media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,442 @@ +--- media/libcubeb/src/cubeb_oss.c.orig 2018-12-14 14:39:39.512308659 +0000 ++++ media/libcubeb/src/cubeb_oss.c +@@ -0,0 +1,454 @@ +/* + * Copyright © 2014 Mozilla Foundation + * @@ -39,11 +39,13 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__oss.c,v 1.3 2017/04/27 13:32:41 +}; + +struct cubeb_stream { ++ /* Note: Must match cubeb_stream layout in cubeb.c. */ + cubeb * context; ++ void * user_ptr; ++ /**/ + + cubeb_data_callback data_callback; + cubeb_state_callback state_callback; -+ void * user_ptr; + float volume; + float panning; + @@ -94,10 +96,11 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__oss.c,v 1.3 2017/04/27 13:32:41 +} + +static int oss_get_min_latency(cubeb * context, cubeb_stream_params params, -+ uint32_t * latency_ms) ++ uint32_t * latency_frames) +{ ++ (void)context; + /* 40ms is a big enough number to work ok */ -+ *latency_ms = 40; ++ *latency_frames = 40 * params.rate / 1000; + return CUBEB_OK; +} + @@ -240,8 +243,7 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__oss.c,v 1.3 2017/04/27 13:32:41 + unsigned int latency_bytes, n_frag; + int frag; + /* fragment size of 1024 is a good choice with good chances to be accepted */ -+ unsigned int frag_size=1024; -+ unsigned int frag_log=10; /* 2^frag_log = frag_size */ ++ unsigned int frag_log=10; /* 2^frag_log = fragment size */ + latency_bytes = + latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000; + n_frag = latency_bytes>>frag_log; @@ -272,6 +274,11 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__oss.c,v 1.3 2017/04/27 13:32:41 + return CUBEB_ERROR_DEVICE_UNAVAILABLE; + } + ++ if ((input_stream_params && input_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK) || ++ (output_stream_params && output_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK)) { ++ return CUBEB_ERROR_NOT_SUPPORTED; ++ } ++ + if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) { + free(stream); + return CUBEB_ERROR; @@ -432,16 +439,21 @@ $NetBSD: patch-mozilla_media_libcubeb_src_cubeb__oss.c,v 1.3 2017/04/27 13:32:41 + .get_max_channel_count = oss_get_max_channel_count, + .get_min_latency = oss_get_min_latency, + .get_preferred_sample_rate = oss_get_preferred_sample_rate, ++ .get_preferred_channel_layout = NULL, ++ .enumerate_devices = NULL, ++ .device_collection_destroy = NULL, + .destroy = oss_destroy, + .stream_init = oss_stream_init, + .stream_destroy = oss_stream_destroy, + .stream_start = oss_stream_start, + .stream_stop = oss_stream_stop, ++ .stream_reset_default_device = NULL, + .stream_get_position = oss_stream_get_position, + .stream_get_latency = oss_stream_get_latency, + .stream_set_volume = oss_stream_set_volume, + .stream_set_panning = oss_stream_set_panning, + .stream_get_current_device = NULL, + .stream_device_destroy = NULL, -+ .stream_register_device_changed_callback = NULL ++ .stream_register_device_changed_callback = NULL, ++ .register_device_collection_changed = NULL +}; diff --git a/mail/thunderbird/patches/patch-media_libcubeb_src_moz.build b/mail/thunderbird/patches/patch-media_libcubeb_src_moz.build new file mode 100644 index 00000000000..09a73fc3a01 --- /dev/null +++ b/mail/thunderbird/patches/patch-media_libcubeb_src_moz.build @@ -0,0 +1,25 @@ +$NetBSD: patch-media_libcubeb_src_moz.build,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/libcubeb/src/moz.build.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/libcubeb/src/moz.build +@@ -22,6 +22,12 @@ if CONFIG['MOZ_ALSA']: + ] + DEFINES['USE_ALSA'] = True + ++if CONFIG['MOZ_OSS']: ++ SOURCES += [ ++ 'cubeb_oss.c', ++ ] ++ DEFINES['USE_OSS'] = True ++ + if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']: + SOURCES += [ + 'cubeb_resampler.cpp', +@@ -87,6 +93,7 @@ if CONFIG['OS_TARGET'] == 'Android': + FINAL_LIBRARY = 'gkmedias' + + CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] ++CFLAGS += CONFIG['MOZ_OSS_CFLAGS'] + CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS'] + + # We allow warnings for third-party code that can be updated from upstream. diff --git a/mail/thunderbird/patches/patch-media_libcubeb_update.sh b/mail/thunderbird/patches/patch-media_libcubeb_update.sh new file mode 100644 index 00000000000..dbeeb936604 --- /dev/null +++ b/mail/thunderbird/patches/patch-media_libcubeb_update.sh @@ -0,0 +1,12 @@ +$NetBSD: patch-media_libcubeb_update.sh,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/libcubeb/update.sh.orig 2018-12-04 23:11:53.000000000 +0000 ++++ media/libcubeb/update.sh +@@ -20,6 +20,7 @@ cp $1/src/cubeb_log.h src + cp $1/src/cubeb_mixer.cpp src + cp $1/src/cubeb_mixer.h src + cp $1/src/cubeb_opensl.c src ++cp $1/src/cubeb_oss.c src + cp $1/src/cubeb-jni.cpp src + cp $1/src/cubeb-jni.h src + cp $1/src/android/cubeb-output-latency.h src/android diff --git a/mail/thunderbird/patches/patch-media_libpng_pngpriv.h b/mail/thunderbird/patches/patch-media_libpng_pngpriv.h new file mode 100644 index 00000000000..5e275e72e6e --- /dev/null +++ b/mail/thunderbird/patches/patch-media_libpng_pngpriv.h @@ -0,0 +1,15 @@ +$NetBSD: patch-media_libpng_pngpriv.h,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/libpng/pngpriv.h.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/libpng/pngpriv.h +@@ -36,8 +36,10 @@ + * still required (as of 2011-05-02.) + */ + #ifndef _POSIX_SOURCE ++#if !defined(__sun) || (__STDC_VERSION__-0 < 199901L) + # define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */ + #endif ++#endif + + #ifndef PNG_VERSION_INFO_ONLY + /* Standard library headers not required by png.h: */ diff --git a/mail/thunderbird/patches/patch-media_libyuv_libyuv_source_mjpeg__decoder.cc b/mail/thunderbird/patches/patch-media_libyuv_libyuv_source_mjpeg__decoder.cc new file mode 100644 index 00000000000..0b047aad334 --- /dev/null +++ b/mail/thunderbird/patches/patch-media_libyuv_libyuv_source_mjpeg__decoder.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-media_libyuv_libyuv_source_mjpeg__decoder.cc,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/libyuv/libyuv/source/mjpeg_decoder.cc.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/libyuv/libyuv/source/mjpeg_decoder.cc +@@ -25,7 +25,7 @@ + #endif + + #endif +-struct FILE; // For jpeglib.h. ++//struct FILE; // For jpeglib.h. + + // C++ build requires extern C for jpeg internals. + #ifdef __cplusplus diff --git a/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_linux_audio__device__alsa__linux.cc b/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_linux_audio__device__alsa__linux.cc new file mode 100644 index 00000000000..b0a3ee1f74c --- /dev/null +++ b/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_linux_audio__device__alsa__linux.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__device_linux_audio__device__alsa__linux.cc,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc +@@ -60,6 +60,10 @@ static const unsigned int ALSA_CAPTURE_W + #define FUNC_GET_DEVICE_NAME 1 + #define FUNC_GET_DEVICE_NAME_FOR_AN_ENUM 2 + ++#if !defined(ESTRPIPE) ++#define ESTRPIPE EPIPE ++#endif ++ + AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const int32_t id) : + _ptrAudioBuffer(NULL), + _critSect(*CriticalSectionWrapper::CreateCriticalSection()), diff --git a/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc b/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc index 3ff40c9f2be..127feb2894d 100644 --- a/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc +++ b/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc @@ -1,7 +1,7 @@ -$NetBSD: patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc,v 1.4 2017/04/27 13:32:41 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc.orig 2017-04-14 04:53:19.000000000 +0000 -+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc @@ -25,6 +25,9 @@ #else #include <linux/videodev2.h> @@ -10,9 +10,9 @@ $NetBSD: patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_de +#include <libv4l2.h> +#endif - #include "webrtc/system_wrappers/interface/ref_count.h" - #include "webrtc/system_wrappers/interface/trace.h" -@@ -34,6 +37,15 @@ + #include "webrtc/system_wrappers/include/trace.h" + +@@ -33,6 +36,15 @@ #define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) #endif @@ -28,7 +28,7 @@ $NetBSD: patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_de namespace webrtc { namespace videocapturemodule -@@ -274,6 +286,11 @@ int32_t DeviceInfoLinux::GetDeviceName( +@@ -314,6 +326,11 @@ int32_t DeviceInfoLinux::GetDeviceName( memset(deviceNameUTF8, 0, deviceNameLength); memcpy(cameraName, cap.card, sizeof(cap.card)); diff --git a/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc b/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc new file mode 100644 index 00000000000..a42f160af5e --- /dev/null +++ b/mail/thunderbird/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc @@ -0,0 +1,30 @@ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc.orig 2018-12-04 23:11:54.000000000 +0000 ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc +@@ -24,6 +24,9 @@ + #else + #include <linux/videodev2.h> + #endif ++#ifdef HAVE_LIBV4L2 ++#include <libv4l2.h> ++#endif + + #include <new> + +@@ -33,6 +36,15 @@ + #include "webrtc/system_wrappers/include/critical_section_wrapper.h" + #include "webrtc/system_wrappers/include/trace.h" + ++#ifdef HAVE_LIBV4L2 ++#define open v4l2_open ++#define close v4l2_close ++#define dup v4l2_dup ++#define ioctl v4l2_ioctl ++#define mmap v4l2_mmap ++#define munmap v4l2_munmap ++#endif ++ + namespace webrtc { + namespace videocapturemodule { + rtc::scoped_refptr<VideoCaptureModule> VideoCaptureImpl::Create( diff --git a/mail/thunderbird/patches/patch-modules_pdfium_update.sh b/mail/thunderbird/patches/patch-modules_pdfium_update.sh new file mode 100644 index 00000000000..634e699e34d --- /dev/null +++ b/mail/thunderbird/patches/patch-modules_pdfium_update.sh @@ -0,0 +1,16 @@ +$NetBSD: patch-modules_pdfium_update.sh,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- modules/pdfium/update.sh.orig 2018-12-04 23:11:55.000000000 +0000 ++++ modules/pdfium/update.sh +@@ -132,9 +132,9 @@ update_readme() { + perl -p -i -e "s/${PREFIX} [0-9A-Fa-f]+ \(.+\)/${PREFIX} ${COMMIT} (${COMMIT_DATE})/" README_MOZILLA + } + +-if [ "$#" == 0 ]; then ++if [ "$#" = 0 ]; then + COMMIT_SELECTOR="master" +-elif [ "$#" == 2 -a "$1" == "--commit" ]; then ++elif [ "$#" = 2 -a "$1" = "--commit" ]; then + COMMIT_SELECTOR="$2" + else + print_help diff --git a/mail/thunderbird/patches/patch-mozilla_browser_branding_unofficial_locales_en-US_brand.dtd b/mail/thunderbird/patches/patch-mozilla_browser_branding_unofficial_locales_en-US_brand.dtd deleted file mode 100644 index 8180878b4ff..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_browser_branding_unofficial_locales_en-US_brand.dtd +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-mozilla_browser_branding_unofficial_locales_en-US_brand.dtd,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/browser/branding/unofficial/locales/en-US/brand.dtd.orig 2016-04-07 21:33:15.000000000 +0000 -+++ mozilla/browser/branding/unofficial/locales/en-US/brand.dtd -@@ -2,8 +2,8 @@ - - 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/. --> - --<!ENTITY brandShorterName "Nightly"> --<!ENTITY brandShortName "Nightly"> --<!ENTITY brandFullName "Nightly"> -+<!ENTITY brandShorterName "Browser"> -+<!ENTITY brandShortName "Browser"> -+<!ENTITY brandFullName "Browser"> - <!ENTITY vendorShortName "Mozilla"> - <!ENTITY trademarkInfo.part1 " "> diff --git a/mail/thunderbird/patches/patch-mozilla_build_gyp.mozbuild b/mail/thunderbird/patches/patch-mozilla_build_gyp.mozbuild deleted file mode 100644 index d01755f94ff..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_build_gyp.mozbuild +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_build_gyp.mozbuild,v 1.4 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/build/gyp.mozbuild.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/build/gyp.mozbuild -@@ -14,6 +14,7 @@ gyp_vars = { - 'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0, - 'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0, - 'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0, -+ 'use_libv4l2': 1 if CONFIG['MOZ_LIBV4L2_LIBS'] else 0, - # basic stuff for everything - 'include_internal_video_render': 0, - 'clang_use_chrome_plugins': 0, diff --git a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_init.configure b/mail/thunderbird/patches/patch-mozilla_build_moz.configure_init.configure deleted file mode 100644 index 36be3f477e8..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_init.configure +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-mozilla_build_moz.configure_init.configure,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/build/moz.configure/init.configure.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/build/moz.configure/init.configure -@@ -134,6 +134,7 @@ option(env='PYTHON', nargs=1, help='Pyth - @imports(_from='mozbuild.configure.util', _import='LineIO') - @imports(_from='mozbuild.virtualenv', _import='VirtualenvManager') - @imports(_from='mozbuild.virtualenv', _import='verify_python_version') -+@imports(_from='__builtin__', _import='KeyError') - @imports('distutils.sysconfig') - def virtualenv_python(env_python, build_env, mozconfig, help): - if help: -@@ -153,6 +154,12 @@ def virtualenv_python(env_python, build_ - python = mozconfig['vars']['added']['PYTHON'] - elif 'PYTHON' in mozconfig['vars']['modified']: - python = mozconfig['vars']['modified']['PYTHON'][1] -+ for i in ('env', 'vars'): -+ for j in ('added', 'modified'): -+ try: -+ del mozconfig[i][j]['PYTHON'] -+ except KeyError: -+ pass - - with LineIO(lambda l: log.error(l)) as out: - verify_python_version(out) -@@ -188,7 +195,10 @@ def virtualenv_python(env_python, build_ - if python != normsep(sys.executable): - log.info('Reexecuting in the virtualenv') - if env_python: -- del os.environ['PYTHON'] -+ try: -+ del os.environ['PYTHON'] -+ except KeyError: -+ pass - # One would prefer to use os.execl, but that's completely borked on - # Windows. - sys.exit(subprocess.call([python] + sys.argv)) diff --git a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_keyfiles.configure b/mail/thunderbird/patches/patch-mozilla_build_moz.configure_keyfiles.configure deleted file mode 100644 index beae376e972..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_keyfiles.configure +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-mozilla_build_moz.configure_keyfiles.configure,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/build/moz.configure/keyfiles.configure.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/build/moz.configure/keyfiles.configure -@@ -18,6 +18,7 @@ def keyfile(desc, help=None, callback=la - @checking('for the %s key' % desc, lambda x: x and x is not no_key) - @imports(_from='__builtin__', _import='open') - @imports(_from='__builtin__', _import='IOError') -+ @imports(_from='os', _import='environ') - def keyfile(value): - if value: - try: -@@ -28,7 +29,7 @@ def keyfile(desc, help=None, callback=la - raise FatalCheckError("'%s' is empty." % value[0]) - except IOError as e: - raise FatalCheckError("'%s': %s." % (value[0], e.strerror)) -- return no_key -+ return environ.get('MOZ_%s_KEY' % desc.upper().replace(' ', '_')) or no_key - - return keyfile - diff --git a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_memory.configure b/mail/thunderbird/patches/patch-mozilla_build_moz.configure_memory.configure deleted file mode 100644 index c60629b9518..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_memory.configure +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_build_moz.configure_memory.configure,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/build/moz.configure/memory.configure.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/build/moz.configure/memory.configure -@@ -66,7 +66,7 @@ def jemalloc_os_define(jemalloc, jemallo - return 'MOZ_MEMORY_LINUX' - if target.kernel == 'Darwin': - return 'MOZ_MEMORY_DARWIN' -- if target.kernel in ('kFreeBSD', 'FreeBSD', 'NetBSD'): -+ if target.kernel in ('kFreeBSD', 'FreeBSD', 'NetBSD', 'DragonFly'): - return 'MOZ_MEMORY_BSD' - die('--enable-jemalloc is not supported on %s', target.kernel) - diff --git a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_old.configure b/mail/thunderbird/patches/patch-mozilla_build_moz.configure_old.configure deleted file mode 100644 index 2d056edbd86..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_build_moz.configure_old.configure +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-mozilla_build_moz.configure_old.configure,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/build/moz.configure/old.configure.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/build/moz.configure/old.configure -@@ -276,6 +276,7 @@ def old_configure_options(*options): - '--with-nspr-prefix', - '--with-nss-exec-prefix', - '--with-nss-prefix', -+ '--with-oss', - '--with-pthreads', - '--with-qemu-exe', - '--with-sixgill', -@@ -287,7 +288,12 @@ def old_configure_options(*options): - '--with-system-libvpx', - '--with-system-nspr', - '--with-system-nss', -+ '--with-system-ogg', - '--with-system-png', -+ '--with-system-soundtouch', -+ '--with-system-theora', -+ '--with-system-tremor', -+ '--with-system-vorbis', - '--with-system-zlib', - '--with-thumb', - '--with-thumb-interwork', diff --git a/mail/thunderbird/patches/patch-mozilla_build_pgo_profileserver.py b/mail/thunderbird/patches/patch-mozilla_build_pgo_profileserver.py deleted file mode 100644 index 8537315f2fe..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_build_pgo_profileserver.py +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_build_pgo_profileserver.py,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/build/pgo/profileserver.py.orig 2016-04-07 21:33:18.000000000 +0000 -+++ mozilla/build/pgo/profileserver.py -@@ -68,7 +68,7 @@ if __name__ == '__main__': - env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog) - print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"] - -- cmdargs = ["http://localhost:%d/index.html" % PORT] -+ cmdargs = ["http://127.0.0.1:%d/index.html" % PORT] - runner = FirefoxRunner(profile=profile, - binary=build.get_binary_path(where="staged-package"), - cmdargs=cmdargs, diff --git a/mail/thunderbird/patches/patch-mozilla_config_Makefile.in b/mail/thunderbird/patches/patch-mozilla_config_Makefile.in deleted file mode 100644 index cf20d363e10..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_Makefile.in +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-mozilla_config_Makefile.in,v 1.5 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/config/Makefile.in.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/config/Makefile.in -@@ -41,6 +41,8 @@ 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) \ -@@ -49,6 +51,11 @@ export:: $(export-preqs) - -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \ - -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \ - -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \ -+ -DMOZ_SYSTEM_OGG=$(MOZ_SYSTEM_OGG) \ -+ -DMOZ_SYSTEM_THEORA=$(MOZ_SYSTEM_THEORA) \ -+ -DMOZ_SYSTEM_VORBIS=$(MOZ_SYSTEM_VORBIS) \ -+ -DMOZ_SYSTEM_TREMOR=$(MOZ_SYSTEM_TREMOR) \ -+ -DMOZ_SYSTEM_SOUNDTOUCH=$(MOZ_SYSTEM_SOUNDTOUCH) \ - $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers - $(INSTALL) system_wrappers $(DIST) - diff --git a/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk b/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk deleted file mode 100644 index b86d396350b..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-mozilla_config_baseconfig.mk,v 1.5 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/config/baseconfig.mk.orig 2016-04-07 21:33:18.000000000 +0000 -+++ mozilla/config/baseconfig.mk -@@ -2,10 +2,10 @@ - # directly in python/mozbuild/mozbuild/base.py for gmake validation. - # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending - # whether a normal build is happening or whether the check is running. --includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+includedir := $(includedir)/${MOZILLA_PKG_NAME} -+idldir = $(datadir)/idl/${MOZILLA_PKG_NAME} -+installdir = $(libdir)/${MOZILLA_PKG_NAME} -+sdkdir = $(libdir)/${MOZILLA_PKG_NAME} - ifeq (.,$(DEPTH)) - DIST = dist - else diff --git a/mail/thunderbird/patches/patch-mozilla_config_external_moz.build b/mail/thunderbird/patches/patch-mozilla_config_external_moz.build deleted file mode 100644 index c4b85a87b59..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_external_moz.build +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD: patch-mozilla_config_external_moz.build,v 1.4 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/config/external/moz.build.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/config/external/moz.build -@@ -21,12 +21,21 @@ if CONFIG['MOZ_UPDATER']: - external_dirs += ['modules/brotli'] - external_dirs += ['modules/woff2'] - --if CONFIG['MOZ_VORBIS']: -+if not CONFIG['MOZ_SYSTEM_OGG']: -+ external_dirs += ['media/libogg'] -+ -+if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_SYSTEM_VORBIS']: - external_dirs += ['media/libvorbis'] - --if CONFIG['MOZ_TREMOR']: -+if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_SYSTEM_TREMOR']: - external_dirs += ['media/libtremor'] - -+if not CONFIG['MOZ_SYSTEM_THEORA']: -+ external_dirs += ['media/libtheora'] -+ -+if not CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: -+ external_dirs += ['media/libsoundtouch'] -+ - if CONFIG['MOZ_WEBM_ENCODER']: - external_dirs += ['media/libmkv'] - -@@ -52,12 +61,9 @@ external_dirs += [ - 'media/kiss_fft', - 'media/libcubeb', - 'media/libnestegg', -- 'media/libogg', - 'media/libopus', -- 'media/libtheora', - 'media/libspeex_resampler', - 'media/libstagefright', -- 'media/libsoundtouch', - 'media/psshparser' - ] - diff --git a/mail/thunderbird/patches/patch-mozilla_config_stl__wrappers_ios b/mail/thunderbird/patches/patch-mozilla_config_stl__wrappers_ios deleted file mode 100644 index 24a10489a12..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_stl__wrappers_ios +++ /dev/null @@ -1,8 +0,0 @@ -$NetBSD: patch-mozilla_config_stl__wrappers_ios,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/config/stl_wrappers/ios.orig 2016-04-17 13:47:46.239830507 +0000 -+++ mozilla/config/stl_wrappers/ios -@@ -0,0 +1,3 @@ -+#pragma GCC visibility push(default) -+#include_next <ios> -+#pragma GCC visibility pop diff --git a/mail/thunderbird/patches/patch-mozilla_config_stl__wrappers_ostream b/mail/thunderbird/patches/patch-mozilla_config_stl__wrappers_ostream deleted file mode 100644 index 6a1c65312bf..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_stl__wrappers_ostream +++ /dev/null @@ -1,8 +0,0 @@ -$NetBSD: patch-mozilla_config_stl__wrappers_ostream,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/config/stl_wrappers/ostream.orig 2016-04-17 13:47:46.239960852 +0000 -+++ mozilla/config/stl_wrappers/ostream -@@ -0,0 +1,3 @@ -+#pragma GCC visibility push(default) -+#include_next <ostream> -+#pragma GCC visibility pop diff --git a/mail/thunderbird/patches/patch-mozilla_config_system-headers b/mail/thunderbird/patches/patch-mozilla_config_system-headers deleted file mode 100644 index eda0ff65b65..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_system-headers +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-mozilla_config_system-headers,v 1.11 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/config/system-headers.orig 2017-04-14 04:53:01.000000000 +0000 -+++ mozilla/config/system-headers -@@ -624,6 +624,7 @@ libgnome/libgnome.h - libgnomeui/gnome-icon-lookup.h - libgnomeui/gnome-icon-theme.h - libgnomeui/gnome-ui-init.h -+libv4l2.h - limits.h - link.h - #ifdef ANDROID -@@ -1267,6 +1268,15 @@ 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 -@@ -1335,3 +1345,17 @@ unicode/utypes.h - libutil.h - unwind.h - fenv.h -+#if MOZ_SYSTEM_OGG==1 -+ogg/ogg.h -+ogg/os_types.h -+#endif -+#if MOZ_SYSTEM_THEORA==1 -+theora/theoradec.h -+#endif -+#if MOZ_SYSTEM_VORBIS==1 -+vorbis/codec.h -+vorbis/vorbisenc.h -+#endif -+#if MOZ_SYSTEM_TREMOR==1 -+tremor/ivorbiscodec.h -+#endif diff --git a/mail/thunderbird/patches/patch-mozilla_config_system__wrappers_unwind.h b/mail/thunderbird/patches/patch-mozilla_config_system__wrappers_unwind.h deleted file mode 100644 index e9400c94f9d..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_config_system__wrappers_unwind.h +++ /dev/null @@ -1,9 +0,0 @@ -$NetBSD: patch-mozilla_config_system__wrappers_unwind.h,v 1.5 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/config/system_wrappers/unwind.h.orig 2017-04-25 12:22:45.864950181 +0000 -+++ mozilla/config/system_wrappers/unwind.h -@@ -0,0 +1,4 @@ -+#pragma GCC system_header -+#pragma GCC visibility push(default) -+#include_next <unwind.h> -+#pragma GCC visibility pop diff --git a/mail/thunderbird/patches/patch-mozilla_dom_base_moz.build b/mail/thunderbird/patches/patch-mozilla_dom_base_moz.build deleted file mode 100644 index 189a91d951f..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_base_moz.build +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_dom_base_moz.build,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/dom/base/moz.build.orig 2017-04-14 04:53:03.000000000 +0000 -+++ mozilla/dom/base/moz.build -@@ -478,6 +478,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser' - 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 --git a/mail/thunderbird/patches/patch-mozilla_dom_media_AudioStream.cpp b/mail/thunderbird/patches/patch-mozilla_dom_media_AudioStream.cpp deleted file mode 100644 index 05975c870e0..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_media_AudioStream.cpp +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-mozilla_dom_media_AudioStream.cpp,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/dom/media/AudioStream.cpp.orig 2017-04-14 04:53:05.000000000 +0000 -+++ mozilla/dom/media/AudioStream.cpp -@@ -115,7 +115,9 @@ AudioStream::AudioStream(DataSource& aSo - : mMonitor("AudioStream") - , mChannels(0) - , mOutChannels(0) -+#ifndef MOZ_SYSTEM_SOUNDTOUCH - , mTimeStretcher(nullptr) -+#endif - , mDumpFile(nullptr) - , mState(INITIALIZED) - , mDataSource(aSource) -@@ -130,9 +132,11 @@ AudioStream::~AudioStream() - if (mDumpFile) { - fclose(mDumpFile); - } -+#ifndef MOZ_SYSTEM_SOUNDTOUCH - if (mTimeStretcher) { - soundtouch::destroySoundTouchObj(mTimeStretcher); - } -+#endif - } - - size_t -@@ -151,7 +155,11 @@ nsresult AudioStream::EnsureTimeStretche - { - mMonitor.AssertCurrentThreadOwns(); - if (!mTimeStretcher) { -+#ifdef MOZ_SYSTEM_SOUNDTOUCH -+ mTimeStretcher = new soundtouch::SoundTouch(); -+#else - mTimeStretcher = soundtouch::createSoundTouchObj(); -+#endif - mTimeStretcher->setSampleRate(mAudioClock.GetInputRate()); - mTimeStretcher->setChannels(mOutChannels); - mTimeStretcher->setPitch(1.0); diff --git a/mail/thunderbird/patches/patch-mozilla_dom_media_AudioStream.h b/mail/thunderbird/patches/patch-mozilla_dom_media_AudioStream.h deleted file mode 100644 index adf16a591b2..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_media_AudioStream.h +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-mozilla_dom_media_AudioStream.h,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/dom/media/AudioStream.h.orig 2017-04-14 04:53:05.000000000 +0000 -+++ mozilla/dom/media/AudioStream.h -@@ -16,7 +16,11 @@ - #include "mozilla/TimeStamp.h" - #include "mozilla/UniquePtr.h" - #include "CubebUtils.h" -+#ifdef MOZ_SYSTEM_SOUNDTOUCH -+#include "soundtouch/SoundTouch.h" -+#else - #include "soundtouch/SoundTouchFactory.h" -+#endif - - namespace mozilla { - -@@ -281,7 +285,11 @@ private: - uint32_t mChannels; - uint32_t mOutChannels; - AudioClock mAudioClock; -+#ifdef MOZ_SYSTEM_SOUNDTOUCH -+ nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher; -+#else - soundtouch::SoundTouch* mTimeStretcher; -+#endif - - // Output file for dumping audio - FILE* mDumpFile; diff --git a/mail/thunderbird/patches/patch-mozilla_dom_media_moz.build b/mail/thunderbird/patches/patch-mozilla_dom_media_moz.build deleted file mode 100644 index 0627d4f0a50..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_media_moz.build +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-mozilla_dom_media_moz.build,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/dom/media/moz.build.orig 2017-04-14 04:53:05.000000000 +0000 -+++ mozilla/dom/media/moz.build -@@ -315,6 +315,21 @@ if CONFIG['MOZ_WEBRTC']: - - DEFINES['MOZILLA_INTERNAL_API'] = True - -+if CONFIG['MOZ_SYSTEM_OGG']: -+ CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS'] -+ -+if CONFIG['MOZ_SYSTEM_THEORA']: -+ CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS'] -+ -+if CONFIG['MOZ_SYSTEM_VORBIS']: -+ CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS'] -+ -+if CONFIG['MOZ_SYSTEM_TREMOR']: -+ CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS'] -+ -+if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: -+ CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS'] -+ - if CONFIG['OS_TARGET'] == 'WINNT': - DEFINES['WEBRTC_WIN'] = True - else: diff --git a/mail/thunderbird/patches/patch-mozilla_dom_media_platforms_ffmpeg_ffvpx_FFVPXRuntimeLinker.cpp b/mail/thunderbird/patches/patch-mozilla_dom_media_platforms_ffmpeg_ffvpx_FFVPXRuntimeLinker.cpp deleted file mode 100644 index 3802f2ec174..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_media_platforms_ffmpeg_ffvpx_FFVPXRuntimeLinker.cpp +++ /dev/null @@ -1,39 +0,0 @@ -$NetBSD: patch-mozilla_dom_media_platforms_ffmpeg_ffvpx_FFVPXRuntimeLinker.cpp,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp.orig 2017-04-14 04:53:06.000000000 +0000 -+++ mozilla/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp -@@ -11,9 +11,13 @@ - #include "prmem.h" - #include "prlink.h" - -+#ifdef MOZ_SYSTEM_SOUNDTOUCH -+#include "nsXPCOMPrivate.h" // for XUL_DLL -+#else - // We use a known symbol located in lgpllibs to determine its location. - // soundtouch happens to be always included in lgpllibs - #include "soundtouch/SoundTouch.h" -+#endif - - namespace mozilla - { -@@ -51,6 +55,12 @@ FFVPXRuntimeLinker::Init() - - sLinkStatus = LinkStatus_FAILED; - -+#ifdef MOZ_SYSTEM_SOUNDTOUCH -+ // We retrieve the path of the XUL library as this is where mozavcodec and -+ // mozavutil libs are located. -+ char* path = -+ PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init); -+#else - // We retrieve the path of the lgpllibs library as this is where mozavcodec - // and mozavutil libs are located. - char* lgpllibsname = PR_GetLibraryName(nullptr, "lgpllibs"); -@@ -61,6 +71,7 @@ FFVPXRuntimeLinker::Init() - PR_GetLibraryFilePathname(lgpllibsname, - (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); - PR_FreeLibraryName(lgpllibsname); -+#endif - if (!path) { - return false; - } diff --git a/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp b/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp deleted file mode 100644 index f6593f953d0..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.7 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2016-04-07 21:33:30.000000000 +0000 -+++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp -@@ -308,7 +308,7 @@ PluginModuleChild::InitForChrome(const s - - // TODO: use PluginPRLibrary here - --#if defined(OS_LINUX) || defined(OS_BSD) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) - mShutdownFunc = - (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); - -@@ -1916,7 +1916,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin - AssertPluginThread(); - MOZ_ASSERT(mIsChrome); - --#if defined(OS_LINUX) || defined(OS_BSD) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) - return true; - #elif defined(OS_WIN) || defined(OS_MACOSX) - *_retval = mGetEntryPointsFunc(&mFunctions); -@@ -1961,7 +1961,7 @@ PluginModuleChild::DoNP_Initialize(const - #endif - - NPError result; --#if defined(OS_LINUX) || defined(OS_BSD) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) - result = mInitializeFunc(&sBrowserFuncs, &mFunctions); - #elif defined(OS_WIN) || defined(OS_MACOSX) - result = mInitializeFunc(&sBrowserFuncs); diff --git a/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h b/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h deleted file mode 100644 index 5c1b26ddbcb..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.h,v 1.5 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2016-04-07 21:33:30.000000000 +0000 -+++ mozilla/dom/plugins/ipc/PluginModuleChild.h -@@ -281,7 +281,7 @@ private: - - // we get this from the plugin - NP_PLUGINSHUTDOWN mShutdownFunc; --#if defined(OS_LINUX) || defined(OS_BSD) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) - NP_PLUGINUNIXINIT mInitializeFunc; - #elif defined(OS_WIN) || defined(OS_MACOSX) - NP_PLUGININIT mInitializeFunc; diff --git a/mail/thunderbird/patches/patch-mozilla_dom_system_OSFileConstants.cpp b/mail/thunderbird/patches/patch-mozilla_dom_system_OSFileConstants.cpp deleted file mode 100644 index b5f1a55492d..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_dom_system_OSFileConstants.cpp +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-mozilla_dom_system_OSFileConstants.cpp,v 1.4 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/dom/system/OSFileConstants.cpp.orig 2017-04-14 04:53:07.000000000 +0000 -+++ mozilla/dom/system/OSFileConstants.cpp -@@ -16,14 +16,17 @@ - #include "dirent.h" - #include "poll.h" - #include "sys/stat.h" --#if defined(ANDROID) -+#if defined(XP_LINUX) - #include <sys/vfs.h> - #define statvfs statfs -+#define f_frsize f_bsize - #else - #include "sys/statvfs.h" -+#endif // defined(XP_LINUX) -+#if !defined(ANDROID) - #include "sys/wait.h" - #include <spawn.h> --#endif // defined(ANDROID) -+#endif // !defined(ANDROID) - #endif // defined(XP_UNIX) - - #if defined(XP_LINUX) -@@ -699,7 +702,7 @@ static const dom::ConstantSpec gLibcProp - - { "OSFILE_SIZEOF_STATVFS", JS::Int32Value(sizeof (struct statvfs)) }, - -- { "OSFILE_OFFSETOF_STATVFS_F_BSIZE", JS::Int32Value(offsetof (struct statvfs, f_bsize)) }, -+ { "OSFILE_OFFSETOF_STATVFS_F_FRSIZE", JS::Int32Value(offsetof (struct statvfs, f_frsize)) }, - { "OSFILE_OFFSETOF_STATVFS_F_BAVAIL", JS::Int32Value(offsetof (struct statvfs, f_bavail)) }, - - #endif // defined(XP_UNIX) diff --git a/mail/thunderbird/patches/patch-mozilla_extensions_spellcheck_hunspell_glue_mozHunspell.cpp b/mail/thunderbird/patches/patch-mozilla_extensions_spellcheck_hunspell_glue_mozHunspell.cpp deleted file mode 100644 index 66a665de78d..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_extensions_spellcheck_hunspell_glue_mozHunspell.cpp +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-mozilla_extensions_spellcheck_hunspell_glue_mozHunspell.cpp,v 1.3 2018/03/29 10:19:31 wiz Exp $ - ---- mozilla/extensions/spellcheck/hunspell/glue/mozHunspell.cpp.orig 2017-04-14 04:53:08.000000000 +0000 -+++ mozilla/extensions/spellcheck/hunspell/glue/mozHunspell.cpp -@@ -381,6 +381,14 @@ mozHunspell::LoadDictionaryList(bool aNo - } - } - -+ // load system hunspell dictionaries -+ nsCOMPtr<nsIFile> hunDir; -+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("@LOCALBASE@/share/hunspell"), -+ true, getter_AddRefs(hunDir)); -+ if (hunDir) { -+ LoadDictionariesFromDir(hunDir); -+ } -+ - // find dictionaries from extensions requiring restart - nsCOMPtr<nsISimpleEnumerator> dictDirs; - rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_cairo_libpixman_src_pixman-arm-neon-asm.S b/mail/thunderbird/patches/patch-mozilla_gfx_cairo_libpixman_src_pixman-arm-neon-asm.S deleted file mode 100644 index 68e08b4ab1b..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_cairo_libpixman_src_pixman-arm-neon-asm.S +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-mozilla_gfx_cairo_libpixman_src_pixman-arm-neon-asm.S,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S.orig 2016-04-07 21:33:13.000000000 +0000 -+++ mozilla/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S -@@ -34,6 +34,12 @@ - * - pixman_composite_over_n_8_0565_asm_neon - */ - -+#if defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__) -+#define UNWIND -+#else -+#define UNWIND @ -+#endif -+ - /* Prevent the stack from becoming executable for no reason... */ - #if defined(__linux__) && defined(__ELF__) - .section .note.GNU-stack,"",%progbits -@@ -3141,7 +3147,8 @@ pixman_asm_function fname - TMP4 .req r9 - STRIDE .req r2 - -- .fnstart -+ .cfi_startproc -+ UNWIND .fnstart - mov ip, sp - .save {r4, r5, r6, r7, r8, r9} - push {r4, r5, r6, r7, r8, r9} -@@ -3244,7 +3251,8 @@ pixman_asm_function fname - .endif - pop {r4, r5, r6, r7, r8, r9} - bx lr -- .fnend -+ UNWIND .fnend -+ .cfi_endproc - - .unreq OUT - .unreq TOP diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_gl_GLContextProviderGLX.cpp b/mail/thunderbird/patches/patch-mozilla_gfx_gl_GLContextProviderGLX.cpp deleted file mode 100644 index 7aa1f243c3b..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_gl_GLContextProviderGLX.cpp +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_gfx_gl_GLContextProviderGLX.cpp,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/gfx/gl/GLContextProviderGLX.cpp.orig 2016-04-07 21:33:13.000000000 +0000 -+++ mozilla/gfx/gl/GLContextProviderGLX.cpp -@@ -84,7 +84,7 @@ GLXLibrary::EnsureInitialized() - // see e.g. bug 608526: it is intrinsically interesting to know whether we have dynamically linked to libGL.so.1 - // because at least the NVIDIA implementation requires an executable stack, which causes mprotect calls, - // which trigger glibc bug http://sourceware.org/bugzilla/show_bug.cgi?id=12225 --#ifdef __OpenBSD__ -+#if defined(__OpenBSD__) || defined(__NetBSD__) - libGLfilename = "libGL.so"; - #else - libGLfilename = "libGL.so.1"; diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_graphite2_moz-gr-update.sh b/mail/thunderbird/patches/patch-mozilla_gfx_graphite2_moz-gr-update.sh deleted file mode 100644 index e74c42294ad..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_graphite2_moz-gr-update.sh +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-mozilla_gfx_graphite2_moz-gr-update.sh,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/gfx/graphite2/moz-gr-update.sh.orig 2017-04-14 04:53:08.000000000 +0000 -+++ mozilla/gfx/graphite2/moz-gr-update.sh -@@ -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 @@ echo "See" $0 "for update procedure." >> - #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 --git a/mail/thunderbird/patches/patch-mozilla_gfx_graphite2_src_Bidi.cpp b/mail/thunderbird/patches/patch-mozilla_gfx_graphite2_src_Bidi.cpp deleted file mode 100644 index a9059907340..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_graphite2_src_Bidi.cpp +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-mozilla_gfx_graphite2_src_Bidi.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/gfx/graphite2/src/Bidi.cpp.orig 2016-04-07 21:33:13.000000000 +0000 -+++ mozilla/gfx/graphite2/src/Bidi.cpp -@@ -31,6 +31,11 @@ of the License or (at your option) any l - - using namespace graphite2; - -+#ifdef __sun -+#undef CS -+#undef ES -+#endif -+ - enum DirCode { // Hungarian: dirc - Unk = -1, - N = 0, // other neutrals (default) - ON diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_moz.build b/mail/thunderbird/patches/patch-mozilla_gfx_moz.build deleted file mode 100644 index 899a9fc1e4e..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_moz.build +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-mozilla_gfx_moz.build,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/gfx/moz.build.orig 2017-04-14 04:53:08.000000000 +0000 -+++ mozilla/gfx/moz.build -@@ -7,6 +7,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', -@@ -15,8 +21,6 @@ DIRS += [ - 'qcms', - 'gl', - 'layers', -- 'graphite2/src', -- 'harfbuzz/src', - 'ots/src', - 'thebes', - 'ipc', diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_skia_generate__mozbuild.py b/mail/thunderbird/patches/patch-mozilla_gfx_skia_generate__mozbuild.py deleted file mode 100644 index a638683242c..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_skia_generate__mozbuild.py +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_gfx_skia_generate__mozbuild.py,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/gfx/skia/generate_mozbuild.py.orig 2017-04-14 04:53:08.000000000 +0000 -+++ mozilla/gfx/skia/generate_mozbuild.py -@@ -140,6 +140,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_ - '-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 --git a/mail/thunderbird/patches/patch-mozilla_gfx_skia_moz.build b/mail/thunderbird/patches/patch-mozilla_gfx_skia_moz.build deleted file mode 100644 index 1d55987c476..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_skia_moz.build +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_gfx_skia_moz.build,v 1.5 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/gfx/skia/moz.build.orig 2017-04-14 04:53:08.000000000 +0000 -+++ mozilla/gfx/skia/moz.build -@@ -750,6 +750,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_ - '-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 --git a/mail/thunderbird/patches/patch-mozilla_gfx_thebes_moz.build b/mail/thunderbird/patches/patch-mozilla_gfx_thebes_moz.build deleted file mode 100644 index 4362989dd6f..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_thebes_moz.build +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-mozilla_gfx_thebes_moz.build,v 1.4 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/gfx/thebes/moz.build.orig 2017-04-14 04:53:09.000000000 +0000 -+++ mozilla/gfx/thebes/moz.build -@@ -266,7 +266,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk - 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. diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_ycbcr_moz.build b/mail/thunderbird/patches/patch-mozilla_gfx_ycbcr_moz.build deleted file mode 100644 index ea38e5c90c4..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_ycbcr_moz.build +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_gfx_ycbcr_moz.build,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/gfx/ycbcr/moz.build.orig 2016-04-07 21:33:15.000000000 +0000 -+++ mozilla/gfx/ycbcr/moz.build -@@ -57,7 +57,7 @@ else: - - if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: - SOURCES += [ -- 'yuv_row_arm.s', -+ 'yuv_row_arm.S', - ] - SOURCES += [ - 'yuv_convert_arm.cpp', diff --git a/mail/thunderbird/patches/patch-mozilla_gfx_ycbcr_yuv__row__arm.S b/mail/thunderbird/patches/patch-mozilla_gfx_ycbcr_yuv__row__arm.S deleted file mode 100644 index a1f266185a4..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_gfx_ycbcr_yuv__row__arm.S +++ /dev/null @@ -1,40 +0,0 @@ -$NetBSD: patch-mozilla_gfx_ycbcr_yuv__row__arm.S,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/gfx/ycbcr/yuv_row_arm.S.orig 2017-04-14 04:53:09.000000000 +0000 -+++ mozilla/gfx/ycbcr/yuv_row_arm.S -@@ -2,6 +2,12 @@ - * 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 defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__) -+#define UNWIND -+#else -+#define UNWIND @ -+#endif -+ - .arch armv7-a - .fpu neon - /* Allow to build on targets not supporting neon, and force the object file -@@ -74,7 +80,8 @@ YCbCr42xToRGB565_DITHER30_CONSTS_NEON: - .global ScaleYCbCr42xToRGB565_BilinearY_Row_NEON - .type ScaleYCbCr42xToRGB565_BilinearY_Row_NEON, %function - .balign 64 -- .fnstart -+ .cfi_startproc -+ UNWIND .fnstart - ScaleYCbCr42xToRGB565_BilinearY_Row_NEON: - STMFD r13!,{r4-r9,r14} @ 8 words. - ADR r14,YCbCr42xToRGB565_DITHER03_CONSTS_NEON -@@ -296,9 +303,10 @@ s42xbily_neon_tail: - s42xbily_neon_done: - VPOP {Q4-Q7} @ 16 words. - LDMFD r13!,{r4-r9,PC} @ 8 words. -- .fnend -+ UNWIND .fnend -+ .cfi_endproc - .size ScaleYCbCr42xToRGB565_BilinearY_Row_NEON, .-ScaleYCbCr42xToRGB565_BilinearY_Row_NEON - --#if defined(__ELF__)&&defined(__linux__) -+#if defined(__ELF__)&&(defined(__linux__) || defined(__NetBSD__)) - .section .note.GNU-stack,"",%progbits - #endif diff --git a/mail/thunderbird/patches/patch-mozilla_image_Downscaler.h b/mail/thunderbird/patches/patch-mozilla_image_Downscaler.h deleted file mode 100644 index 12234f20efb..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_image_Downscaler.h +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-mozilla_image_Downscaler.h,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/image/Downscaler.h.orig 2017-04-14 04:53:09.000000000 +0000 -+++ mozilla/image/Downscaler.h -@@ -154,14 +154,14 @@ private: - class Downscaler - { - public: -- explicit Downscaler(const nsIntSize&) -+ explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0) - { - MOZ_RELEASE_ASSERT(false, "Skia is not enabled"); - } - -- const nsIntSize& OriginalSize() const { return nsIntSize(); } -- const nsIntSize& TargetSize() const { return nsIntSize(); } -- const gfxSize& Scale() const { return gfxSize(1.0, 1.0); } -+ const nsIntSize& OriginalSize() const { return mSize; } -+ const nsIntSize& TargetSize() const { return mSize; } -+ const gfxSize& Scale() const { return mScale; } - - nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false) - { -@@ -177,6 +177,9 @@ public: - DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); } - void ResetForNextProgressivePass() { } - const nsIntSize FrameSize() const { return nsIntSize(0, 0); } -+private: -+ nsIntSize mSize; -+ gfxSize mScale; - }; - - #endif // MOZ_ENABLE_SKIA diff --git a/mail/thunderbird/patches/patch-mozilla_intl_hyphenation_glue_hnjalloc.h b/mail/thunderbird/patches/patch-mozilla_intl_hyphenation_glue_hnjalloc.h deleted file mode 100644 index 22997065d82..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_intl_hyphenation_glue_hnjalloc.h +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_intl_hyphenation_glue_hnjalloc.h,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/intl/hyphenation/glue/hnjalloc.h.orig 2016-04-07 21:33:16.000000000 +0000 -+++ mozilla/intl/hyphenation/glue/hnjalloc.h -@@ -24,6 +24,9 @@ - */ - - #include <stdio.h> /* ensure stdio.h is loaded before our macros */ -+#ifdef __sun -+#include <wchar.h> -+#endif - - #undef FILE - #define FILE hnjFile diff --git a/mail/thunderbird/patches/patch-mozilla_intl_unicharutil_util_moz.build b/mail/thunderbird/patches/patch-mozilla_intl_unicharutil_util_moz.build deleted file mode 100644 index 0829d7c02dd..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_intl_unicharutil_util_moz.build +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_intl_unicharutil_util_moz.build,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/intl/unicharutil/util/moz.build.orig 2017-04-14 04:53:10.000000000 +0000 -+++ mozilla/intl/unicharutil/util/moz.build -@@ -42,4 +42,7 @@ if CONFIG['_MSC_VER']: - if CONFIG['ENABLE_INTL_API']: - USE_LIBS += ['icu'] - -+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: -+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] -+ - DIST_INSTALL = True diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_atomicops.h b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_atomicops.h deleted file mode 100644 index 9b4b9c6a025..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_atomicops.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_atomicops.h,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/atomicops.h.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/atomicops.h -@@ -45,7 +45,7 @@ typedef int64_t Atomic64; - - // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or - // Atomic64 routines below, depending on your architecture. --#ifdef OS_OPENBSD -+#if defined(OS_OPENBSD) || (defined(OS_NETBSD) && defined(ARCH_CPU_ARM_FAMILY)) - #ifdef ARCH_CPU_64_BITS - typedef Atomic64 AtomicWord; - #else diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h deleted file mode 100644 index 8c8883786bc..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_platform__thread.h,v 1.5 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/platform_thread.h -@@ -25,6 +25,9 @@ typedef pthread_t PlatformThreadHandle; - #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__) - #include <unistd.h> - typedef pid_t PlatformThreadId; -+#elif defined(OS_SOLARIS) -+#include <sys/lwp.h> -+typedef lwpid_t PlatformThreadId; - #elif defined(OS_BSD) - #include <sys/types.h> - typedef lwpid_t PlatformThreadId; diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_platform__thread__posix.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_platform__thread__posix.cc deleted file mode 100644 index 334e71c50ef..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_platform__thread__posix.cc +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2017-04-14 04:53:10.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc -@@ -12,7 +12,9 @@ - #if defined(OS_MACOSX) - #include <mach/mach.h> - #elif defined(OS_NETBSD) -+_Pragma("GCC visibility push(default)") - #include <lwp.h> -+_Pragma("GCC visibility pop") - #elif defined(OS_LINUX) - #include <sys/syscall.h> - #include <sys/prctl.h> -@@ -107,7 +109,8 @@ void PlatformThread::SetName(const char* - pthread_setname_np(pthread_self(), "%s", (void *)name); - #elif defined(OS_BSD) && !defined(__GLIBC__) - pthread_set_name_np(pthread_self(), name); --#else -+#elif !defined(OS_SOLARIS) -+ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); - #endif - } - #endif // !OS_MACOSX diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util.h b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util.h deleted file mode 100644 index 60ef9c346c1..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util.h +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util.h,v 1.7 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/process_util.h.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/process_util.h -@@ -41,6 +41,9 @@ - typedef PROCESSENTRY32 ProcessEntry; - typedef IO_COUNTERS IoCounters; - #elif defined(OS_POSIX) -+#ifndef NAME_MAX -+#define NAME_MAX _POSIX_NAME_MAX -+#endif - // TODO(port): we should not rely on a Win32 structure. - struct ProcessEntry { - int pid; diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc deleted file mode 100644 index c9399061cdd..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__posix.cc,v 1.5 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/process_util_posix.cc -@@ -116,7 +116,7 @@ void CloseSuperfluousFds(const base::Inj - #if defined(ANDROID) - static const rlim_t kSystemDefaultMaxFds = 1024; - static const char kFDDir[] = "/proc/self/fd"; --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_SOLARIS) - static const rlim_t kSystemDefaultMaxFds = 8192; - static const char kFDDir[] = "/proc/self/fd"; - #elif defined(OS_MACOSX) -@@ -208,7 +208,7 @@ void CloseSuperfluousFds(const base::Inj - // TODO(agl): Remove this function. It's fundamentally broken for multithreaded - // apps. - void SetAllFDsToCloseOnExec() { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_SOLARIS) - const char fd_dir[] = "/proc/self/fd"; - #elif defined(OS_MACOSX) || defined(OS_BSD) - const char fd_dir[] = "/dev/fd"; diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_sys__info__posix.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_sys__info__posix.cc deleted file mode 100644 index 1e02b3c4b5c..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_sys__info__posix.cc +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_sys__info__posix.cc,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/sys_info_posix.cc -@@ -119,7 +119,11 @@ std::wstring SysInfo::GetEnvVar(const wc - - // static - std::string SysInfo::OperatingSystemName() { -+#ifdef OS_SOLARIS -+ struct utsname info; -+#else - utsname info; -+#endif - if (uname(&info) < 0) { - NOTREACHED(); - return ""; diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_time__posix.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_time__posix.cc deleted file mode 100644 index 078d94826a9..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_time__posix.cc +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_base_time__posix.cc,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/base/time_posix.cc.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/base/time_posix.cc -@@ -65,8 +65,10 @@ Time Time::FromExploded(bool is_local, c - timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this - timestruct.tm_yday = 0; // mktime/timegm ignore this - timestruct.tm_isdst = -1; // attempt to figure it out -+#ifndef OS_SOLARIS - timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore - timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore -+#endif - - time_t seconds; - #ifdef ANDROID diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_build_build__config.h b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_build_build__config.h deleted file mode 100644 index 7cf155654e6..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_build_build__config.h +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_build_build__config.h,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/build/build_config.h.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/build/build_config.h -@@ -30,6 +30,8 @@ - #define OS_NETBSD 1 - #elif defined(__OpenBSD__) - #define OS_OPENBSD 1 -+#elif defined(__sun) -+#define OS_SOLARIS 1 - #elif defined(_WIN32) - #define OS_WIN 1 - #else -@@ -45,7 +47,7 @@ - - // For access to standard POSIX features, use OS_POSIX instead of a more - // specific macro. --#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) - #define OS_POSIX 1 - #endif - diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h deleted file mode 100644 index 1c20f932703..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h,v 1.5 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h -@@ -66,7 +66,7 @@ class TransportDIB { - typedef base::SharedMemoryHandle Handle; - // On Mac, the inode number of the backing file is used as an id. - typedef base::SharedMemoryId Id; --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_SOLARIS) - typedef int Handle; // These two ints are SysV IPC shared memory keys - typedef int Id; - #endif diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp b/mail/thunderbird/patches/patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp deleted file mode 100644 index 0f04d0bb17a..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp +++ /dev/null @@ -1,45 +0,0 @@ -$NetBSD: patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2016-04-07 21:33:19.000000000 +0000 -+++ mozilla/ipc/glue/GeckoChildProcessHost.cpp -@@ -4,7 +4,13 @@ - * 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 defined(__NetBSD__) -+_Pragma("GCC visibility push(default)") -+#endif - #include "GeckoChildProcessHost.h" -+#if defined(__NetBSD__) -+_Pragma("GCC visibility pop") -+#endif - - #include "base/command_line.h" - #include "base/string_util.h" -@@ -633,7 +639,7 @@ GeckoChildProcessHost::PerformAsyncLaunc - // and passing wstrings from one config to the other is unsafe. So - // we split the logic here. - --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_SOLARIS) - base::environment_map newEnvVars; - ChildPrivileges privs = mPrivileges; - if (privs == base::PRIVILEGES_DEFAULT) { -@@ -759,7 +765,7 @@ GeckoChildProcessHost::PerformAsyncLaunc - childArgv.push_back(pidstring); - - #if defined(MOZ_CRASHREPORTER) --# if defined(OS_LINUX) || defined(OS_BSD) -+# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) - int childCrashFd, childCrashRemapFd; - if (!CrashReporter::CreateNotificationPipeForChild( - &childCrashFd, &childCrashRemapFd)) -@@ -792,7 +798,7 @@ GeckoChildProcessHost::PerformAsyncLaunc - childArgv.push_back(childProcessType); - - base::LaunchApp(childArgv, mFileMap, --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_SOLARIS) - newEnvVars, privs, - #endif - false, &process, arch); diff --git a/mail/thunderbird/patches/patch-mozilla_js_src_jit_arm_Architecture-arm.cpp b/mail/thunderbird/patches/patch-mozilla_js_src_jit_arm_Architecture-arm.cpp deleted file mode 100644 index 6c505b686d6..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_js_src_jit_arm_Architecture-arm.cpp +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_js_src_jit_arm_Architecture-arm.cpp,v 1.3 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/js/src/jit/arm/Architecture-arm.cpp.orig 2017-04-14 04:53:12.000000000 +0000 -+++ mozilla/js/src/jit/arm/Architecture-arm.cpp -@@ -16,7 +16,7 @@ - #include "jit/arm/Assembler-arm.h" - #include "jit/RegisterSets.h" - --#if !defined(__linux__) || defined(ANDROID) || defined(JS_SIMULATOR_ARM) -+#if !defined(__linux__) || defined(ANDROID) || defined(JS_SIMULATOR_ARM) || defined(__NetBSD__) - // The Android NDK and B2G do not include the hwcap.h kernel header, and it is not - // defined when building the simulator, so inline the header defines we need. - # define HWCAP_VFP (1 << 6) diff --git a/mail/thunderbird/patches/patch-mozilla_js_src_jit_none_AtomicOperations-sparc.h b/mail/thunderbird/patches/patch-mozilla_js_src_jit_none_AtomicOperations-sparc.h deleted file mode 100644 index f3f5b331bfb..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_js_src_jit_none_AtomicOperations-sparc.h +++ /dev/null @@ -1,259 +0,0 @@ -$NetBSD: patch-mozilla_js_src_jit_none_AtomicOperations-sparc.h,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/js/src/jit/none/AtomicOperations-sparc.h.orig 2017-04-14 04:53:11.000000000 +0000 -+++ mozilla/js/src/jit/none/AtomicOperations-sparc.h -@@ -249,3 +249,254 @@ js::jit::RegionLock::release(void* addr) - #endif - - #endif // jit_sparc_AtomicOperations_sparc_h -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- -+ * vim: set ts=8 sts=4 et sw=4 tw=99: -+ * 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/. */ -+ -+/* For documentation, see jit/AtomicOperations.h */ -+ -+#ifndef jit_sparc_AtomicOperations_sparc_h -+#define jit_sparc_AtomicOperations_sparc_h -+ -+#include "mozilla/Assertions.h" -+#include "mozilla/Types.h" -+ -+#if defined(__clang__) || defined(__GNUC__) -+ -+// The default implementation tactic for gcc/clang is to use the newer -+// __atomic intrinsics added for use in C++11 <atomic>. Where that -+// isn't available, we use GCC's older __sync functions instead. -+// -+// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward -+// compatible option for older compilers: enable this to use GCC's old -+// __sync functions instead of the newer __atomic functions. This -+// will be required for GCC 4.6.x and earlier, and probably for Clang -+// 3.1, should we need to use those versions. -+ -+//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ -+inline bool -+js::jit::AtomicOperations::isLockfree8() -+{ -+# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0)); -+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0)); -+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0)); -+# if defined(__LP64__) -+ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0)); -+# endif -+ return true; -+# else -+ return false; -+# endif -+} -+ -+inline void -+js::jit::AtomicOperations::fenceSeqCst() -+{ -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ __sync_synchronize(); -+# else -+ __atomic_thread_fence(__ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::loadSeqCst(T* addr) -+{ -+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ __sync_synchronize(); -+ T v = *addr; -+ __sync_synchronize(); -+# else -+ T v; -+ __atomic_load(addr, &v, __ATOMIC_SEQ_CST); -+# endif -+ return v; -+} -+ -+template<typename T> -+inline void -+js::jit::AtomicOperations::storeSeqCst(T* addr, T val) -+{ -+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ __sync_synchronize(); -+ *addr = val; -+ __sync_synchronize(); -+# else -+ __atomic_store(addr, &val, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval) -+{ -+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ return __sync_val_compare_and_swap(addr, oldval, newval); -+# else -+ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); -+ return oldval; -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val) -+{ -+#if !defined( __LP64__) -+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet"); -+#endif -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ return __sync_fetch_and_add(addr, val); -+# else -+ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val) -+{ -+#if !defined( __LP64__) -+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet"); -+#endif -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ return __sync_fetch_and_sub(addr, val); -+# else -+ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val) -+{ -+#if !defined( __LP64__) -+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet"); -+#endif -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ return __sync_fetch_and_and(addr, val); -+# else -+ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val) -+{ -+#if !defined( __LP64__) -+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet"); -+#endif -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ return __sync_fetch_and_or(addr, val); -+# else -+ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val) -+{ -+#if !defined( __LP64__) -+ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet"); -+#endif -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ return __sync_fetch_and_xor(addr, val); -+# else -+ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) -+{ -+ return *addr; // FIXME (1208663): not yet safe -+} -+ -+template<typename T> -+inline void -+js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val) -+{ -+ *addr = val; // FIXME (1208663): not yet safe -+} -+ -+inline void -+js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes) -+{ -+ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe -+} -+ -+inline void -+js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes) -+{ -+ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe -+} -+ -+template<typename T> -+inline T -+js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val) -+{ -+ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ T v; -+ __sync_synchronize(); -+ do { -+ v = *addr; -+ } while (__sync_val_compare_and_swap(addr, v, val) != v); -+ return v; -+# else -+ T v; -+ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST); -+ return v; -+# endif -+} -+ -+template<size_t nbytes> -+inline void -+js::jit::RegionLock::acquire(void* addr) -+{ -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1)) -+ ; -+# else -+ uint32_t zero = 0; -+ uint32_t one = 1; -+ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) { -+ zero = 0; -+ continue; -+ } -+# endif -+} -+ -+template<size_t nbytes> -+inline void -+js::jit::RegionLock::release(void* addr) -+{ -+ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock"); -+# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ __sync_sub_and_fetch(&spinlock, 1); -+# else -+ uint32_t zero = 0; -+ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST); -+# endif -+} -+ -+# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS -+ -+#elif defined(ENABLE_SHARED_ARRAY_BUFFER) -+ -+# error "Either disable JS shared memory, use GCC or Clang, or add code here" -+ -+#endif -+ -+#endif // jit_sparc_AtomicOperations_sparc_h diff --git a/mail/thunderbird/patches/patch-mozilla_js_src_moz.build b/mail/thunderbird/patches/patch-mozilla_js_src_moz.build deleted file mode 100644 index 8bee2a4b566..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_js_src_moz.build +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_js_src_moz.build,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/js/src/moz.build.orig 2017-04-14 04:53:12.000000000 +0000 -+++ mozilla/js/src/moz.build -@@ -735,10 +735,6 @@ OS_LIBS += CONFIG['REALTIME_LIBS'] - CFLAGS += CONFIG['MOZ_ICU_CFLAGS'] - CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] - --NO_EXPAND_LIBS = True -- --DIST_INSTALL = True -- - # Prepare self-hosted JS code for embedding - GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')] - selfhosted = GENERATED_FILES[('selfhosted.out.h', 'selfhosted.js')] diff --git a/mail/thunderbird/patches/patch-mozilla_js_src_old-configure.in b/mail/thunderbird/patches/patch-mozilla_js_src_old-configure.in deleted file mode 100644 index 46051737899..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_js_src_old-configure.in +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-mozilla_js_src_old-configure.in,v 1.1 2017/04/27 13:32:40 ryoon Exp $ - ---- mozilla/js/src/old-configure.in.orig 2017-04-14 04:53:11.000000000 +0000 -+++ mozilla/js/src/old-configure.in -@@ -140,6 +140,9 @@ fi - - MOZ_TOOL_VARIABLES - -+AC_PROG_CPP -+AC_PROG_CXXCPP -+ - dnl Special win32 checks - dnl ======================================================== - -@@ -1024,7 +1027,7 @@ dnl Checks for header files. - dnl ======================================================== - AC_HEADER_DIRENT - case "$target_os" in --freebsd*) -+freebsd*|*-*-dragonfly*) - # for stuff like -lXshm - CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" - ;; -@@ -1155,7 +1158,7 @@ then - fi - - case "$target" in -- *-*-freebsd*) -+ *-*-freebsd*|*-*-dragonfly*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) - dnl -pthread links in -lpthread, so don't specify it explicitly. diff --git a/mail/thunderbird/patches/patch-mozilla_js_xpconnect_src_XPCConvert.cpp b/mail/thunderbird/patches/patch-mozilla_js_xpconnect_src_XPCConvert.cpp deleted file mode 100644 index 9bcc0dbbeea..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_js_xpconnect_src_XPCConvert.cpp +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_js_xpconnect_src_XPCConvert.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/js/xpconnect/src/XPCConvert.cpp.orig 2016-04-07 21:33:28.000000000 +0000 -+++ mozilla/js/xpconnect/src/XPCConvert.cpp -@@ -134,7 +134,7 @@ XPCConvert::NativeData2JS(MutableHandleV - d.setNumber(*static_cast<const float*>(s)); - return true; - case nsXPTType::T_DOUBLE: -- d.setNumber(*static_cast<const double*>(s)); -+ d.setNumber(CanonicalizeNaN(*static_cast<const double*>(s))); - return true; - case nsXPTType::T_BOOL : - d.setBoolean(*static_cast<const bool*>(s)); diff --git a/mail/thunderbird/patches/patch-mozilla_js_xpconnect_src_xpcprivate.h b/mail/thunderbird/patches/patch-mozilla_js_xpconnect_src_xpcprivate.h deleted file mode 100644 index 215aa946b4a..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_js_xpconnect_src_xpcprivate.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_js_xpconnect_src_xpcprivate.h,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/js/xpconnect/src/xpcprivate.h.orig 2017-04-14 04:53:14.000000000 +0000 -+++ mozilla/js/xpconnect/src/xpcprivate.h -@@ -843,6 +843,8 @@ typedef nsTArray<InterpositionWhitelistP - /***************************************************************************/ - // XPCWrappedNativeScope is one-to-one with a JS global object. - -+extern template class JS_PUBLIC_API(JS::WeakMapPtr)<JSObject*, JSObject*>; -+ - class nsIAddonInterposition; - class nsXPCComponentsBase; - class XPCWrappedNativeScope final : public PRCList diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb.c b/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb.c deleted file mode 100644 index 229c57094a7..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_cubeb.c +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-mozilla_media_libcubeb_src_cubeb.c,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libcubeb/src/cubeb.c.orig 2017-04-14 04:53:18.000000000 +0000 -+++ mozilla/media/libcubeb/src/cubeb.c -@@ -54,6 +54,9 @@ int audiotrack_init(cubeb ** context, ch - #if defined(USE_KAI) - int kai_init(cubeb ** context, char const * context_name); - #endif -+#if defined(USE_OSS) -+int oss_init(cubeb ** context, char const * context_name); -+#endif - - - static int -@@ -141,6 +144,9 @@ cubeb_init(cubeb ** context, char const - #if defined(USE_KAI) - kai_init, - #endif -+#if defined(USE_OSS) -+ oss_init, -+#endif - }; - int i; - diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_moz.build b/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_moz.build deleted file mode 100644 index 3dbbd133b48..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_moz.build +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-mozilla_media_libcubeb_src_moz.build,v 1.4 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libcubeb/src/moz.build.orig 2017-04-14 04:53:18.000000000 +0000 -+++ mozilla/media/libcubeb/src/moz.build -@@ -24,6 +24,12 @@ if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['M - 'cubeb_resampler.cpp', - ] - -+if CONFIG['MOZ_OSS']: -+ SOURCES += [ -+ 'cubeb_oss.c', -+ ] -+ DEFINES['USE_OSS'] = True -+ - if CONFIG['MOZ_PULSEAUDIO']: - SOURCES += [ - 'cubeb_pulse.c', -@@ -81,6 +87,7 @@ if CONFIG['OS_TARGET'] == 'Android': - - FINAL_LIBRARY = 'gkmedias' - -+CFLAGS += CONFIG['MOZ_OSS_CFLAGS'] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - if CONFIG['ANDROID_VERSION'] >= '17': - LOCAL_INCLUDES += [ diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_tests_moz.build b/mail/thunderbird/patches/patch-mozilla_media_libcubeb_tests_moz.build deleted file mode 100644 index 1d774c23e8b..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_tests_moz.build +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_media_libcubeb_tests_moz.build,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libcubeb/tests/moz.build.orig 2017-04-14 04:53:18.000000000 +0000 -+++ mozilla/media/libcubeb/tests/moz.build -@@ -73,7 +73,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD': - 'sndio', - ] - else: -- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] - OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS'] - - if CONFIG['GNU_CXX']: diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_update.sh b/mail/thunderbird/patches/patch-mozilla_media_libcubeb_update.sh deleted file mode 100644 index 58fb81b9880..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_update.sh +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_media_libcubeb_update.sh,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libcubeb/update.sh.orig 2017-04-14 04:53:18.000000000 +0000 -+++ mozilla/media/libcubeb/update.sh -@@ -17,6 +17,7 @@ cp $1/src/cubeb_audiounit.cpp src - cp $1/src/cubeb_osx_run_loop.h src - cp $1/src/cubeb_jack.cpp src - cp $1/src/cubeb_opensl.c src -+cp $1/src/cubeb_oss.c src - cp $1/src/cubeb_panner.cpp src - cp $1/src/cubeb_panner.h src - cp $1/src/cubeb_pulse.c src diff --git a/mail/thunderbird/patches/patch-mozilla_media_libsoundtouch_src_cpu__detect__x86.cpp b/mail/thunderbird/patches/patch-mozilla_media_libsoundtouch_src_cpu__detect__x86.cpp deleted file mode 100644 index 4d657813412..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libsoundtouch_src_cpu__detect__x86.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_media_libsoundtouch_src_cpu__detect__x86.cpp,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp.orig 2016-04-07 21:33:21.000000000 +0000 -+++ mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp -@@ -125,7 +125,9 @@ uint detectCPUextensions(void) - #endif - - return res & ~_dwDisabledISA; -- -+#elif defined(__GNUC__) -+ // No cpuid.h --> no cpuid support -+ return 0; - #else - - /// One of these is true: diff --git a/mail/thunderbird/patches/patch-mozilla_media_libsoundtouch_src_soundtouch__perms.h b/mail/thunderbird/patches/patch-mozilla_media_libsoundtouch_src_soundtouch__perms.h deleted file mode 100644 index 5cb574a599c..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libsoundtouch_src_soundtouch__perms.h +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_media_libsoundtouch_src_soundtouch__perms.h,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libsoundtouch/src/soundtouch_perms.h.orig 2017-04-14 04:53:17.000000000 +0000 -+++ mozilla/media/libsoundtouch/src/soundtouch_perms.h -@@ -12,7 +12,9 @@ - - #pragma GCC visibility push(default) - #include "SoundTouch.h" -+#ifndef MOZ_SYSTEM_SOUNDTOUCH - #include "SoundTouchFactory.h" -+#endif - #pragma GCC visibility pop - - #endif // MOZILLA_SOUNDTOUCH_PERMS_H diff --git a/mail/thunderbird/patches/patch-mozilla_media_libtheora_lib_arm_armcpu.c b/mail/thunderbird/patches/patch-mozilla_media_libtheora_lib_arm_armcpu.c deleted file mode 100644 index fb589f1baef..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libtheora_lib_arm_armcpu.c +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-mozilla_media_libtheora_lib_arm_armcpu.c,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/media/libtheora/lib/arm/armcpu.c.orig 2016-04-07 21:33:21.000000000 +0000 -+++ mozilla/media/libtheora/lib/arm/armcpu.c -@@ -107,6 +107,18 @@ ogg_uint32_t oc_cpu_flags_get(void){ - return flags; - } - -+#elif defined(__NetBSD__) -+ogg_uint32_t oc_cpu_flags_get(void){ -+ ogg_uint32_t flags; -+ /* XXX ryoon: I have no idea about ARM CPU extensions detection mechanism -+ under NetBSD/earm. -+ evbearmv6hf-el machine, Raspberry Pi does not have NEON. -+ evbearmv7hf-el machine, CubieBoard2 does not have EDSP. -+ I have no idea about MEDIA. -+ So I will disable all options. */ -+ flags=0; -+ return flags; -+} - #else - /*The feature registers which can tell us what the processor supports are - accessible in priveleged modes only, so we can't have a general user-space diff --git a/mail/thunderbird/patches/patch-mozilla_media_libtheora_moz.build b/mail/thunderbird/patches/patch-mozilla_media_libtheora_moz.build deleted file mode 100644 index ecb3a74f5c3..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libtheora_moz.build +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_media_libtheora_moz.build,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libtheora/moz.build.orig 2017-04-14 04:53:17.000000000 +0000 -+++ mozilla/media/libtheora/moz.build -@@ -21,6 +21,9 @@ FINAL_LIBRARY = 'gkmedias' - # The encoder is currently not included. - DEFINES['THEORA_DISABLE_ENCODE'] = True - -+if CONFIG['MOZ_SYSTEM_OGG']: -+ CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] -+ - # Suppress warnings in third-party code. - if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: - CFLAGS += ['-Wno-type-limits'] diff --git a/mail/thunderbird/patches/patch-mozilla_media_libtremor_moz.build b/mail/thunderbird/patches/patch-mozilla_media_libtremor_moz.build deleted file mode 100644 index 6a77100f262..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libtremor_moz.build +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-mozilla_media_libtremor_moz.build,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libtremor/moz.build.orig 2017-04-14 04:53:18.000000000 +0000 -+++ mozilla/media/libtremor/moz.build -@@ -9,3 +9,5 @@ with Files('*'): - - DIRS += ['include/tremor', 'lib'] - -+if CONFIG['MOZ_SYSTEM_OGG']: -+ CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] diff --git a/mail/thunderbird/patches/patch-mozilla_media_libvorbis_moz.build b/mail/thunderbird/patches/patch-mozilla_media_libvorbis_moz.build deleted file mode 100644 index 150f01b6a50..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libvorbis_moz.build +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-mozilla_media_libvorbis_moz.build,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libvorbis/moz.build.orig 2017-04-14 04:53:19.000000000 +0000 -+++ mozilla/media/libvorbis/moz.build -@@ -56,3 +56,6 @@ FINAL_LIBRARY = 'gkmedias' - # Suppress warnings in third-party code. - if CONFIG['GNU_CC']: - CFLAGS += ['-Wno-uninitialized'] -+ -+if CONFIG['MOZ_SYSTEM_OGG']: -+ CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] diff --git a/mail/thunderbird/patches/patch-mozilla_media_libyuv_source_mjpeg__decoder.cc b/mail/thunderbird/patches/patch-mozilla_media_libyuv_source_mjpeg__decoder.cc deleted file mode 100644 index 8b372885205..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_libyuv_source_mjpeg__decoder.cc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_media_libyuv_source_mjpeg__decoder.cc,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/libyuv/source/mjpeg_decoder.cc.orig 2017-04-14 04:53:19.000000000 +0000 -+++ mozilla/media/libyuv/source/mjpeg_decoder.cc -@@ -25,7 +25,6 @@ - #endif - - #endif --struct FILE; // For jpeglib.h. - - // C++ build requires extern C for jpeg internals. - #ifdef __cplusplus diff --git a/mail/thunderbird/patches/patch-mozilla_media_openmax__dl_dl_api_armCOMM__s.h b/mail/thunderbird/patches/patch-mozilla_media_openmax__dl_dl_api_armCOMM__s.h deleted file mode 100644 index d5b8d328ef3..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_openmax__dl_dl_api_armCOMM__s.h +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-mozilla_media_openmax__dl_dl_api_armCOMM__s.h,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/media/openmax_dl/dl/api/armCOMM_s.h.orig 2016-04-07 21:33:22.000000000 +0000 -+++ mozilla/media/openmax_dl/dl/api/armCOMM_s.h -@@ -11,6 +11,12 @@ - @// This file was originally licensed as follows. It has been - @// relicensed with permission from the copyright holders. - @// -+ -+#if defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__) -+#define UNWIND -+#else -+#define UNWIND @ -+#endif - - @// - @// File Name: armCOMM_s.h -@@ -175,7 +181,8 @@ - .object_arch armv4 - .align 2 - \name : --.fnstart -+ .cfi_startproc -+ UNWIND .fnstart - @ Save specified R registers - _M_GETRREGLIST \rreg - _M_PUSH_RREG -@@ -202,7 +209,8 @@ - .endif - @ Restore any saved R or D registers. - _M_RET -- .fnend -+ UNWIND .fnend -+ .cfi_endproc - .endfunc - @ Reset the global stack tracking variables back to their - @ initial values. diff --git a/mail/thunderbird/patches/patch-mozilla_media_webrtc_signaling_test_common.build b/mail/thunderbird/patches/patch-mozilla_media_webrtc_signaling_test_common.build deleted file mode 100644 index 2d08bc876c4..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_webrtc_signaling_test_common.build +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-mozilla_media_webrtc_signaling_test_common.build,v 1.2 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/webrtc/signaling/test/common.build.orig 2017-04-14 04:53:18.000000000 +0000 -+++ mozilla/media/webrtc/signaling/test/common.build -@@ -96,11 +96,12 @@ if CONFIG['JS_SHARED_LIBRARY']: - - USE_LIBS += ['mozglue'] - -+OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS'] - OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS'] - OS_LIBS += CONFIG['REALTIME_LIBS'] - --if CONFIG['MOZ_ALSA']: -- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] -+if CONFIG['MOZ_OSS']: -+ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] - - if CONFIG['MOZ_SYSTEM_JPEG']: - OS_LIBS += CONFIG['MOZ_JPEG_LIBS'] diff --git a/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc b/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc deleted file mode 100644 index df4ee284b69..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc.orig 2016-04-07 21:33:24.000000000 +0000 -+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc -@@ -25,6 +25,9 @@ - #else - #include <linux/videodev2.h> - #endif -+#ifdef HAVE_LIBV4L2 -+#include <libv4l2.h> -+#endif - - #include <new> - -@@ -33,6 +36,15 @@ - #include "webrtc/system_wrappers/interface/ref_count.h" - #include "webrtc/system_wrappers/interface/trace.h" - -+#ifdef HAVE_LIBV4L2 -+#define open v4l2_open -+#define close v4l2_close -+#define dup v4l2_dup -+#define ioctl v4l2_ioctl -+#define mmap v4l2_mmap -+#define munmap v4l2_munmap -+#endif -+ - namespace webrtc - { - namespace videocapturemodule diff --git a/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi b/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi deleted file mode 100644 index bf5dd970bef..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi +++ /dev/null @@ -1,34 +0,0 @@ -$NetBSD: patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi,v 1.4 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi.orig 2017-04-14 04:53:19.000000000 +0000 -+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi -@@ -7,6 +7,9 @@ - # be found in the AUTHORS file in the root of the source tree. - - { -+ 'variables': { -+ 'use_libv4l2%': 0, -+ }, - 'targets': [ - { - # Note this library is missing an implementation for the video capture. -@@ -75,6 +78,19 @@ - 'linux/video_capture_linux.cc', - 'linux/video_capture_linux.h', - ], -+ 'conditions': [ -+ ['use_libv4l2==1', { -+ 'defines': [ -+ 'HAVE_LIBV4L2', -+ ], -+ 'cflags_mozilla': [ -+ '$(MOZ_LIBV4L2_CFLAGS)', -+ ], -+ 'libraries': [ -+ '-lv4l2', -+ ], -+ }], -+ ], - }], # linux - ['OS=="mac"', { - 'sources': [ diff --git a/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc__abort.cpp b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc__abort.cpp deleted file mode 100644 index cc6269a9912..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc__abort.cpp +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-mozilla_memory_mozalloc_mozalloc__abort.cpp,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/memory/mozalloc/mozalloc_abort.cpp.orig 2016-04-07 21:33:25.000000000 +0000 -+++ mozilla/memory/mozalloc/mozalloc_abort.cpp -@@ -68,7 +68,11 @@ void fillAbortMessage(char (&msg)[N], ui - // - // That segmentation fault will be interpreted as another bug by ASan and as a - // result, ASan will just exit(1) instead of aborting. -+#if defined(SOLARIS) -+void std::abort(void) -+#else - void abort(void) -+#endif - { - #ifdef MOZ_WIDGET_ANDROID - char msg[64] = {}; diff --git a/mail/thunderbird/patches/patch-mozilla_mfbt_Poison.cpp b/mail/thunderbird/patches/patch-mozilla_mfbt_Poison.cpp deleted file mode 100644 index 6c2650bb787..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_mfbt_Poison.cpp +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-mozilla_mfbt_Poison.cpp,v 1.3 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/mfbt/Poison.cpp.orig 2016-04-07 21:33:25.000000000 +0000 -+++ mozilla/mfbt/Poison.cpp -@@ -129,7 +129,11 @@ ReleaseRegion(void* aRegion, uintptr_t a - static bool - ProbeRegion(uintptr_t aRegion, uintptr_t aSize) - { -+#if !defined(__sun__) - if (madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) { -+#else -+ if (posix_madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) { -+#endif - return true; - } else { - return false; diff --git a/mail/thunderbird/patches/patch-mozilla_mobile_android_installer_Makefile.in b/mail/thunderbird/patches/patch-mozilla_mobile_android_installer_Makefile.in deleted file mode 100644 index dbbcc8a4dc9..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_mobile_android_installer_Makefile.in +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_mobile_android_installer_Makefile.in,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/mobile/android/installer/Makefile.in.orig 2017-04-14 04:53:19.000000000 +0000 -+++ mozilla/mobile/android/installer/Makefile.in -@@ -74,6 +74,10 @@ BINPATH = bin - endif - DEFINES += -DBINPATH=$(BINPATH) - -+ifdef MOZ_DEBUG -+DEFINES += -DMOZ_DEBUG=1 -+endif -+ - ifdef ENABLE_MARIONETTE - DEFINES += -DENABLE_MARIONETTE=1 - endif diff --git a/mail/thunderbird/patches/patch-mozilla_modules_libjar_nsZipArchive.cpp b/mail/thunderbird/patches/patch-mozilla_modules_libjar_nsZipArchive.cpp deleted file mode 100644 index 6312d62f945..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_modules_libjar_nsZipArchive.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_modules_libjar_nsZipArchive.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/modules/libjar/nsZipArchive.cpp.orig 2016-04-07 21:33:29.000000000 +0000 -+++ mozilla/modules/libjar/nsZipArchive.cpp -@@ -626,7 +626,9 @@ MOZ_WIN_MEM_TRY_BEGIN - // Success means optimized jar layout from bug 559961 is in effect - uint32_t readaheadLength = xtolong(startp); - if (readaheadLength) { --#if defined(XP_UNIX) -+#if defined(OS_SOLARIS) -+ posix_madvise(const_cast<uint8_t*>(startp), readaheadLength, POSIX_MADV_WILLNEED); -+#elif defined(XP_UNIX) - madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED); - #elif defined(XP_WIN) - if (aFd) { diff --git a/mail/thunderbird/patches/patch-mozilla_mozglue_build_arm.cpp b/mail/thunderbird/patches/patch-mozilla_mozglue_build_arm.cpp deleted file mode 100644 index be0a189cc37..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_mozglue_build_arm.cpp +++ /dev/null @@ -1,57 +0,0 @@ -$NetBSD: patch-mozilla_mozglue_build_arm.cpp,v 1.2 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/mozglue/build/arm.cpp.orig 2017-04-14 04:53:21.000000000 +0000 -+++ mozilla/mozglue/build/arm.cpp -@@ -13,10 +13,13 @@ - // we don't compile one of these detection methods. The detection code here is - // based on the CPU detection in libtheora. - --# if defined(__linux__) || defined(ANDROID) -+# if defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) - # include <stdio.h> - # include <stdlib.h> - # include <string.h> -+# if defined(__NetBSD__) -+# include <sys/sysctl.h> -+# endif - - enum{ - MOZILLA_HAS_EDSP_FLAG=1, -@@ -25,6 +28,29 @@ enum{ - MOZILLA_HAS_NEON_FLAG=8 - }; - -+# if defined(__NetBSD__) -+static unsigned -+get_arm_cpu_flags(void) -+{ -+ unsigned flags = 0; -+ size_t len; -+ int flag; -+ -+ len = sizeof(flag); -+ if (sysctlbyname("machdep.simdex_present", &flag, &len, NULL, 0) == 0 && flag) { -+ flags |= MOZILLA_HAS_ARMV6_FLAG; -+ flags |= MOZILLA_HAS_EDSP_FLAG; -+ } -+ -+ len = sizeof(flag); -+ if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0 && flag) { -+ flags |= MOZILLA_HAS_ARMV7_FLAG; -+ flags |= MOZILLA_HAS_NEON_FLAG; -+ } -+ -+ return flags; -+} -+# else - static unsigned - get_arm_cpu_flags(void) - { -@@ -89,6 +115,7 @@ get_arm_cpu_flags(void) - } - return flags; - } -+# endif - - // Cache a local copy so we only have to read /proc/cpuinfo once. - static unsigned arm_cpu_flags = get_arm_cpu_flags(); diff --git a/mail/thunderbird/patches/patch-mozilla_mozglue_build_arm.h b/mail/thunderbird/patches/patch-mozilla_mozglue_build_arm.h deleted file mode 100644 index f274ae1bdcc..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_mozglue_build_arm.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_mozglue_build_arm.h,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/mozglue/build/arm.h.orig 2016-04-07 21:33:29.000000000 +0000 -+++ mozilla/mozglue/build/arm.h -@@ -76,7 +76,7 @@ - # endif - - // Currently we only have CPU detection for Linux via /proc/cpuinfo --# if defined(__linux__) || defined(ANDROID) -+# if defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) - # define MOZILLA_ARM_HAVE_CPUID_DETECTION 1 - # endif - diff --git a/mail/thunderbird/patches/patch-mozilla_netwerk_dns_moz.build b/mail/thunderbird/patches/patch-mozilla_netwerk_dns_moz.build deleted file mode 100644 index ff0c61c3b46..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_netwerk_dns_moz.build +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-mozilla_netwerk_dns_moz.build,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/netwerk/dns/moz.build.orig 2017-04-14 04:53:21.000000000 +0000 -+++ mozilla/netwerk/dns/moz.build -@@ -66,6 +66,9 @@ 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'] diff --git a/mail/thunderbird/patches/patch-mozilla_old-configure.in b/mail/thunderbird/patches/patch-mozilla_old-configure.in deleted file mode 100644 index 5025b16dc6f..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_old-configure.in +++ /dev/null @@ -1,244 +0,0 @@ -$NetBSD: patch-mozilla_old-configure.in,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/old-configure.in.orig 2017-04-14 04:53:22.000000000 +0000 -+++ mozilla/old-configure.in -@@ -2159,11 +2159,7 @@ if test "$MOZ_SYSTEM_JPEG" = 1; then - #include <jpeglib.h> ], - [ #if JPEG_LIB_VERSION < $MOZJPEG - #error "Insufficient JPEG library version ($MOZJPEG required)." -- #endif -- #ifndef JCS_EXTENSIONS -- #error "libjpeg-turbo JCS_EXTENSIONS required" -- #endif -- ], -+ #endif ], - MOZ_SYSTEM_JPEG=1, - AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg])) - fi -@@ -2894,6 +2890,9 @@ if test -n "$MOZ_WEBRTC"; then - MOZ_RAW=1 - MOZ_VPX_ERROR_CONCEALMENT=1 - -+ dnl with libv4l2 we can support more cameras -+ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2) -+ - dnl enable once Signaling lands - MOZ_WEBRTC_SIGNALING=1 - AC_DEFINE(MOZ_WEBRTC_SIGNALING) -@@ -2936,7 +2935,7 @@ dnl Use integers over floats for audio o - dnl (regarless of the CPU architecture, because audio - dnl backends for those platforms don't support floats. We also - dnl use integers on ARM with other OS, because it's more efficient. --if test "$OS_TARGET" = "Android" -o "$CPU_ARCH" = "arm"; then -+if test -n "$MOZ_INTEGER_SAMPLES"; then - MOZ_SAMPLE_TYPE_S16=1 - AC_DEFINE(MOZ_SAMPLE_TYPE_S16) - AC_SUBST(MOZ_SAMPLE_TYPE_S16) -@@ -3044,6 +3043,111 @@ if test -n "$MOZ_OMX_PLUGIN"; then - fi - fi - -+dnl ======================================================== -+dnl Check for libogg -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-ogg, -+[ --with-system-ogg Use system libogg (located with pkgconfig)], -+MOZ_SYSTEM_OGG=1, -+MOZ_SYSTEM_OGG=) -+ -+if test -n "$MOZ_SYSTEM_OGG"; then -+ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.0) -+ -+ _SAVE_LIBS=$LIBS -+ LIBS="$LIBS $MOZ_OGG_LIBS" -+ AC_CHECK_FUNC(ogg_set_mem_functions, [], -+ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)]) -+ LIBS=$_SAVE_LIBS -+fi -+ -+AC_SUBST(MOZ_SYSTEM_OGG) -+ -+dnl ======================================================== -+dnl Check for libvorbis -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-vorbis, -+[ --with-system-vorbis Use system libvorbis (located with pkgconfig)], -+MOZ_SYSTEM_VORBIS=1, -+MOZ_SYSTEM_VORBIS=) -+ -+if test -n "$MOZ_SYSTEM_VORBIS"; then -+ PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5) -+fi -+ -+AC_SUBST(MOZ_SYSTEM_VORBIS) -+ -+dnl ======================================================== -+dnl Check for integer-only libvorbis aka tremor -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-tremor, -+[ --with-system-tremor Use system libtremor (located with pkgconfig)], -+MOZ_SYSTEM_TREMOR=1, -+MOZ_SYSTEM_TREMOR=) -+ -+if test -n "$MOZ_SYSTEM_TREMOR"; then -+ PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1) -+fi -+ -+AC_SUBST(MOZ_SYSTEM_TREMOR) -+ -+dnl ======================================================== -+dnl Check for libtheora -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-theora, -+[ --with-system-theora Use system libtheora (located with pkgconfig)], -+MOZ_SYSTEM_THEORA=1, -+MOZ_SYSTEM_THEORA=) -+ -+if test -n "$MOZ_SYSTEM_THEORA"; then -+ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2) -+fi -+ -+AC_SUBST(MOZ_SYSTEM_THEORA) -+ -+dnl ======================================================== -+dnl Check for libSoundTouch -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-soundtouch, -+[ --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)], -+MOZ_SYSTEM_SOUNDTOUCH=1, -+MOZ_SYSTEM_SOUNDTOUCH=) -+ -+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then -+ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0) -+ -+ AC_LANG_SAVE -+ AC_LANG_CPLUSPLUS -+ _SAVE_CXXFLAGS=$CXXFLAGS -+ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS" -+ AC_CACHE_CHECK(for soundtouch sample type, -+ ac_cv_soundtouch_sample_type, -+ [AC_TRY_COMPILE([#include <SoundTouch.h> -+ #ifndef SOUNDTOUCH_INTEGER_SAMPLES -+ #error soundtouch expects float samples -+ #endif], -+ [], -+ [ac_cv_soundtouch_sample_type=short], -+ [ac_cv_soundtouch_sample_type=float])]) -+ CXXFLAGS=$_SAVE_CXXFLAGS -+ AC_LANG_RESTORE -+ -+ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \ -+ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then -+ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.]) -+ fi -+fi -+ -+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then -+ AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH) -+fi -+AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH) -+ - dnl system libvpx Support - dnl ======================================================== - MOZ_ARG_WITH_BOOL(system-libvpx, -@@ -3208,6 +3312,67 @@ AC_DEFINE(MOZ_WEBM_ENCODER) - AC_SUBST(MOZ_WEBM_ENCODER) - - dnl ================================== -+dnl = Check OSS availability -+dnl ================================== -+ -+dnl If using Linux, Solaris or BSDs, ensure that OSS is available -+case "$OS_TARGET" in -+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD) -+ MOZ_OSS=1 -+ ;; -+esac -+ -+MOZ_ARG_WITH_STRING(oss, -+[ --with-oss[=PFX] Enable OpenSoundSystem support [installed at prefix PFX]], -+ OSSPREFIX=$withval) -+ -+if test -n "$OSSPREFIX"; then -+ if test "$OSSPREFIX" != "no"; then -+ MOZ_OSS=1 -+ else -+ MOZ_OSS= -+ fi -+fi -+ -+_SAVE_CFLAGS=$CFLAGS -+_SAVE_LIBS=$LIBS -+if test -n "$MOZ_OSS"; then -+ dnl Prefer 4Front implementation -+ AC_MSG_CHECKING([MOZ_OSS_CFLAGS]) -+ if test "$OSSPREFIX" != "yes"; then -+ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf -+ if test -f "$oss_conf"; then -+ . "$oss_conf" -+ else -+ OSSLIBDIR=$OSSPREFIX/lib/oss -+ fi -+ if test -d "$OSSLIBDIR"; then -+ MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include" -+ fi -+ fi -+ AC_MSG_RESULT([$MOZ_OSS_CFLAGS]) -+ -+ CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS" -+ MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h) -+ -+ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \ -+ "$ac_cv_header_soundcard_h" != "yes"; then -+ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --without-oss.]) -+ fi -+ -+ dnl Assume NetBSD implementation over SunAudio -+ AC_CHECK_LIB(ossaudio, _oss_ioctl, -+ [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound") -+ MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"]) -+fi -+CFLAGS=$_SAVE_CFLAGS -+LIBS=$_SAVE_LIBS -+ -+AC_SUBST(MOZ_OSS) -+AC_SUBST_LIST(MOZ_OSS_CFLAGS) -+AC_SUBST_LIST(MOZ_OSS_LIBS) -+ -+dnl ================================== - dnl = Check alsa availability on Linux - dnl ================================== - -@@ -5023,6 +5188,27 @@ if test "$USE_FC_FREETYPE"; then - fi - - dnl ======================================================== -+dnl Check for graphite2 -+dnl ======================================================== -+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then -+ dnl graphite2.pc has bogus version, check manually -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" -+ AC_TRY_COMPILE([ #include <graphite2/Font.h> -+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ -+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ -+ * 100 + GR2_VERSION_BUGFIX >= \ -+ (major) * 10000 + (minor) * 100 + (bugfix) ) -+ ], [ -+ #if !GR2_VERSION_REQUIRE(1,3,8) -+ #error "Insufficient graphite2 version." -+ #endif -+ ], [], -+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) -+ CFLAGS=$_SAVE_CFLAGS -+fi -+ -+dnl ======================================================== - dnl Check for pixman and cairo - dnl ======================================================== - diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_components_osfile_modules_osfile__unix__back.jsm b/mail/thunderbird/patches/patch-mozilla_toolkit_components_osfile_modules_osfile__unix__back.jsm deleted file mode 100644 index b5bbb55051f..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_components_osfile_modules_osfile__unix__back.jsm +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_components_osfile_modules_osfile__unix__back.jsm,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm.orig 2017-04-14 04:53:29.000000000 +0000 -+++ mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm -@@ -228,8 +228,8 @@ - let statvfs = new SharedAll.HollowStructure("statvfs", - Const.OSFILE_SIZEOF_STATVFS); - -- statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BSIZE, -- "f_bsize", Type.unsigned_long.implementation); -+ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_FRSIZE, -+ "f_frsize", Type.unsigned_long.implementation); - statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BAVAIL, - "f_bavail", Type.fsblkcnt_t.implementation); - diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_components_osfile_modules_osfile__unix__front.jsm b/mail/thunderbird/patches/patch-mozilla_toolkit_components_osfile_modules_osfile__unix__front.jsm deleted file mode 100644 index 4dc58ebbf6e..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_components_osfile_modules_osfile__unix__front.jsm +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_components_osfile_modules_osfile__unix__front.jsm,v 1.4 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm.orig 2017-04-14 04:53:28.000000000 +0000 -+++ mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm -@@ -399,7 +399,7 @@ - throw_on_negative("statvfs", (UnixFile.statvfs || UnixFile.statfs)(sourcePath, fileSystemInfoPtr)); - - let bytes = new Type.uint64_t.implementation( -- fileSystemInfo.f_bsize * fileSystemInfo.f_bavail); -+ fileSystemInfo.f_frsize * fileSystemInfo.f_bavail); - - return bytes.value; - }; diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h b/mail/thunderbird/patches/patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h deleted file mode 100644 index 8c146823c98..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h,v 1.2 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/components/protobuf/src/google/protobuf/stubs/atomicops.h.orig 2017-04-14 04:53:29.000000000 +0000 -+++ mozilla/toolkit/components/protobuf/src/google/protobuf/stubs/atomicops.h -@@ -76,6 +76,11 @@ typedef intptr_t Atomic64; - #endif - #endif - -+#if defined(__NetBSD__) && defined(__arm__) -+// NetBSD/arm uses long for intptr_t, which fails -fpermissive checks. So -+// explicitly use int32 here instead. -+typedef int32 AtomicWord; -+#else - // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or - // Atomic64 routines below, depending on your architecture. - #if defined(__OpenBSD__) && !defined(GOOGLE_PROTOBUF_ARCH_64_BIT) -@@ -83,6 +88,7 @@ typedef Atomic32 AtomicWord; - #else - typedef intptr_t AtomicWord; - #endif -+#endif - - // Atomically execute: - // result = *ptr; diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_platform__macros.h b/mail/thunderbird/patches/patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_platform__macros.h deleted file mode 100644 index c38d7ad664f..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_platform__macros.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_components_protobuf_src_google_protobuf_stubs_platform__macros.h,v 1.1 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h.orig 2016-04-07 21:33:32.000000000 +0000 -+++ mozilla/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h -@@ -67,7 +67,7 @@ - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 - #elif defined(sparc) - #define GOOGLE_PROTOBUF_ARCH_SPARC 1 --#ifdef SOLARIS_64BIT_ENABLED -+#if (defined(sun) && defined(SOLARIS_64BIT_ENABLED)) || __LP64__ - #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 - #else - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_library_moz.build b/mail/thunderbird/patches/patch-mozilla_toolkit_library_moz.build deleted file mode 100644 index e8fed79c191..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_library_moz.build +++ /dev/null @@ -1,54 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_library_moz.build,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/library/moz.build.orig 2017-04-14 04:53:29.000000000 +0000 -+++ mozilla/toolkit/library/moz.build -@@ -215,6 +215,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF - ] - - OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS'] -+OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS'] - OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS'] - - if CONFIG['SERVO_TARGET_DIR']: -@@ -229,9 +230,30 @@ if CONFIG['MOZ_SYSTEM_JPEG']: - if CONFIG['MOZ_SYSTEM_PNG']: - OS_LIBS += CONFIG['MOZ_PNG_LIBS'] - -+if CONFIG['MOZ_SYSTEM_GRAPHITE2']: -+ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] -+ -+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_OGG']: -+ OS_LIBS += CONFIG['MOZ_OGG_LIBS'] -+ -+if CONFIG['MOZ_SYSTEM_THEORA']: -+ OS_LIBS += CONFIG['MOZ_THEORA_LIBS'] -+ -+if CONFIG['MOZ_SYSTEM_VORBIS']: -+ OS_LIBS += CONFIG['MOZ_VORBIS_LIBS'] -+ -+if CONFIG['MOZ_SYSTEM_TREMOR']: -+ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS'] -+ -+if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: -+ OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS'] -+ - if CONFIG['MOZ_SYSTEM_LIBEVENT']: - OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] - -@@ -241,8 +263,8 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']: - 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_OSS']: -+ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] - - if CONFIG['HAVE_CLOCK_MONOTONIC']: - OS_LIBS += CONFIG['REALTIME_LIBS'] diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_modules_GMPUtils.jsm b/mail/thunderbird/patches/patch-mozilla_toolkit_modules_GMPUtils.jsm deleted file mode 100644 index a7fc26a1325..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_modules_GMPUtils.jsm +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_modules_GMPUtils.jsm,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/modules/GMPUtils.jsm.orig 2017-04-14 04:53:29.000000000 +0000 -+++ mozilla/toolkit/modules/GMPUtils.jsm -@@ -80,6 +80,7 @@ this.GMPUtils = { - // Mac OSX, and Linux. - return AppConstants.isPlatformAndVersionAtLeast("win", "6") || - AppConstants.platform == "macosx" || -+ AppConstants.platform == "netbsd" || - AppConstants.platform == "linux"; - } - diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_moz.configure b/mail/thunderbird/patches/patch-mozilla_toolkit_moz.configure deleted file mode 100644 index 02b4c8b1a61..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_moz.configure +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_moz.configure,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/moz.configure.orig 2017-04-14 04:53:29.000000000 +0000 -+++ mozilla/toolkit/moz.configure -@@ -338,6 +338,26 @@ add_old_configure_assignment('FT2_LIBS', - add_old_configure_assignment('FT2_CFLAGS', - delayed_getattr(ft2_info, 'cflags')) - -+# Graphite2 -+# ============================================================== -+option('--with-system-graphite2', -+ help="Use system graphite2 (located with pkgconfig)") -+ -+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', -+ when='--with-system-graphite2') -+ -+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True)) -+ -+# HarfBuzz -+# ============================================================== -+option('--with-system-harfbuzz', -+ help="Use system harfbuzz (located with pkgconfig)") -+ -+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.1', -+ when='--with-system-harfbuzz') -+ -+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) -+ - # Apple platform decoder support - # ============================================================== - @depends(toolkit) diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_mozapps_extensions_test_browser_browser__gmpProvider.js b/mail/thunderbird/patches/patch-mozilla_toolkit_mozapps_extensions_test_browser_browser__gmpProvider.js deleted file mode 100644 index 90f2d349998..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_mozapps_extensions_test_browser_browser__gmpProvider.js +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_mozapps_extensions_test_browser_browser__gmpProvider.js,v 1.1 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js.orig 2017-04-14 04:53:29.000000000 +0000 -+++ mozilla/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js -@@ -393,6 +393,7 @@ add_task(function* testEmeSupport() { - } else if (addon.id == GMPScope.WIDEVINE_ID) { - if (AppConstants.isPlatformAndVersionAtLeast("win", "6") || - AppConstants.platform == "macosx" || -+ AppConstants.platform == "netbsd" || - AppConstants.platform == "linux") { - Assert.ok(item, "Widevine supported, found add-on element."); - } else { diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_mozapps_installer_packager.mk b/mail/thunderbird/patches/patch-mozilla_toolkit_mozapps_installer_packager.mk deleted file mode 100644 index de7c212bf03..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_mozapps_installer_packager.mk +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_mozapps_installer_packager.mk,v 1.2 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/toolkit/mozapps/installer/packager.mk.orig 2017-04-14 04:53:30.000000000 +0000 -+++ mozilla/toolkit/mozapps/installer/packager.mk -@@ -139,8 +139,8 @@ endif - (cd $(DESTDIR)$(installdir) && tar -xf -) - $(NSINSTALL) -D $(DESTDIR)$(bindir) - $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME) -- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir) --ifdef INSTALL_SDK # Here comes the hard part -+ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)/${MOZILLA_PKG_NAME} -+ifeq ($(MOZ_APP_NAME),xulrunner) - $(NSINSTALL) -D $(DESTDIR)$(includedir) - (cd $(DIST)/include && $(TAR) $(TAR_CREATE_FLAGS) - .) | \ - (cd $(DESTDIR)$(includedir) && tar -xf -) diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_xre_nsEmbedFunctions.cpp b/mail/thunderbird/patches/patch-mozilla_toolkit_xre_nsEmbedFunctions.cpp deleted file mode 100644 index f2fc8742161..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_xre_nsEmbedFunctions.cpp +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-mozilla_toolkit_xre_nsEmbedFunctions.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/toolkit/xre/nsEmbedFunctions.cpp.orig 2016-04-07 21:33:34.000000000 +0000 -+++ mozilla/toolkit/xre/nsEmbedFunctions.cpp -@@ -259,7 +259,7 @@ XRE_SetRemoteExceptionHandler(const char - { - #if defined(XP_WIN) || defined(XP_MACOSX) - return CrashReporter::SetRemoteExceptionHandler(nsDependentCString(aPipe)); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_SOLARIS) - return CrashReporter::SetRemoteExceptionHandler(); - #else - # error "OOP crash reporter unsupported on this platform" -@@ -449,7 +449,7 @@ XRE_InitChildProcess(int aArgc, - // Bug 684322 will add better visibility into this condition - NS_WARNING("Could not setup crash reporting\n"); - } --# elif defined(OS_LINUX) -+# elif defined(OS_LINUX) || defined(OS_SOLARIS) - // on POSIX, |crashReporterArg| is "true" if crash reporting is - // enabled, false otherwise - if (0 != strcmp("false", crashReporterArg) && diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_build_XPCOMInit.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_build_XPCOMInit.cpp deleted file mode 100644 index 153da4a9b62..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_build_XPCOMInit.cpp +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_build_XPCOMInit.cpp,v 1.3 2017/04/27 13:32:41 ryoon Exp $ - ---- mozilla/xpcom/build/XPCOMInit.cpp.orig 2017-04-14 04:53:30.000000000 +0000 -+++ mozilla/xpcom/build/XPCOMInit.cpp -@@ -154,7 +154,9 @@ extern nsresult nsStringInputStreamConst - - #include "mozilla/ipc/GeckoChildProcessHost.h" - -+#ifndef MOZ_OGG_NO_MEM_REPORTING - #include "ogg/ogg.h" -+#endif - #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) - #if defined(HAVE_STDINT_H) - // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in -@@ -675,11 +677,13 @@ NS_InitXPCOM2(nsIServiceManager** aResul - // this oddness. - mozilla::SetICUMemoryFunctions(); - -+#ifndef MOZ_OGG_NO_MEM_REPORTING - // Do the same for libogg. - ogg_set_mem_functions(OggReporter::CountingMalloc, - OggReporter::CountingCalloc, - OggReporter::CountingRealloc, - OggReporter::CountingFree); -+#endif - - #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) - // And for VPX. diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_Makefile.in b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_Makefile.in deleted file mode 100644 index 9fece87964a..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_Makefile.in +++ /dev/null @@ -1,48 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_Makefile.in,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/Makefile.in.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/Makefile.in -@@ -42,6 +42,43 @@ ifeq ($(OS_ARCH),AIX) - CXXFLAGS := $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS)) - endif - -+###################################################################### -+# SPARC -+###################################################################### -+# -+# Linux/SPARC -+# -+ifeq ($(OS_ARCH),Linux) -+ifneq (,$(findstring sparc,$(OS_TEST))) -+ASFILES := xptcinvoke_asm_sparc_linux_GCC3.s xptcstubs_asm_sparc_solaris.s -+endif -+endif -+# -+# NetBSD/SPARC -+# -+ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc) -+ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s -+endif -+# -+# OpenBSD/SPARC -+# -+ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc) -+ASFILES := xptcinvoke_asm_sparc_openbsd.s xptcstubs_asm_sparc_openbsd.s -+endif -+# -+# OpenBSD/SPARC64 -+# -+ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST))) -+ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s -+endif -+# -+# NetBSD/SPARC64 -+# -+ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc64) -+CPPSRCS := xptcinvoke_sparc64_netbsd.cpp xptcstubs_sparc64_openbsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_netbsd.s -+endif -+ - include $(topsrcdir)/config/rules.mk - - ifeq ($(OS_ARCH),Linux) diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp deleted file mode 100644 index a1d0b6c4a98..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp +++ /dev/null @@ -1,527 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_arm_netbsd.cpp.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_arm_netbsd.cpp -@@ -7,82 +7,92 @@ - - #include "xptcprivate.h" - --// Remember that these 'words' are 32bit DWORDS -+#include "mozilla/Compiler.h" - --static uint32_t --invoke_count_words(uint32_t paramCount, nsXPTCVariant* s) -+#ifndef __ARM_PCS_VFP -+ -+/* This function copies a 64-bits word from dw to the given pointer in -+ * a buffer delimited by start and end, possibly wrapping around the -+ * buffer boundaries, and/or properly aligning the data at 64-bits word -+ * boundaries (for EABI). -+ * start and end are both assumed to be 64-bits aligned. -+ * Returns a pointer to the second 32-bits word copied (to accomodate -+ * the invoke_copy_to_stack loop). -+ */ -+static uint32_t * -+copy_double_word(uint32_t *start, uint32_t *current, uint32_t *end, uint64_t *dw) - { -- uint32_t result = 0; -- for(uint32_t i = 0; i < paramCount; i++, s++) -- { -- if(s->IsPtrData()) -- { -- result++; -- continue; -- } -- switch(s->type) -- { -- case nsXPTType::T_I8 : -- case nsXPTType::T_I16 : -- case nsXPTType::T_I32 : -- result++; -- break; -- case nsXPTType::T_I64 : -- result+=2; -- break; -- case nsXPTType::T_U8 : -- case nsXPTType::T_U16 : -- case nsXPTType::T_U32 : -- result++; -- break; -- case nsXPTType::T_U64 : -- result+=2; -- break; -- case nsXPTType::T_FLOAT : -- result++; -- break; -- case nsXPTType::T_DOUBLE : -- result+=2; -- break; -- case nsXPTType::T_BOOL : -- case nsXPTType::T_CHAR : -- case nsXPTType::T_WCHAR : -- result++; -- break; -- default: -- // all the others are plain pointer types -- result++; -- break; -- } -+#ifdef __ARM_EABI__ -+ /* Aligning the pointer for EABI */ -+ current = (uint32_t *)(((uint32_t)current + 7) & ~7); -+ /* Wrap when reaching the end of the buffer */ -+ if (current == end) current = start; -+#else -+ /* On non-EABI, 64-bits values are not aligned and when we reach the end -+ * of the buffer, we need to write half of the data at the end, and the -+ * other half at the beginning. */ -+ if (current == end - 1) { -+ *current = ((uint32_t*)dw)[0]; -+ *start = ((uint32_t*)dw)[1]; -+ return start; - } -- return result; -+#endif -+ -+ *((uint64_t*) current) = *dw; -+ return current + 1; - } - --static void --invoke_copy_to_stack(uint32_t* d, uint32_t paramCount, nsXPTCVariant* s) -+/* See stack_space comment in NS_InvokeByIndex to see why this needs not to -+ * be static on DEBUG builds. */ -+#ifndef DEBUG -+static -+#endif -+void -+invoke_copy_to_stack(uint32_t* stk, uint32_t *end, -+ uint32_t paramCount, nsXPTCVariant* s) - { -+ /* The stack buffer is 64-bits aligned. The end argument points to its end. -+ * The caller is assumed to create a stack buffer of at least four 32-bits -+ * words. -+ * We use the last three 32-bit words to store the values for r1, r2 and r3 -+ * for the method call, i.e. the first words for arguments passing. -+ */ -+ uint32_t *d = end - 3; - for(uint32_t i = 0; i < paramCount; i++, d++, s++) - { -+ /* Wrap when reaching the end of the stack buffer */ -+ if (d == end) d = stk; -+ NS_ASSERTION(d >= stk && d < end, -+ "invoke_copy_to_stack is copying outside its given buffer"); - if(s->IsPtrData()) - { - *((void**)d) = s->ptr; - continue; - } -+ // According to the ARM EABI, integral types that are smaller than a word -+ // are to be sign/zero-extended to a full word and treated as 4-byte values. -+ - switch(s->type) - { -- case nsXPTType::T_I8 : *((int8_t*) d) = s->val.i8; break; -- case nsXPTType::T_I16 : *((int16_t*) d) = s->val.i16; break; -+ case nsXPTType::T_I8 : *((int32_t*) d) = s->val.i8; break; -+ case nsXPTType::T_I16 : *((int32_t*) d) = s->val.i16; break; - case nsXPTType::T_I32 : *((int32_t*) d) = s->val.i32; break; -- case nsXPTType::T_I64 : *((int64_t*) d) = s->val.i64; d++; break; -- case nsXPTType::T_U8 : *((uint8_t*) d) = s->val.u8; break; -- case nsXPTType::T_U16 : *((uint16_t*)d) = s->val.u16; break; -+ case nsXPTType::T_I64 : -+ d = copy_double_word(stk, d, end, (uint64_t *)&s->val.i64); -+ break; -+ case nsXPTType::T_U8 : *((uint32_t*)d) = s->val.u8; break; -+ case nsXPTType::T_U16 : *((uint32_t*)d) = s->val.u16; break; - case nsXPTType::T_U32 : *((uint32_t*)d) = s->val.u32; break; -- case nsXPTType::T_U64 : *((uint64_t*)d) = s->val.u64; d++; break; -+ case nsXPTType::T_U64 : -+ d = copy_double_word(stk, d, end, (uint64_t *)&s->val.u64); -+ break; - case nsXPTType::T_FLOAT : *((float*) d) = s->val.f; break; -- case nsXPTType::T_DOUBLE : *((double*) d) = s->val.d; d++; break; -- case nsXPTType::T_BOOL : *((bool*) d) = s->val.b; break; -- case nsXPTType::T_CHAR : *((char*) d) = s->val.c; break; -- case nsXPTType::T_WCHAR : *((wchar_t*) d) = s->val.wc; break; -+ case nsXPTType::T_DOUBLE : -+ d = copy_double_word(stk, d, end, (uint64_t *)&s->val.d); -+ break; -+ case nsXPTType::T_BOOL : *((int32_t*) d) = s->val.b; break; -+ case nsXPTType::T_CHAR : *((int32_t*) d) = s->val.c; break; -+ case nsXPTType::T_WCHAR : *((int32_t*) d) = s->val.wc; break; - default: - // all the others are plain pointer types - *((void**)d) = s->val.p; -@@ -91,47 +101,27 @@ invoke_copy_to_stack(uint32_t* d, uint32 - } - } - --extern "C" --struct my_params_struct { -- nsISupports* that; -- uint32_t Index; -- uint32_t Count; -- nsXPTCVariant* params; -- uint32_t fn_count; -- uint32_t fn_copy; --}; -+typedef nsresult (*vtable_func)(nsISupports *, uint32_t, uint32_t, uint32_t); - --XPTC_PUBLIC_API(nsresult) --XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+EXPORT_XPCOM_API(nsresult) -+NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, - uint32_t paramCount, nsXPTCVariant* params) - { -- uint32_t result; -- struct my_params_struct my_params; -- my_params.that = that; -- my_params.Index = methodIndex; -- my_params.Count = paramCount; -- my_params.params = params; -- my_params.fn_copy = (uint32_t) &invoke_copy_to_stack; -- my_params.fn_count = (uint32_t) &invoke_count_words; - - /* This is to call a given method of class that. - * The parameters are in params, the number is in paramCount. - * The routine will issue calls to count the number of words - * required for argument passing and to copy the arguments to - * the stack. -- * Since APCS passes the first 3 params in r1-r3, we need to -- * load the first three words from the stack and correct the stack -- * pointer (sp) in the appropriate way. This means: -- * -- * 1.) more than 3 arguments: load r1-r3, correct sp and remember No. -- * of bytes left on the stack in r4 -- * -- * 2.) <= 2 args: load r1-r3 (we won't be causing a stack overflow I hope), -- * restore sp as if nothing had happened and set the marker r4 to zero. -- * -- * Afterwards sp will be restored using the value in r4 (which is not a temporary register -- * and will be preserved by the function/method called according to APCS [ARM Procedure -- * Calling Standard]). -+ * ACPS passes the first 3 params in r1-r3 (with exceptions for 64-bits -+ * arguments), and the remaining goes onto the stack. -+ * We allocate a buffer on the stack for a "worst case" estimate of how much -+ * stack might be needed for EABI, i.e. twice the number of parameters. -+ * The end of this buffer will be used to store r1 to r3, so that the start -+ * of the stack is the remaining parameters. -+ * The magic here is to call the method with "that" and three 32-bits -+ * arguments corresponding to r1-r3, so that the compiler generates the -+ * proper function call. The stack will also contain the remaining arguments. - * - * !!! IMPORTANT !!! - * This routine makes assumptions about the vtable layout of the c++ compiler. It's implemented -@@ -139,43 +129,272 @@ XPTC_InvokeByIndex(nsISupports* that, ui - * - */ - -- __asm__ __volatile__( -- "ldr r1, [%1, #12] \n\t" /* prepare to call invoke_count_words */ -- "ldr ip, [%1, #16] \n\t" /* r0=paramCount, r1=params */ -- "ldr r0, [%1, #8] \n\t" -- "mov lr, pc \n\t" /* call it... */ -- "mov pc, ip \n\t" -- "mov r4, r0, lsl #2 \n\t" /* This is the amount of bytes needed. */ -- "sub sp, sp, r4 \n\t" /* use stack space for the args... */ -- "mov r0, sp \n\t" /* prepare a pointer an the stack */ -- "ldr r1, [%1, #8] \n\t" /* =paramCount */ -- "ldr r2, [%1, #12] \n\t" /* =params */ -- "ldr ip, [%1, #20] \n\t" /* =invoke_copy_to_stack */ -- "mov lr, pc \n\t" /* copy args to the stack like the */ -- "mov pc, ip \n\t" /* compiler would. */ -- "ldr r0, [%1] \n\t" /* =that */ -- "ldr r1, [r0, #0] \n\t" /* get that->vtable offset */ -- "ldr r2, [%1, #4] \n\t" -- "add r2, r1, r2, lsl #3\n\t" /* a vtable_entry(x)=8 + (8 bytes * x) */ -- "add r2, r2, #8 \n\t" /* with this compilers */ -- "ldr r3, [r2] \n\t" /* get virtual offset from vtable */ -- "mov r3, r3, lsl #16 \n\t" -- "add r0, r0, r3, asr #16\n\t" -- "ldr ip, [r2, #4] \n\t" /* get method address from vtable */ -- "cmp r4, #12 \n\t" /* more than 3 arguments??? */ -- "ldmgtia sp!, {r1, r2, r3}\n\t" /* yes: load arguments for r1-r3 */ -- "subgt r4, r4, #12 \n\t" /* and correct the stack pointer */ -- "ldmleia sp, {r1, r2, r3}\n\t" /* no: load r1-r3 from stack */ -- "addle sp, sp, r4 \n\t" /* and restore stack pointer */ -- "movle r4, #0 \n\t" /* a mark for restoring sp */ -- "mov lr, pc \n\t" /* call mathod */ -- "mov pc, ip \n\t" -- "add sp, sp, r4 \n\t" /* restore stack pointer */ -- "mov %0, r0 \n\t" /* the result... */ -- : "=r" (result) -- : "r" (&my_params) -- : "r0", "r1", "r2", "r3", "r4", "ip", "lr" -- ); -- -- return result; -+ vtable_func *vtable, func; -+ int base_size = (paramCount > 1) ? paramCount : 2; -+ -+/* !!! IMPORTANT !!! -+ * On DEBUG builds, the NS_ASSERTION used in invoke_copy_to_stack needs to use -+ * the stack to pass the 5th argument to NS_DebugBreak. When invoke_copy_to_stack -+ * is inlined, this can result, depending on the compiler and flags, in the -+ * stack pointer not pointing at stack_space when the method is called at the -+ * end of this function. More generally, any function call requiring stack -+ * allocation of arguments is unsafe to be inlined in this function. -+ */ -+ uint32_t *stack_space = (uint32_t *) __builtin_alloca(base_size * 8); -+ -+ invoke_copy_to_stack(stack_space, &stack_space[base_size * 2], -+ paramCount, params); -+ -+ vtable = *reinterpret_cast<vtable_func **>(that); -+ func = vtable[methodIndex]; -+ -+ return func(that, stack_space[base_size * 2 - 3], -+ stack_space[base_size * 2 - 2], -+ stack_space[base_size * 2 - 1]); - } -+ -+#else /* __ARM_PCS_VFP */ -+ -+/* "Procedure Call Standard for the ARM Architecture" document, sections -+ * "5.5 Parameter Passing" and "6.1.2 Procedure Calling" contain all the -+ * needed information. -+ * -+ * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf -+ */ -+ -+#if defined(__thumb__) && !defined(__thumb2__) -+#error "Thumb1 is not supported" -+#endif -+ -+#ifndef __ARMEL__ -+#error "Only little endian compatibility was tested" -+#endif -+ -+/* -+ * Allocation of integer function arguments initially to registers r1-r3 -+ * and then to stack. Handling of 'this' argument which goes to r0 registers -+ * is handled separately and does not belong to these two inline functions. -+ * -+ * The doubleword arguments are allocated to even:odd -+ * register pairs or get aligned at 8-byte boundary on stack. The "holes" -+ * which may appear as a result of this realignment remain unused. -+ * -+ * 'ireg_args' - pointer to the current position in the buffer, -+ * corresponding to the register arguments -+ * 'stack_args' - pointer to the current position in the buffer, -+ * corresponding to the arguments on stack -+ * 'end' - pointer to the end of the registers argument -+ * buffer (it is guaranteed to be 8-bytes aligned) -+ */ -+ -+static inline void copy_word(uint32_t* &ireg_args, -+ uint32_t* &stack_args, -+ uint32_t* end, -+ uint32_t data) -+{ -+ if (ireg_args < end) { -+ *ireg_args = data; -+ ireg_args++; -+ } else { -+ *stack_args = data; -+ stack_args++; -+ } -+} -+ -+static inline void copy_dword(uint32_t* &ireg_args, -+ uint32_t* &stack_args, -+ uint32_t* end, -+ uint64_t data) -+{ -+ if (ireg_args + 1 < end) { -+ if ((uint32_t)ireg_args & 4) { -+ ireg_args++; -+ } -+ *(uint64_t *)ireg_args = data; -+ ireg_args += 2; -+ } else { -+ if ((uint32_t)stack_args & 4) { -+ stack_args++; -+ } -+ *(uint64_t *)stack_args = data; -+ stack_args += 2; -+ } -+} -+ -+/* -+ * Allocation of floating point arguments to VFP registers (s0-s15, d0-d7). -+ * -+ * Unlike integer registers allocation, "back-filling" needs to be -+ * supported. For example, the third floating point argument in the -+ * following function is going to be allocated to s1 register, back-filling -+ * the "hole": -+ * void f(float s0, double d1, float s1) -+ * -+ * Refer to the "Procedure Call Standard for the ARM Architecture" document -+ * for more details. -+ * -+ * 'vfp_s_args' - pointer to the current position in the buffer with -+ * the next unallocated single precision register -+ * 'vfp_d_args' - pointer to the current position in the buffer with -+ * the next unallocated double precision register, -+ * it has the same value as 'vfp_s_args' when back-filling -+ * is not used -+ * 'end' - pointer to the end of the vfp registers argument -+ * buffer (it is guaranteed to be 8-bytes aligned) -+ * -+ * Mozilla bugtracker has a test program attached which be used for -+ * experimenting with VFP registers allocation code and testing its -+ * correctness: -+ * https://bugzilla.mozilla.org/show_bug.cgi?id=601914#c19 -+ */ -+ -+static inline bool copy_vfp_single(float* &vfp_s_args, double* &vfp_d_args, -+ float* end, float data) -+{ -+ if (vfp_s_args >= end) -+ return false; -+ -+ *vfp_s_args = data; -+ vfp_s_args++; -+ if (vfp_s_args < (float *)vfp_d_args) { -+ // It was the case of back-filling, now the next free single precision -+ // register should overlap with the next free double precision register -+ vfp_s_args = (float *)vfp_d_args; -+ } else if (vfp_s_args > (float *)vfp_d_args) { -+ // also update the pointer to the next free double precision register -+ vfp_d_args++; -+ } -+ return true; -+} -+ -+static inline bool copy_vfp_double(float* &vfp_s_args, double* &vfp_d_args, -+ float* end, double data) -+{ -+ if (vfp_d_args >= (double *)end) { -+ // The back-filling continues only so long as no VFP CPRC has been -+ // allocated to a slot on the stack. Basically no VFP registers can -+ // be allocated after this point. -+ vfp_s_args = end; -+ return false; -+ } -+ -+ if (vfp_s_args == (float *)vfp_d_args) { -+ // also update the pointer to the next free single precision register -+ vfp_s_args += 2; -+ } -+ *vfp_d_args = data; -+ vfp_d_args++; -+ return true; -+} -+ -+static void -+invoke_copy_to_stack(uint32_t* stk, uint32_t *end, -+ uint32_t paramCount, nsXPTCVariant* s) -+{ -+ uint32_t *ireg_args = end - 3; -+ float *vfp_s_args = (float *)end; -+ double *vfp_d_args = (double *)end; -+ float *vfp_end = vfp_s_args + 16; -+ -+ for (uint32_t i = 0; i < paramCount; i++, s++) { -+ if (s->IsPtrData()) { -+ copy_word(ireg_args, stk, end, (uint32_t)s->ptr); -+ continue; -+ } -+ // According to the ARM EABI, integral types that are smaller than a word -+ // are to be sign/zero-extended to a full word and treated as 4-byte values -+ switch (s->type) -+ { -+ case nsXPTType::T_FLOAT: -+ if (!copy_vfp_single(vfp_s_args, vfp_d_args, vfp_end, s->val.f)) { -+ copy_word(end, stk, end, reinterpret_cast<uint32_t&>(s->val.f)); -+ } -+ break; -+ case nsXPTType::T_DOUBLE: -+ if (!copy_vfp_double(vfp_s_args, vfp_d_args, vfp_end, s->val.d)) { -+ copy_dword(end, stk, end, reinterpret_cast<uint64_t&>(s->val.d)); -+ } -+ break; -+ case nsXPTType::T_I8: copy_word(ireg_args, stk, end, s->val.i8); break; -+ case nsXPTType::T_I16: copy_word(ireg_args, stk, end, s->val.i16); break; -+ case nsXPTType::T_I32: copy_word(ireg_args, stk, end, s->val.i32); break; -+ case nsXPTType::T_I64: copy_dword(ireg_args, stk, end, s->val.i64); break; -+ case nsXPTType::T_U8: copy_word(ireg_args, stk, end, s->val.u8); break; -+ case nsXPTType::T_U16: copy_word(ireg_args, stk, end, s->val.u16); break; -+ case nsXPTType::T_U32: copy_word(ireg_args, stk, end, s->val.u32); break; -+ case nsXPTType::T_U64: copy_dword(ireg_args, stk, end, s->val.u64); break; -+ case nsXPTType::T_BOOL: copy_word(ireg_args, stk, end, s->val.b); break; -+ case nsXPTType::T_CHAR: copy_word(ireg_args, stk, end, s->val.c); break; -+ case nsXPTType::T_WCHAR: copy_word(ireg_args, stk, end, s->val.wc); break; -+ default: -+ // all the others are plain pointer types -+ copy_word(ireg_args, stk, end, reinterpret_cast<uint32_t>(s->val.p)); -+ break; -+ } -+ } -+} -+ -+typedef uint32_t (*vtable_func)(nsISupports *, uint32_t, uint32_t, uint32_t); -+ -+EXPORT_XPCOM_API(nsresult) -+NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ uint32_t paramCount, nsXPTCVariant* params) -+{ -+ vtable_func *vtable = *reinterpret_cast<vtable_func **>(that); -+ vtable_func func = vtable[methodIndex]; -+ // 'register uint32_t result asm("r0")' could be used here, but it does not -+ // seem to be reliable in all cases: http://gcc.gnu.org/PR46164 -+ nsresult result; -+ asm ( -+ "mov r3, sp\n" -+ "mov %[stack_space_size], %[param_count_plus_2], lsl #3\n" -+ "tst r3, #4\n" /* check stack alignment */ -+ -+ "add %[stack_space_size], #(4 * 16)\n" /* space for VFP registers */ -+ "mov r3, %[params]\n" -+ -+ "it ne\n" -+ "addne %[stack_space_size], %[stack_space_size], #4\n" -+ "sub r0, sp, %[stack_space_size]\n" /* allocate space on stack */ -+ -+ "sub r2, %[param_count_plus_2], #2\n" -+ "mov sp, r0\n" -+ -+ "add r1, r0, %[param_count_plus_2], lsl #3\n" -+ "blx %[invoke_copy_to_stack]\n" -+ -+ "add ip, sp, %[param_count_plus_2], lsl #3\n" -+ "mov r0, %[that]\n" -+ "ldmdb ip, {r1, r2, r3}\n" -+ "vldm ip, {d0, d1, d2, d3, d4, d5, d6, d7}\n" -+ "blx %[func]\n" -+ -+ "add sp, sp, %[stack_space_size]\n" /* cleanup stack */ -+ "mov %[stack_space_size], r0\n" /* it's actually 'result' variable */ -+ : [stack_space_size] "=&r" (result) -+ : [func] "r" (func), -+ [that] "r" (that), -+ [params] "r" (params), -+ [param_count_plus_2] "r" (paramCount + 2), -+ [invoke_copy_to_stack] "r" (invoke_copy_to_stack) -+ : "cc", "memory", -+ // Mark all the scratch registers as clobbered because they may be -+ // modified by the functions, called from this inline assembly block -+ "r0", "r1", "r2", "r3", "ip", "lr", -+ "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", -+ // Also unconditionally mark d16-d31 registers as clobbered even though -+ // they actually don't exist in vfpv2 and vfpv3-d16 variants. There is -+ // no way to identify VFP variant using preprocessor at the momemnt -+ // (see http://gcc.gnu.org/PR46128 for more details), but fortunately -+ // current versions of gcc do not seem to complain about these registers -+ // even when this code is compiled with '-mfpu=vfpv3-d16' option. -+ // If gcc becomes more strict in the future and/or provides a way to -+ // identify VFP variant, the following d16-d31 registers list needs -+ // to be wrapped into some #ifdef -+ "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", -+ "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31" -+ ); -+ return result; -+} -+ -+#endif diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__mips.S b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__mips.S deleted file mode 100644 index 4e8bdb089ab..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__mips.S +++ /dev/null @@ -1,52 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__mips.S,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_mips.S.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_mips.S -@@ -16,6 +16,47 @@ - #include <sys/asm.h> - #endif - -+#ifdef __NetBSD__ -+# include <machine/regdef.h> -+# include <machine/asm.h> -+# ifndef fp -+# define fp s8 -+# endif -+# ifndef PTRLOG -+# if SZREG == 4 -+# define PTRLOG 2 -+# else -+# define PTRLOG 3 -+# endif -+# endif -+# ifndef SETUP_GP -+# if defined(__mips_o32) -+# define SETUP_GP \ -+ .set push; \ -+ .set noreorder; \ -+ .cpload t9; \ -+ .set pop -+# define SAVE_GP(x) \ -+ .cprestore x -+# else -+# define SETUP_GP -+# define SAVE_GP(x) -+# endif -+# endif -+# ifndef ALSZ -+# if defined(__mips_n32) || defined(__mips_n64) -+# define ALSZ 15 -+# define ALMASK ~15 -+# else -+# define ALSZ 7 -+# define ALMASK ~7 -+# endif -+# endif -+#else -+# include <sys/regdef.h> -+# include <sys/asm.h> -+#endif -+ - # NARGSAVE is the argument space in the callers frame, including extra - # 'shadowed' space for the argument registers. The minimum of 4 - # argument slots is sometimes predefined in the header files. diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__ppc__netbsd.s b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__ppc__netbsd.s deleted file mode 100644 index 563b35b7638..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__ppc__netbsd.s +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__ppc__netbsd.s,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_netbsd.s -@@ -20,15 +20,15 @@ - - .section ".text" - .align 2 -- .globl XPTC_InvokeByIndex -- .type XPTC_InvokeByIndex,@function -+ .globl NS_InvokeByIndex_P -+ .type NS_InvokeByIndex_P,@function - - # --# XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex, --# uint32_t paramCount, nsXPTCVariant* params) -+# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, -+# PRUint32 paramCount, nsXPTCVariant* params) - # - --XPTC_InvokeByIndex: -+NS_InvokeByIndex_P: - stwu sp,-32(sp) # setup standard stack frame - mflr r0 # save LR - stw r3,8(sp) # r3 <= that diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__netbsd__m68k.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__netbsd__m68k.cpp deleted file mode 100644 index 3f1e236d616..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__netbsd__m68k.cpp +++ /dev/null @@ -1,75 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__netbsd__m68k.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_netbsd_m68k.cpp.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_netbsd_m68k.cpp -@@ -100,6 +100,15 @@ extern "C" { - } - } - -+/* -+ * SYMBOL PREFIX must be "_" for aout symbols and "" for ELF -+ */ -+#ifndef __ELF__ -+#define SYMBOLPREFIX "_" -+#else -+#define SYMBOLPREFIX -+#endif -+ - XPTC_PUBLIC_API(nsresult) - XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex, - uint32_t paramCount, nsXPTCVariant* params) -@@ -107,30 +116,30 @@ XPTC_InvokeByIndex(nsISupports* that, ui - uint32_t result; - - __asm__ __volatile__( -- "movl %4, sp@-\n\t" -- "movl %3, sp@-\n\t" -- "jbsr _invoke_count_words\n\t" /* count words */ -- "addql #8, sp\n\t" -- "lsll #2, d0\n\t" /* *= 4 */ -- "movl sp, a2\n\t" /* save original sp */ -- "subl d0, sp\n\t" /* make room for params */ -- "movl sp, a0\n\t" -- "movl %4, sp@-\n\t" -- "movl %3, sp@-\n\t" -- "movl a0, sp@-\n\t" -- "jbsr _invoke_copy_to_stack\n\t" /* copy params */ -- "addl #12, sp\n\t" -- "movl %1, a0\n\t" -- "movl a0@, a1\n\t" -- "movl %2, d0\n\t" /* function index */ -- "movl a0, d1\n\t" -- "movw a1@(8,d0:l:8), a0\n\t" -- "addl a0, d1\n\t" -- "movl a1@(12,d0:l:8), a1\n\t" -- "movl d1, sp@-\n\t" -- "jbsr a1@\n\t" -- "movl a2, sp\n\t" /* restore original sp */ -- "movl d0, %0\n\t" -+ "movl %4, %%sp@-\n\t" -+ "movl %3, %%sp@-\n\t" -+ "jbsr "SYMBOLPREFIX"invoke_count_words\n\t" /* count words */ -+ "addql #8, %%sp\n\t" -+ "lsll #2, %%d0\n\t" /* *= 4 */ -+ "movl %%sp, %%a2\n\t" /* save original sp */ -+ "subl %%d0, %%sp\n\t" /* make room for params */ -+ "movl %%sp, %%a0\n\t" -+ "movl %4, %%sp@-\n\t" -+ "movl %3, %%sp@-\n\t" -+ "movl %%a0, %%sp@-\n\t" -+ "jbsr "SYMBOLPREFIX"invoke_copy_to_stack\n\t" /* copy params */ -+ "addl #12, %%sp\n\t" -+ "movl %1, %%a0\n\t" -+ "movl %%a0@, %%a1\n\t" -+ "movl %2, %%d0\n\t" /* function index */ -+ "movl %%a0, %%d1\n\t" -+ "movw %%a1@(8,%%d0:l:8), %%a0\n\t" -+ "addl %%a0, %%d1\n\t" -+ "movl %%a1@(12,%%d0:l:8), %%a1\n\t" -+ "movl %%d1, %%sp@-\n\t" -+ "jbsr %%a1@\n\t" -+ "movl %%a2, %%sp\n\t" /* restore original sp */ -+ "movl %%d0, %0\n\t" - : "=g" (result) /* %0 */ - : "g" (that), /* %1 */ - "g" (methodIndex), /* %2 */ diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__ppc__netbsd.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__ppc__netbsd.cpp deleted file mode 100644 index 6aa5f4596be..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__ppc__netbsd.cpp +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__ppc__netbsd.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_netbsd.cpp -@@ -5,9 +5,9 @@ - - // Platform specific code to invoke XPCOM methods on native objects - --// The purpose of XPTC_InvokeByIndex() is to map a platform -+// The purpose of NS_InvokeByIndex_P() is to map a platform - // indepenpent call to the platform ABI. To do that, --// XPTC_InvokeByIndex() has to determine the method to call via vtable -+// NS_InvokeByIndex_P() has to determine the method to call via vtable - // access. The parameters for the method are read from the - // nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC - // ABI this means that the first 8 integral and floating point -@@ -72,8 +72,10 @@ invoke_copy_to_stack(uint32_t* d, - if ((uint32_t) d & 4) d++; // doubles are 8-byte aligned on stack - *((double*) d) = s->val.d; - d += 2; -+#if __GXX_ABI_VERSION < 100 - if (gpr < GPR_COUNT) - gpr += 2; -+#endif - } - } - else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) { -@@ -82,8 +84,10 @@ invoke_copy_to_stack(uint32_t* d, - else { - *((float*) d) = s->val.f; - d += 1; -+#if __GXX_ABI_VERSION < 100 - if (gpr < GPR_COUNT) - gpr += 1; -+#endif - } - } - else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64 -@@ -110,6 +114,6 @@ invoke_copy_to_stack(uint32_t* d, - } - - extern "C" --XPTC_PUBLIC_API(nsresult) --XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+EXPORT_XPCOM_API(nsresult) -+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, - uint32_t paramCount, nsXPTCVariant* params); diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__arm__netbsd.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__arm__netbsd.cpp deleted file mode 100644 index a99e61a312a..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__arm__netbsd.cpp +++ /dev/null @@ -1,217 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__arm__netbsd.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_netbsd.cpp.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_netbsd.cpp -@@ -6,15 +6,32 @@ - /* Implement shared vtbl methods. */ - - #include "xptcprivate.h" -+#include "xptiprivate.h" - --nsresult ATTRIBUTE_USED -+/* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */ -+static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args) asm("_PrepareAndDispatch") -+ATTRIBUTE_USED; -+ -+#ifdef __ARM_EABI__ -+#define DOUBLEWORD_ALIGN(p) ((uint32_t *)((((uint32_t)(p)) + 7) & 0xfffffff8)) -+#else -+#define DOUBLEWORD_ALIGN(p) (p) -+#endif -+ -+// Apple's iOS toolchain is lame and does not support .cfi directives. -+#ifdef __APPLE__ -+#define CFI(str) -+#else -+#define CFI(str) str -+#endif -+ -+static nsresult - PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args) - { - #define PARAM_BUFFER_COUNT 16 - - nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; - nsXPTCMiniVariant* dispatchParams = nullptr; -- nsIInterfaceInfo* iface_info = nullptr; - const nsXPTMethodInfo* info; - uint8_t paramCount; - uint8_t i; -@@ -22,12 +39,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, - - NS_ASSERTION(self,"no self"); - -- self->GetInterfaceInfo(&iface_info); -- NS_ASSERTION(iface_info,"no interface info"); -- -- iface_info->GetMethodInfo(uint16_t(methodIndex), &info); -- NS_ASSERTION(info,"no interface info"); -- -+ self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info); - paramCount = info->GetParamCount(); - - // setup variant array pointer -@@ -55,13 +67,16 @@ PrepareAndDispatch(nsXPTCStubBase* self, - case nsXPTType::T_I8 : dp->val.i8 = *((int8_t*) ap); break; - case nsXPTType::T_I16 : dp->val.i16 = *((int16_t*) ap); break; - case nsXPTType::T_I32 : dp->val.i32 = *((int32_t*) ap); break; -- case nsXPTType::T_I64 : dp->val.i64 = *((int64_t*) ap); ap++; break; -+ case nsXPTType::T_I64 : ap = DOUBLEWORD_ALIGN(ap); -+ dp->val.i64 = *((int64_t*) ap); ap++; break; - case nsXPTType::T_U8 : dp->val.u8 = *((uint8_t*) ap); break; - case nsXPTType::T_U16 : dp->val.u16 = *((uint16_t*)ap); break; - case nsXPTType::T_U32 : dp->val.u32 = *((uint32_t*)ap); break; -- case nsXPTType::T_U64 : dp->val.u64 = *((uint64_t*)ap); ap++; break; -+ case nsXPTType::T_U64 : ap = DOUBLEWORD_ALIGN(ap); -+ dp->val.u64 = *((uint64_t*)ap); ap++; break; - case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break; -- case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); ap++; break; -+ case nsXPTType::T_DOUBLE : ap = DOUBLEWORD_ALIGN(ap); -+ dp->val.d = *((double*) ap); ap++; break; - case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break; - case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; - case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; -@@ -71,9 +86,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, - } - } - -- result = self->CallMethod((uint16_t)methodIndex, info, dispatchParams); -- -- NS_RELEASE(iface_info); -+ result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams); - - if(dispatchParams != paramBuffer) - delete [] dispatchParams; -@@ -82,26 +95,114 @@ PrepareAndDispatch(nsXPTCStubBase* self, - } - - /* -- * These stubs move just move the values passed in registers onto the stack, -- * so they are contiguous with values passed on the stack, and then calls -- * PrepareAndDispatch() to do the dirty work. -+ * This is our shared stub. -+ * -+ * r0 = Self. -+ * -+ * The Rules: -+ * We pass an (undefined) number of arguments into this function. -+ * The first 3 C++ arguments are in r1 - r3, the rest are built -+ * by the calling function on the stack. -+ * -+ * We are allowed to corrupt r0 - r3, ip, and lr. -+ * -+ * Other Info: -+ * We pass the stub number in using `ip'. -+ * -+ * Implementation: -+ * - We save r1 to r3 inclusive onto the stack, which will be -+ * immediately below the caller saved arguments. -+ * - setup r2 (PrepareAndDispatch's args pointer) to point at -+ * the base of all these arguments -+ * - Save LR (for the return address) -+ * - Set r1 (PrepareAndDispatch's methodindex argument) from ip -+ * - r0 is passed through (self) -+ * - Call PrepareAndDispatch -+ * - When the call returns, we return by loading the PC off the -+ * stack, and undoing the stack (one instruction)! -+ * - */ -+__asm__ ("\n" -+ ".text\n" -+ ".align 2\n" -+ "SharedStub:\n" -+ CFI(".cfi_startproc\n") -+ "stmfd sp!, {r1, r2, r3}\n" -+ CFI(".cfi_def_cfa_offset 12\n") -+ CFI(".cfi_offset r3, -4\n") -+ CFI(".cfi_offset r2, -8\n") -+ CFI(".cfi_offset r1, -12\n") -+ "mov r2, sp\n" -+ "str lr, [sp, #-4]!\n" -+ CFI(".cfi_def_cfa_offset 16\n") -+ CFI(".cfi_offset lr, -16\n") -+ "mov r1, ip\n" -+ "bl _PrepareAndDispatch\n" -+ "ldr pc, [sp], #16\n" -+ CFI(".cfi_endproc\n")); -+ -+/* -+ * Create sets of stubs to call the SharedStub. -+ * We don't touch the stack here, nor any registers, other than IP. -+ * IP is defined to be corruptable by a called function, so we are -+ * safe to use it. -+ * -+ * This will work with or without optimisation. -+ */ -+ -+/* -+ * Note : As G++3 ABI contains the length of the functionname in the -+ * mangled name, it is difficult to get a generic assembler mechanism like -+ * in the G++ 2.95 case. -+ * Create names would be like : -+ * _ZN14nsXPTCStubBase5Stub9Ev -+ * _ZN14nsXPTCStubBase6Stub13Ev -+ * _ZN14nsXPTCStubBase7Stub144Ev -+ * Use the assembler directives to get the names right... -+ */ -+ -+#define STUB_ENTRY(n) \ -+ __asm__( \ -+ ".section \".text\"\n" \ -+" .align 2\n" \ -+" .iflt ("#n" - 10)\n" \ -+" .globl _ZN14nsXPTCStubBase5Stub"#n"Ev\n" \ -+" .type _ZN14nsXPTCStubBase5Stub"#n"Ev,#function\n" \ -+"_ZN14nsXPTCStubBase5Stub"#n"Ev:\n" \ -+" .else\n" \ -+" .iflt ("#n" - 100)\n" \ -+" .globl _ZN14nsXPTCStubBase6Stub"#n"Ev\n" \ -+" .type _ZN14nsXPTCStubBase6Stub"#n"Ev,#function\n" \ -+"_ZN14nsXPTCStubBase6Stub"#n"Ev:\n" \ -+" .else\n" \ -+" .iflt ("#n" - 1000)\n" \ -+" .globl _ZN14nsXPTCStubBase7Stub"#n"Ev\n" \ -+" .type _ZN14nsXPTCStubBase7Stub"#n"Ev,#function\n" \ -+"_ZN14nsXPTCStubBase7Stub"#n"Ev:\n" \ -+" .else\n" \ -+" .err \"stub number "#n"> 1000 not yet supported\"\n" \ -+" .endif\n" \ -+" .endif\n" \ -+" .endif\n" \ -+" mov ip, #"#n"\n" \ -+" b SharedStub\n\t"); -+ -+#if 0 -+/* -+ * This part is left in as comment : this is how the method definition -+ * should look like. -+ */ -+ -+#define STUB_ENTRY(n) \ -+nsresult nsXPTCStubBase::Stub##n () \ -+{ \ -+ __asm__ ( \ -+" mov ip, #"#n"\n" \ -+" b SharedStub\n\t"); \ -+ return 0; /* avoid warnings */ \ -+} -+#endif - --#define STUB_ENTRY(n) \ --__asm__( \ -- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \ --"_Stub"#n"__14nsXPTCStubBase:\n\t" \ -- "stmfd sp!, {r1, r2, r3} \n\t" \ -- "mov ip, sp \n\t" \ -- "stmfd sp!, {fp, ip, lr, pc} \n\t" \ -- "sub fp, ip, #4 \n\t" \ -- "mov r1, #"#n" \n\t" /* = methodIndex */ \ -- "add r2, sp, #16 \n\t" \ -- "bl _PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \ -- "ldmea fp, {fp, sp, lr} \n\t" \ -- "add sp, sp, #12 \n\t" \ -- "mov pc, lr \n\t" \ --); - - #define SENTINEL_ENTRY(n) \ - nsresult nsXPTCStubBase::Sentinel##n() \ diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__mips.S b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__mips.S deleted file mode 100644 index 371b8ba8609..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__mips.S +++ /dev/null @@ -1,52 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__mips.S,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_mips.S.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_mips.S -@@ -14,6 +14,47 @@ - #include <sys/asm.h> - #endif - -+#ifdef __NetBSD__ -+# include <machine/regdef.h> -+# include <machine/asm.h> -+# ifndef fp -+# define fp s8 -+# endif -+# ifndef PTRLOG -+# if SZREG == 4 -+# define PTRLOG 2 -+# else -+# define PTRLOG 3 -+# endif -+# endif -+# ifndef SETUP_GP -+# if defined(__mips_o32) -+# define SETUP_GP \ -+ .set push; \ -+ .set noreorder; \ -+ .cpload t9; \ -+ .set pop -+# define SAVE_GP(x) \ -+ .cprestore x -+# else -+# define SETUP_GP -+# define SAVE_GP(x) -+# endif -+# endif -+# ifndef ALSZ -+# if defined(__mips_n32) || defined(__mips_n64) -+# define ALSZ 15 -+# define ALMASK ~15 -+# else -+# define ALSZ 7 -+# define ALMASK ~7 -+# endif -+# endif -+#else -+# include <sys/regdef.h> -+# include <sys/asm.h> -+#endif -+ - # NARGSAVE is the argument space in the callers frame, including extra - # 'shadowed' space for the argument registers. The minimum of 4 - # argument slots is sometimes predefined in the header files. diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__sparc64__netbsd.s b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__sparc64__netbsd.s deleted file mode 100644 index ae683dbef27..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__sparc64__netbsd.s +++ /dev/null @@ -1,71 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__sparc64__netbsd.s,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparc64_netbsd.s.orig 2016-04-17 13:47:46.350069203 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparc64_netbsd.s -@@ -0,0 +1,66 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- -+ * -+ * The contents of this file are subject to the Netscape Public -+ * License Version 1.1 (the "License"); you may not use this file -+ * except in compliance with the License. You may obtain a copy of -+ * the License at http://www.mozilla.org/NPL/ -+ * -+ * Software distributed under the License is distributed on an "AS -+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * rights and limitations under the License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is Netscape -+ * Communications Corporation. Portions created by Netscape are -+ * Copyright (C) 1999 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ */ -+ -+ .global SharedStub -+ -+/* -+ in the frame for the function that called SharedStub are the -+ rest of the parameters we need -+ -+*/ -+ -+SharedStub: -+! we don't create a new frame yet, but work within the frame of the calling -+! function to give ourselves the other parameters we want -+ -+ mov %o0, %o1 ! shuffle the index up to 2nd place -+ mov %i0, %o0 ! the original 'this' -+ add %fp, 0x7ff + 136, %o2 ! previous stack top adjusted to the first argument slot (beyond 'this') -+ -+! save off the original incoming parameters that arrived in -+! registers, the ABI guarantees the space for us to do this -+ stx %i1, [%fp + 0x7ff + 136] -+ stx %i2, [%fp + 0x7ff + 144] -+ stx %i3, [%fp + 0x7ff + 152] -+ stx %i4, [%fp + 0x7ff + 160] -+ stx %i5, [%fp + 0x7ff + 168] -+! now we can build our own stack frame -+ save %sp,-(128 + 64),%sp ! room for the register window and -+ ! struct pointer, rounded up to 0 % 64 -+! our function now appears to have been called -+! as SharedStub(nsISupports* that, PRUint32 index, PRUint32* args) -+! so we can just copy these through -+ -+ mov %i0, %o0 -+ mov %i1, %o1 -+ mov %i2, %o2 -+ call PrepareAndDispatch -+ nop -+ mov %o0,%i0 ! propagate return value -+ b .LL1 -+ nop -+.LL1: -+ ret -+ restore -+ -+ .size SharedStub, .-SharedStub -+ .type SharedStub, #function diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__netbsd__m68k.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__netbsd__m68k.cpp deleted file mode 100644 index 166cce6b89d..00000000000 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__netbsd__m68k.cpp +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__netbsd__m68k.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ - ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_netbsd_m68k.cpp.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_netbsd_m68k.cpp -@@ -91,17 +91,27 @@ extern "C" { - } - } - -+/* -+ * Beware: use % instead of %% for register identifiers in a preprocessor macro -+ * SYMBOL PREFIX must be "_" for aout and "" for ELF -+ */ -+#ifndef __ELF__ -+#define SYMBOLPREFIX "_" -+#else -+#define SYMBOLPREFIX -+#endif -+ - #define STUB_ENTRY(n) \ - __asm__( \ -- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \ --"_Stub"#n"__14nsXPTCStubBase:\n\t" \ -- "link a6,#0 \n\t" \ -- "lea a6@(12), a0 \n\t" /* pointer to args */ \ -- "movl a0, sp@- \n\t" \ -- "movl #"#n", sp@- \n\t" /* method index */ \ -- "movl a6@(8), sp@- \n\t" /* this */ \ -- "jbsr _PrepareAndDispatch \n\t" \ -- "unlk a6 \n\t" \ -+ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \ -+SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \ -+ "link %a6,#0 \n\t" \ -+ "lea %a6@(12), %a0 \n\t" /* pointer to args */ \ -+ "movl %a0, %sp@- \n\t" \ -+ "movl #"#n", %sp@- \n\t" /* method index */ \ -+ "movl %a6@(8), %sp@- \n\t" /* this */ \ -+ "jbsr "SYMBOLPREFIX"PrepareAndDispatch\n\t" \ -+ "unlk %a6 \n\t" \ - "rts \n\t" \ - ); - diff --git a/mail/thunderbird/patches/patch-old-configure.in b/mail/thunderbird/patches/patch-old-configure.in new file mode 100644 index 00000000000..45fb1833a0f --- /dev/null +++ b/mail/thunderbird/patches/patch-old-configure.in @@ -0,0 +1,85 @@ +$NetBSD: patch-old-configure.in,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- old-configure.in.orig 2018-12-04 23:11:55.000000000 +0000 ++++ old-configure.in +@@ -1819,11 +1819,7 @@ if test "$MOZ_SYSTEM_JPEG" = 1; then + #include <jpeglib.h> ], + [ #if JPEG_LIB_VERSION < $MOZJPEG + #error "Insufficient JPEG library version ($MOZJPEG required)." +- #endif +- #ifndef JCS_EXTENSIONS +- #error "libjpeg-turbo JCS_EXTENSIONS required" +- #endif +- ], ++ #endif ], + MOZ_SYSTEM_JPEG=1, + AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg])) + fi +@@ -2611,6 +2607,67 @@ AC_DEFINE(MOZ_WEBM_ENCODER) + AC_SUBST(MOZ_WEBM_ENCODER) + + dnl ================================== ++dnl = Check OSS availability ++dnl ================================== ++ ++dnl If using Linux, Solaris or BSDs, ensure that OSS is available ++case "$OS_TARGET" in ++Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD) ++ MOZ_OSS=1 ++ ;; ++esac ++ ++MOZ_ARG_WITH_STRING(oss, ++[ --with-oss[=PFX] Enable OpenSoundSystem support [installed at prefix PFX]], ++ OSSPREFIX=$withval) ++ ++if test -n "$OSSPREFIX"; then ++ if test "$OSSPREFIX" != "no"; then ++ MOZ_OSS=1 ++ else ++ MOZ_OSS= ++ fi ++fi ++ ++_SAVE_CFLAGS=$CFLAGS ++_SAVE_LIBS=$LIBS ++if test -n "$MOZ_OSS"; then ++ dnl Prefer 4Front implementation ++ AC_MSG_CHECKING([MOZ_OSS_CFLAGS]) ++ if test "$OSSPREFIX" != "yes"; then ++ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf ++ if test -f "$oss_conf"; then ++ . "$oss_conf" ++ else ++ OSSLIBDIR=$OSSPREFIX/lib/oss ++ fi ++ if test -d "$OSSLIBDIR"; then ++ MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include" ++ fi ++ fi ++ AC_MSG_RESULT([$MOZ_OSS_CFLAGS]) ++ ++ CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS" ++ MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h) ++ ++ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \ ++ "$ac_cv_header_soundcard_h" != "yes"; then ++ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --without-oss.]) ++ fi ++ ++ dnl Assume NetBSD implementation over SunAudio ++ AC_CHECK_LIB(ossaudio, _oss_ioctl, ++ [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound") ++ MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"]) ++fi ++CFLAGS=$_SAVE_CFLAGS ++LIBS=$_SAVE_LIBS ++ ++AC_SUBST(MOZ_OSS) ++AC_SUBST_LIST(MOZ_OSS_CFLAGS) ++AC_SUBST_LIST(MOZ_OSS_LIBS) ++ ++dnl ================================== + dnl = Check alsa availability on Linux + dnl ================================== + diff --git a/mail/thunderbird/patches/patch-servo_components_style_build__gecko.rs b/mail/thunderbird/patches/patch-servo_components_style_build__gecko.rs new file mode 100644 index 00000000000..456af2ec262 --- /dev/null +++ b/mail/thunderbird/patches/patch-servo_components_style_build__gecko.rs @@ -0,0 +1,13 @@ +$NetBSD: patch-servo_components_style_build__gecko.rs,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- servo/components/style/build_gecko.rs.orig 2018-12-04 23:11:55.000000000 +0000 ++++ servo/components/style/build_gecko.rs +@@ -556,6 +556,8 @@ mod bindings { + .borrowed_type(ty) + .zero_size_type(ty, &structs_types); + } ++ builder = builder ++ .raw_line(format!("pub use gecko_bindings::structs::root::*;")); + write_binding_file(builder, BINDINGS_FILE, &fixups); + } + diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_components_terminator_nsTerminator.cpp b/mail/thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp index 49dd5fdceb6..dcb2f097220 100644 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_components_terminator_nsTerminator.cpp +++ b/mail/thunderbird/patches/patch-toolkit_components_terminator_nsTerminator.cpp @@ -1,7 +1,7 @@ -$NetBSD: patch-mozilla_toolkit_components_terminator_nsTerminator.cpp,v 1.1 2017/04/27 13:32:41 ryoon Exp $ +$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/toolkit/components/terminator/nsTerminator.cpp.orig 2017-04-14 04:53:28.000000000 +0000 -+++ mozilla/toolkit/components/terminator/nsTerminator.cpp +--- toolkit/components/terminator/nsTerminator.cpp.orig 2018-12-04 23:12:02.000000000 +0000 ++++ toolkit/components/terminator/nsTerminator.cpp @@ -36,7 +36,7 @@ #if defined(XP_WIN) #include <windows.h> @@ -11,7 +11,7 @@ $NetBSD: patch-mozilla_toolkit_components_terminator_nsTerminator.cpp,v 1.1 2017 #endif #include "mozilla/ArrayUtils.h" -@@ -147,7 +147,10 @@ RunWatchdog(void* arg) +@@ -178,7 +178,10 @@ RunWatchdog(void* arg) #if defined(XP_WIN) Sleep(1000 /* ms */); #else diff --git a/mail/thunderbird/patches/patch-toolkit_library_moz.build b/mail/thunderbird/patches/patch-toolkit_library_moz.build new file mode 100644 index 00000000000..17ee2322252 --- /dev/null +++ b/mail/thunderbird/patches/patch-toolkit_library_moz.build @@ -0,0 +1,15 @@ +$NetBSD: patch-toolkit_library_moz.build,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- toolkit/library/moz.build.orig 2018-12-04 23:12:02.000000000 +0000 ++++ toolkit/library/moz.build +@@ -247,8 +247,8 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']: + 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_OSS']: ++ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] + + if CONFIG['HAVE_CLOCK_MONOTONIC']: + OS_LIBS += CONFIG['REALTIME_LIBS'] diff --git a/mail/thunderbird/patches/patch-toolkit_moz.configure b/mail/thunderbird/patches/patch-toolkit_moz.configure new file mode 100644 index 00000000000..35e321387d5 --- /dev/null +++ b/mail/thunderbird/patches/patch-toolkit_moz.configure @@ -0,0 +1,21 @@ +$NetBSD: patch-toolkit_moz.configure,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- toolkit/moz.configure.orig 2018-12-04 23:12:01.000000000 +0000 ++++ toolkit/moz.configure +@@ -932,11 +932,11 @@ include('nss.configure') + # ============================================================== + option('--disable-skia', help='Disable use of Skia') + +-@depends('--disable-skia') +-def skia(value): +- if not value: +- die('--disable-skia is not supported anymore') +- else: ++@depends('--disable-skia', target) ++def skia(value, target): ++ if value.origin == 'default' and target.endianness == 'big': ++ return None ++ if value: + return True + + set_config('MOZ_ENABLE_SKIA', skia) diff --git a/mail/thunderbird/patches/patch-toolkit_mozapps_installer_packager.mk b/mail/thunderbird/patches/patch-toolkit_mozapps_installer_packager.mk new file mode 100644 index 00000000000..006d5746b44 --- /dev/null +++ b/mail/thunderbird/patches/patch-toolkit_mozapps_installer_packager.mk @@ -0,0 +1,13 @@ +$NetBSD: patch-toolkit_mozapps_installer_packager.mk,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- toolkit/mozapps/installer/packager.mk.orig 2018-12-04 23:12:03.000000000 +0000 ++++ toolkit/mozapps/installer/packager.mk +@@ -130,7 +130,7 @@ endif + (cd $(DESTDIR)$(installdir) && tar -xf -) + $(NSINSTALL) -D $(DESTDIR)$(bindir) + $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME) +- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir) ++ #ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir) + + checksum: + mkdir -p `dirname $(CHECKSUM_FILE)` diff --git a/mail/thunderbird/patches/patch-mozilla_toolkit_xre_glxtest.cpp b/mail/thunderbird/patches/patch-toolkit_xre_glxtest.cpp index ab5adffdd2b..9f3f6e29921 100644 --- a/mail/thunderbird/patches/patch-mozilla_toolkit_xre_glxtest.cpp +++ b/mail/thunderbird/patches/patch-toolkit_xre_glxtest.cpp @@ -1,8 +1,8 @@ -$NetBSD: patch-mozilla_toolkit_xre_glxtest.cpp,v 1.1 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-toolkit_xre_glxtest.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/toolkit/xre/glxtest.cpp.orig 2016-04-07 21:33:34.000000000 +0000 -+++ mozilla/toolkit/xre/glxtest.cpp -@@ -163,7 +163,7 @@ void glxtest() +--- toolkit/xre/glxtest.cpp.orig 2018-12-04 23:12:02.000000000 +0000 ++++ toolkit/xre/glxtest.cpp +@@ -124,7 +124,7 @@ void glxtest() fatal_error("The MOZ_AVOID_OPENGL_ALTOGETHER environment variable is defined"); ///// Open libGL and load needed symbols ///// diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_base_nscore.h b/mail/thunderbird/patches/patch-xpcom_base_nscore.h index 191242db9c3..23a86c84387 100644 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_base_nscore.h +++ b/mail/thunderbird/patches/patch-xpcom_base_nscore.h @@ -1,7 +1,7 @@ -$NetBSD: patch-mozilla_xpcom_base_nscore.h,v 1.2 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-xpcom_base_nscore.h,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/xpcom/base/nscore.h.orig 2016-04-07 21:33:35.000000000 +0000 -+++ mozilla/xpcom/base/nscore.h +--- xpcom/base/nscore.h.orig 2018-12-04 23:12:03.000000000 +0000 ++++ xpcom/base/nscore.h @@ -76,7 +76,7 @@ * NS_HIDDEN_(int) NS_FASTCALL func2(char *foo); */ diff --git a/mail/thunderbird/patches/patch-xpcom_build_BinaryPath.h b/mail/thunderbird/patches/patch-xpcom_build_BinaryPath.h new file mode 100644 index 00000000000..28981f3748b --- /dev/null +++ b/mail/thunderbird/patches/patch-xpcom_build_BinaryPath.h @@ -0,0 +1,38 @@ +$NetBSD: patch-xpcom_build_BinaryPath.h,v 1.1 2018/12/16 08:12:16 ryoon Exp $ + +--- xpcom/build/BinaryPath.h.orig 2018-12-04 23:12:03.000000000 +0000 ++++ xpcom/build/BinaryPath.h +@@ -22,7 +22,8 @@ + defined(__OpenBSD__) + #include <sys/sysctl.h> + #endif +-#if defined(__OpenBSD__) ++#if defined(__OpenBSD__) || \ ++ (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME)) + #include <sys/stat.h> + #endif + #include "mozilla/UniquePtr.h" +@@ -172,7 +173,8 @@ private: + } + + #elif defined(__FreeBSD__) || defined(__DragonFly__) || \ +- defined(__FreeBSD_kernel__) || defined(__NetBSD__) ++ defined(__FreeBSD_kernel__) || \ ++ (defined(__NetBSD__) && defined(KERN_PROC_PATHNAME)) + static nsresult Get(char aResult[MAXPATHLEN]) + { + int mib[4]; +@@ -257,6 +259,13 @@ private: + return NS_ERROR_FAILURE; + } + ++#elif (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME)) ++ static nsresult Get(char aResult[MAXPATHLEN]) ++ { ++ char path[] = "@PREFIX@/lib/firefox60/firefox60"; ++ sprintf(aResult, "%s", path); ++ return NS_OK; ++ } + #else + #error Oops, you need platform-specific code here + #endif diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp b/mail/thunderbird/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp index 258fc2c4e9b..236123a0896 100644 --- a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp +++ b/mail/thunderbird/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp @@ -1,7 +1,7 @@ -$NetBSD: patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp,v 1.2 2016/04/17 18:33:50 ryoon Exp $ +$NetBSD: patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp,v 1.1 2018/12/16 08:12:16 ryoon Exp $ ---- mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_netbsd.cpp.orig 2016-04-17 13:47:46.349377857 +0000 -+++ mozilla/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_netbsd.cpp +--- xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_netbsd.cpp.orig 2018-12-14 14:39:39.519246035 +0000 ++++ xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_netbsd.cpp @@ -0,0 +1,84 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * |