MozillaFirefox/MozillaFirefox.spec
branchfirefox106
changeset 1180 d76083122710
parent 1179 c19c9e7820ef
child 1181 ba646dddffef
equal deleted inserted replaced
1179:c19c9e7820ef 1180:d76083122710
     1 #
     1 #
     2 # spec file
     2 # spec file for package MozillaFirefox
     3 #
     3 #
     4 # Copyright (c) 2022 SUSE LLC
     4 # Copyright (c) 2022 SUSE LLC
     5 #               2006-2022 Wolfgang Rosenauer <wr@rosenauer.org>
     5 #               2006-2022 Wolfgang Rosenauer <wr@rosenauer.org>
     6 #
     6 #
     7 # All modifications and additions to the file contributed by third parties
     7 # All modifications and additions to the file contributed by third parties
    26 # orig_version would be the upstream tar ball
    26 # orig_version would be the upstream tar ball
    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          105
    31 %define major          106
    32 %define mainver        %major.0.3
    32 %define mainver        %major.0.5
    33 %define orig_version   105.0.3
    33 %define orig_version   106.0.5
    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 
    52 
    52 
    53 # Firefox only supports i686
    53 # Firefox only supports i686
    54 %ifarch %ix86
    54 %ifarch %ix86
    55 ExclusiveArch:  i586 i686
    55 ExclusiveArch:  i586 i686
    56 BuildArch:      i686
    56 BuildArch:      i686
    57 %{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic}
    57 %{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic -msse2}
    58 %endif
    58 %endif
       
    59 %{expand:%%global optflags %(echo "%optflags"|sed -e s/-Werror=return-type//) }
       
    60 %{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) }
    59 
    61 
    60 # general build definitions
    62 # general build definitions
    61 %define progname firefox
    63 %define progname firefox
    62 %define appname  Firefox
    64 %define appname  Firefox
    63 %define pkgname  MozillaFirefox
    65 %define pkgname  MozillaFirefox
    95 BuildRequires:  gcc11-c++
    97 BuildRequires:  gcc11-c++
    96 %else
    98 %else
    97 BuildRequires:  gcc-c++
    99 BuildRequires:  gcc-c++
    98 %endif
   100 %endif
    99 %if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
   101 %if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
   100 BuildRequires:  cargo >= 1.59
   102 BuildRequires:  cargo >= 1.61
   101 BuildRequires:  rust >= 1.59
   103 BuildRequires:  rust >= 1.61
   102 %else
   104 %else
   103 # Newer sle/leap/tw use parallel versioned rust releases which have
   105 # Newer sle/leap/tw use parallel versioned rust releases which have
   104 # a different method for provides that we can use to request a
   106 # a different method for provides that we can use to request a
   105 # specific version
   107 # specific version
   106 # minimal requirement:
   108 # minimal requirement:
   115 BuildRequires:  libXcomposite-devel
   117 BuildRequires:  libXcomposite-devel
   116 BuildRequires:  libcurl-devel
   118 BuildRequires:  libcurl-devel
   117 BuildRequires:  libiw-devel
   119 BuildRequires:  libiw-devel
   118 BuildRequires:  libproxy-devel
   120 BuildRequires:  libproxy-devel
   119 BuildRequires:  makeinfo
   121 BuildRequires:  makeinfo
   120 BuildRequires:  mozilla-nspr-devel >= 4.34.1
   122 BuildRequires:  mozilla-nspr-devel >= 4.35
   121 BuildRequires:  mozilla-nss-devel >= 3.82
   123 BuildRequires:  mozilla-nss-devel >= 3.83
   122 BuildRequires:  nasm >= 2.14
   124 BuildRequires:  nasm >= 2.14
   123 BuildRequires:  nodejs >= 10.22.1
   125 BuildRequires:  nodejs >= 10.22.1
   124 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
   126 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
   125 BuildRequires:  python-libxml2
   127 BuildRequires:  python-libxml2
   126 BuildRequires:  python36
   128 BuildRequires:  python36
   222 Patch21:        mozilla-libavcodec58_91.patch
   224 Patch21:        mozilla-libavcodec58_91.patch
   223 Patch22:        mozilla-silence-no-return-type.patch
   225 Patch22:        mozilla-silence-no-return-type.patch
   224 Patch23:        mozilla-bmo531915.patch
   226 Patch23:        mozilla-bmo531915.patch
   225 Patch25:        one_swizzle_to_rule_them_all.patch
   227 Patch25:        one_swizzle_to_rule_them_all.patch
   226 Patch26:        svg-rendering.patch
   228 Patch26:        svg-rendering.patch
   227 Patch27:        mozilla-i686-build.patch
   229 Patch27:        mozilla-buildfixes.patch
   228 # Firefox/browser
   230 # Firefox/browser
   229 Patch101:       firefox-kde.patch
   231 Patch101:       firefox-kde.patch
   230 Patch102:       firefox-branded-icons.patch
   232 Patch102:       firefox-branded-icons.patch
   231 %endif
   233 %endif
   232 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   234 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   360 echo "" > .obsenv.sh
   362 echo "" > .obsenv.sh
   361 %endif
   363 %endif
   362 
   364 
   363 cat >> .obsenv.sh <<EOF
   365 cat >> .obsenv.sh <<EOF
   364 export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo
   366 export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo
   365 export MOZ_SOURCE_CHANGESET=$RELEASE_TAG
   367 export MOZ_SOURCE_CHANGESET=\$RELEASE_TAG
   366 export SOURCE_REPO=$RELEASE_REPO
   368 export SOURCE_REPO=\$RELEASE_REPO
   367 export source_repo=$RELEASE_REPO
   369 export source_repo=\$RELEASE_REPO
   368 export MOZ_SOURCE_REPO=$RELEASE_REPO
   370 export MOZ_SOURCE_REPO=\$RELEASE_REPO
   369 export MOZ_BUILD_DATE=$RELEASE_TIMESTAMP
   371 export MOZ_BUILD_DATE=\$RELEASE_TIMESTAMP
   370 export MOZILLA_OFFICIAL=1
   372 export MOZILLA_OFFICIAL=1
   371 export BUILD_OFFICIAL=1
   373 export BUILD_OFFICIAL=1
   372 export MOZ_TELEMETRY_REPORTING=1
   374 export MOZ_TELEMETRY_REPORTING=1
   373 export MACH_USE_SYSTEM_PYTHON=1
   375 export MACH_USE_SYSTEM_PYTHON=1
       
   376 export CFLAGS="%{optflags}"
   374 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150400
   377 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150400
   375 export CC=gcc-11
   378 export CC=gcc-11
   376 %else
   379 %else
   377 %if 0%{?clang_build} == 0
   380 %if 0%{?clang_build} == 0
   378 export CC=gcc
   381 export CC=gcc
   379 export CXX=g++
   382 export CXX=g++
   380 %if 0%{?gcc_version:%{gcc_version}} >= 12
   383 %if 0%{?gcc_version:%{gcc_version}} >= 12
   381 export CFLAGS="$CFLAGS -fimplicit-constexpr"
   384 export CFLAGS="\$CFLAGS -fimplicit-constexpr"
   382 %endif
   385 %endif
   383 %endif
   386 %endif
   384 %endif
   387 %endif
   385 %ifarch %arm %ix86
   388 %ifarch %arm %ix86
   386 # Limit RAM usage during link
   389 # Limit RAM usage during link
   387 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
   390 export LDFLAGS="\$LDFLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
   388 # 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
   389 export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
   392 export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
   390 %endif
   393 %endif
   391 export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now"
   394 export LDFLAGS="\$LDFLAGS -fPIC -Wl,-z,relro,-z,now"
   392 %ifarch ppc64 ppc64le
   395 %ifarch ppc64 ppc64le
   393 %if 0%{?clang_build} == 0
   396 %if 0%{?clang_build} == 0
   394 export CFLAGS="$CFLAGS -mminimal-toc"
   397 export CFLAGS="\$CFLAGS -mminimal-toc"
   395 %endif
   398 %endif
   396 %endif
   399 %endif
   397 export CXXFLAGS="$CFLAGS"
   400 export CXXFLAGS="\$CFLAGS"
   398 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
   401 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
   399 EOF
   402 EOF
   400 # Done with env-variables.
   403 # Done with env-variables.
   401 source ./.obsenv.sh
   404 source ./.obsenv.sh
   402 
   405