From 1b7ab3e92c26c775198d989a8f17b989f57ae141 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Oct 2012 12:50:00 +0200 Subject: [PATCH] added system nss switch --- thunderbird-mozconfig | 2 -- thunderbird.spec | 24 +++++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/thunderbird-mozconfig b/thunderbird-mozconfig index 88c79fd..ab3b28c 100644 --- a/thunderbird-mozconfig +++ b/thunderbird-mozconfig @@ -7,8 +7,6 @@ mk_add_options AUTOCONF=autoconf-2.13 ac_add_options --prefix="$PREFIX" ac_add_options --libdir="$LIBDIR" -ac_add_options --with-system-nspr -ac_add_options --with-system-nss ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-libvpx diff --git a/thunderbird.spec b/thunderbird.spec index 54996dc..a61f627 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -1,3 +1,6 @@ +# Use system nspr/nss? +%define system_nss 1 + # Build as a debug package? %define debug_build 0 @@ -9,11 +12,15 @@ %define build_langpacks 1 +%if %{?system_nss} %define nspr_version 4.9 %define nss_version 3.13.3 +%endif %define cairo_version 1.8.8 %define freetype_version 2.1.9 +%if %{?system_sqlite} %define sqlite_version 3.7.10 +%endif %define libnotify_version 0.4 %global libvpx_version 1.0.0 %define _default_patch_fuzz 2 @@ -78,9 +85,11 @@ Patch301: rhbz-855923.patch %endif -BuildRequires: nss-static +%if %{?system_nss} +BuildRequires: nss-static >= %{nss_version} BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} +%endif BuildRequires: cairo-devel >= %{cairo_version} BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: libpng-devel @@ -110,8 +119,10 @@ BuildRequires: libcurl-devel BuildRequires: mesa-libGL-devel BuildRequires: libvpx-devel >= %{libvpx_version} Requires: mozilla-filesystem +%if %{?system_nss} Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} +%endif %if %{?system_sqlite} Requires: sqlite >= %{sqlite_version} %endif @@ -176,6 +187,14 @@ cd .. %{__cat} %{SOURCE13} >> .mozconfig %endif +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +%else +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig +%endif + # s390(x) fails to start with jemalloc enabled %ifarch s390 s390x echo "ac_add_options --disable-jemalloc" >> .mozconfig @@ -393,6 +412,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif +%if !%{?system_nss} +%{mozappdir}/*.chk +%endif %exclude %{_datadir}/idl/%{name}-%{version} %exclude %{_includedir}/%{name}-%{version} %{mozappdir}/chrome.manifest