From 6c92badd87e58f67447e0526c1623c871e323fd5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Feb 2007 14:55:15 +0000 Subject: [PATCH] * Added the Emacs Unicode branch (which supposedly will become Emacs 23.x), which GTK and Xft support. Add something like (set-default-font "Bitstream Vera Sans Mono-8") to ~/.emacs to get a TTF font. svn path=/nixpkgs/trunk/; revision=7841 --- .../editors/emacs-22/modes/cua/builder.sh | 4 -- .../editors/emacs-22/modes/cua/default.nix | 8 ---- .../editors/emacs-22/modes/haskell/builder.sh | 6 --- .../emacs-22/modes/haskell/default.nix | 8 ---- .../editors/emacs-22/modes/nxml/builder.sh | 7 ---- .../editors/emacs-22/modes/nxml/default.nix | 8 ---- .../modes => emacs-modes}/cua/builder.sh | 0 .../modes => emacs-modes}/cua/default.nix | 0 .../modes => emacs-modes}/haskell/builder.sh | 0 .../modes => emacs-modes}/haskell/default.nix | 0 .../modes => emacs-modes}/nxml/builder.sh | 0 .../modes => emacs-modes}/nxml/default.nix | 0 .../{emacs-22-aa => emacs-unicode}/builder.sh | 6 ++- .../{emacs-22-aa => emacs-unicode}/crt.patch | 0 .../default.nix | 21 ++++++---- .../editors/emacs-unicode/xft-default.patch | 39 +++++++++++++++++++ .../editors/emacs/modes/cua/builder.sh | 4 -- .../editors/emacs/modes/cua/default.nix | 8 ---- .../editors/emacs/modes/haskell/builder.sh | 6 --- .../editors/emacs/modes/haskell/default.nix | 8 ---- .../editors/emacs/modes/nxml/builder.sh | 7 ---- .../editors/emacs/modes/nxml/default.nix | 8 ---- pkgs/top-level/all-packages.nix | 11 +++--- 23 files changed, 63 insertions(+), 96 deletions(-) delete mode 100644 pkgs/applications/editors/emacs-22/modes/cua/builder.sh delete mode 100644 pkgs/applications/editors/emacs-22/modes/cua/default.nix delete mode 100644 pkgs/applications/editors/emacs-22/modes/haskell/builder.sh delete mode 100644 pkgs/applications/editors/emacs-22/modes/haskell/default.nix delete mode 100644 pkgs/applications/editors/emacs-22/modes/nxml/builder.sh delete mode 100644 pkgs/applications/editors/emacs-22/modes/nxml/default.nix rename pkgs/applications/editors/{emacs-22-aa/modes => emacs-modes}/cua/builder.sh (100%) rename pkgs/applications/editors/{emacs-22-aa/modes => emacs-modes}/cua/default.nix (100%) rename pkgs/applications/editors/{emacs-22-aa/modes => emacs-modes}/haskell/builder.sh (100%) rename pkgs/applications/editors/{emacs-22-aa/modes => emacs-modes}/haskell/default.nix (100%) rename pkgs/applications/editors/{emacs-22-aa/modes => emacs-modes}/nxml/builder.sh (100%) rename pkgs/applications/editors/{emacs-22-aa/modes => emacs-modes}/nxml/default.nix (100%) rename pkgs/applications/editors/{emacs-22-aa => emacs-unicode}/builder.sh (60%) rename pkgs/applications/editors/{emacs-22-aa => emacs-unicode}/crt.patch (100%) rename pkgs/applications/editors/{emacs-22-aa => emacs-unicode}/default.nix (58%) create mode 100644 pkgs/applications/editors/emacs-unicode/xft-default.patch delete mode 100644 pkgs/applications/editors/emacs/modes/cua/builder.sh delete mode 100644 pkgs/applications/editors/emacs/modes/cua/default.nix delete mode 100644 pkgs/applications/editors/emacs/modes/haskell/builder.sh delete mode 100644 pkgs/applications/editors/emacs/modes/haskell/default.nix delete mode 100644 pkgs/applications/editors/emacs/modes/nxml/builder.sh delete mode 100644 pkgs/applications/editors/emacs/modes/nxml/default.nix diff --git a/pkgs/applications/editors/emacs-22/modes/cua/builder.sh b/pkgs/applications/editors/emacs-22/modes/cua/builder.sh deleted file mode 100644 index 6f7bb428c1a6..000000000000 --- a/pkgs/applications/editors/emacs-22/modes/cua/builder.sh +++ /dev/null @@ -1,4 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/emacs/site-lisp -cp $src $out/emacs/site-lisp/cua.el diff --git a/pkgs/applications/editors/emacs-22/modes/cua/default.nix b/pkgs/applications/editors/emacs-22/modes/cua/default.nix deleted file mode 100644 index ddc2dca22326..000000000000 --- a/pkgs/applications/editors/emacs-22/modes/cua/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { - name = "cua-mode-2.10"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/cua-mode-2.10.el; - md5 = "5bf5e43f5f38c8383868c7c6c5baca09"; - }; -} diff --git a/pkgs/applications/editors/emacs-22/modes/haskell/builder.sh b/pkgs/applications/editors/emacs-22/modes/haskell/builder.sh deleted file mode 100644 index 2d1540319944..000000000000 --- a/pkgs/applications/editors/emacs-22/modes/haskell/builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/emacs/site-lisp -tar zxvf $src -cp haskell-mode*/*.el $out/emacs/site-lisp -cp haskell-mode*/*.hs $out/emacs/site-lisp diff --git a/pkgs/applications/editors/emacs-22/modes/haskell/default.nix b/pkgs/applications/editors/emacs-22/modes/haskell/default.nix deleted file mode 100644 index 644c485b947b..000000000000 --- a/pkgs/applications/editors/emacs-22/modes/haskell/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { - name = "haskell-mode-1.45"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/haskell-mode-1.45.tar.gz; - md5 = "c609998580cdb9ca8888c7d47d22ca3b"; - }; -} diff --git a/pkgs/applications/editors/emacs-22/modes/nxml/builder.sh b/pkgs/applications/editors/emacs-22/modes/nxml/builder.sh deleted file mode 100644 index d2393362ebb6..000000000000 --- a/pkgs/applications/editors/emacs-22/modes/nxml/builder.sh +++ /dev/null @@ -1,7 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/emacs/site-lisp -cd $out/emacs/site-lisp -tar xvfz $src -mv nxml-mode-*/* . -rmdir nxml-mode-* diff --git a/pkgs/applications/editors/emacs-22/modes/nxml/default.nix b/pkgs/applications/editors/emacs-22/modes/nxml/default.nix deleted file mode 100644 index 57583bbfcb62..000000000000 --- a/pkgs/applications/editors/emacs-22/modes/nxml/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { - name = "nxml-mode-20041004"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/nxml-mode-20041004.tar.gz; - md5 = "ac137024cf337d6f11d8ab278d39b4db"; - }; -} diff --git a/pkgs/applications/editors/emacs-22-aa/modes/cua/builder.sh b/pkgs/applications/editors/emacs-modes/cua/builder.sh similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/modes/cua/builder.sh rename to pkgs/applications/editors/emacs-modes/cua/builder.sh diff --git a/pkgs/applications/editors/emacs-22-aa/modes/cua/default.nix b/pkgs/applications/editors/emacs-modes/cua/default.nix similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/modes/cua/default.nix rename to pkgs/applications/editors/emacs-modes/cua/default.nix diff --git a/pkgs/applications/editors/emacs-22-aa/modes/haskell/builder.sh b/pkgs/applications/editors/emacs-modes/haskell/builder.sh similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/modes/haskell/builder.sh rename to pkgs/applications/editors/emacs-modes/haskell/builder.sh diff --git a/pkgs/applications/editors/emacs-22-aa/modes/haskell/default.nix b/pkgs/applications/editors/emacs-modes/haskell/default.nix similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/modes/haskell/default.nix rename to pkgs/applications/editors/emacs-modes/haskell/default.nix diff --git a/pkgs/applications/editors/emacs-22-aa/modes/nxml/builder.sh b/pkgs/applications/editors/emacs-modes/nxml/builder.sh similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/modes/nxml/builder.sh rename to pkgs/applications/editors/emacs-modes/nxml/builder.sh diff --git a/pkgs/applications/editors/emacs-22-aa/modes/nxml/default.nix b/pkgs/applications/editors/emacs-modes/nxml/default.nix similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/modes/nxml/default.nix rename to pkgs/applications/editors/emacs-modes/nxml/default.nix diff --git a/pkgs/applications/editors/emacs-22-aa/builder.sh b/pkgs/applications/editors/emacs-unicode/builder.sh similarity index 60% rename from pkgs/applications/editors/emacs-22-aa/builder.sh rename to pkgs/applications/editors/emacs-unicode/builder.sh index e9c909739d53..46e41f3ef49d 100644 --- a/pkgs/applications/editors/emacs-22-aa/builder.sh +++ b/pkgs/applications/editors/emacs-unicode/builder.sh @@ -3,11 +3,15 @@ source $stdenv/setup myglibc=`cat ${NIX_GCC}/nix-support/orig-libc` echo "glibc: $myglibc" +postConfigure=postConfigure postConfigure() { cp $myglibc/lib/crt1.o src cp $myglibc/lib/crti.o src cp $myglibc/lib/crtn.o src + + for i in Makefile ./src/Makefile ./lib-src/Makefile ./leim/Makefile ./admin/unidata/Makefile; do + substituteInPlace $i --replace /bin/pwd pwd + done } -postConfigure=postConfigure genericBuild diff --git a/pkgs/applications/editors/emacs-22-aa/crt.patch b/pkgs/applications/editors/emacs-unicode/crt.patch similarity index 100% rename from pkgs/applications/editors/emacs-22-aa/crt.patch rename to pkgs/applications/editors/emacs-unicode/crt.patch diff --git a/pkgs/applications/editors/emacs-22-aa/default.nix b/pkgs/applications/editors/emacs-unicode/default.nix similarity index 58% rename from pkgs/applications/editors/emacs-22-aa/default.nix rename to pkgs/applications/editors/emacs-unicode/default.nix index b6ed749b8296..9c6af572b5b0 100644 --- a/pkgs/applications/editors/emacs-22-aa/default.nix +++ b/pkgs/applications/editors/emacs-unicode/default.nix @@ -3,7 +3,7 @@ , xaw3dSupport ? false , gtkGUI ? false , xftSupport ? false -, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null +, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null , pkgconfig ? null, gtk ? null, libXft ? null, libpng ? null }: @@ -14,21 +14,26 @@ assert gtkGUI -> pkgconfig != null && gtk != null; assert xftSupport -> libXft != null && libpng != null; # libpng = probably a bug stdenv.mkDerivation { - name = "emacs-22.0.50-pre-xft"; + name = "emacs-23.0.0.1-pre20070127"; builder = ./builder.sh; src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/emacs-22.0.50-pre-xft.tar.bz2; - md5 = "4f96ada6f18513aeb70adc27b7ac862f"; + url = http://debs.peadrop.com/pool/edgy/backports/emacs-snapshot_20070127.orig.tar.gz; + sha256 = "1p5ds3sjxx6izzmfq4k3wkvklm8yw7spanl7zgl16s7cln3m7hv2"; }; - patches = [./crt.patch]; + patches = [ + ./crt.patch + # From Debian: use --enable-font-backend by default. + ./xft-default.patch + ]; buildInputs = [ - x11 + ncurses x11 (if xawSupport then libXaw else null) (if xpmSupport then libXpm else null) (if xaw3dSupport then Xaw3d else null) ] ++ (if gtkGUI then [pkgconfig gtk] else []) ++ (if xftSupport then [libXft libpng] else []); - configureFlags = - if gtkGUI then ["--with-x-toolkit=gtk" "--with-xft"] else []; + configureFlags = " + ${if gtkGUI then "--with-gtk --enable-font-backend --with-xft" else ""} + "; } diff --git a/pkgs/applications/editors/emacs-unicode/xft-default.patch b/pkgs/applications/editors/emacs-unicode/xft-default.patch new file mode 100644 index 000000000000..c98ba66a6e4e --- /dev/null +++ b/pkgs/applications/editors/emacs-unicode/xft-default.patch @@ -0,0 +1,39 @@ +diff -rc emacs-snapshot-20070127-orig/src/emacs.c emacs-snapshot-20070127/src/emacs.c +*** emacs-snapshot-20070127-orig/src/emacs.c Sun Jan 28 02:08:54 2007 +--- emacs-snapshot-20070127/src/emacs.c Mon Feb 5 15:35:26 2007 +*************** +*** 1408,1417 **** + = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); + + #ifdef USE_FONT_BACKEND +! enable_font_backend = 0; + if (argmatch (argv, argc, "-enable-font-backend", "--enable-font-backend", + 4, NULL, &skip_args)) + enable_font_backend = 1; + #endif /* USE_FONT_BACKEND */ + + #ifdef HAVE_X_WINDOWS +--- 1408,1420 ---- + = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); + + #ifdef USE_FONT_BACKEND +! enable_font_backend = 1; + if (argmatch (argv, argc, "-enable-font-backend", "--enable-font-backend", + 4, NULL, &skip_args)) + enable_font_backend = 1; ++ if (argmatch (argv, argc, "-disable-font-backend", "--disable-font-backend", ++ 4, NULL, &skip_args)) ++ enable_font_backend = 0; + #endif /* USE_FONT_BACKEND */ + + #ifdef HAVE_X_WINDOWS +*************** +*** 1817,1822 **** +--- 1820,1826 ---- + { "-no-multibyte", "--no-multibyte", 80, 0 }, + { "-nl", "--no-loadup", 70, 0 }, + { "-enable-font-backend", "--enable-font-backend", 65, 0 }, ++ { "-disable-font-backend", "--disable-font-backend", 64, 0 }, + /* -d must come last before the options handled in startup.el. */ + { "-d", "--display", 60, 1 }, + { "-display", 0, 60, 1 }, diff --git a/pkgs/applications/editors/emacs/modes/cua/builder.sh b/pkgs/applications/editors/emacs/modes/cua/builder.sh deleted file mode 100644 index 6f7bb428c1a6..000000000000 --- a/pkgs/applications/editors/emacs/modes/cua/builder.sh +++ /dev/null @@ -1,4 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/emacs/site-lisp -cp $src $out/emacs/site-lisp/cua.el diff --git a/pkgs/applications/editors/emacs/modes/cua/default.nix b/pkgs/applications/editors/emacs/modes/cua/default.nix deleted file mode 100644 index ddc2dca22326..000000000000 --- a/pkgs/applications/editors/emacs/modes/cua/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { - name = "cua-mode-2.10"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/cua-mode-2.10.el; - md5 = "5bf5e43f5f38c8383868c7c6c5baca09"; - }; -} diff --git a/pkgs/applications/editors/emacs/modes/haskell/builder.sh b/pkgs/applications/editors/emacs/modes/haskell/builder.sh deleted file mode 100644 index 2d1540319944..000000000000 --- a/pkgs/applications/editors/emacs/modes/haskell/builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/emacs/site-lisp -tar zxvf $src -cp haskell-mode*/*.el $out/emacs/site-lisp -cp haskell-mode*/*.hs $out/emacs/site-lisp diff --git a/pkgs/applications/editors/emacs/modes/haskell/default.nix b/pkgs/applications/editors/emacs/modes/haskell/default.nix deleted file mode 100644 index 644c485b947b..000000000000 --- a/pkgs/applications/editors/emacs/modes/haskell/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { - name = "haskell-mode-1.45"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/haskell-mode-1.45.tar.gz; - md5 = "c609998580cdb9ca8888c7d47d22ca3b"; - }; -} diff --git a/pkgs/applications/editors/emacs/modes/nxml/builder.sh b/pkgs/applications/editors/emacs/modes/nxml/builder.sh deleted file mode 100644 index d2393362ebb6..000000000000 --- a/pkgs/applications/editors/emacs/modes/nxml/builder.sh +++ /dev/null @@ -1,7 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/emacs/site-lisp -cd $out/emacs/site-lisp -tar xvfz $src -mv nxml-mode-*/* . -rmdir nxml-mode-* diff --git a/pkgs/applications/editors/emacs/modes/nxml/default.nix b/pkgs/applications/editors/emacs/modes/nxml/default.nix deleted file mode 100644 index 57583bbfcb62..000000000000 --- a/pkgs/applications/editors/emacs/modes/nxml/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { - name = "nxml-mode-20041004"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/nxml-mode-20041004.tar.gz; - md5 = "ac137024cf337d6f11d8ab278d39b4db"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22f05dd7b92a..22babdb3b96f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2477,7 +2477,7 @@ rec { }; }; - cua = import ../applications/editors/emacs/modes/cua { + cua = import ../applications/editors/emacs-modes/cua { inherit fetchurl stdenv; }; @@ -2518,10 +2518,11 @@ rec { gtkGUI = true; }; - emacs22aa = import ../applications/editors/emacs-22-aa { - inherit fetchurl stdenv pkgconfig x11 Xaw3d libpng; + emacsUnicode = import ../applications/editors/emacs-unicode { + inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d libpng; inherit (xlibs) libXaw libXpm libXft; inherit (gtkLibs) gtk; + xawSupport = false; xaw3dSupport = false; gtkGUI = true; xftSupport = true; @@ -2595,7 +2596,7 @@ rec { inherit (gtkLibs) glib; }; - haskellMode = import ../applications/editors/emacs/modes/haskell { + haskellMode = import ../applications/editors/emacs-modes/haskell { inherit fetchurl stdenv; }; @@ -2687,7 +2688,7 @@ rec { motif = lesstif; }; - nxml = import ../applications/editors/emacs/modes/nxml { + nxml = import ../applications/editors/emacs-modes/nxml { inherit fetchurl stdenv; };