[packages/icedove] - fix building with gcc 6 - rel 6

baggins baggins at pld-linux.org
Sun Mar 19 13:22:47 CET 2017


commit 3b54e43a70e24ac8d6113c8bb05dcaf154d14742
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Mar 19 13:22:26 2017 +0100

    - fix building with gcc 6
    - rel 6

 gcc6.patch       | 24 ++++++++++++++++++++++++
 icedove.spec     | 18 ++++++++++++------
 sed-syntax.patch | 22 ++++++++++++++++++++++
 3 files changed, 58 insertions(+), 6 deletions(-)
---
diff --git a/icedove.spec b/icedove.spec
index c90efbd..63b2081 100644
--- a/icedove.spec
+++ b/icedove.spec
@@ -1,5 +1,6 @@
 # TODO:
 # - build with system mozldap
+# - update to current version and debrand, see thunderbird.spec
 #
 # Conditional builds
 %bcond_with	gtk3		# GTK+ 3.x instead of 2.x
@@ -9,6 +10,7 @@
 %bcond_with	crashreporter	# report crashes to crash-stats.mozilla.com
 # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
 %bcond_with	shared_js	# shared libmozjs library [broken]
+%bcond_with	system_icu	# build with system ICU (disabled due to crashes with system icu 58.2)
 
 %if 0%{?_enable_debug_packages} != 1
 %undefine	crashreporter
@@ -28,7 +30,7 @@ Summary:	Icedove - email client
 Summary(pl.UTF-8):	Icedove - klient poczty
 Name:		icedove
 Version:	38.5.0
-Release:	5
+Release:	6
 License:	MPL v2.0
 Group:		X11/Applications/Mail
 Source0:	http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
@@ -46,6 +48,8 @@ Patch6:		no-subshell.patch
 Patch7:		system-virtualenv.patch
 Patch8:		enable-addons.patch
 Patch9:		bump-nss-req.patch
+Patch10:	gcc6.patch
+Patch11:	sed-syntax.patch
 URL:		http://www.pld-linux.org/Packages/Icedove
 BuildRequires:	GConf2-devel >= 1.2.1
 BuildRequires:	alsa-lib-devel
@@ -62,7 +66,7 @@ BuildRequires:	gstreamer0.10-plugins-base-devel
 BuildRequires:	hunspell-devel
 BuildRequires:	libIDL-devel >= 0.8.0
 BuildRequires:	libevent-devel
-BuildRequires:	libicu-devel >= 50.1
+%{?with_system_icu:BuildRequires:	libicu-devel >= 50.1}
 BuildRequires:	libiw-devel
 # requires libjpeg-turbo implementing at least libjpeg 6b API
 BuildRequires:	libjpeg-devel >= 6b
@@ -159,6 +163,8 @@ cd mozilla
 %patch7 -p1
 %patch8 -p1
 %patch9 -p2
+%patch10 -p1
+%patch11 -p1
 
 %build
 cd mozilla
@@ -169,8 +175,8 @@ cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
 cat << EOF > .mozconfig
 mk_add_options MOZ_OBJDIR=%{objdir}
 
-export CFLAGS="%{rpmcflags}"
-export CXXFLAGS="%{rpmcflags}"
+export CFLAGS="%{rpmcflags} -fno-schedule-insns2 -fno-delete-null-pointer-checks"
+export CXXFLAGS="%{rpmcxxflags} -fno-schedule-insns2 -fno-delete-null-pointer-checks"
 
 %if %{with crashreporter}
 export MOZ_DEBUG_SYMBOLS=1
@@ -200,7 +206,7 @@ ac_add_options --enable-crash-on-assert
 ac_add_options --disable-debug
 ac_add_options --disable-debug-modules
 ac_add_options --disable-logging
-ac_add_options --enable-optimize="%{rpmcflags} -Os"
+ac_add_options --enable-optimize="%{rpmcflags} -Os -fno-schedule-insns2 -fno-delete-null-pointer-checks"
 %endif
 ac_add_options --disable-strip
 ac_add_options --disable-strip-libs
@@ -257,7 +263,7 @@ ac_add_options --with-system-libxul
 ac_add_options --with-pthreads
 ac_add_options --with-system-bz2
 ac_add_options --with-system-ffi
-ac_add_options --with-system-icu
+ac_add_options --with%{!?with_system_icu:out}-system-icu
 ac_add_options --with-system-jpeg
 ac_add_options --with-system-libevent
 ac_add_options --with-system-libvpx
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644
index 0000000..4508039
--- /dev/null
+++ b/gcc6.patch
@@ -0,0 +1,24 @@
+--- icedove-38.5.0/mozilla/nsprpub/config/make-system-wrappers.pl.back	2016-01-24 00:23:49.000000000 +0100
++++ icedove-38.5.0/mozilla/nsprpub/config/make-system-wrappers.pl	2016-02-02 14:58:45.064112655 +0100
+@@ -19,7 +19,9 @@ while (<STDIN>) {
+     open OUT, ">$output_dir/$_";
+     print OUT "#pragma GCC system_header\n";  # suppress include_next warning
+     print OUT "#pragma GCC visibility push(default)\n";
++    print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n";
+     print OUT "#include_next \<$_\>\n";
++    print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n";
+     print OUT "#pragma GCC visibility pop\n";
+     close OUT;
+ }
+--- icedove-38.5.0/mozilla/mozglue/build/arm.cpp.old	2016-02-03 10:07:29.879526500 +0100
++++ icedove-38.5.0/mozilla/mozglue/build/arm.cpp	2016-02-03 10:08:11.062697517 +0100
+@@ -104,7 +104,9 @@ check_neon(void)
+ 
+ #  elif defined(__linux__) || defined(ANDROID)
+ #    include <stdio.h>
++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #    include <stdlib.h>
++#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #    include <string.h>
+ 
+ enum{
diff --git a/sed-syntax.patch b/sed-syntax.patch
new file mode 100644
index 0000000..8208d23
--- /dev/null
+++ b/sed-syntax.patch
@@ -0,0 +1,22 @@
+--- icedove-38.5.0/mozilla/configure.orig	2015-12-21 23:33:20.000000000 +0100
++++ icedove-38.5.0/mozilla/configure	2017-03-18 19:29:05.607042728 +0100
+@@ -28736,7 +28736,7 @@
+         fi
+     fi
+ 
+-    version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
++    version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
+     if test x"$version" = x; then
+        { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
+     fi
+--- icedove-38.5.0/mozilla/js/src/configure~	2017-03-18 19:29:05.000000000 +0100
++++ icedove-38.5.0/mozilla/js/src/configure	2017-03-19 11:42:29.040055874 +0100
+@@ -15226,7 +15226,7 @@
+         fi
+     fi
+ 
+-    version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
++    version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
+     if test x"$version" = x; then
+        { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
+     fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/icedove.git/commitdiff/3b54e43a70e24ac8d6113c8bb05dcaf154d14742



More information about the pld-cvs-commit mailing list