From 48a75e34a518b6c59839b4379925c4e40a31857364a406498fb63c0fd3468d64 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 14 Jan 2013 15:34:56 +0000 Subject: [PATCH] Accepting request 148242 from home:AndreasSchwab:ff - Don't strip binaries - Remove unused build requirements - Properly configure TERMINFO (bnc#797787) OBS-URL: https://build.opensuse.org/request/show/148242 OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=106 --- emacs-24.1-glibc.patch | 46 +++++++++++++++++----- emacs-24.1-tinfo.dif | 88 ++++++++++++++++++++++++++++++++++++++---- emacs-24.1.dif | 8 ++-- emacs.changes | 7 ++++ emacs.spec | 16 +------- 5 files changed, 131 insertions(+), 34 deletions(-) diff --git a/emacs-24.1-glibc.patch b/emacs-24.1-glibc.patch index 8e5418a..3ff1dae 100644 --- a/emacs-24.1-glibc.patch +++ b/emacs-24.1-glibc.patch @@ -1,3 +1,39 @@ +--- configure ++++ configure +@@ -10020,6 +10020,7 @@ system_malloc=no + case "$opsys" in + ## darwin ld insists on the use of malloc routines in the System framework. + darwin|sol2-10) system_malloc=yes ;; ++ gnu-linux) system_malloc=yes ;; + esac + + if test "${system_malloc}" = "yes"; then +@@ -10063,6 +10064,7 @@ fi + use_mmap_for_buffers=no + case "$opsys" in + cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; ++ gnu-linux) use_mmap_for_buffers=yes ;; + esac + + +--- configure.in ++++ configure.in +@@ -1661,6 +1661,7 @@ system_malloc=no + case "$opsys" in + ## darwin ld insists on the use of malloc routines in the System framework. + darwin|sol2-10) system_malloc=yes ;; ++ gnu-linux) system_malloc=yes ;; + esac + + if test "${system_malloc}" = "yes"; then +@@ -1701,6 +1702,7 @@ fi + use_mmap_for_buffers=no + case "$opsys" in + cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; ++ gnu-linux) use_mmap_for_buffers=yes ;; + esac + + AC_FUNC_MMAP --- lib-src/Makefile.in +++ lib-src/Makefile.in 2012-06-14 11:41:22.208010103 +0000 @@ -307,14 +307,16 @@ test-distrib${EXEEXT}: ${srcdir}/test-di @@ -41,18 +77,10 @@ want that here since we don't use unexec. None of these systems --- src/s/gnu-linux.h +++ src/s/gnu-linux.h 2012-06-26 16:05:56.116010465 +0000 -@@ -159,3 +159,14 @@ along with GNU Emacs. If not, see &6; } +@@ -14296,7 +14296,7 @@ $as_echo_n "checking for library contain # Maybe curses should be tried earlier? # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 @@ -9,32 +9,106 @@ OLIBS=$LIBS if test -z "$tputs_library"; then LIBS_TERMCAP= -@@ -14386,7 +14386,7 @@ case "$opsys" in +@@ -14374,22 +14374,15 @@ HAVE_LIBNCURSES=yes + ## Note only system files NOT using terminfo are: + ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and + ## darwin|gnu without ncurses. +-TERMINFO=no ++TERMINFO=yes + case "$opsys" in +- ## cygwin: Fewer environment variables to go wrong, more terminal types. +- ## hpux10-20: Use the system provided termcap(3) library. +- ## openbsd: David Mazieres says this +- ## is necessary. Otherwise Emacs dumps core when run -nw. +- aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; +- + ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. + ## The ncurses library has been moved out of the System framework in + ## Mac OS X 10.2. So if configure detects it, set the command-line ## option to use it. darwin|gnu*) ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) - if test "x$HAVE_LIBNCURSES" = "xyes"; then +- TERMINFO=yes + if test -z "$LIBS_TERMCAP" && test "x$HAVE_LIBNCURSES" = "xyes"; then - TERMINFO=yes LIBS_TERMCAP="-lncurses" fi + ;; +@@ -14428,17 +14421,16 @@ fi + $as_echo "$emacs_cv_freebsd_terminfo" >&6; } + + if test $emacs_cv_freebsd_terminfo = yes; then +- TERMINFO=yes + LIBS_TERMCAP="-lncurses" + else ++ TERMINFO=no + LIBS_TERMCAP="-ltermcap" + fi + ;; + + netbsd) +- if test "x$LIBS_TERMCAP" = "x-lterminfo"; then +- TERMINFO=yes +- else ++ if test "x$LIBS_TERMCAP" != "x-lterminfo"; then ++ TERMINFO=no + LIBS_TERMCAP="-ltermcap" + fi + ;; --- configure.in +++ configure.in -@@ -2803,7 +2803,7 @@ AC_DEFUN([tputs_link_source], [ +@@ -2805,7 +2805,7 @@ AC_DEFUN([tputs_link_source], [ ]) # Maybe curses should be tried earlier? # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 -for tputs_library in '' ncurses terminfo termcap curses; do -+for tputs_library in '' tinfo ncurses ncursesw terminfo termcap curses; do ++for tputs_library in '' tinfo ncurses terminfo termcap curses; do OLIBS=$LIBS if test -z "$tputs_library"; then LIBS_TERMCAP= -@@ -2853,7 +2853,7 @@ case "$opsys" in +@@ -2841,22 +2841,15 @@ HAVE_LIBNCURSES=yes + ## Note only system files NOT using terminfo are: + ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and + ## darwin|gnu without ncurses. +-TERMINFO=no ++TERMINFO=yes + case "$opsys" in +- ## cygwin: Fewer environment variables to go wrong, more terminal types. +- ## hpux10-20: Use the system provided termcap(3) library. +- ## openbsd: David Mazieres says this +- ## is necessary. Otherwise Emacs dumps core when run -nw. +- aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; +- + ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. + ## The ncurses library has been moved out of the System framework in + ## Mac OS X 10.2. So if configure detects it, set the command-line ## option to use it. darwin|gnu*) ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) - if test "x$HAVE_LIBNCURSES" = "xyes"; then +- TERMINFO=yes + if test -z "$LIBS_TERMCAP" && test "x$HAVE_LIBNCURSES" = "xyes"; then - TERMINFO=yes LIBS_TERMCAP="-lncurses" fi + ;; +@@ -2873,17 +2866,16 @@ fail; + AC_MSG_RESULT($emacs_cv_freebsd_terminfo) + + if test $emacs_cv_freebsd_terminfo = yes; then +- TERMINFO=yes + LIBS_TERMCAP="-lncurses" + else ++ TERMINFO=no + LIBS_TERMCAP="-ltermcap" + fi + ;; + + netbsd) +- if test "x$LIBS_TERMCAP" = "x-lterminfo"; then +- TERMINFO=yes +- else ++ if test "x$LIBS_TERMCAP" != "x-lterminfo"; then ++ TERMINFO=no + LIBS_TERMCAP="-ltermcap" + fi + ;; diff --git a/emacs-24.1.dif b/emacs-24.1.dif index ab3fc35..6a3c0f1 100644 --- a/emacs-24.1.dif +++ b/emacs-24.1.dif @@ -41,7 +41,7 @@ for file in snake-scores tetris-scores; do \ --- configure +++ configure -@@ -9740,9 +9740,9 @@ LD_SWITCH_X_SITE_AUX= +@@ -9701,9 +9701,9 @@ LD_SWITCH_X_SITE_AUX= LD_SWITCH_X_SITE_AUX_RPATH= if test "${x_libraries}" != NONE; then if test -n "${x_libraries}"; then @@ -49,7 +49,7 @@ - LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` - LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` + LD_SWITCH_X_SITE="-L ${x_libraries%%:*}" -+ LD_SWITCH_X_SITE_AUX="-rpath-link ${x_libraries%%:*}" ++ LD_SWITCH_X_SITE_AUX="-rpath-link ${x_libraries%%:*}" + LD_SWITCH_X_SITE_AUX_RPATH="-Wl,-rpath-link ${x_libraries%%:*}" fi x_default_search_path="" @@ -64,7 +64,7 @@ - LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` - LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` + LD_SWITCH_X_SITE="-L ${x_libraries%%:*}" -+ LD_SWITCH_X_SITE_AUX="-rpath-link ${x_libraries%%:*}" ++ LD_SWITCH_X_SITE_AUX="-rpath-link ${x_libraries%%:*}" + LD_SWITCH_X_SITE_AUX_RPATH="-Wl,-rpath-link ${x_libraries%%:*}" fi x_default_search_path="" @@ -166,7 +166,7 @@ INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog STAMP_INST_SCRIPTS = stamp-rcs-checkin stamp-grep-changelog -@@ -327,10 +327,11 @@ ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${ +@@ -324,10 +324,11 @@ ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${ ## We depend on etags to assure that parallel makes do not write two ## etags.o files on top of each other. diff --git a/emacs.changes b/emacs.changes index 470d538..f231e18 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jan 12 21:08:43 UTC 2013 - schwab@linux-m68k.org + +- Don't strip binaries +- Remove unused build requirements +- Properly configure TERMINFO (bnc#797787) + ------------------------------------------------------------------- Mon Dec 10 22:25:23 UTC 2012 - schwab@linux-m68k.org diff --git a/emacs.spec b/emacs.spec index 3937cdd..1af76a5 100644 --- a/emacs.spec +++ b/emacs.spec @@ -1,7 +1,7 @@ # # spec file for package emacs # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,6 @@ BuildRequires: ImageMagick-devel BuildRequires: alsa-devel BuildRequires: bind-devel BuildRequires: dbus-1-devel -BuildRequires: elfutils BuildRequires: fdupes BuildRequires: fonts-config BuildRequires: freetype2-devel @@ -47,8 +46,6 @@ BuildRequires: libtiff-devel BuildRequires: libxml2-devel BuildRequires: m17n-lib-devel BuildRequires: ncurses-devel -BuildRequires: nmh -BuildRequires: sendmail BuildRequires: texinfo BuildRequires: update-desktop-files BuildRequires: xaw3d-devel @@ -191,9 +188,6 @@ modes. %patch15 -p0 -b .iconic %patch16 -p0 -b .flyspell %patch -p0 -if test ! -e $HOME/.mh_profile && type -p install-mh > /dev/null 2>&1; then - install-mh -auto < /dev/null -fi %patch22 %patch23 %patch24 @@ -201,6 +195,7 @@ fi # We don't want to run autoconf touch configure src/stamp-h.in +%build # make sure that the binaries work (pagesize on build must be the same as on target, bnc#726769) %if %suse_version >= 1110 %ifarch ppc ppc64 ia64 @@ -211,7 +206,6 @@ exit 1 %endif %endif -%build cflags () { local flag=$1; shift @@ -528,12 +522,6 @@ done # install desktop file cp etc/images/icons/hicolor/32x32/apps/emacs.png $RPM_SOURCE_DIR/emacs.png %suse_update_desktop_file -i emacs TextEditor -## -## binutils' strip dies, so we better strip comments with a tool a bit smarter -## if it appears stripped, the tools won't touch it anymore -for bin in emacs-x11 emacs-gtk emacs-nox; do - eu-strip --remove-comment %{buildroot}/usr/bin/$bin -o $bin.new && mv $bin.new %{buildroot}/usr/bin/$bin -done rm -vf %{buildroot}%{_bindir}/gnuctags rm -vf %{buildroot}%{_mandir}/man1/gnuctags.1*