diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 2e82f0cd78675b1cdf7137586a1716cf46438279..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# firefox - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 985040f2f3fc36069421aedb28bc133bea0c1671..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# firefox - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/build-jit-atomic-always-lucky.patch b/build-jit-atomic-always-lucky.patch new file mode 100644 index 0000000000000000000000000000000000000000..31bc5ec2aaec49b22083641d0d2df7b4b7600d36 --- /dev/null +++ b/build-jit-atomic-always-lucky.patch @@ -0,0 +1,30 @@ +diff -up firefox-57.0b5/js/src/jit/AtomicOperations.h.jit-atomic-lucky firefox-57.0b5/js/src/jit/AtomicOperations.h +--- firefox-57.0b5/js/src/jit/AtomicOperations.h.jit-atomic-lucky 2017-10-06 12:34:02.338973607 +0200 ++++ firefox-57.0b5/js/src/jit/AtomicOperations.h 2017-10-06 12:38:24.632622215 +0200 +@@ -415,7 +415,7 @@ AtomicOperations::isLockfreeJS(int32_t s + #elif defined(__s390__) || defined(__s390x__) + # include "jit/none/AtomicOperations-feeling-lucky.h" + #else +-# error "No AtomicOperations support provided for this platform" ++# include "jit/none/AtomicOperations-feeling-lucky.h" + #endif + + #endif // jit_AtomicOperations_h +diff -up firefox-57.0b5/js/src/jit/none/AtomicOperations-feeling-lucky.h.jit-atomic-lucky firefox-57.0b5/js/src/jit/none/AtomicOperations-feeling-lucky.h +--- firefox-57.0b5/js/src/jit/none/AtomicOperations-feeling-lucky.h.jit-atomic-lucky 2017-09-19 06:18:28.000000000 +0200 ++++ firefox-57.0b5/js/src/jit/none/AtomicOperations-feeling-lucky.h 2017-10-06 12:34:02.338973607 +0200 +@@ -79,6 +79,14 @@ + # define GNUC_COMPATIBLE + #endif + ++#ifdef __s390__ ++# define GNUC_COMPATIBLE ++#endif ++ ++#ifdef __s390x__ ++# define GNUC_COMPATIBLE ++#endif ++ + // The default implementation tactic for gcc/clang is to use the newer + // __atomic intrinsics added for use in C++11 . Where that + // isn't available, we use GCC's older __sync functions instead. diff --git a/distribution.ini b/distribution.ini new file mode 100644 index 0000000000000000000000000000000000000000..f784bf8b3e810a4e2c1124581b27122dba8ad87c --- /dev/null +++ b/distribution.ini @@ -0,0 +1,10 @@ +[Global] +id=openeuler +version=1.0 +about=Mozilla Firefox for Openeuler + +[Preferences] +app.distributor=openeuler +app.distributor.channel=openeuler +app.partner.fedora=openeuler + diff --git a/firefox-62.0.3.source.tar.xz b/firefox-62.0.3.source.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..3a28f9c372596159c41310e04005b5acc3b8e324 Binary files /dev/null and b/firefox-62.0.3.source.tar.xz differ diff --git a/firefox-langpacks-62.0.3-20181002.tar.xz b/firefox-langpacks-62.0.3-20181002.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..e3effad3e852df5d59bab914abc1e1b0fd3742f2 Binary files /dev/null and b/firefox-langpacks-62.0.3-20181002.tar.xz differ diff --git a/firefox-mozconfig b/firefox-mozconfig new file mode 100644 index 0000000000000000000000000000000000000000..d64b691f558f56d7abf15da62723a38e1f508928 --- /dev/null +++ b/firefox-mozconfig @@ -0,0 +1,28 @@ +. $topsrcdir/browser/config/mozconfig + +ac_add_options --prefix="$PREFIX" +ac_add_options --libdir="$LIBDIR" +ac_add_options --with-system-zlib +ac_add_options --with-system-bz2 +ac_add_options --disable-strip +ac_add_options --disable-tests +#ac_add_options --enable-libnotify +ac_add_options --enable-necko-wifi +ac_add_options --enable-startup-notification +ac_add_options --disable-updater +ac_add_options --enable-chrome-format=omni +ac_add_options --enable-pulseaudio +ac_add_options --with-system-icu +ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key +ac_add_options --with-google-api-keyfile=../google-api-key +ac_add_options --enable-release +ac_add_options --enable-pie +# Workaround for mozbz#1341234 +ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)" + +export BUILD_OFFICIAL=1 +export MOZILLA_OFFICIAL=1 +export MOZ_TELEMETRY_REPORTING=1 +mk_add_options BUILD_OFFICIAL=1 +mk_add_options MOZILLA_OFFICIAL=1 +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir diff --git a/firefox-wayland.desktop b/firefox-wayland.desktop new file mode 100644 index 0000000000000000000000000000000000000000..12669c5916ab60369c1e41e2dda31211fc468cb5 --- /dev/null +++ b/firefox-wayland.desktop @@ -0,0 +1,231 @@ +[Desktop Entry] +Version=1.0 +Name=Firefox on Wayland +GenericName=Web Browser +Comment=Browse the Web +Exec=firefox-wayland --name firefox-wayland %u +Icon=firefox +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=new-window;new-private-window; + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn-BD]=নতুন উইন্ডো (N) +Name[bn-IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en-GB]=New Window +Name[en-US]=New Window +Name[en-ZA]=New Window +Name[eo]=Nova fenestro +Name[es-AR]=Nueva ventana +Name[es-CL]=Nueva ventana +Name[es-ES]=Nueva ventana +Name[es-MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید‌ +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy-NL]=Nij finster +Name[ga-IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu-IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi-IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy-AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja-JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួច​​​ថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb-NO]=Nytt vindu +Name[ne-NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn-NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt-BR]=Nova janela +Name[pt-PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv-SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh-CN]=新建窗口 +Name[zh-TW]=開新視窗 +Exec=firefox-wayland --name firefox-wayland --new-window %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn-BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn-IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en-GB]=New Private Window +Name[en-US]=New Private Window +Name[en-ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es-AR]=Nueva ventana privada +Name[es-CL]=Nueva ventana privada +Name[es-ES]=Nueva ventana privada +Name[es-MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy-NL]=Nij priveefinster +Name[ga-IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu-IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi-IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy-AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja-JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួច​ឯកជន​ថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو& +Name[lij]=Neuvo barcon privou +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb-NO]=Nytt privat vindu +Name[ne-NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn-NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt-BR]=Nova janela privativa +Name[pt-PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv-SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh-CN]=新建隐私浏览窗口 +Name[zh-TW]=新增隱私視窗 +Exec=firefox-wayland --private-window --name firefox-wayland %u + diff --git a/firefox-wayland.sh.in b/firefox-wayland.sh.in new file mode 100644 index 0000000000000000000000000000000000000000..64a1c868e86089f41a33dbbb3fdccbc3f9cc5f89 --- /dev/null +++ b/firefox-wayland.sh.in @@ -0,0 +1,7 @@ +#!/bin/bash +# +# Run Firefox under Wayland +# + +export GDK_BACKEND=wayland +exec /usr/bin/firefox "$@" diff --git a/firefox.1 b/firefox.1 new file mode 100644 index 0000000000000000000000000000000000000000..4311322ec375d80a552bedb3fa84038620612db9 --- /dev/null +++ b/firefox.1 @@ -0,0 +1,141 @@ +.TH FIREFOX 1 "November 30, 2017" firefox "Linux User's Manual" +.SH NAME +firefox \- a Web browser for X11 derived from the Mozilla browser + +.SH SYNOPSIS +.B firefox +[\fIOPTIONS\fR ...] [\fIURL\fR] + +.B firefox-bin +[\fIOPTIONS\fR] [\fIURL\fR] + +.SH DESCRIPTION +\fBMozilla Firefox\fR is an open-source web browser, designed for +standards compliance, performance and portability. + +.SH USAGE +\fBfirefox\fR is a simple shell script that will set up the +environment for the actual executable, \fBfirefox-bin\fR. + +.SH OPTIONS +A summary of the options supported by \fBfirefox\fR is included below. + +.SS "X11 options" +.TP +.BI \-\-display= DISPLAY +X display to use +.TP +.B \--sync +Make X calls synchronous +.TP +.B \-\-g-fatal-warnings +Make all warnings fatal + +.SS "Firefox options" +.TP +.B \-h, \-help +Show summary of options. +.TP +.B \-v, \-version +Print Firefox version. +.TP +\fB\-P\fR \fIprofile\fR +Start with \fIprofile\fR. +.TP +\fB\-\-profile\fR \fIpath\fR +Start with profile at \fIpath\fR. +.TP +\fB\-\-migration\fR +Start with migration wizard. +.TP +.B \-\-ProfileManager +Start with ProfileManager. +.TP +\fB\-\-no\-remote\fR +Do not accept or send remote commands; implies \fB--new-instance\fR. +.TP +\fB\-\-new\-instance\fR +Open new instance, not a new window in running instance. +.TP +\fB\-\-UILocale\fR \fIlocale\fR +Start with \fIlocale\fR resources as UI Locale. +.TP +\fB\-\-save\-mode\fR +Disables extensions and themes for this session. +.TP +\fB\-\-headless\fR +Run without a GUI. +.TP +\fB\-\-marionette\fR +Enable remote control server. +.TP +\fB\-\-browser\fR +Open a browser window. +.TP +\fB\-\-new-window\fR \fIurl\fR +Open \fIurl\fR in a new window. +.TP +\fB\-\-new-tab\fR \fIurl\fR +Open \fIurl\fR in a new tab. +.TP +\fB\-\-private-window\fR \fIurl\fR +Open \fIurl\fR in a new private window. +.TP +\fB\-\-preferences\fR +Open Preferences dialog. +.TP +\fB\-\-screenshot\fR [\fIpath\fR] +Save screenshot to \fIpath\fR or in working directory. +.TP +\fB\-\-window-size\fR \fIwidth\fR[,\fIheight\fR] +Width and optionally height of screenshot. +.TP +\fB\-\-search\fR \fIterm\fR +Search \fIterm\fR with your default search engine. +.TP + + +\fB\-\-jsconsole\fR +Open the Browser Console. +.TP +\fB\-\-jsdebugger\fR +Open the Browser Toolbox. +.TP +\fB\-\-wait-for-jsdebugger\fR +Spin event loop until JS debugger connects. Enables debugging (some) application startup code paths. Only has an effect when \fI--jsdebugger\fR is also supplied. +.TP +\fB\-\-devtools\fR +Open DevTools on initial load. +.TP +\fB\-\-start-debugger-server\fR [ws:][\fIport\fR|\fIpath\fR] +Start the debugger server on a TCP port or Unix domain socket path. Defaults to TCP port 6000. Use WebSocket protocol if ws: prefix is specified. +.TP +\fB\-\-recording\fR \fIfile\fR +Record drawing for a given URL. +.TP +\fB\-\-recording-output\fR \fIfile\fR +Specify destination file for a drawing recording. +.TP +\fB\-\-setDefaultBrowser\fR +Set this app as the default browser. + +.SH FILES +\fI/usr/bin/firefox\fR - shell script wrapping +\fBfirefox\fR +.br +\fI/usr/lib64/firefox/firefox-bin\fR - \fBfirefox\fR +executable + +.SH VERSION +57.0 + +.SH BUGS +To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR + +.SH AUTHORS +.TP +.B The Mozilla Organization +.I http://www.mozilla.org/about.html +.TP +.B Tobias Girstmair +.I https://gir.st/ diff --git a/firefox.desktop b/firefox.desktop new file mode 100644 index 0000000000000000000000000000000000000000..89fa082fac912948df8a6133e7e612b067152b8f --- /dev/null +++ b/firefox.desktop @@ -0,0 +1,272 @@ +[Desktop Entry] +Version=1.0 +Name=Firefox +GenericName=Web Browser +GenericName[ca]=Navegador web +GenericName[cs]=Webový prohlížeč +GenericName[es]=Navegador web +GenericName[fa]=مرورگر اینترنتی +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[hu]=Webböngésző +GenericName[it]=Browser Web +GenericName[ja]=ウェブ・ブラウザ +GenericName[ko]=웹 브라우저 +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[nn]=Nettlesar +GenericName[no]=Nettleser +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador Web +GenericName[sk]=Internetový prehliadač +GenericName[sv]=Webbläsare +Comment=Browse the Web +Comment[ca]=Navegueu per el web +Comment[cs]=Prohlížení stránek World Wide Webu +Comment[de]=Im Internet surfen +Comment[es]=Navegue por la web +Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید +Comment[fi]=Selaa Internetin WWW-sivuja +Comment[fr]=Navigue sur Internet +Comment[hu]=A világháló böngészése +Comment[it]=Esplora il web +Comment[ja]=ウェブを閲覧します +Comment[ko]=웹을 돌아 다닙니다 +Comment[nb]=Surf på nettet +Comment[nl]=Verken het internet +Comment[nn]=Surf på nettet +Comment[no]=Surf på nettet +Comment[pl]=Przeglądanie stron WWW +Comment[pt]=Navegue na Internet +Comment[pt_BR]=Navegue na Internet +Comment[sk]=Prehliadanie internetu +Comment[sv]=Surfa på webben +Exec=firefox %u +Icon=firefox +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=new-window;new-private-window; + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn-BD]=নতুন উইন্ডো (N) +Name[bn-IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en-GB]=New Window +Name[en-US]=New Window +Name[en-ZA]=New Window +Name[eo]=Nova fenestro +Name[es-AR]=Nueva ventana +Name[es-CL]=Nueva ventana +Name[es-ES]=Nueva ventana +Name[es-MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید‌ +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy-NL]=Nij finster +Name[ga-IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu-IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi-IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy-AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja-JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួច​​​ថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb-NO]=Nytt vindu +Name[ne-NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn-NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt-BR]=Nova janela +Name[pt-PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv-SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh-CN]=新建窗口 +Name[zh-TW]=開新視窗 + + +Exec=firefox --new-window %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn-BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn-IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en-GB]=New Private Window +Name[en-US]=New Private Window +Name[en-ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es-AR]=Nueva ventana privada +Name[es-CL]=Nueva ventana privada +Name[es-ES]=Nueva ventana privada +Name[es-MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy-NL]=Nij priveefinster +Name[ga-IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu-IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi-IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy-AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja-JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួច​ឯកជន​ថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو& +Name[lij]=Neuvo barcon privou +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb-NO]=Nytt privat vindu +Name[ne-NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn-NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt-BR]=Nova janela privativa +Name[pt-PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv-SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh-CN]=新建隐私浏览窗口 +Name[zh-TW]=新增隱私視窗 +Exec=firefox --private-window %u + diff --git a/firefox.js b/firefox.js new file mode 100644 index 0000000000000000000000000000000000000000..441b1308dea12e6868e9c54d50c19a297553b5f4 --- /dev/null +++ b/firefox.js @@ -0,0 +1,2 @@ +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://openeuler.org/zh/"); +pref("browser.newtabpage.pinned", '[{"url":"https://openeuler.org/zh/","title":"Openeuler Project - Start Page"}]'); diff --git a/firefox.sh.in b/firefox.sh.in new file mode 100644 index 0000000000000000000000000000000000000000..f14956487f7a6244a908e81a6e31c849ba3a635a --- /dev/null +++ b/firefox.sh.in @@ -0,0 +1,254 @@ +#!/bin/bash +# +# 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) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +## +## Usage: +## +## $ firefox +## +## This script is meant to run a mozilla program from the mozilla +## rpm installation. +## +## The script will setup all the environment voodoo needed to make +## mozilla work. + +cmdname=`basename $0` + +## +## Variables +## +MOZ_ARCH=$(uname -m) +case $MOZ_ARCH in + x86_64 | s390x | sparc64) + MOZ_LIB_DIR="/usr/lib64" + SECONDARY_LIB_DIR="/usr/lib" + ;; + * ) + MOZ_LIB_DIR="/usr/lib" + SECONDARY_LIB_DIR="/usr/lib64" + ;; +esac + +MOZ_FIREFOX_FILE="firefox" + +if [ ! -r $MOZ_LIB_DIR/firefox/$MOZ_FIREFOX_FILE ]; then + if [ ! -r $SECONDARY_LIB_DIR/firefox/$MOZ_FIREFOX_FILE ]; then + echo "Error: $MOZ_LIB_DIR/firefox/$MOZ_FIREFOX_FILE not found" + if [ -d $SECONDARY_LIB_DIR ]; then + echo " $SECONDARY_LIB_DIR/firefox/$MOZ_FIREFOX_FILE not found" + fi + exit 1 + fi + MOZ_LIB_DIR="$SECONDARY_LIB_DIR" +fi +MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox" +MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" +MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" +MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" +MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh" + +## +## Set MOZ_GRE_CONF +## +MOZ_GRE_CONF=/etc/gre.d/gre.conf +if [ "$MOZ_LIB_DIR" == "/usr/lib64" ]; then + MOZ_GRE_CONF=/etc/gre.d/gre64.conf +fi +export MOZ_GRE_CONF + +## +## Set MOZILLA_FIVE_HOME +## +MOZILLA_FIVE_HOME="$MOZ_DIST_BIN" + +export MOZILLA_FIVE_HOME + +## +## Make sure that we set the plugin path +## +MOZ_PLUGIN_DIR="plugins" + +if [ "$MOZ_PLUGIN_PATH" ] +then + MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$MOZ_LIB_DIR/mozilla/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR +else + MOZ_PLUGIN_PATH=$MOZ_LIB_DIR/mozilla/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR +fi +export MOZ_PLUGIN_PATH + +## +## Set MOZ_APP_LAUNCHER for gnome-session +## +export MOZ_APP_LAUNCHER="/usr/bin/firefox" + +## +## Set FONTCONFIG_PATH for Xft/fontconfig +## +FONTCONFIG_PATH="/etc/fonts:${MOZILLA_FIVE_HOME}/res/Xft" +export FONTCONFIG_PATH + +## +## In order to better support certain scripts (such as Indic and some CJK +## scripts), Fedora builds its Firefox, with permission from the Mozilla +## Corporation, with the Pango system as its text renderer. This change +## may negatively impact performance on some pages. To disable the use of +## Pango, set MOZ_DISABLE_PANGO=1 in your environment before launching +## Firefox. +## +# +# MOZ_DISABLE_PANGO=1 +# export MOZ_DISABLE_PANGO +# + +## +## Disable the GNOME crash dialog, Moz has it's own +## +GNOME_DISABLE_CRASH_DIALOG=1 +export GNOME_DISABLE_CRASH_DIALOG + +## +## Disable the SLICE allocator (rhbz#1014858) +## +export G_SLICE=always-malloc + +## +## Enable Xinput2 (mozbz#1207973) +## +export MOZ_USE_XINPUT2=1 + +# OK, here's where all the real work gets done + + +## +## To disable the use of Firefox localization, set MOZ_DISABLE_LANGPACKS=1 +## in your environment before launching Firefox. +## +# +# MOZ_DISABLE_LANGPACKS=1 +# export MOZ_DISABLE_LANGPACKS +# + +## +## Automatically installed langpacks are tracked by .fedora-langpack-install +## config file. +## +FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install" + +# MOZ_DISABLE_LANGPACKS disables language packs completely +MOZILLA_DOWN=0 +if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then + if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then + # Is firefox running? + /usr/bin/pidof firefox > /dev/null 2>&1 + MOZILLA_DOWN=$? + fi +fi + +# Modify language pack configuration only when firefox is not running +# and language packs are not disabled +if [ $MOZILLA_DOWN -ne 0 ]; then + + # Clear already installed langpacks + mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR + if [ -f $FEDORA_LANGPACK_CONFIG ]; then + rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1 + rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1 + # remove all empty langpacks dirs while they block installation of langpacks + rmdir $MOZ_EXTENSIONS_PROFILE_DIR/langpack* > /dev/null 2>&1 + fi + + # Get locale from system + CURRENT_LOCALE=$LC_ALL + CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES} + CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} + + # Try with a local variant first, then without a local variant + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"` + + function create_langpack_link() { + local language=$* + local langpack=langpack-${language}@firefox.mozilla.org.xpi + if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then + rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + # If the target file is a symlink (the fallback langpack), + # install the original file instead of the fallback one + if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then + langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack` + fi + ln -s $MOZ_LANGPACKS_DIR/$langpack \ + $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG + return 0 + fi + return 1 + } + + create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true +fi + +# BEAST fix (rhbz#1005611) +NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1} +export NSS_SSL_CBC_RANDOM_IV + +# Prepare command line arguments +script_args="" +pass_arg_count=0 +while [ $# -gt $pass_arg_count ] +do + case "$1" in + -g | --debug) + script_args="$script_args -g" + debugging=1 + shift + ;; + -d | --debugger) + if [ $# -gt 1 ]; then + script_args="$script_args -d $2" + shift 2 + else + shift + fi + ;; + *) + # Move the unrecognized argument to the end of the list. + arg="$1" + shift + set -- "$@" "$arg" + pass_arg_count=`expr $pass_arg_count + 1` + ;; + esac +done + +if ! [ "$GDK_BACKEND" ]; then + export GDK_BACKEND=x11 +fi + +# Run the browser +debugging=0 +if [ $debugging = 1 ] +then + echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" +fi + + +exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" diff --git a/firefox.spec b/firefox.spec new file mode 100644 index 0000000000000000000000000000000000000000..aad6d936056168886d2ff9e710cedeadcf3b1565 --- /dev/null +++ b/firefox.spec @@ -0,0 +1,319 @@ +Name: firefox +Summary: Mozilla Firefox Web browser +Version: 62.0.3 +Release: 4 +URL: https://www.mozilla.org/firefox/ +License: MPLv1.1 or GPLv2+ or LGPLv2+ +Source0: http://download-origin.cdn.mozilla.net/pub/firefox/releases/62.0.3/source/firefox-62.0.3.source.tar.xz +Source1: firefox-langpacks-%{version}-20181002.tar.xz +Source2: firefox-mozconfig +Source3: firefox.js +Source4: firefox.desktop +Source5: firefox.sh.in +Source7: mozilla-api-key +Source6: firefox.1 +Source9: distribution.ini +Source10: google-api-key +Source11: firefox-wayland.sh.in +Source12: firefox-wayland.desktop + +Patch0001: build-jit-atomic-always-lucky.patch +Patch0004: mozilla-build-arm.patch +Patch0006: rhbz-1173156.patch +Patch0008: mozilla-1170092.patch +Patch0009: rhbz-1354671.patch +Patch0010: mozilla-1196777.patch +Patch0011: mozilla-256180.patch +Patch0012: mozilla-1353817.patch +Patch0016: mozilla-1467125.patch +Patch0017: mozilla-1467128.patch +Patch0018: mozilla-1415078.patch + +BuildRequires: pkgconfig(nspr) >= 4.19 pkgconfig(nss) >= 3.37.3 pkgconfig(libpng) pkgconfig(libffi) +BuildRequires: pkgconfig(zlib) pkgconfig(libIDL-2.0) pkgconfig(gtk+-3.0) pkgconfig(gtk+-2.0) pkgconfig(krb5) +BuildRequires: pkgconfig(pango) pkgconfig(freetype2) >= 2.1.9 pkgconfig(xt) pkgconfig(xrender) pkgconfig(dri) +BuildRequires: pkgconfig(libstartup-notification-1.0) pkgconfig(libnotify) >= 0.7.0 pkgconfig(libcurl) +BuildRequires: pkgconfig(libpulse) pkgconfig(icu-i18n) pkgconfig(gconf-2.0) yasm clang clang-libs autoconf213 +BuildRequires: libjpeg-devel bzip2-devel dbus-glib-devel llvm-devel libvpx-devel >= 1.4.0 python2-devel llvm zip +BuildRequires: desktop-file-utils rust cargo clang-devel nss-static >= 3.37.3 nss-devel >= 3.37.3 + +Requires: mozilla-filesystem p11-kit-trust nspr >= 4.19 nss >= 3.37.3 u2f-hidraw-policy + +Provides: webclient firefox-wayland = %{version}-%{release} +Obsoletes: mozilla <= 37:1.7.13 firefox-wayland <= %{version}-%{release} + +%description +Mozilla Firefox is an open-source web browser, designed for standards +compliance, performance and portability. + +%prep +%autosetup -n firefox-%{version} -p1 + +rm -f .mozconfig +cp %{SOURCE2} .mozconfig +cp %{SOURCE7} mozilla-api-key +cp %{SOURCE10} google-api-key + +echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig +echo "ac_add_options --enable-official-branding" >> .mozconfig +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +echo "ac_add_options --disable-system-sqlite" >> .mozconfig +echo "ac_add_options --disable-system-cairo" >> .mozconfig +echo "ac_add_options --enable-system-ffi" >> .mozconfig +echo "ac_add_options --disable-debug" >> .mozconfig +echo "ac_add_options --disable-crashreporter" >> .mozconfig +echo "ac_add_options --without-system-jpeg" >> .mozconfig +echo "ac_add_options --with-system-libvpx" >> .mozconfig +echo "ac_add_options --without-system-icu" >> .mozconfig + +echo "ac_add_options --enable-optimize='-g -O2'" >> .mozconfig +echo "ac_add_options --disable-jemalloc" >> .mozconfig +echo "ac_add_options --disable-webrtc" >> .mozconfig + +chmod -x third_party/rust/itertools/src/lib.rs + +%build +echo "Generate big endian version of config/external/icu/data/icud58l.dat" + +find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' + +MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks" +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +export CFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS +export PREFIX='%{_prefix}' +export LIBDIR='%{_libdir}' +export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" +export MOZ_SERVICES_SYNC="1" +export STRIP=/bin/true + +MOZ_SMP_FLAGS=-j1 +[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 + +./mach build + +%install + +cat > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF +pref("general.useragent.locale", "chrome://global/locale/intl.properties"); +EOF + +DESTDIR=$RPM_BUILD_ROOT make -C objdir install + +mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} + +desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE4} +desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE12} + +rm -rf $RPM_BUILD_ROOT%{_bindir}/firefox +cat %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/firefox +cat %{SOURCE11} > $RPM_BUILD_ROOT%{_bindir}/firefox-wayland +chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox +chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox-wayland + +install -p -D -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1 + +rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/firefox-config +rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/update-settings.ini + +for s in 16 22 24 32 48 256; do + mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps + cp -p browser/branding/official/default${s}.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/firefox.png +done + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/symbolic/apps +mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata + +cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml < + + + + firefox.desktop + CC0-1.0 + +

+ Bringing together all kinds of awesomeness to make browsing better for you. + Get to your favorite sites quickly – even if you don’t remember the URLs. + Type your term into the location bar (aka the Awesome Bar) and the autocomplete + function will include possible matches from your browsing history, bookmarked + sites and open tabs. +

+ +
+ http://www.mozilla.org/ + + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/a.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/b.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/c.png + + +
+EOF + +echo > %{name}.lang +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/langpacks +tar xf %{SOURCE1} + +for langpack in `ls firefox-langpacks/*.xpi`; do + language=`basename $langpack .xpi` + extensionID=langpack-$language@firefox.mozilla.org + mkdir -p $extensionID + unzip -qq $langpack -d $extensionID + find $extensionID -type f | xargs chmod 644 + + cd $extensionID + zip -qq -r9mX ../${extensionID}.xpi * + cd - + + install -m 644 ${extensionID}.xpi $RPM_BUILD_ROOT%{_libdir}/%{name}/langpacks + language=`echo $language | sed -e 's/-/_/g'` + echo "%%lang($language) %{_libdir}/%{name}/langpacks/${extensionID}.xpi" >> %{name}.lang +done +rm -rf firefox-langpacks + +function create_default_langpack() { +language_long=$1 +language_short=$2 +cd $RPM_BUILD_ROOT%{_libdir}/%{name}/langpacks +ln -s langpack-$language_long@firefox.mozilla.org.xpi langpack-$language_short@firefox.mozilla.org.xpi +cd - +echo "%%lang($language_short) %{_libdir}/%{name}/langpacks/langpack-$language_short@firefox.mozilla.org.xpi" >> %{name}.lang +} + +create_default_langpack "bn-IN" "bn" +create_default_langpack "es-AR" "es" +create_default_langpack "fy-NL" "fy" +create_default_langpack "ga-IE" "ga" +create_default_langpack "gu-IN" "gu" +create_default_langpack "hi-IN" "hi" +create_default_langpack "hy-AM" "hy" +create_default_langpack "nb-NO" "nb" +create_default_langpack "nn-NO" "nn" +create_default_langpack "pa-IN" "pa" +create_default_langpack "pt-PT" "pt" +create_default_langpack "sv-SE" "sv" +create_default_langpack "zh-TW" "zh" + +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults/preferences +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pref +mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} + +install -p -c -m 644 LICENSE $RPM_BUILD_ROOT/%{_libdir}/%{name} + +rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries +ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries + +cp %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults/preferences +cp build/unix/run-mozilla.sh $RPM_BUILD_ROOT%{_libdir}/%{name} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/distribution +cp %{SOURCE9} $RPM_BUILD_ROOT%{_libdir}/%{name}/distribution + +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{version}/sdk/lib/libmozjs.so +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{version}/sdk/lib/libmozalloc.so +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{version}/sdk/lib/libxul.so + +%preun +if [ $1 -eq 0 ]; then + rm -rf %{_libdir}/%{name}/components + rm -rf %{_libdir}/%{name}/extensions + rm -rf %{_libdir}/%{name}/plugins + rm -rf %{_libdir}/%{name}/langpacks +fi + +%post +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +update-desktop-database &> /dev/null || : +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%pretrans -p +require 'posix' +require 'os' +if (posix.stat("%{_libdir}/%{name}/browser/defaults/preferences", "type") == "link") then + posix.unlink("%{_libdir}/%{name}/browser/defaults/preferences") + posix.mkdir("%{_libdir}/%{name}/browser/defaults/preferences") + if (posix.stat("%{_libdir}/%{name}/defaults/preferences", "type") == "directory") then + for i,filename in pairs(posix.dir("%{_libdir}/%{name}/defaults/preferences")) do + os.rename("%{_libdir}/%{name}/defaults/preferences/"..filename, "%{_libdir}/%{name}/browser/defaults/preferences/"..filename) + end + f = io.open("%{_libdir}/%{name}/defaults/preferences/README","w") + if f then + f:write("Content of this directory has been moved to %{_libdir}/%{name}/browser/defaults/preferences.") + f:close() + end + end +end + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%files -f %{name}.lang +%license %{_libdir}/%{name}/LICENSE +%doc %{_mandir}/man1/* +%{_bindir}/firefox +%{_bindir}/firefox-wayland +%dir %{_sysconfdir}/%{name} +%dir %{_sysconfdir}/%{name}/* +%dir %{_datadir}/mozilla/extensions/* +%dir %{_libdir}/mozilla/extensions/* +%dir %{_libdir}/%{name} +%dir %{_libdir}/%{name}/langpacks +%attr(644, root, root) %{_libdir}/%{name}/browser/blocklist.xml +%{_libdir}/%{name}/*.so +%{_libdir}/%{name}/gtk2/*.so +%{_libdir}/%{name}/firefox +%{_libdir}/%{name}/firefox-bin +%{_libdir}/%{name}/browser/chrome +%{_libdir}/%{name}/browser/chrome.manifest +%{_libdir}/%{name}/browser/omni.ja +%{_libdir}/%{name}/browser/defaults/preferences/firefox.js +%{_libdir}/%{name}/browser/features/*.xpi +%{_libdir}/%{name}/distribution/distribution.ini +%{_libdir}/%{name}/defaults/pref/channel-prefs.js +%{_libdir}/%{name}/dependentlibs.list +%{_libdir}/%{name}/dictionaries +%{_libdir}/%{name}/omni.ja +%{_libdir}/%{name}/platform.ini +%{_libdir}/%{name}/plugin-container +%{_libdir}/%{name}/gmp-clearkey +%{_libdir}/%{name}/fonts/TwemojiMozilla.ttf +%{_libdir}/%{name}/chrome.manifest +%{_libdir}/%{name}/run-mozilla.sh +%{_libdir}/%{name}/application.ini +%{_libdir}/%{name}/pingsender +%ghost %{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi +%exclude %{_libdir}/%{name}/removed-files +%{_datadir}/appdata/*.appdata.xml +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/16x16/apps/firefox.png +%{_datadir}/icons/hicolor/22x22/apps/firefox.png +%{_datadir}/icons/hicolor/24x24/apps/firefox.png +%{_datadir}/icons/hicolor/256x256/apps/firefox.png +%{_datadir}/icons/hicolor/32x32/apps/firefox.png +%{_datadir}/icons/hicolor/48x48/apps/firefox.png +%{_datadir}/applications/firefox-wayland.desktop + +%changelog +* Wen Feb 26 2020 xuxijian - 62.0.3-4 +- Package init diff --git a/google-api-key b/google-api-key new file mode 100644 index 0000000000000000000000000000000000000000..b95d1897d87de6f0752af029c5b278ecfa5d4cd2 --- /dev/null +++ b/google-api-key @@ -0,0 +1 @@ +AIzaSyBPGXa4AYD4FC3HJK7LnIKxm4fDusVuuco diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch new file mode 100644 index 0000000000000000000000000000000000000000..9e8906f34c5489bd79d5259140ed625f3bd02790 --- /dev/null +++ b/mozilla-1170092.patch @@ -0,0 +1,96 @@ +diff -up firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp +--- firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2018-01-11 21:17:03.000000000 +0100 ++++ firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2018-01-23 13:59:45.446495820 +0100 +@@ -239,9 +239,20 @@ nsresult nsReadConfig::openAndEvaluateJS + return rv; + + rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); +- if (NS_FAILED(rv)) +- return rv; ++ if (NS_FAILED(rv)) { ++ // Look for cfg file in /etc//pref ++ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, ++ getter_AddRefs(jsFile)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = jsFile->AppendNative(NS_LITERAL_CSTRING("pref")); ++ NS_ENSURE_SUCCESS(rv, rv); ++ rv = jsFile->AppendNative(nsDependentCString(aFileName)); ++ NS_ENSURE_SUCCESS(rv, rv); + ++ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); ++ NS_ENSURE_SUCCESS(rv, rv); ++ } + } else { + nsAutoCString location("resource://gre/defaults/autoconfig/"); + location += aFileName; +diff -up firefox-58.0/modules/libpref/Preferences.cpp.1170092 firefox-58.0/modules/libpref/Preferences.cpp +--- firefox-58.0/modules/libpref/Preferences.cpp.1170092 2018-01-23 13:59:45.447495817 +0100 ++++ firefox-58.0/modules/libpref/Preferences.cpp 2018-01-23 14:02:51.456987774 +0100 +@@ -4402,6 +4402,8 @@ pref_InitInitialObjects() + // + // Thus, in the omni.jar case, we always load app-specific default + // preferences from omni.jar, whether or not `$app == $gre`. ++ // At very end load configuration from system config location: ++ // - /etc/firefox/pref/*.js + + nsresult rv; + nsZipFind* findPtr; +diff -up firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-58.0/toolkit/xre/nsXREDirProvider.cpp +--- firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2018-01-11 21:17:06.000000000 +0100 ++++ firefox-58.0/toolkit/xre/nsXREDirProvider.cpp 2018-01-23 13:59:45.447495817 +0100 +@@ -59,6 +59,7 @@ + #endif + #ifdef XP_UNIX + #include ++#include "nsIXULAppInfo.h" + #endif + #ifdef XP_IOS + #include "UIKitDirProvider.h" +@@ -554,6 +555,20 @@ nsXREDirProvider::GetFile(const char* aP + } + } + } ++#if defined(XP_UNIX) ++ if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { ++ nsCString sysConfigDir = NS_LITERAL_CSTRING("/etc/"); ++ nsCOMPtr appInfo = do_GetService("@mozilla.org/xre/app-info;1"); ++ if (!appInfo) ++ return NS_ERROR_NOT_AVAILABLE; ++ nsCString appName; ++ appInfo->GetName(appName); ++ ToLowerCase(appName); ++ sysConfigDir.Append(appName); ++ return NS_NewNativeLocalFile(sysConfigDir, false, aFile); ++ } ++#endif ++ + if (NS_FAILED(rv) || !file) + return NS_ERROR_FAILURE; + +@@ -887,6 +902,14 @@ nsXREDirProvider::GetFilesInternal(const + LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); + LoadDirsIntoArray(mAppBundleDirectories, + kAppendPrefDir, directories); ++ // Add /etc//pref/ directory if it exists ++ nsCOMPtr systemPrefDir; ++ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, getter_AddRefs(systemPrefDir)); ++ if (NS_SUCCEEDED(rv)) { ++ rv = systemPrefDir->AppendNative(NS_LITERAL_CSTRING("pref")); ++ if (NS_SUCCEEDED(rv)) ++ directories.AppendObject(systemPrefDir); ++ } + + rv = NS_NewArrayEnumerator(aResult, directories); + } +diff -up firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h +--- firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2018-01-23 13:59:45.447495817 +0100 ++++ firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h 2018-01-23 14:02:02.871120476 +0100 +@@ -59,6 +59,7 @@ + #define NS_APP_PREFS_50_FILE "PrefF" + #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" + #define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults ++#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration + + #define NS_APP_USER_PROFILE_50_DIR "ProfD" + #define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD" diff --git a/mozilla-1196777.patch b/mozilla-1196777.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba5e4b7f7af7674499f03c06b2abc420646e2a13 --- /dev/null +++ b/mozilla-1196777.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# User Martin Stransky +# Parent 4e3ad95d689a5beabf3c1f41d958794fe00e3767 +Bug 1196777 - Ask GDK to receive focus events, r=?karlt + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -142,17 +142,18 @@ const gint kEvents = GDK_EXPOSURE_MASK | + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + #if GTK_CHECK_VERSION(3,4,0) + GDK_SMOOTH_SCROLL_MASK | + GDK_TOUCH_MASK | + #endif + GDK_SCROLL_MASK | + GDK_POINTER_MOTION_MASK | +- GDK_PROPERTY_CHANGE_MASK; ++ GDK_PROPERTY_CHANGE_MASK | ++ GDK_FOCUS_CHANGE_MASK; + + /* utility functions */ + static bool is_mouse_in_window(GdkWindow* aWindow, + gdouble aMouseX, gdouble aMouseY); + static nsWindow *get_window_for_gtk_widget(GtkWidget *widget); + static nsWindow *get_window_for_gdk_window(GdkWindow *window); + static GtkWidget *get_gtk_widget_for_gdk_window(GdkWindow *window); + static GdkCursor *get_gtk_cursor(nsCursor aCursor); diff --git a/mozilla-1353817.patch b/mozilla-1353817.patch new file mode 100644 index 0000000000000000000000000000000000000000..dc8d8f8e99b88b063c0bd844fcd8661c2c77ef87 --- /dev/null +++ b/mozilla-1353817.patch @@ -0,0 +1,27 @@ +From 1cc652f5525f458b0b4ceb12af24bf5a4367db32 Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Tue, 23 May 2017 13:09:48 -0400 +Subject: [PATCH] Bug 1353817: Include SkNx_neon.h for ARM64 too + +This fixes build errors as arm_neon.h was missing along with some +missing converters. +--- + gfx/skia/skia/src/core/SkNx.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gfx/skia/skia/src/core/SkNx.h b/gfx/skia/skia/src/core/SkNx.h +index 6bca856..b0427aa 100644 +--- a/gfx/skia/skia/src/core/SkNx.h ++++ b/gfx/skia/skia/src/core/SkNx.h +@@ -299,7 +299,7 @@ typedef SkNx<4, uint32_t> Sk4u; + // Include platform specific specializations if available. + #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 + #include "../opts/SkNx_sse.h" +-#elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) ++#elif !defined(SKNX_NO_SIMD) && (defined(SK_ARM_HAS_NEON) || defined(SK_CPU_ARM64)) + #include "../opts/SkNx_neon.h" + #else + +-- +2.9.4 + diff --git a/mozilla-1415078.patch b/mozilla-1415078.patch new file mode 100644 index 0000000000000000000000000000000000000000..c5c433eab59cda25e84119e88ce27de9b9bfd3cb --- /dev/null +++ b/mozilla-1415078.patch @@ -0,0 +1,57 @@ +diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp +--- a/toolkit/components/remote/nsRemoteService.cpp ++++ b/toolkit/components/remote/nsRemoteService.cpp +@@ -34,20 +34,18 @@ + NS_IMETHODIMP + nsRemoteService::Startup(const char* aAppName, const char* aProfileName) + { +-#if defined(MOZ_ENABLE_DBUS) ++#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND) + nsresult rv; + mDBusRemoteService = new nsDBusRemoteService(); + rv = mDBusRemoteService->Startup(aAppName, aProfileName); + if (NS_FAILED(rv)) { + mDBusRemoteService = nullptr; + } ++#elif !defined(MOZ_WAYLAND) ++ mGtkRemoteService = new nsGTKRemoteService(); ++ mGtkRemoteService->Startup(aAppName, aProfileName); + #endif + +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +- mGtkRemoteService = new nsGTKRemoteService(); +- mGtkRemoteService->Startup(aAppName, aProfileName); +- } +- + if (!mDBusRemoteService && !mGtkRemoteService) + return NS_ERROR_FAILURE; + +@@ -73,7 +71,7 @@ + NS_IMETHODIMP + nsRemoteService::Shutdown() + { +-#if defined(MOZ_ENABLE_DBUS) ++#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND) + if (mDBusRemoteService) { + mDBusRemoteService->Shutdown(); + mDBusRemoteService = nullptr; +diff --git a/widget/xremoteclient/moz.build b/widget/xremoteclient/moz.build +--- a/widget/xremoteclient/moz.build ++++ b/widget/xremoteclient/moz.build +@@ -11,7 +11,6 @@ + + SOURCES += [ + 'RemoteUtils.cpp', +- 'XRemoteClient.cpp', + ] + + if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG['MOZ_WAYLAND']: +@@ -20,3 +19,7 @@ + ] + CXXFLAGS += CONFIG['TK_CFLAGS'] + CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] ++else: ++ SOURCES += [ ++ 'XRemoteClient.cpp', ++ ] + diff --git a/mozilla-1467125.patch b/mozilla-1467125.patch new file mode 100644 index 0000000000000000000000000000000000000000..375ac4901fe3f7cdf7c27dbe6d244f9195bc6a68 --- /dev/null +++ b/mozilla-1467125.patch @@ -0,0 +1,26 @@ +diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp +--- a/widget/gtk/WindowSurfaceWayland.cpp ++++ b/widget/gtk/WindowSurfaceWayland.cpp +@@ -146,18 +146,19 @@ static StaticMutex gWaylandDisplaysMutex + // + // nsWaylandDisplay is our interface to wayland compositor. It provides wayland + // global objects as we need (wl_display, wl_shm) and operates wl_event_queue on + // compositor (not the main) thread. + static nsWaylandDisplay* WaylandDisplayGet(wl_display *aDisplay); + static void WaylandDisplayRelease(wl_display *aDisplay); + static void WaylandDisplayLoop(wl_display *aDisplay); + +-// TODO: is the 60pfs loop correct? +-#define EVENT_LOOP_DELAY (1000/60) ++// TODO: Bug 1467125 - We need to integrate wl_display_dispatch_queue_pending() with ++// compositor event loop. ++#define EVENT_LOOP_DELAY (1000/240) + + // Get WaylandDisplay for given wl_display and actual calling thread. + static nsWaylandDisplay* + WaylandDisplayGetLocked(wl_display *aDisplay, const StaticMutexAutoLock&) + { + nsWaylandDisplay* waylandDisplay = nullptr; + + int len = gWaylandDisplays.Count(); + diff --git a/mozilla-1467128.patch b/mozilla-1467128.patch new file mode 100644 index 0000000000000000000000000000000000000000..75cf92c16e1f9836b6780a5a79608d12acf0496b --- /dev/null +++ b/mozilla-1467128.patch @@ -0,0 +1,359 @@ +diff --git a/gfx/thebes/gfxPlatformGtk.h b/gfx/thebes/gfxPlatformGtk.h +--- a/gfx/thebes/gfxPlatformGtk.h ++++ b/gfx/thebes/gfxPlatformGtk.h +@@ -102,23 +102,42 @@ public: + #endif + + #ifdef MOZ_X11 + Display* GetCompositorDisplay() { + return mCompositorDisplay; + } + #endif // MOZ_X11 + ++#ifdef MOZ_WAYLAND ++ void SetWaylandLastVsync(uint32_t aVsyncTimestamp) { ++ mWaylandLastVsyncTimestamp = aVsyncTimestamp; ++ } ++ int64_t GetWaylandLastVsync() { ++ return mWaylandLastVsyncTimestamp; ++ } ++ void SetWaylandFrameDelay(int64_t aFrameDelay) { ++ mWaylandFrameDelay = aFrameDelay; ++ } ++ int64_t GetWaylandFrameDelay() { ++ return mWaylandFrameDelay; ++ } ++#endif ++ + protected: + bool CheckVariationFontSupport() override; + + int8_t mMaxGenericSubstitutions; + + private: + virtual void GetPlatformCMSOutputProfile(void *&mem, + size_t &size) override; + + #ifdef MOZ_X11 + Display* mCompositorDisplay; + #endif ++#ifdef MOZ_WAYLAND ++ int64_t mWaylandLastVsyncTimestamp; ++ int64_t mWaylandFrameDelay; ++#endif + }; + + #endif /* GFX_PLATFORM_GTK_H */ +diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp +--- a/gfx/thebes/gfxPlatformGtk.cpp ++++ b/gfx/thebes/gfxPlatformGtk.cpp +@@ -46,16 +46,20 @@ + #include "GLContextGLX.h" + #include "GLXLibrary.h" + + /* Undefine the Status from Xlib since it will conflict with system headers on OSX */ + #if defined(__APPLE__) && defined(Status) + #undef Status + #endif + ++#ifdef MOZ_WAYLAND ++#include ++#endif ++ + #endif /* MOZ_X11 */ + + #include + + #include "nsMathUtils.h" + + #define GDK_PIXMAP_SIZE_MAX 32767 + +@@ -89,16 +93,22 @@ gfxPlatformGtk::gfxPlatformGtk() + #ifdef MOZ_X11 + if (gfxPlatform::IsHeadless() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) { + mCompositorDisplay = XOpenDisplay(nullptr); + MOZ_ASSERT(mCompositorDisplay, "Failed to create compositor display!"); + } else { + mCompositorDisplay = nullptr; + } + #endif // MOZ_X11 ++#ifdef MOZ_WAYLAND ++ // Wayland compositors use g_get_monotonic_time() to get timestamps. ++ mWaylandLastVsyncTimestamp = (g_get_monotonic_time() / 1000); ++ // Set default display fps to 60 ++ mWaylandFrameDelay = 1000/60; ++#endif + } + + gfxPlatformGtk::~gfxPlatformGtk() + { + #ifdef MOZ_X11 + if (mCompositorDisplay) { + XCloseDisplay(mCompositorDisplay); + } +@@ -505,26 +515,26 @@ gfxPlatformGtk::CheckVariationFontSuppor + // until at least 2.7.1. + FT_Int major, minor, patch; + FT_Library_Version(GetFTLibrary(), &major, &minor, &patch); + return major * 1000000 + minor * 1000 + patch >= 2007001; + } + + #ifdef MOZ_X11 + +-class GLXVsyncSource final : public VsyncSource ++class GtkVsyncSource final : public VsyncSource + { + public: +- GLXVsyncSource() ++ GtkVsyncSource() + { + MOZ_ASSERT(NS_IsMainThread()); + mGlobalDisplay = new GLXDisplay(); + } + +- virtual ~GLXVsyncSource() ++ virtual ~GtkVsyncSource() + { + MOZ_ASSERT(NS_IsMainThread()); + } + + virtual Display& GetGlobalDisplay() override + { + return *mGlobalDisplay; + } +@@ -536,39 +546,52 @@ public: + public: + GLXDisplay() : mGLContext(nullptr) + , mXDisplay(nullptr) + , mSetupLock("GLXVsyncSetupLock") + , mVsyncThread("GLXVsyncThread") + , mVsyncTask(nullptr) + , mVsyncEnabledLock("GLXVsyncEnabledLock") + , mVsyncEnabled(false) ++#ifdef MOZ_WAYLAND ++ , mIsWaylandDisplay(false) ++#endif + { + } + + // Sets up the display's GL context on a worker thread. + // Required as GLContexts may only be used by the creating thread. + // Returns true if setup was a success. + bool Setup() + { + MonitorAutoLock lock(mSetupLock); + MOZ_ASSERT(NS_IsMainThread()); + if (!mVsyncThread.Start()) + return false; + + RefPtr vsyncSetup = +- NewRunnableMethod("GLXVsyncSource::GLXDisplay::SetupGLContext", ++ NewRunnableMethod("GtkVsyncSource::GLXDisplay::SetupGLContext", + this, + &GLXDisplay::SetupGLContext); + mVsyncThread.message_loop()->PostTask(vsyncSetup.forget()); + // Wait until the setup has completed. + lock.Wait(); + return mGLContext != nullptr; + } + ++#ifdef MOZ_WAYLAND ++ bool SetupWayland() ++ { ++ MonitorAutoLock lock(mSetupLock); ++ MOZ_ASSERT(NS_IsMainThread()); ++ mIsWaylandDisplay = true; ++ return mVsyncThread.Start(); ++ } ++#endif ++ + // Called on the Vsync thread to setup the GL context. + void SetupGLContext() + { + MonitorAutoLock lock(mSetupLock); + MOZ_ASSERT(!NS_IsMainThread()); + MOZ_ASSERT(!mGLContext, "GLContext already setup!"); + + // Create video sync timer on a separate Display to prevent locking the +@@ -613,29 +636,35 @@ public: + } + + lock.NotifyAll(); + } + + virtual void EnableVsync() override + { + MOZ_ASSERT(NS_IsMainThread()); ++#if !defined(MOZ_WAYLAND) + MOZ_ASSERT(mGLContext, "GLContext not setup!"); ++#endif + + MonitorAutoLock lock(mVsyncEnabledLock); + if (mVsyncEnabled) { + return; + } + mVsyncEnabled = true; + + // If the task has not nulled itself out, it hasn't yet realized + // that vsync was disabled earlier, so continue its execution. + if (!mVsyncTask) { + mVsyncTask = NewRunnableMethod( +- "GLXVsyncSource::GLXDisplay::RunVsync", this, &GLXDisplay::RunVsync); ++ "GtkVsyncSource::GLXDisplay::RunVsync", this, ++#if defined(MOZ_WAYLAND) ++ mIsWaylandDisplay ? &GLXDisplay::RunVsyncWayland : ++#endif ++ &GLXDisplay::RunVsync); + RefPtr addrefedTask = mVsyncTask; + mVsyncThread.message_loop()->PostTask(addrefedTask.forget()); + } + } + + virtual void DisableVsync() override + { + MonitorAutoLock lock(mVsyncEnabledLock); +@@ -650,17 +679,17 @@ public: + + virtual void Shutdown() override + { + MOZ_ASSERT(NS_IsMainThread()); + DisableVsync(); + + // Cleanup thread-specific resources before shutting down. + RefPtr shutdownTask = NewRunnableMethod( +- "GLXVsyncSource::GLXDisplay::Cleanup", this, &GLXDisplay::Cleanup); ++ "GtkVsyncSource::GLXDisplay::Cleanup", this, &GLXDisplay::Cleanup); + mVsyncThread.message_loop()->PostTask(shutdownTask.forget()); + + // Stop, waiting for the cleanup task to finish execution. + mVsyncThread.Stop(); + } + + private: + virtual ~GLXDisplay() +@@ -709,50 +738,96 @@ public: + } + } + + lastVsync = TimeStamp::Now(); + NotifyVsync(lastVsync); + } + } + ++#ifdef MOZ_WAYLAND ++ /* VSync on Wayland is tricky as we can get only "last VSync" event signal. ++ * That means we should draw next frame at "last Vsync + frame delay" time. ++ */ ++ void RunVsyncWayland() ++ { ++ MOZ_ASSERT(!NS_IsMainThread()); ++ ++ for (;;) { ++ { ++ MonitorAutoLock lock(mVsyncEnabledLock); ++ if (!mVsyncEnabled) { ++ mVsyncTask = nullptr; ++ return; ++ } ++ } ++ ++ gint64 lastVsync = gfxPlatformGtk::GetPlatform()->GetWaylandLastVsync(); ++ gint64 currTime = (g_get_monotonic_time() / 1000); ++ ++ gint64 remaining = gfxPlatformGtk::GetPlatform()->GetWaylandFrameDelay() - ++ (currTime - lastVsync); ++ if (remaining > 0) { ++ PlatformThread::Sleep(remaining); ++ } else { ++ // Time from last HW Vsync is longer than our frame delay, ++ // use our approximation then. ++ gfxPlatformGtk::GetPlatform()->SetWaylandLastVsync(currTime); ++ } ++ ++ NotifyVsync(TimeStamp::Now()); ++ } ++ } ++#endif ++ + void Cleanup() { + MOZ_ASSERT(!NS_IsMainThread()); + + mGLContext = nullptr; +- XCloseDisplay(mXDisplay); ++ if (mXDisplay) ++ XCloseDisplay(mXDisplay); + } + + // Owned by the vsync thread. + RefPtr mGLContext; + _XDisplay* mXDisplay; + Monitor mSetupLock; + base::Thread mVsyncThread; + RefPtr mVsyncTask; + Monitor mVsyncEnabledLock; + bool mVsyncEnabled; ++#ifdef MOZ_WAYLAND ++ bool mIsWaylandDisplay; ++#endif + }; + private: + // We need a refcounted VsyncSource::Display to use chromium IPC runnables. + RefPtr mGlobalDisplay; + }; + + already_AddRefed + gfxPlatformGtk::CreateHardwareVsyncSource() + { ++#ifdef MOZ_WAYLAND ++ if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) { ++ RefPtr vsyncSource = new GtkVsyncSource(); ++ VsyncSource::Display& display = vsyncSource->GetGlobalDisplay(); ++ static_cast(display).SetupWayland(); ++ return vsyncSource.forget(); ++ } ++#endif ++ + // Only use GLX vsync when the OpenGL compositor is being used. + // The extra cost of initializing a GLX context while blocking the main + // thread is not worth it when using basic composition. +- // Also don't use it on non-X11 displays. + if (gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) { +- if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) && +- gl::sGLXLibrary.SupportsVideoSync()) { +- RefPtr vsyncSource = new GLXVsyncSource(); ++ if (gl::sGLXLibrary.SupportsVideoSync()) { ++ RefPtr vsyncSource = new GtkVsyncSource(); + VsyncSource::Display& display = vsyncSource->GetGlobalDisplay(); +- if (!static_cast(display).Setup()) { ++ if (!static_cast(display).Setup()) { + NS_WARNING("Failed to setup GLContext, falling back to software vsync."); + return gfxPlatform::CreateHardwareVsyncSource(); + } + return vsyncSource.forget(); + } + NS_WARNING("SGI_video_sync unsupported. Falling back to software vsync."); + } + return gfxPlatform::CreateHardwareVsyncSource(); +diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp +--- a/widget/gtk/WindowSurfaceWayland.cpp ++++ b/widget/gtk/WindowSurfaceWayland.cpp +@@ -546,16 +546,18 @@ WindowBackBuffer::Lock() + mWaylandDisplay->GetSurfaceFormat()); + } + + static void + frame_callback_handler(void *data, struct wl_callback *callback, uint32_t time) + { + auto surface = reinterpret_cast(data); + surface->FrameCallbackHandler(); ++ ++ gfxPlatformGtk::GetPlatform()->SetWaylandLastVsync(time); + } + + static const struct wl_callback_listener frame_listener = { + frame_callback_handler + }; + + WindowSurfaceWayland::WindowSurfaceWayland(nsWindow *aWindow) + : mWindow(aWindow) + diff --git a/mozilla-256180.patch b/mozilla-256180.patch new file mode 100644 index 0000000000000000000000000000000000000000..13a1c9777cc99cbdb7fcd437ff6cd57c254034fe --- /dev/null +++ b/mozilla-256180.patch @@ -0,0 +1,11 @@ +--- a/layout/generic/nsIFrame.h.old 2016-07-11 13:41:39.688276559 +0200 ++++ b/layout/generic/nsIFrame.h 2016-07-11 13:42:12.791406976 +0200 +@@ -13,7 +13,7 @@ + #error This header/class should only be used within Mozilla code. It should not be used by extensions. + #endif + +-#define MAX_REFLOW_DEPTH 200 ++#define MAX_REFLOW_DEPTH 1000 + + /* nsIFrame is in the process of being deCOMtaminated, i.e., this file is eventually + going to be eliminated, and all callers will use nsFrame instead. At the moment diff --git a/mozilla-api-key b/mozilla-api-key new file mode 100644 index 0000000000000000000000000000000000000000..81877bc006dbe9ef8295fa06cfa16a9d39723cbf --- /dev/null +++ b/mozilla-api-key @@ -0,0 +1 @@ +9008bb7e-1e22-4038-94fe-047dd48ccc0b diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch new file mode 100644 index 0000000000000000000000000000000000000000..e390a284322df9606b2de0cb8378aaba620f8a20 --- /dev/null +++ b/mozilla-build-arm.patch @@ -0,0 +1,14 @@ +diff -up firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h +--- firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm 2017-03-03 13:53:52.480754536 +0100 ++++ firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h 2017-03-03 13:56:01.476018102 +0100 +@@ -203,6 +203,10 @@ + #define SK_ARM_HAS_CRC32 + #endif + ++#if defined(__aarch64__) ++ #undef SK_ARM_HAS_NEON ++#endif ++ + ////////////////////////////////////////////////////////////////////// + + #if !defined(SKIA_IMPLEMENTATION) diff --git a/rhbz-1173156.patch b/rhbz-1173156.patch new file mode 100644 index 0000000000000000000000000000000000000000..5cb47322d23cd1857350cf4546e2d0e48952f6b6 --- /dev/null +++ b/rhbz-1173156.patch @@ -0,0 +1,12 @@ +diff -up mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp.old mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp +--- mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp.old 2014-11-25 12:23:22.000000000 +0100 ++++ mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp 2014-12-23 15:26:36.606674625 +0100 +@@ -174,7 +174,7 @@ nsAuthSambaNTLM::SpawnNTLMAuthHelper() + return NS_ERROR_FAILURE; + + const char* const args[] = { +- "ntlm_auth", ++ "/usr/bin/ntlm_auth", + "--helper-protocol", "ntlmssp-client-1", + "--use-cached-creds", + "--username", username, diff --git a/rhbz-1354671.patch b/rhbz-1354671.patch new file mode 100644 index 0000000000000000000000000000000000000000..6ee89b775c3ebbae45ebbda75c7491311fa01ec1 --- /dev/null +++ b/rhbz-1354671.patch @@ -0,0 +1,12 @@ +diff -up firefox-53.0/layout/base/nsIPresShell.h.1354671 firefox-53.0/layout/base/nsIPresShell.h +--- firefox-53.0/layout/base/nsIPresShell.h.1354671 2017-04-27 13:07:43.808653320 +0200 ++++ firefox-53.0/layout/base/nsIPresShell.h 2017-04-27 13:09:40.404427641 +0200 +@@ -212,7 +212,7 @@ public: + * to the same aSize value. AllocateFrame is infallible and will abort + * on out-of-memory. + */ +- void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) ++ void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) + { + void* result = mFrameArena.AllocateByFrameID(aID, aSize); + RecordAlloc(result);