* Backported Andres' fix for building emacs-23 on x86_64 to emacs-22.

Also updated to Emacs 22.2.

svn path=/nixpkgs/branches/stdenv-updates/; revision=12050
This commit is contained in:
Eelco Dolstra 2008-06-12 09:21:18 +00:00
parent 78d2e3cb30
commit 62835f4090
3 changed files with 17 additions and 180 deletions

View file

@ -1,41 +0,0 @@
Only in emacs-21.3: configure.in~
Only in emacs-21.3: patchfile
Only in emacs-21.3/src: Makefile.in~
diff -rc emacs-orig/src/s/gnu-linux.h emacs-21.3/src/s/gnu-linux.h
*** emacs-orig/src/s/gnu-linux.h 2001-09-28 17:50:04.000000000 +0200
--- emacs-21.3/src/s/gnu-linux.h 2004-10-06 13:13:19.000000000 +0200
***************
*** 173,179 ****
/* GNU/Linux usually has crt0.o in a non-standard place */
#define START_FILES pre-crt0.o /usr/lib/crt0.o
#else
! #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
#endif
#ifdef __ELF__
--- 173,179 ----
/* GNU/Linux usually has crt0.o in a non-standard place */
#define START_FILES pre-crt0.o /usr/lib/crt0.o
#else
! #define START_FILES pre-crt0.o crt1.o crti.o
#endif
#ifdef __ELF__
***************
*** 225,231 ****
#else
#undef LIB_GCC
#define LIB_GCC
! #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
#endif
/* Don't use -g in test compiles in configure.
--- 225,231 ----
#else
#undef LIB_GCC
#define LIB_GCC
! #define LIB_STANDARD -lgcc -lc -lgcc crtn.o
#endif
/* Don't use -g in test compiles in configure.
Only in emacs-21.3/src/s: gnu-linux.h~

View file

@ -13,19 +13,26 @@ assert xpmSupport -> libXpm != null;
assert gtkGUI -> pkgconfig != null && gtk != null;
stdenv.mkDerivation {
name = "emacs-22.1";
name = "emacs-22.2";
builder = ./builder.sh;
src = fetchurl {
url = mirror://gnu/emacs/emacs-22.1.tar.gz;
sha256 = "1l1y3il98pq3cz464p244wz2d3nga5lq8fkw5pwp5r97f7pkpi0y";
url = mirror://gnu/emacs/emacs-22.2.tar.gz;
md5 = "d6ee586b8752351334ebf072904c4d51";
};
patches = [./crt.patch ./makefile-pwd.patch];
buildInputs = [
ncurses x11
(if xawSupport then if xaw3dSupport then Xaw3d else libXaw else null)
(if xpmSupport then libXpm else null)
] ++ (if gtkGUI then [pkgconfig gtk] else []);
buildInputs = [ncurses x11]
++ stdenv.lib.optional xawSupport (if xaw3dSupport then Xaw3d else libXaw)
++ stdenv.lib.optional xpmSupport libXpm
++ stdenv.lib.optionals gtkGUI [pkgconfig gtk];
configureFlags =
if gtkGUI then ["--with-x-toolkit=gtk"] else [];
stdenv.lib.optional gtkGUI "--with-x-toolkit=gtk";
meta = {
description = "Emacs, *the* text editor";
homepage = http://www.gnu.org/software/emacs/;
license = "GPL";
};
}

View file

@ -1,129 +0,0 @@
--- emacs-22.1/Makefile.in 2008-02-10 23:56:29.000000000 +0100
+++ emacs-22.1/Makefile.in 2008-02-10 23:55:55.000000000 +0100
@@ -420,7 +420,7 @@
-set ${COPYDESTS} ; \
unset CDPATH; \
for dir in ${COPYDIR} ; do \
- if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
+ if [ `(cd $$1 && pwd)` != `(cd $${dir} && pwd)` ] ; then \
rm -rf $$1 ; \
fi ; \
shift ; \
@@ -432,7 +432,7 @@
for dir in ${COPYDIR} ; do \
dest=$$1 ; shift ; \
[ -d $${dir} ] \
- && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
+ && [ `(cd $${dir} && pwd)` != `(cd $${dest} && pwd)` ] \
&& (echo "Copying $${dir} to $${dest}..." ; \
(cd $${dir}; tar -chf - . ) \
| (cd $${dest}; umask 022; \
@@ -472,7 +472,7 @@
fi
-chmod a+r $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el
-unset CDPATH; \
- if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \
+ if [ `(cd ./etc; pwd)` != `(cd $(DESTDIR)${docdir}; pwd)` ]; \
then \
echo "Copying etc/DOC-* to $(DESTDIR)${docdir} ..." ; \
(cd ./etc; tar -chf - DOC*) \
@@ -483,8 +483,8 @@
-unset CDPATH; \
if [ -r ./lisp ] \
&& [ -r ./lisp/simple.el ] \
- && [ x`(cd ./lisp; /bin/pwd)` != x`(cd $(DESTDIR)${lispdir}; /bin/pwd)` ] \
- && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
+ && [ x`(cd ./lisp; pwd)` != x`(cd $(DESTDIR)${lispdir}; pwd)` ] \
+ && [ x`(cd ${srcdir}/lisp; pwd)` != x`(cd ./lisp; pwd)` ]; \
then \
echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \
(cd lisp; tar -chf - *.el *.elc) \
@@ -500,8 +500,8 @@
done) \
else true; fi
-unset CDPATH; \
- thisdir=`/bin/pwd`; \
- if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
+ thisdir=`pwd`; \
+ if [ `(cd ${srcdir}/info && pwd)` != `(cd $(DESTDIR)${infodir} && pwd)` ]; \
then \
(cd $(DESTDIR)${infodir}; \
if [ -f dir ]; then true; \
@@ -519,8 +519,8 @@
done); \
else true; fi
-unset CDPATH; \
- thisdir=`/bin/pwd`; \
- if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
+ thisdir=`pwd`; \
+ if [ `(cd ${srcdir}/info && pwd)` != `(cd $(DESTDIR)${infodir} && pwd)` ]; \
then \
for elt in $(INFO_FILES); do \
(cd $${thisdir}; \
@@ -528,7 +528,7 @@
done; \
else true; fi
-chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} $(DESTDIR)${datadir}/emacs/site-lisp ${COPYDESTS} $(DESTDIR)${infodir}
- thisdir=`/bin/pwd`; \
+ thisdir=`pwd`; \
cd ${srcdir}/etc; \
for page in emacs emacsclient etags ctags ; do \
(cd $${thisdir}; \
@@ -575,8 +575,8 @@
-unset CDPATH; \
for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \
if [ -d $${dir} ]; then \
- case `(cd $${dir} ; /bin/pwd)` in \
- `(cd ${srcdir} ; /bin/pwd)`* ) ;; \
+ case `(cd $${dir} ; pwd)` in \
+ `(cd ${srcdir} ; pwd)`* ) ;; \
* ) rm -rf $${dir} ;; \
esac ; \
case $${dir} in \
--- emacs-22.1/leim/Makefile.in 2008-02-10 23:55:31.000000000 +0100
+++ emacs-22.1/leim/Makefile.in 2008-02-10 23:55:41.000000000 +0100
@@ -207,7 +207,7 @@
leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
${RUN-EMACS} -l ${buildlisppath}/international/quail \
-f batch-byte-compile-if-not-done ${TIT-MISC:.elc=.el}
- if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
+ if [ x`(cd ${srcdir} && pwd)` = x`(pwd)` ] ; then \
${RUN-EMACS} -l ${buildlisppath}/international/quail \
--eval "(update-leim-list-file \".\")" ; \
else \
@@ -220,11 +220,11 @@
if [ ! -d ${INSTALLDIR} ] ; then \
${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \
else true; fi
- if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
+ if [ x`(cd ${INSTALLDIR} && pwd)` != x`(pwd)` ] ; then \
rm -rf ${INSTALLDIR}/leim-list.el; \
rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
echo "Copying leim files to ${INSTALLDIR} ..." ; \
- if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
+ if [ x`(cd ${srcdir} && pwd)` = x`(pwd)` ] ; then \
tar -chf - leim-list.el quail ja-dic \
| (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
else \
--- emacs-22.1/lib-src/Makefile.in 2008-02-10 23:59:08.000000000 +0100
+++ emacs-22.1/lib-src/Makefile.in 2008-02-10 23:59:13.000000000 +0100
@@ -306,7 +306,7 @@
@echo
@echo "Installing utilities run internally by Emacs."
$(top_srcdir)/mkinstalldirs $(DESTDIR)${archlibdir}
- if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
+ if [ `(cd $(DESTDIR)${archlibdir} && pwd)` != `pwd` ]; then \
for file in ${UTILITIES}; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
done ; \
@@ -321,8 +321,8 @@
chown ${gameuser} $(DESTDIR)${gamedir}; \
chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
fi
- if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` \
- != `(cd ${srcdir} && /bin/pwd)` ]; then \
+ if [ `(cd $(DESTDIR)${archlibdir} && pwd)` \
+ != `(cd ${srcdir} && pwd)` ]; then \
for file in ${SCRIPTS}; do \
$(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \
done ; \