90 %if 0%{?suse_version} <= 1320 |
90 %if 0%{?suse_version} <= 1320 |
91 BuildRequires: gcc9-c++ |
91 BuildRequires: gcc9-c++ |
92 %else |
92 %else |
93 BuildRequires: gcc-c++ |
93 BuildRequires: gcc-c++ |
94 %endif |
94 %endif |
95 BuildRequires: cargo >= 1.43 |
95 BuildRequires: cargo >= 1.44 |
96 BuildRequires: ccache |
96 BuildRequires: ccache |
97 BuildRequires: libXcomposite-devel |
97 BuildRequires: libXcomposite-devel |
98 BuildRequires: libcurl-devel |
98 BuildRequires: libcurl-devel |
99 BuildRequires: libidl-devel |
99 BuildRequires: libidl-devel |
100 BuildRequires: libiw-devel |
100 BuildRequires: libiw-devel |
101 BuildRequires: libproxy-devel |
101 BuildRequires: libproxy-devel |
102 BuildRequires: makeinfo |
102 BuildRequires: makeinfo |
103 BuildRequires: mozilla-nspr-devel >= 4.29 |
103 BuildRequires: mozilla-nspr-devel >= 4.29 |
104 BuildRequires: mozilla-nss-devel >= 3.58 |
104 BuildRequires: mozilla-nss-devel >= 3.59 |
105 BuildRequires: nasm >= 2.14 |
105 BuildRequires: nasm >= 2.14 |
106 BuildRequires: nodejs10 >= 10.22.1 |
106 BuildRequires: nodejs10 >= 10.22.1 |
107 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
107 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
108 BuildRequires: python-libxml2 |
108 BuildRequires: python-libxml2 |
109 BuildRequires: python36 |
109 BuildRequires: python36 |
110 %else |
110 %else |
111 BuildRequires: python3 >= 3.5 |
111 BuildRequires: python3 >= 3.5 |
112 BuildRequires: python3-devel |
112 BuildRequires: python3-devel |
113 %endif |
113 %endif |
114 BuildRequires: rust >= 1.43 |
114 BuildRequires: rust >= 1.44 |
115 BuildRequires: rust-cbindgen >= 0.14.3 |
115 BuildRequires: rust-cbindgen >= 0.15.0 |
116 BuildRequires: unzip |
116 BuildRequires: unzip |
117 BuildRequires: update-desktop-files |
117 BuildRequires: update-desktop-files |
118 BuildRequires: xorg-x11-libXt-devel |
118 BuildRequires: xorg-x11-libXt-devel |
119 %if 0%{?do_profiling} |
119 %if 0%{?do_profiling} |
120 BuildRequires: xvfb-run |
120 BuildRequires: xvfb-run |
193 Patch4: mozilla-aarch64-startup-crash.patch |
193 Patch4: mozilla-aarch64-startup-crash.patch |
194 Patch6: mozilla-sandbox-fips.patch |
194 Patch6: mozilla-sandbox-fips.patch |
195 Patch7: mozilla-fix-aarch64-libopus.patch |
195 Patch7: mozilla-fix-aarch64-libopus.patch |
196 Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
196 Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
197 Patch9: mozilla-s390-context.patch |
197 Patch9: mozilla-s390-context.patch |
|
198 Patch10: mozilla-pgo.patch |
198 Patch11: mozilla-reduce-rust-debuginfo.patch |
199 Patch11: mozilla-reduce-rust-debuginfo.patch |
199 Patch13: mozilla-bmo1005535.patch |
200 Patch13: mozilla-bmo1005535.patch |
200 Patch14: mozilla-bmo1568145.patch |
201 Patch14: mozilla-bmo1568145.patch |
201 Patch15: mozilla-bmo1504834-part1.patch |
202 Patch15: mozilla-bmo1504834-part1.patch |
202 Patch16: mozilla-bmo1504834-part2.patch |
203 Patch16: mozilla-bmo1504834-part2.patch |
210 Patch24: mozilla-bmo1602730.patch |
211 Patch24: mozilla-bmo1602730.patch |
211 Patch25: mozilla-bmo998749.patch |
212 Patch25: mozilla-bmo998749.patch |
212 Patch26: mozilla-bmo1626236.patch |
213 Patch26: mozilla-bmo1626236.patch |
213 Patch27: mozilla-s390x-skia-gradient.patch |
214 Patch27: mozilla-s390x-skia-gradient.patch |
214 Patch28: mozilla-libavcodec58_91.patch |
215 Patch28: mozilla-libavcodec58_91.patch |
215 Patch29: revert-795c8762b16b.patch |
|
216 # Firefox/browser |
216 # Firefox/browser |
217 Patch101: firefox-kde.patch |
217 Patch101: firefox-kde.patch |
218 Patch102: firefox-branded-icons.patch |
218 Patch102: firefox-branded-icons.patch |
219 %endif |
219 %endif |
220 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
220 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
534 %endif |
534 %endif |
535 ./mach build -v |
535 ./mach build -v |
536 |
536 |
537 # build additional locales |
537 # build additional locales |
538 %if %localize |
538 %if %localize |
539 mkdir -p %{buildroot}%{progdir}/browser/extensions |
|
540 truncate -s 0 %{_tmppath}/translations.{common,other} |
539 truncate -s 0 %{_tmppath}/translations.{common,other} |
541 # langpack-build can not be done in parallel easily (see https://bugzilla.mozilla.org/show_bug.cgi?id=1660943) |
540 # langpack-build can not be done in parallel easily (see https://bugzilla.mozilla.org/show_bug.cgi?id=1660943) |
542 # Therefore, we have to have a separate obj-dir for each language |
541 # Therefore, we have to have a separate obj-dir for each language |
543 # We do this, by creating a mozconfig-template with the necessary switches |
542 # We do this, by creating a mozconfig-template with the necessary switches |
544 # and a placeholder obj-dir, which gets copied and modified for each language |
543 # and a placeholder obj-dir, which gets copied and modified for each language |
560 %ifarch %ix86 |
559 %ifarch %ix86 |
561 %define njobs 1 |
560 %define njobs 1 |
562 %else |
561 %else |
563 %define njobs 0%{?jobs:%jobs} |
562 %define njobs 0%{?jobs:%jobs} |
564 %endif |
563 %endif |
|
564 mkdir -p $RPM_BUILD_DIR/langpacks_artifacts/ |
565 sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ |
565 sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ |
566 | xargs -n 1 %{?njobs:-P %njobs} -I {} /bin/sh -c ' |
566 | xargs -n 1 %{?njobs:-P %njobs} -I {} /bin/sh -c ' |
567 locale=$1 |
567 locale=$1 |
568 cp ${MOZCONFIG}_LANG ${MOZCONFIG}_$locale |
568 cp ${MOZCONFIG}_LANG ${MOZCONFIG}_$locale |
569 sed -i "s|obj_LANG|obj_$locale|" ${MOZCONFIG}_$locale |
569 sed -i "s|obj_LANG|obj_$locale|" ${MOZCONFIG}_$locale |
570 export MOZCONFIG=${MOZCONFIG}_$locale |
570 export MOZCONFIG=${MOZCONFIG}_$locale |
571 # nsinstall is needed for langpack-build. It is already built by `./mach build`, but building it again is very fast |
571 # nsinstall is needed for langpack-build. It is already built by `./mach build`, but building it again is very fast |
572 ./mach build config/nsinstall langpack-$locale |
572 ./mach build config/nsinstall langpack-$locale |
573 cp -L ../obj_$locale/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \ |
573 cp -L ../obj_$locale/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \ |
574 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi |
574 $RPM_BUILD_DIR/langpacks_artifacts/langpack-$locale@firefox.mozilla.org.xpi |
575 # remove prefs, profile defaults, and hyphenation from langpack |
|
576 #rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
|
577 #rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
|
578 # check against the fixed common list and sort into the right filelist |
575 # check against the fixed common list and sort into the right filelist |
579 _matched=0 |
576 _matched=0 |
580 for _match in ar ca cs da de el en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do |
577 for _match in ar ca cs da de el en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do |
581 [ "$_match" = "$locale" ] && _matched=1 |
578 [ "$_match" = "$locale" ] && _matched=1 |
582 done |
579 done |
602 #DEBUG (break the build if searchplugins are missing / temporary) |
599 #DEBUG (break the build if searchplugins are missing / temporary) |
603 grep amazondotcom dist/firefox/browser/omni.ja |
600 grep amazondotcom dist/firefox/browser/omni.ja |
604 # copy tree into RPM_BUILD_ROOT |
601 # copy tree into RPM_BUILD_ROOT |
605 mkdir -p %{buildroot}%{progdir} |
602 mkdir -p %{buildroot}%{progdir} |
606 cp -rf $RPM_BUILD_DIR/obj/dist/%{srcname}/* %{buildroot}%{progdir} |
603 cp -rf $RPM_BUILD_DIR/obj/dist/%{srcname}/* %{buildroot}%{progdir} |
|
604 mkdir -p %{buildroot}%{progdir}/browser/extensions |
|
605 cp -rf $RPM_BUILD_DIR/langpacks_artifacts/* %{buildroot}%{progdir}/browser/extensions/ |
607 mkdir -p %{buildroot}%{progdir}/distribution/extensions |
606 mkdir -p %{buildroot}%{progdir}/distribution/extensions |
608 mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/ |
607 mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/ |
609 # renaming executables (for regular vs. ESR) |
608 # renaming executables (for regular vs. ESR) |
610 %if "%{srcname}" != "%{progname}" |
609 %if "%{srcname}" != "%{progname}" |
611 mv %{buildroot}%{progdir}/%{srcname} %{buildroot}%{progdir}/%{progname} |
610 mv %{buildroot}%{progdir}/%{srcname} %{buildroot}%{progdir}/%{progname} |