* 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
This commit is contained in:
Eelco Dolstra 2007-02-05 14:55:15 +00:00
parent c7de8ceb73
commit 6c92badd87
23 changed files with 63 additions and 96 deletions

View File

@ -1,4 +0,0 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
cp $src $out/emacs/site-lisp/cua.el

View File

@ -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";
};
}

View File

@ -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

View File

@ -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";
};
}

View File

@ -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-*

View File

@ -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";
};
}

View File

@ -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

View File

@ -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 ""}
";
}

View File

@ -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 },

View File

@ -1,4 +0,0 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
cp $src $out/emacs/site-lisp/cua.el

View File

@ -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";
};
}

View File

@ -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

View File

@ -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";
};
}

View File

@ -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-*

View File

@ -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";
};
}

View File

@ -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;
};