From 95fcf2800d055a3accd7c2dd08df656c81367d068306821acd349fb183d7775c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 20 Mar 2017 15:21:49 +0000 Subject: [PATCH 1/2] . OBS-URL: https://build.opensuse.org/package/show/M17N/xemacs?expand=0&rev=92 --- xemacs-21.5.34-sbrk.patch | 21 +++++++++++++++++++++ xemacs.changes | 5 +++++ xemacs.spec | 11 ++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 xemacs-21.5.34-sbrk.patch diff --git a/xemacs-21.5.34-sbrk.patch b/xemacs-21.5.34-sbrk.patch new file mode 100644 index 0000000..1118101 --- /dev/null +++ b/xemacs-21.5.34-sbrk.patch @@ -0,0 +1,21 @@ +--- src/gmalloc.c ++++ src/gmalloc.c 2017-03-20 15:02:35.000000000 +0000 +@@ -1199,18 +1199,6 @@ along with the GNU C Library. If not, s + #include + #endif + +-/* #ifndef __GNU_LIBRARY__ */ +-#define __sbrk sbrk +-/* #endif */ +- +-#ifdef __GNU_LIBRARY__ +-/* It is best not to declare this and cast its result on foreign operating +- systems with potentially hostile include files. */ +-#if !(defined(linux) && defined(sparc)) +-extern __ptr_t __sbrk __P ((int increment)); +-#endif +-#endif +- + #ifndef NULL + #define NULL 0 + #endif diff --git a/xemacs.changes b/xemacs.changes index d21d681..1ce275c 100644 --- a/xemacs.changes +++ b/xemacs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 20 15:21:17 UTC 2017 - werner@suse.de + +- Add patch xemacs-21.5.34-sbrk.patch to avoid redefinition of sbrk + ------------------------------------------------------------------- Fri Nov 27 13:35:03 UTC 2015 - werner@suse.de diff --git a/xemacs.spec b/xemacs.spec index 8506d13..dbea59b 100644 --- a/xemacs.spec +++ b/xemacs.spec @@ -1,7 +1,7 @@ # # spec file for package xemacs # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -96,6 +96,8 @@ Patch57: xemacs-21.5.34-Xaw3D_I18N.patch Patch58: xemacs-21.5.34-custom-fonts.patch # PATCH-FIX-SUSE do wait on alsa Patch59: xemacs-21.5.34-alsaplay.patch +# PATCH-FIX-SUSE avoid redefinition of sbrk +Patch60: xemacs-21.5.34-sbrk.patch Requires(pre): permissions Requires: ctags Requires: efont-unicode @@ -188,6 +190,7 @@ echo Use xfs, that is XFontSet support for internationalized menubar. %patch57 -p0 %patch58 -p0 %patch59 -p1 +%patch60 -p0 %patch0 -p1 find lisp/ etc/ -name '*.elc' | xargs -r rm -f find . -name CVS -type d | xargs rm -rf @@ -372,6 +375,12 @@ COMP="--with-gcc \ --with-cflags=\"${CFLAGS}\" \ " eval ./configure $SYS $COMP $PREFIX $SPECIAL $X11 $MULE $FONTS $MAIL +if grep -q _DEFAULT_SOURCE /usr/include/features.h ; then + sed -ri '/^(#[[:blank:]]*define[[:blank:]]+_(BSD|SVID)_SOURCE)/{ + s/_BSD_SOURCE/_DEFAULT_SOURCE/ + s/_SVID_SOURCE/_DEFAULT_SOURCE/ + }' src/config.h +fi make %{?_smp_mflags} %install From ab3afc2131f83377d2f430b2c2f7b8a9df77d6f8e66c0ac02cb24c82d32c25a5 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 20 Mar 2017 15:40:58 +0000 Subject: [PATCH 2/2] . OBS-URL: https://build.opensuse.org/package/show/M17N/xemacs?expand=0&rev=93 --- xemacs.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xemacs.spec b/xemacs.spec index dbea59b..980deef 100644 --- a/xemacs.spec +++ b/xemacs.spec @@ -309,6 +309,9 @@ SPECIAL="--with-database=berkdb,gdbm \ %if %kkcc_broken --disable-kkcc \ %endif +%if 0%{?suse_version} > 1320 + --with-system-malloc \ +%endif %ifnarch s390 --enable-sound=native \ --with-gpm \