MozillaFirefox/MozillaFirefox.spec
branchfirefox87
changeset 1156 c3d884659acf
parent 1155 b8c834aafde2
child 1157 57fc0524b50c
equal deleted inserted replaced
1155:b8c834aafde2 1156:c3d884659acf
    42 
    42 
    43 # PGO builds do not work in TW currently (bmo#1680306)
    43 # PGO builds do not work in TW currently (bmo#1680306)
    44 %define do_profiling   0
    44 %define do_profiling   0
    45 
    45 
    46 # upstream default is clang (to use gcc for large parts set to 0)
    46 # upstream default is clang (to use gcc for large parts set to 0)
    47 %define clang_build 0
    47 %define clang_build    1
       
    48 %if 0%{?is_opensuse} && 0%{?suse_version} >= 1550
       
    49 %ifarch x86_64
       
    50 # on Tumbleweed/x86_64 this does not work due to undefined
       
    51 #  references to `__rust_probestack'
       
    52 %define clang_build    0
       
    53 %endif
       
    54 %endif
    48 
    55 
    49 # PIE, full relro
    56 # PIE, full relro
    50 %define build_hardened 1
    57 %define build_hardened 1
    51 
    58 
    52 %bcond_with only_print_mozconfig
    59 %bcond_with only_print_mozconfig
       
    60 
       
    61 # define if ccache should be used or not
       
    62 %define useccache     1
    53 
    63 
    54 # Firefox only supports i686
    64 # Firefox only supports i686
    55 %ifarch %ix86
    65 %ifarch %ix86
    56 ExclusiveArch:  i586 i686
    66 ExclusiveArch:  i586 i686
    57 BuildArch:      i686
    67 BuildArch:      i686
    94 BuildRequires:  gcc9-c++
   104 BuildRequires:  gcc9-c++
    95 %else
   105 %else
    96 BuildRequires:  gcc-c++
   106 BuildRequires:  gcc-c++
    97 %endif
   107 %endif
    98 BuildRequires:  cargo >= 1.47
   108 BuildRequires:  cargo >= 1.47
       
   109 %if 0%{useccache} != 0
    99 BuildRequires:  ccache
   110 BuildRequires:  ccache
       
   111 %endif
   100 BuildRequires:  libXcomposite-devel
   112 BuildRequires:  libXcomposite-devel
   101 BuildRequires:  libcurl-devel
   113 BuildRequires:  libcurl-devel
   102 BuildRequires:  libidl-devel
   114 BuildRequires:  libidl-devel
   103 BuildRequires:  libiw-devel
   115 BuildRequires:  libiw-devel
   104 BuildRequires:  libproxy-devel
   116 BuildRequires:  libproxy-devel
   453 ac_add_options --disable-elf-hack
   465 ac_add_options --disable-elf-hack
   454 %endif
   466 %endif
   455 #%endif
   467 #%endif
   456 ac_add_options --with-system-nspr
   468 ac_add_options --with-system-nspr
   457 ac_add_options --with-system-nss
   469 ac_add_options --with-system-nss
       
   470 %if 0%{useccache} != 0
   458 ac_add_options --with-ccache
   471 ac_add_options --with-ccache
       
   472 %endif
   459 %if %{localize}
   473 %if %{localize}
   460 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
   474 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
   461 %endif
   475 %endif
   462 #ac_add_options --with-system-jpeg    # libjpeg-turbo is used internally
   476 #ac_add_options --with-system-jpeg    # libjpeg-turbo is used internally
   463 #ac_add_options --with-system-png     # doesn't work because of missing APNG support
   477 #ac_add_options --with-system-png     # doesn't work because of missing APNG support
   503 %endif
   517 %endif
   504 %endif
   518 %endif
   505 %endif
   519 %endif
   506 EOF
   520 EOF
   507 %if !%{with only_print_mozconfig}
   521 %if !%{with only_print_mozconfig}
       
   522 %if 0%{useccache} != 0
   508 ccache -s
   523 ccache -s
       
   524 %endif
   509 %if 0%{?do_profiling}
   525 %if 0%{?do_profiling}
   510 xvfb-run --server-args="-screen 0 1920x1080x24" \
   526 xvfb-run --server-args="-screen 0 1920x1080x24" \
   511 %endif
   527 %endif
   512 ./mach build -v
   528 ./mach build -v
   513 
   529 
   558         echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi \
   574         echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi \
   559             >> %{_tmppath}/translations.$_l10ntarget
   575             >> %{_tmppath}/translations.$_l10ntarget
   560 ' -- {}
   576 ' -- {}
   561 %endif
   577 %endif
   562 
   578 
       
   579 %if 0%{useccache} != 0
   563 ccache -s
   580 ccache -s
       
   581 %endif
   564 %endif
   582 %endif
   565 
   583 
   566 %install
   584 %install
   567 cd $RPM_BUILD_DIR/obj
   585 cd $RPM_BUILD_DIR/obj
   568 source %{SOURCE4}
   586 source %{SOURCE4}