48 %define useccache 0 |
48 %define useccache 0 |
49 |
49 |
50 # SLE-12 doesn't have this macro |
50 # SLE-12 doesn't have this macro |
51 %{!?_rpmmacrodir: %global _rpmmacrodir %{_rpmconfigdir}/macros.d} |
51 %{!?_rpmmacrodir: %global _rpmmacrodir %{_rpmconfigdir}/macros.d} |
52 |
52 |
|
53 # No i586 on SLE-12, as the rpmlints are broken and can't handle the big rpms resulting from this build. |
|
54 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
|
55 ExclusiveArch: aarch64 ppc64le x86_64 s390x |
|
56 %else |
53 # Firefox only supports i686 |
57 # Firefox only supports i686 |
54 %ifarch %ix86 |
58 %ifarch %ix86 |
55 ExclusiveArch: i586 i686 |
59 ExclusiveArch: i586 i686 |
56 BuildArch: i686 |
60 BuildArch: i686 |
57 %{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic -msse2} |
61 %{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic -msse2} |
58 %endif |
62 %endif |
59 %{expand:%%global optflags %(echo "%optflags"|sed -e s/-Werror=return-type//) } |
63 %endif |
60 %{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) } |
64 %{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) } |
61 |
65 |
62 # general build definitions |
66 # general build definitions |
63 %define progname firefox |
67 %define progname firefox |
64 %define appname Firefox |
68 %define appname Firefox |
92 BuildRequires: dbus-1-glib-devel |
96 BuildRequires: dbus-1-glib-devel |
93 BuildRequires: dejavu-fonts |
97 BuildRequires: dejavu-fonts |
94 BuildRequires: fdupes |
98 BuildRequires: fdupes |
95 BuildRequires: memory-constraints |
99 BuildRequires: memory-constraints |
96 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150500 |
100 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150500 |
97 BuildRequires: gcc11-c++ |
101 BuildRequires: gcc12 |
|
102 BuildRequires: gcc12-c++ |
98 %else |
103 %else |
99 BuildRequires: gcc-c++ |
104 BuildRequires: gcc-c++ |
100 %endif |
105 %endif |
101 %if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300 |
106 BuildRequires: cargo1.69 |
102 BuildRequires: cargo >= 1.65 |
107 BuildRequires: rust1.69 |
103 BuildRequires: rust >= 1.65 |
|
104 %else |
|
105 # Newer sle/leap/tw use parallel versioned rust releases which have |
|
106 # a different method for provides that we can use to request a |
|
107 # specific version |
|
108 # minimal requirement: |
|
109 BuildRequires: rust+cargo >= 1.65 |
|
110 # actually used upstream: |
|
111 BuildRequires: cargo1.67 |
|
112 BuildRequires: rust1.67 |
|
113 %endif |
|
114 %if 0%{useccache} != 0 |
108 %if 0%{useccache} != 0 |
115 BuildRequires: ccache |
109 BuildRequires: ccache |
116 %endif |
110 %endif |
117 BuildRequires: libXcomposite-devel |
111 BuildRequires: libXcomposite-devel |
118 BuildRequires: libcurl-devel |
112 BuildRequires: libcurl-devel |
119 BuildRequires: libiw-devel |
113 BuildRequires: libiw-devel |
120 BuildRequires: libproxy-devel |
114 BuildRequires: libproxy-devel |
121 BuildRequires: makeinfo |
115 BuildRequires: makeinfo |
122 BuildRequires: mozilla-nspr-devel >= 4.35 |
116 BuildRequires: mozilla-nspr-devel >= 4.35 |
123 BuildRequires: mozilla-nss-devel >= 3.89 |
117 BuildRequires: mozilla-nss-devel >= 3.90 |
124 BuildRequires: nasm >= 2.14 |
118 BuildRequires: nasm >= 2.14 |
125 BuildRequires: nodejs >= 10.22.1 |
119 BuildRequires: nodejs >= 12.22.12 |
126 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
120 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
|
121 BuildRequires: libXtst-devel |
127 BuildRequires: python-libxml2 |
122 BuildRequires: python-libxml2 |
128 BuildRequires: python36 |
123 BuildRequires: python39 |
|
124 BuildRequires: python39-curses |
|
125 BuildRequires: python39-devel |
129 %else |
126 %else |
130 %if 0%{?sle_version} >= 150000 && 0%{?sle_version} <= 150500 |
127 %if 0%{?sle_version} >= 150000 && 0%{?sle_version} <= 150500 |
131 BuildRequires: python39 |
128 BuildRequires: python39 |
132 BuildRequires: python39-curses |
129 BuildRequires: python39-curses |
133 BuildRequires: python39-devel |
130 BuildRequires: python39-devel |
217 Patch4: mozilla-aarch64-startup-crash.patch |
214 Patch4: mozilla-aarch64-startup-crash.patch |
218 Patch5: mozilla-fix-aarch64-libopus.patch |
215 Patch5: mozilla-fix-aarch64-libopus.patch |
219 Patch6: mozilla-s390-context.patch |
216 Patch6: mozilla-s390-context.patch |
220 Patch7: mozilla-pgo.patch |
217 Patch7: mozilla-pgo.patch |
221 Patch8: mozilla-reduce-rust-debuginfo.patch |
218 Patch8: mozilla-reduce-rust-debuginfo.patch |
222 Patch9: mozilla-bmo1005535.patch |
|
223 Patch10: mozilla-bmo1504834-part1.patch |
219 Patch10: mozilla-bmo1504834-part1.patch |
224 Patch11: mozilla-bmo1504834-part3.patch |
220 Patch11: mozilla-bmo1504834-part3.patch |
225 Patch12: mozilla-bmo1512162.patch |
221 Patch12: mozilla-bmo1512162.patch |
226 Patch13: mozilla-fix-top-level-asm.patch |
222 Patch13: mozilla-fix-top-level-asm.patch |
227 Patch14: mozilla-bmo849632.patch |
223 Patch14: mozilla-bmo849632.patch |
228 Patch15: mozilla-bmo998749.patch |
224 Patch15: mozilla-bmo998749.patch |
229 Patch16: mozilla-s390x-skia-gradient.patch |
|
230 Patch17: mozilla-libavcodec58_91.patch |
225 Patch17: mozilla-libavcodec58_91.patch |
231 Patch18: mozilla-silence-no-return-type.patch |
226 Patch18: mozilla-silence-no-return-type.patch |
232 Patch19: mozilla-bmo531915.patch |
227 Patch19: mozilla-bmo531915.patch |
233 Patch20: one_swizzle_to_rule_them_all.patch |
228 Patch20: one_swizzle_to_rule_them_all.patch |
234 Patch21: svg-rendering.patch |
229 Patch21: svg-rendering.patch |
235 Patch22: mozilla-buildfixes.patch |
230 Patch22: mozilla-partial-revert-1768632.patch |
|
231 Patch23: mozilla-bmo1775202.patch |
|
232 Patch24: mozilla-rust-disable-future-incompat.patch |
236 # Firefox/browser |
233 # Firefox/browser |
237 Patch101: firefox-kde.patch |
234 Patch101: firefox-kde.patch |
238 Patch102: firefox-branded-icons.patch |
235 Patch102: firefox-branded-icons.patch |
239 %endif |
236 %endif |
240 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
237 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
343 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{pkgname}.changes")" |
340 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{pkgname}.changes")" |
344 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
341 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
345 TIME="\"$(date -d "${modified}" "+%%R")\"" |
342 TIME="\"$(date -d "${modified}" "+%%R")\"" |
346 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
343 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
347 |
344 |
348 # SLE-12 provides python36, but that package does not provide a python3 binary |
345 # SLE-12 provides python39, but that package does not provide a python3 binary |
349 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
346 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
350 sed -i "s/python3/python36/g" configure.in |
347 #sed -i "s/python3/python3.9/g" configure.in |
351 sed -i "s/python3/python36/g" mach |
348 sed -i "s|/usr/bin/env python3|/usr/bin/env python3.9|" mach |
352 export PYTHON3=/usr/bin/python36 |
349 sed -i "s|potential_python_binary = f\"python3.{i}\"|potential_python_binary = f\"python3.9.{i}\"|" mach |
353 %endif |
350 export PYTHON3=/usr/bin/python3.9 |
354 |
351 %endif |
355 # |
352 |
356 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
353 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
357 if test "$kdehelperversion" != %{kde_helper_version}; then |
354 if test "$kdehelperversion" != %{kde_helper_version}; then |
358 echo fix kde helper version in the .spec file |
355 echo fix kde helper version in the .spec file |
359 exit 1 |
356 exit 1 |
360 fi |
357 fi |
|
358 |
361 # When doing only_print_mozconfig, this file isn't necessarily available, so skip it |
359 # When doing only_print_mozconfig, this file isn't necessarily available, so skip it |
362 cp %{SOURCE4} .obsenv.sh |
360 cp %{SOURCE4} .obsenv.sh |
363 %else |
361 %else |
364 # We need to make sure its empty |
362 # We need to make sure its empty |
365 echo "" > .obsenv.sh |
363 echo "" > .obsenv.sh |
376 export BUILD_OFFICIAL=1 |
374 export BUILD_OFFICIAL=1 |
377 export MOZ_TELEMETRY_REPORTING=1 |
375 export MOZ_TELEMETRY_REPORTING=1 |
378 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system |
376 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system |
379 export CFLAGS="%{optflags}" |
377 export CFLAGS="%{optflags}" |
380 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150500 |
378 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150500 |
381 export CC=gcc-11 |
379 export CC=gcc-12 |
|
380 export CXX=g++-12 |
382 %else |
381 %else |
383 %if 0%{?clang_build} == 0 |
382 %if 0%{?clang_build} == 0 |
384 export CC=gcc |
383 export CC=gcc |
385 export CXX=g++ |
384 export CXX=g++ |
386 %if 0%{?gcc_version:%{gcc_version}} >= 12 |
385 %if 0%{?gcc_version:%{gcc_version}} >= 12 |
395 export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes |
394 export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes |
396 %endif |
395 %endif |
397 export LDFLAGS="\$LDFLAGS -fPIC -Wl,-z,relro,-z,now" |
396 export LDFLAGS="\$LDFLAGS -fPIC -Wl,-z,relro,-z,now" |
398 %ifarch ppc64 ppc64le |
397 %ifarch ppc64 ppc64le |
399 %if 0%{?clang_build} == 0 |
398 %if 0%{?clang_build} == 0 |
400 export CFLAGS="\$CFLAGS -mminimal-toc" |
399 #export CFLAGS="\$CFLAGS -mminimal-toc" |
401 %endif |
400 %endif |
402 %endif |
401 %endif |
403 %ifarch %ix86 |
402 %ifarch %ix86 |
404 # Not enough memory on 32-bit systems, reduce debug info. |
403 # Not enough memory on 32-bit systems, reduce debug info. |
405 export CFLAGS="\$CFLAGS -g1" |
404 export CFLAGS="\$CFLAGS -g1" |
724 %{progdir}/%{progname} |
723 %{progdir}/%{progname} |
725 %{progdir}/%{progname}-bin |
724 %{progdir}/%{progname}-bin |
726 %{progdir}/application.ini |
725 %{progdir}/application.ini |
727 %{progdir}/dependentlibs.list |
726 %{progdir}/dependentlibs.list |
728 %{progdir}/*.so |
727 %{progdir}/*.so |
|
728 %{progdir}/glxtest |
|
729 %if 0%{wayland_supported} |
|
730 %{progdir}/vaapitest |
|
731 %endif |
729 %{progdir}/omni.ja |
732 %{progdir}/omni.ja |
730 %{progdir}/fonts/ |
733 %{progdir}/fonts/ |
731 %{progdir}/pingsender |
734 %{progdir}/pingsender |
732 %{progdir}/platform.ini |
735 %{progdir}/platform.ini |
733 %{progdir}/plugin-container |
736 %{progdir}/plugin-container |