1
0

Accepting request 354473 from home:olh:branches:mozilla:Factory

- Add build conditionals for valgrind and -Os
- Convert existing conditions for kde to bcond

OBS-URL: https://build.opensuse.org/request/show/354473
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=300
This commit is contained in:
Wolfgang Rosenauer 2016-01-19 10:28:29 +00:00 committed by Git OBS Bridge
parent d3c64bdb3b
commit 7116c1cc9d
2 changed files with 25 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 18 07:32:51 UTC 2016 - olaf@aepfle.de
- Add build conditionals for valgrind and -Os
- Convert existing conditions for kde to bcond
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 29 20:30:59 UTC 2015 - wr@rosenauer.org Tue Dec 29 20:30:59 UTC 2015 - wr@rosenauer.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package MozillaThunderbird # spec file for package MozillaThunderbird
# #
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# 2006-2015 Wolfgang Rosenauer <wr@rosenauer.org> # 2006-2015 Wolfgang Rosenauer <wr@rosenauer.org>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -29,7 +29,9 @@
%endif %endif
%endif %endif
%define with_kde 1 %bcond_without mozilla_tb_kde4
%bcond_with mozilla_tb_valgrind
%bcond_without mozilla_tb_optimize_for_size
Name: MozillaThunderbird Name: MozillaThunderbird
BuildRequires: Mesa-devel BuildRequires: Mesa-devel
@ -54,6 +56,9 @@ BuildRequires: xz
BuildRequires: yasm BuildRequires: yasm
BuildRequires: zip BuildRequires: zip
BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libpulse)
%if %{with mozilla_tb_valgrind}
BuildRequires: pkgconfig(valgrind)
%endif
%if %suse_version > 1210 %if %suse_version > 1210
BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) BuildRequires: pkgconfig(gstreamer-%gstreamer_ver)
BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver)
@ -74,7 +79,7 @@ Release: 0
Provides: thunderbird = %{version} Provides: thunderbird = %{version}
Provides: appdata() Provides: appdata()
Provides: appdata(thunderbird.appdata.xml) Provides: appdata(thunderbird.appdata.xml)
%if %{with_kde} %if %{with mozilla_tb_kde4}
# this is needed to match this package with the kde4 helper package without the main package # this is needed to match this package with the kde4 helper package without the main package
# having a hard requirement on the kde4 package # having a hard requirement on the kde4 package
%define kde_helper_version 6 %define kde_helper_version 6
@ -194,7 +199,7 @@ symbols meant for upload to Mozilla's crash collector database.
pushd mozilla pushd mozilla
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%if %{with_kde} %if %{with mozilla_tb_kde4}
%patch3 -p1 %patch3 -p1
%endif %endif
%patch4 -p1 %patch4 -p1
@ -212,7 +217,7 @@ DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\"" TIME="\"$(date -d "${modified}" "+%%R")\""
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
# #
%if %{with_kde} %if %{with mozilla_tb_kde4}
kdehelperversion=$(cat mozilla/toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) kdehelperversion=$(cat mozilla/toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
if test "$kdehelperversion" != %{kde_helper_version}; then if test "$kdehelperversion" != %{kde_helper_version}; then
echo fix kde helper version in the .spec file echo fix kde helper version in the .spec file
@ -226,7 +231,10 @@ export BUILD_OFFICIAL=1
%if %{update_channel} == "esr" %if %{update_channel} == "esr"
export MOZ_ESR=1 export MOZ_ESR=1
%endif %endif
export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%if %{with mozilla_tb_optimize_for_size}
export CFLAGS="$CFLAGS -Os"
%endif
%ifarch ppc64 ppc64le %ifarch ppc64 ppc64le
export CFLAGS="$CFLAGS -mminimal-toc" export CFLAGS="$CFLAGS -mminimal-toc"
%endif %endif
@ -281,6 +289,10 @@ ac_add_options --disable-crashreporter
%ifarch %arm %ifarch %arm
ac_add_options --disable-neon ac_add_options --disable-neon
%endif %endif
%if %{with mozilla_tb_valgrind}
ac_add_options --disable-jemalloc
ac_add_options --enable-valgrind
%endif
EOF EOF
make -f client.mk build make -f client.mk build
@ -291,7 +303,7 @@ make -C mail/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
mkdir -p $RPM_BUILD_ROOT%{progdir} mkdir -p $RPM_BUILD_ROOT%{progdir}
cp -rf $RPM_BUILD_DIR/obj/dist/thunderbird/* \ cp -rf $RPM_BUILD_DIR/obj/dist/thunderbird/* \
$RPM_BUILD_ROOT%{progdir} $RPM_BUILD_ROOT%{progdir}
%if %{with_kde} %if %{with mozilla_tb_kde4}
# install kde.js # install kde.js
install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{progdir}/defaults/pref/kde.js install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{progdir}/defaults/pref/kde.js
# make sure that instantApply is true by default # make sure that instantApply is true by default