From b724614087479a5b27db775030535bd488f6618e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 Oct 2007 16:21:41 +0000 Subject: [PATCH] * Newer Emacs 23.0.0.1 snapshot. svn path=/nixpkgs/trunk/; revision=9519 --- .../editors/emacs-unicode/builder.sh | 25 ++++++----- .../editors/emacs-unicode/crt.patch | 41 ------------------- .../editors/emacs-unicode/default.nix | 26 +++++++----- .../editors/emacs-unicode/xft-default.patch | 39 ------------------ pkgs/top-level/all-packages.nix | 3 +- 5 files changed, 32 insertions(+), 102 deletions(-) delete mode 100644 pkgs/applications/editors/emacs-unicode/crt.patch delete mode 100644 pkgs/applications/editors/emacs-unicode/xft-default.patch diff --git a/pkgs/applications/editors/emacs-unicode/builder.sh b/pkgs/applications/editors/emacs-unicode/builder.sh index 46e41f3ef49d..8b53ade4f97c 100644 --- a/pkgs/applications/editors/emacs-unicode/builder.sh +++ b/pkgs/applications/editors/emacs-unicode/builder.sh @@ -1,17 +1,20 @@ source $stdenv/setup -myglibc=`cat ${NIX_GCC}/nix-support/orig-libc` -echo "glibc: $myglibc" +preConfigure=preConfigure +preConfigure() { + libc=$(cat ${NIX_GCC}/nix-support/orig-libc) + echo "libc: $libc" -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 + substituteInPlace src/s/gnu-linux.h \ + --replace /usr/lib/crt1.o $libc/lib/crt1.o \ + --replace /usr/lib/crti.o $libc/lib/crti.o \ + --replace /usr/lib/crtn.o $libc/lib/crtn.o + + for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in ./admin/unidata/Makefile; do + substituteInPlace $i --replace /bin/pwd pwd + done } +preBuild="make bootstrap" + genericBuild diff --git a/pkgs/applications/editors/emacs-unicode/crt.patch b/pkgs/applications/editors/emacs-unicode/crt.patch deleted file mode 100644 index 93f17643a1af..000000000000 --- a/pkgs/applications/editors/emacs-unicode/crt.patch +++ /dev/null @@ -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~ diff --git a/pkgs/applications/editors/emacs-unicode/default.nix b/pkgs/applications/editors/emacs-unicode/default.nix index dbacd3e20b9f..5091ccf5dd68 100644 --- a/pkgs/applications/editors/emacs-unicode/default.nix +++ b/pkgs/applications/editors/emacs-unicode/default.nix @@ -4,7 +4,8 @@ , gtkGUI ? false , xftSupport ? false , stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null -, pkgconfig ? null, gtk ? null, libXft ? null, libpng ? null +, pkgconfig ? null, gtk ? null, libXft ? null +, libpng, libjpeg, libungif, libtiff }: assert xawSupport -> libXaw != null; @@ -14,25 +15,29 @@ assert gtkGUI -> pkgconfig != null && gtk != null; assert xftSupport -> libXft != null && libpng != null; # libpng = probably a bug stdenv.mkDerivation { - name = "emacs-23.0.0.1-pre20070127"; + name = "emacs-23.0.0.1-pre20070705"; + builder = ./builder.sh; + src = fetchurl { - url = http://losser.st-lab.cs.uu.nl/~eelco/dist/emacs-snapshot_20070127.orig.tar.gz; - sha256 = "1p5ds3sjxx6izzmfq4k3wkvklm8yw7spanl7zgl16s7cln3m7hv2"; + url = http://debs.peadrop.com/pool/edgy/backports/emacs-snapshot_20070705.orig.tar.gz; + sha256 = "1blybacpsxha2v24kj482wl3g1z93rwddfc8rsqsk6dr6f5kdj5q"; }; - patches = [ - ./crt.patch - # From Debian: use --enable-font-backend by default. - ./xft-default.patch - ]; + +# patches = [ +# ./crt.patch +# ]; + buildInputs = [ ncurses x11 (if xawSupport then libXaw else null) (if xpmSupport then libXpm else null) (if xaw3dSupport then Xaw3d else null) + libpng libjpeg libungif libtiff # maybe not strictly required? ] ++ (if gtkGUI then [pkgconfig gtk] else []) - ++ (if xftSupport then [libXft libpng] else []); + ++ (if xftSupport then [libXft] else []); + configureFlags = " ${if gtkGUI then "--with-gtk --enable-font-backend --with-xft" else ""} "; @@ -40,5 +45,6 @@ stdenv.mkDerivation { meta = { description = "Emacs with Unicode, GTK and Xft support (23.x alpha)"; homepage = http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs; + license = "GPL"; }; } diff --git a/pkgs/applications/editors/emacs-unicode/xft-default.patch b/pkgs/applications/editors/emacs-unicode/xft-default.patch deleted file mode 100644 index c98ba66a6e4e..000000000000 --- a/pkgs/applications/editors/emacs-unicode/xft-default.patch +++ /dev/null @@ -1,39 +0,0 @@ -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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1503c22fd53a..e802ec043792 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3474,7 +3474,8 @@ rec { }; emacsUnicode = import ../applications/editors/emacs-unicode { - inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d libpng; + inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d + libpng libjpeg libungif libtiff; inherit (xlibs) libXaw libXpm libXft; inherit (gtkLibs) gtk; xawSupport = false;