summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-02-10 23:08:18 +0000
committerLudovic Courtès <ludo@gnu.org>2008-02-10 23:08:18 +0000
commitf6f85016ec6508413147664ce43b10e9ab6d8336 (patch)
tree661bf08fa9bd970eab9bbc75eda8b0d409bf3dcb /pkgs
parent1e7824a683a071e0d736299c26571ebc1ae8313c (diff)
downloadnixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.tar
nixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.tar.gz
nixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.tar.bz2
nixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.tar.lz
nixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.tar.xz
nixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.tar.zst
nixpkgs-f6f85016ec6508413147664ce43b10e9ab6d8336.zip
Emacs 22: Remove use of `/bin/pwd' in makefiles.
Among other things, this fixes installation of LEIM (Libraries of Emacs Input
Methods), where the `share/emacs/22.1/leim' directory would remain empty.

svn path=/nixpkgs/trunk/; revision=10621
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/emacs-22/default.nix3
-rw-r--r--pkgs/applications/editors/emacs-22/makefile-pwd.patch129
2 files changed, 131 insertions, 1 deletions
diff --git a/pkgs/applications/editors/emacs-22/default.nix b/pkgs/applications/editors/emacs-22/default.nix
index 0af6f95a344..d527e305154 100644
--- a/pkgs/applications/editors/emacs-22/default.nix
+++ b/pkgs/applications/editors/emacs-22/default.nix
@@ -14,12 +14,13 @@ assert gtkGUI -> pkgconfig != null && gtk != null;
 
 stdenv.mkDerivation {
   name = "emacs-22.1";
+
   builder = ./builder.sh;
   src = fetchurl {
     url = mirror://gnu/emacs/emacs-22.1.tar.gz;
     sha256 = "1l1y3il98pq3cz464p244wz2d3nga5lq8fkw5pwp5r97f7pkpi0y";
   };
-  patches = [./crt.patch];
+  patches = [./crt.patch ./makefile-pwd.patch];
   buildInputs = [
     ncurses x11
     (if xawSupport then if xaw3dSupport then Xaw3d else libXaw else null)
diff --git a/pkgs/applications/editors/emacs-22/makefile-pwd.patch b/pkgs/applications/editors/emacs-22/makefile-pwd.patch
new file mode 100644
index 00000000000..232b881c9a6
--- /dev/null
+++ b/pkgs/applications/editors/emacs-22/makefile-pwd.patch
@@ -0,0 +1,129 @@
+--- 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 ; \