[xemacs] Add -c11 patch to fix build failure with gcc 5.0.

Jerry James jjames at fedoraproject.org
Mon Feb 9 22:22:06 UTC 2015


commit 354ce5dd825f34d9eec0d0e0197ea575fa6817ac
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Mon Feb 9 15:21:30 2015 -0700

    Add -c11 patch to fix build failure with gcc 5.0.
    
    Also:
    - Set compiling username to get reproducible builds.
    - Use license macro.

 xemacs-21.5.34-c11.patch |   33 +++++++++++++++++++++++++++++++++
 xemacs.spec              |   22 +++++++++++++++++++---
 2 files changed, 52 insertions(+), 3 deletions(-)
---
diff --git a/xemacs-21.5.34-c11.patch b/xemacs-21.5.34-c11.patch
new file mode 100644
index 0000000..fef4dd5
--- /dev/null
+++ b/xemacs-21.5.34-c11.patch
@@ -0,0 +1,33 @@
+--- src/lisp.h.orig	2014-06-05 09:02:17.000000000 -0600
++++ src/lisp.h	2015-02-09 12:30:00.000000000 -0700
+@@ -1154,6 +1154,9 @@
+ 
+ /* ------------------------ alignment definitions ------------------- */
+ 
++#if (defined (__STDC_VERSION__) && __STDC_VERSION__ < 201112L) || \
++    (defined (__cplusplus) && __cplusplus < 201103L) || \
++    (! defined (__STDC_VERSION__) && ! defined (__cplusplus))
+ /* No type has a greater alignment requirement than max_align_t.
+    (except perhaps for types we don't use, like long double) */
+ typedef union
+@@ -1163,6 +1166,7 @@
+   struct { void (*f)(void); } f;
+   struct { double d; } d;
+ } max_align_t;
++#endif
+ 
+ /* ALIGNOF returns the required alignment of a type -- i.e. a value such
+    that data of this type must begin at a memory address which is a
+@@ -1170,7 +1174,11 @@
+    as the type itself. */
+ 
+ #ifndef ALIGNOF
+-# if defined (__GNUC__) && (__GNUC__ >= 2)
++# if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
++#  define ALIGNOF(type) _Alignof(type)
++# elif defined (__cplusplus) && __cplusplus >= 201103L
++#  define ALIGNOF(type) alignof(type)
++# elif defined (__GNUC__) && (__GNUC__ >= 2)
+ /* gcc has an extension that gives us exactly what we want. */
+ #  define ALIGNOF(type) __alignof__ (type)
+ # elif ! defined (__cplusplus)
diff --git a/xemacs.spec b/xemacs.spec
index 059706d..b813691 100644
--- a/xemacs.spec
+++ b/xemacs.spec
@@ -20,7 +20,7 @@
 
 Name:           xemacs
 Version:        21.5.34
-Release:        8%{?snap:.%{snap}}%{?dist}
+Release:        9%{?snap:.%{snap}}%{?dist}
 Summary:        Different version of Emacs
 
 %global majver %(cut -d. -f1-2 <<<%{version})
@@ -57,6 +57,8 @@ Patch3:         %{name}-21.5.27-no-expdyn-ia64-106744.patch
 Patch4:         %{name}-21.5.28-courier-default.patch
 # Fedora-specific.  Recognize the Fedora X server.
 Patch5:         %{name}-21.5.29-x-server.patch
+# To be sent upstsream: adapt to changes in C11
+Patch6:         %{name}-21.5.34-c11.patch
 
 BuildRequires:  texinfo
 BuildRequires:  ncurses-devel
@@ -244,6 +246,7 @@ sed -i -e /tetris/d lisp/menubar-items.el
 %patch3
 %patch4
 %patch5
+%patch6
 
 sed -e 's/"lib"/"%{_lib}"/' lisp/setup-paths.el > lisp/setup-paths.el.new
 touch -r lisp/setup-paths.el lisp/setup-paths.el.new
@@ -255,6 +258,13 @@ for f in man/lispref/mule.texi man/xemacs-faq.texi CHANGES-beta ; do
     mv -f $f.utf8 $f
 done
 
+# Get reproducible builds by setting the compiling username
+mkdir ~/.xemacs
+echo >> ~/.xemacs/custom.el << EOF
+(custom-set-variables
+ '(user-mail-address "mockbuild at fedoraproject.org"))
+EOF
+
 
 %build
 %if %{with gtk}
@@ -609,7 +619,8 @@ fi
 %{_mandir}/man1/xemacs-xft.1*
 
 %files common -f base-files
-%doc INSTALL README COPYING PROBLEMS CHANGES-beta etc/NEWS etc/TUTORIAL
+%doc INSTALL README PROBLEMS CHANGES-beta etc/NEWS etc/TUTORIAL
+%license COPYING
 %{_bindir}/etags.xemacs
 %{_bindir}/ootags
 %{_bindir}/xemacs-script
@@ -635,7 +646,7 @@ fi
 %endif
 
 %files info -f info-files
-%doc COPYING
+%license COPYING
 %{_infodir}/*.info*
 
 %files devel
@@ -658,6 +669,11 @@ fi
 %dir %{_datadir}/xemacs/site-packages/pkginfo
 
 %changelog
+* Mon Feb  9 2015 Jerry James <loganjerry at gmail.com> - 21.5.34-9.20140605hgacf1c26e3019
+- Add -c11 patch to fix build failure with gcc 5.0
+- Set compiling username to get reproducible builds
+- Use license macro
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 21.5.34-8.20140605hgacf1c26e3019
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list