MozillaFirefox/MozillaFirefox.spec
branchfirefox116
changeset 1192 7612b8d8c46f
parent 1191 37e065158be7
child 1193 16de98d33e97
equal deleted inserted replaced
1191:37e065158be7 1192:7612b8d8c46f
    27 # orig_version 70.0
    27 # orig_version 70.0
    28 # orig_suffix b3
    28 # orig_suffix b3
    29 # major 69
    29 # major 69
    30 # mainver %%major.99
    30 # mainver %%major.99
    31 %define major          116
    31 %define major          116
    32 %define mainver        %major.0
    32 %define mainver        %major.0.3
    33 %define orig_version   116.0
    33 %define orig_version   116.0.3
    34 %define orig_suffix    %{nil}
    34 %define orig_suffix    %{nil}
    35 %define update_channel release
    35 %define update_channel release
    36 %define branding       1
    36 %define branding       1
    37 %define devpkg         1
    37 %define devpkg         1
    38 
    38 
    59 ExclusiveArch:  i586 i686
    59 ExclusiveArch:  i586 i686
    60 BuildArch:      i686
    60 BuildArch:      i686
    61 %{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}
    62 %endif
    62 %endif
    63 %endif
    63 %endif
    64 #%%{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) }
    64 %{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) }
    65 
    65 
    66 # general build definitions
    66 # general build definitions
    67 %define progname firefox
    67 %define progname firefox
    68 %define appname  Firefox
    68 %define appname  Firefox
    69 %define pkgname  MozillaFirefox
    69 %define pkgname  MozillaFirefox
    95 BuildRequires:  autoconf213
    95 BuildRequires:  autoconf213
    96 BuildRequires:  dbus-1-glib-devel
    96 BuildRequires:  dbus-1-glib-devel
    97 BuildRequires:  dejavu-fonts
    97 BuildRequires:  dejavu-fonts
    98 BuildRequires:  fdupes
    98 BuildRequires:  fdupes
    99 BuildRequires:  memory-constraints
    99 BuildRequires:  memory-constraints
   100 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150500
   100 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600
   101 BuildRequires:  gcc12
   101 BuildRequires:  gcc12
   102 BuildRequires:  gcc12-c++
   102 BuildRequires:  gcc12-c++
   103 %else
   103 %else
   104 BuildRequires:  gcc-c++
   104 BuildRequires:  gcc-c++
   105 %endif
   105 %endif
   112 BuildRequires:  libcurl-devel
   112 BuildRequires:  libcurl-devel
   113 BuildRequires:  libiw-devel
   113 BuildRequires:  libiw-devel
   114 BuildRequires:  libproxy-devel
   114 BuildRequires:  libproxy-devel
   115 BuildRequires:  makeinfo
   115 BuildRequires:  makeinfo
   116 BuildRequires:  mozilla-nspr-devel >= 4.35
   116 BuildRequires:  mozilla-nspr-devel >= 4.35
   117 BuildRequires:  mozilla-nss-devel >= 3.90
   117 BuildRequires:  mozilla-nss-devel >= 3.91
   118 BuildRequires:  nasm >= 2.14
   118 BuildRequires:  nasm >= 2.14
   119 BuildRequires:  nodejs >= 12.22.12
   119 BuildRequires:  nodejs >= 12.22.12
   120 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
   120 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
   121 BuildRequires:  libXtst-devel
   121 BuildRequires:  libXtst-devel
   122 BuildRequires:  python-libxml2
   122 BuildRequires:  python-libxml2
   123 BuildRequires:  python39
   123 BuildRequires:  python39
   124 BuildRequires:  python39-curses
   124 BuildRequires:  python39-curses
   125 BuildRequires:  python39-devel
   125 BuildRequires:  python39-devel
   126 %else
   126 %else
   127 %if 0%{?sle_version} >= 150000 && 0%{?sle_version} <= 150500
   127 %if 0%{?sle_version} >= 150000 && 0%{?sle_version} <= 150600
   128 BuildRequires:  python39
   128 BuildRequires:  python39
   129 BuildRequires:  python39-curses
   129 BuildRequires:  python39-curses
   130 BuildRequires:  python39-devel
   130 BuildRequires:  python39-devel
   131 %else
   131 %else
   132 BuildRequires:  python3 >= 3.7
   132 BuildRequires:  python3 >= 3.7
   217 Patch7:         mozilla-pgo.patch
   217 Patch7:         mozilla-pgo.patch
   218 Patch8:         mozilla-reduce-rust-debuginfo.patch
   218 Patch8:         mozilla-reduce-rust-debuginfo.patch
   219 Patch10:        mozilla-bmo1504834-part1.patch
   219 Patch10:        mozilla-bmo1504834-part1.patch
   220 Patch11:        mozilla-bmo1504834-part3.patch
   220 Patch11:        mozilla-bmo1504834-part3.patch
   221 Patch12:        mozilla-bmo1512162.patch
   221 Patch12:        mozilla-bmo1512162.patch
   222 #Patch13:        mozilla-fix-top-level-asm.patch
       
   223 Patch14:        mozilla-bmo849632.patch
   222 Patch14:        mozilla-bmo849632.patch
   224 Patch15:        mozilla-bmo998749.patch
   223 Patch15:        mozilla-bmo998749.patch
   225 Patch17:        mozilla-libavcodec58_91.patch
   224 Patch17:        mozilla-libavcodec58_91.patch
   226 Patch18:        mozilla-silence-no-return-type.patch
   225 Patch18:        mozilla-silence-no-return-type.patch
   227 Patch19:        mozilla-bmo531915.patch
   226 Patch19:        mozilla-bmo531915.patch
   228 Patch20:        one_swizzle_to_rule_them_all.patch
   227 Patch20:        one_swizzle_to_rule_them_all.patch
   229 Patch21:        svg-rendering.patch
   228 Patch21:        svg-rendering.patch
   230 Patch22:        mozilla-partial-revert-1768632.patch
   229 Patch22:        mozilla-partial-revert-1768632.patch
   231 Patch23:        mozilla-bmo1775202.patch
   230 Patch23:        mozilla-rust-disable-future-incompat.patch
   232 Patch24:        mozilla-rust-disable-future-incompat.patch
       
   233 # Firefox/browser
   231 # Firefox/browser
   234 Patch101:       firefox-kde.patch
   232 Patch101:       firefox-kde.patch
   235 Patch102:       firefox-branded-icons.patch
   233 Patch102:       firefox-branded-icons.patch
   236 %endif
   234 %endif
   237 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   235 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   246 # addon leads to startup crash (bnc#908892)
   244 # addon leads to startup crash (bnc#908892)
   247 Obsoletes:      tracker-miner-firefox < 0.15
   245 Obsoletes:      tracker-miner-firefox < 0.15
   248 %if 0%{?devpkg} == 0
   246 %if 0%{?devpkg} == 0
   249 Obsoletes:      %{name}-devel < %{version}
   247 Obsoletes:      %{name}-devel < %{version}
   250 %endif
   248 %endif
   251 ExcludeArch:    armv6l armv6hl ppc ppc64 ppc64le
   249 ExcludeArch:    armv6l armv6hl ppc ppc64
   252 
   250 
   253 %description
   251 %description
   254 Mozilla Firefox is a standalone web browser, designed for standards
   252 Mozilla Firefox is a standalone web browser, designed for standards
   255 compliance and performance.  Its functionality can be enhanced via a
   253 compliance and performance.  Its functionality can be enhanced via a
   256 plethora of extensions.
   254 plethora of extensions.
   373 export MOZILLA_OFFICIAL=1
   371 export MOZILLA_OFFICIAL=1
   374 export BUILD_OFFICIAL=1
   372 export BUILD_OFFICIAL=1
   375 export MOZ_TELEMETRY_REPORTING=1
   373 export MOZ_TELEMETRY_REPORTING=1
   376 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
   374 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
   377 export CFLAGS="%{optflags}"
   375 export CFLAGS="%{optflags}"
   378 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150500
   376 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600
   379 export CC=gcc-12
   377 export CC=gcc-12
   380 export CXX=g++-12
   378 export CXX=g++-12
   381 %else
   379 %else
   382 %if 0%{?clang_build} == 0
   380 %if 0%{?clang_build} == 0
   383 export CC=gcc
   381 export CC=gcc
   384 export CXX=g++
   382 export CXX=g++
   385 %if 0%{?gcc_version:%{gcc_version}} >= 12
       
   386 export CFLAGS="\$CFLAGS -fimplicit-constexpr"
       
   387 %endif
       
   388 %endif
   383 %endif
   389 %endif
   384 %endif
   390 %ifarch %arm %ix86
   385 %ifarch %arm %ix86
       
   386 ### NOTE: these sections are not required anymore. Alson --no-keep-memory + -Wl,-z,pack-relative-relocs causes
       
   387 ### ld to go OOM (https://sourceware.org/bugzilla/show_bug.cgi?id=30756)
   391 # Limit RAM usage during link
   388 # Limit RAM usage during link
   392 export LDFLAGS="\$LDFLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
   389 # export LDFLAGS="\$LDFLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,--no-map-whole-files -Wl,--hash-size=31"
       
   390 #
   393 # A lie to prevent -Wl,--gc-sections being set which requires more memory than 32bit can offer
   391 # A lie to prevent -Wl,--gc-sections being set which requires more memory than 32bit can offer
   394 export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
   392 #export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
   395 %endif
   393 %endif
   396 export LDFLAGS="\$LDFLAGS -fPIC -Wl,-z,relro,-z,now"
   394 export LDFLAGS="\$LDFLAGS -fPIC -Wl,-z,relro,-z,now"
   397 %ifarch ppc64 ppc64le
   395 %ifarch ppc64 ppc64le
   398 %if 0%{?clang_build} == 0
       
   399 #export CFLAGS="\$CFLAGS -mminimal-toc"
       
   400 %endif
       
   401 %endif
   396 %endif
   402 %ifarch %ix86
   397 %ifarch %ix86
   403 # Not enough memory on 32-bit systems, reduce debug info.
   398 # Not enough memory on 32-bit systems, reduce debug info.
   404 export CFLAGS="\$CFLAGS -g1"
   399 export CFLAGS="\$CFLAGS -g1"
   405 %endif
   400 %endif
   432 %endif
   427 %endif
   433 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
   428 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
   434 %ifarch %ix86 %arm
   429 %ifarch %ix86 %arm
   435 ac_add_options --disable-debug-symbols
   430 ac_add_options --disable-debug-symbols
   436 %else
   431 %else
   437 ac_add_options --enable-debug-symbols=-g1
   432 ac_add_options --enable-debug-symbols=-g0
   438 %endif
   433 %endif
   439 ac_add_options --disable-install-strip
   434 ac_add_options --disable-install-strip
   440 # building with elf-hack started to fail everywhere with FF73
   435 %ifarch %ix86 %arm
   441 #%%if 0%%{?suse_version} > 1549
   436 # OOM on 32-bit when ld passed -Wl,-z,pack-relative-relocs
   442 %ifarch %arm %ix86 x86_64
   437 # ac_add_options --enable-elf-hack
   443 ac_add_options --disable-elf-hack
   438 %endif
   444 %endif
       
   445 #%%endif
       
   446 ac_add_options --with-system-nspr
   439 ac_add_options --with-system-nspr
   447 ac_add_options --with-system-nss
   440 ac_add_options --with-system-nss
   448 %if 0%{useccache} != 0
   441 %if 0%{useccache} != 0
   449 ac_add_options --with-ccache
   442 ac_add_options --with-ccache
   450 %endif
   443 %endif
   535 %if %branding
   528 %if %branding
   536 ac_add_options --enable-official-branding
   529 ac_add_options --enable-official-branding
   537 %endif
   530 %endif
   538 EOF
   531 EOF
   539 
   532 
   540 %ifarch %ix86
       
   541 %define njobs 1
       
   542 %else
       
   543 %define njobs 0%{?jobs:%jobs}
   533 %define njobs 0%{?jobs:%jobs}
   544 %endif
       
   545 mkdir -p $RPM_BUILD_DIR/langpacks_artifacts/
   534 mkdir -p $RPM_BUILD_DIR/langpacks_artifacts/
   546 sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \
   535 sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \
   547     | xargs -n 1 %{?njobs:-P %njobs} -I {} /bin/sh -c '
   536     | xargs -n 1 %{?njobs:-P %njobs} -I {} /bin/sh -c '
   548         locale=$1
   537         locale=$1
   549         cp ${MOZCONFIG}_LANG ${MOZCONFIG}_$locale
   538         cp ${MOZCONFIG}_LANG ${MOZCONFIG}_$locale
   725 %{progdir}/application.ini
   714 %{progdir}/application.ini
   726 %{progdir}/dependentlibs.list
   715 %{progdir}/dependentlibs.list
   727 %{progdir}/*.so
   716 %{progdir}/*.so
   728 %{progdir}/glxtest
   717 %{progdir}/glxtest
   729 %if 0%{wayland_supported}
   718 %if 0%{wayland_supported}
       
   719 %ifarch %{arm} aarch64 %{ix86} x86_64
   730 %{progdir}/vaapitest
   720 %{progdir}/vaapitest
       
   721 %endif
       
   722 %endif
       
   723 %ifarch aarch64 riscv64 %arm
       
   724 %{progdir}/v4l2test
   731 %endif
   725 %endif
   732 %{progdir}/omni.ja
   726 %{progdir}/omni.ja
   733 %{progdir}/fonts/
   727 %{progdir}/fonts/
   734 %{progdir}/pingsender
   728 %{progdir}/pingsender
   735 %{progdir}/platform.ini
   729 %{progdir}/platform.ini