lol

* Start the switch to the new X libraries. It's still conditional: set `useOldXLibs' to `false' in all-packages-generic.nix to use them. * Added Xaw3d. * Added Xaw3d support to Emacs.

svn path=/nixpkgs/trunk/; revision=4263

+172 -17
+19 -8
pkgs/applications/editors/emacs/default.nix
··· 1 - {stdenv, fetchurl, xlibs}: 1 + { xawSupport ? true 2 + , xpmSupport ? true 3 + , xaw3dSupport ? false 4 + , stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null 5 + }: 6 + 7 + assert xawSupport -> libXaw != null; 8 + assert xpmSupport -> libXpm != null; 9 + assert xaw3dSupport -> Xaw3d != null; 2 10 3 11 stdenv.mkDerivation { 4 - name = "emacs-21.3"; 12 + name = "emacs-21.4a-Z"; 5 13 builder = ./builder.sh; 6 14 src = fetchurl { 7 - url = http://nix.cs.uu.nl/dist/tarballs/emacs-21.3.tar.gz; 8 - md5 = "a0bab457cbf5b4f8eb99d1d0a3ada420"; 15 + url = http://ftp.gnu.org/pub/gnu/emacs/emacs-21.4a.tar.gz; 16 + md5 = "8f9d97cbd126121bd5d97e5e31168a87"; 9 17 }; 10 - patches = [./patchfile]; 11 - inherit (xlibs) libXaw libX11; 12 - 13 - buildInputs = [xlibs.libXaw xlibs.libX11]; 18 + patches = [./crt.patch]; 19 + buildInputs = [ 20 + x11 21 + (if xawSupport then libXaw else null) 22 + (if xpmSupport then libXpm else null) 23 + (if xaw3dSupport then Xaw3d else null) 24 + ]; 14 25 }
pkgs/applications/editors/emacs/patchfile pkgs/applications/editors/emacs/crt.patch
+22
pkgs/development/libraries/Xaw3d/builder.sh
··· 1 + source $stdenv/setup 2 + 3 + configurePhase=configurePhase 4 + configurePhase() { 5 + cd lib/Xaw3d 6 + (mkdir X11 && cd X11 && ln -fs .. Xaw3d) 7 + xmkmf 8 + } 9 + 10 + buildPhase=buildPhase 11 + buildPhase() { 12 + make depend $makeFlags 13 + make $makeFlags 14 + } 15 + 16 + installPhase() { 17 + make install SHLIBDIR=$out/lib USRLIBDIR=$out/lib INCDIR=$out/include 18 + } 19 + 20 + makeFlags="CDEBUGFLAGS=" # !!! awful hack 21 + 22 + genericBuild
+51
pkgs/development/libraries/Xaw3d/config.patch
··· 1 + diff -rc xc-orig/lib/Xaw3d/Imakefile xc/lib/Xaw3d/Imakefile 2 + *** xc-orig/lib/Xaw3d/Imakefile 2003-03-08 15:55:18.000000000 +0100 3 + --- xc/lib/Xaw3d/Imakefile 2005-11-11 20:12:24.000000000 +0100 4 + *************** 5 + *** 9,15 **** 6 + XCOMM For grayed stipple shadows, define GRAY_BLKWHT_STIPPLES: 7 + #define GRAY_BLKWHT_STIPPLES 8 + XCOMM For scrollbars with arrows, define ARROW_SCROLLBARS: 9 + ! #undef ARROW_SCROLLBARS 10 + 11 + #define DoNormalLib NormalLibXaw 12 + #define DoSharedLib SharedLibXaw 13 + --- 9,15 ---- 14 + XCOMM For grayed stipple shadows, define GRAY_BLKWHT_STIPPLES: 15 + #define GRAY_BLKWHT_STIPPLES 16 + XCOMM For scrollbars with arrows, define ARROW_SCROLLBARS: 17 + ! #define ARROW_SCROLLBARS 18 + 19 + #define DoNormalLib NormalLibXaw 20 + #define DoSharedLib SharedLibXaw 21 + *************** 22 + *** 22,28 **** 23 + #define IncSubSubdir Xaw3d 24 + 25 + XCOMM When building outside an X11 source tree: 26 + ! XCOMM EXTRA_INCLUDES = -I. 27 + 28 + #ifdef SharedXawReqs 29 + REQUIREDLIBS = SharedXawReqs 30 + --- 22,28 ---- 31 + #define IncSubSubdir Xaw3d 32 + 33 + XCOMM When building outside an X11 source tree: 34 + ! EXTRA_INCLUDES = -I. 35 + 36 + #ifdef SharedXawReqs 37 + REQUIREDLIBS = SharedXawReqs 38 + diff -rc xc-orig/lib/Xaw3d/laylex.l xc/lib/Xaw3d/laylex.l 39 + *** xc-orig/lib/Xaw3d/laylex.l 1996-10-15 16:41:26.000000000 +0200 40 + --- xc/lib/Xaw3d/laylex.l 2005-11-11 20:03:50.000000000 +0100 41 + *************** 42 + *** 26,31 **** 43 + --- 26,33 ---- 44 + #ifdef __STDC__ 45 + static int count (); 46 + #endif 47 + + 48 + + static int LayYY_prev_more_offset = 0; 49 + %} 50 + %% 51 + vertical return VERTICAL;
+12
pkgs/development/libraries/Xaw3d/default.nix
··· 1 + {stdenv, fetchurl, x11, xmkmf, makedepend, libXmu, libXpm, libXp, bison, flex}: 2 + 3 + stdenv.mkDerivation { 4 + name = "Xaw3d-1.5E"; 5 + builder = ./builder.sh; 6 + src = fetchurl { 7 + url = http://freshmeat.net/redir/xaw3d/11835/url_tgz/Xaw3d-1.5E.tar.gz; 8 + md5 = "29ecfdcd6bcf47f62ecfd672d31269a1"; 9 + }; 10 + patches = [./config.patch]; 11 + buildInputs = [x11 xmkmf makedepend libXmu libXpm libXp bison flex]; 12 + }
+8
pkgs/development/libraries/xlibs-wrapper/builder.sh
··· 1 + source $stdenv/setup 2 + dontBuild=1 3 + dontMakeInstall=1 4 + nop() { 5 + sourceRoot=. 6 + } 7 + unpackPhase=nop 8 + genericBuild
+10
pkgs/development/libraries/xlibs-wrapper/default.nix
··· 1 + {stdenv, packages}: 2 + 3 + stdenv.mkDerivation { 4 + name = "xlibs-wrapper"; 5 + builder = ./builder.sh; 6 + propagatedBuildInputs = packages; 7 + } // { 8 + # For compatability with XFree86. 9 + buildClientLibs = true; 10 + }
+9 -3
pkgs/servers/x11/xorg/default.nix
··· 1040 1040 url = http://nix.cs.uu.nl/dist/tarballs/xorg/libXft-2.1.8.tar.bz2; 1041 1041 md5 = "18e7a98444ece30ea5b51a24269f8c7c"; 1042 1042 }; 1043 - buildInputs = [pkgconfig libXrender freetype fontconfig ]; 1043 + buildInputs = [pkgconfig libXrender libX11 ]; 1044 + propagatedBuildInputs = [freetype fontconfig ]; 1044 1045 }; 1045 1046 1046 1047 xsm = stdenv.mkDerivation { ··· 1786 1787 1787 1788 xmkmf = stdenv.mkDerivation { 1788 1789 name = "xmkmf-0.99.1"; 1790 + builder = ./xmkmf.sh; 1789 1791 src = fetchurl { 1790 1792 url = http://nix.cs.uu.nl/dist/tarballs/xorg/xmkmf-0.99.1.tar.bz2; 1791 1793 md5 = "75013b6eeed99fd7b4e7913144a9de22"; 1792 1794 }; 1793 1795 buildInputs = [pkgconfig ]; 1796 + propagatedBuildInputs = [imake]; 1797 + inherit xorgcffiles; 1794 1798 }; 1795 1799 1796 1800 xorgcffiles = stdenv.mkDerivation { ··· 1988 1992 url = http://nix.cs.uu.nl/dist/tarballs/xorg/xclock-0.99.1.tar.bz2; 1989 1993 md5 = "ec54b47ee229318cef76a3c86da9ef94"; 1990 1994 }; 1991 - buildInputs = [pkgconfig libX11 libXrender libXft libxkbfile ]; 1995 + buildInputs = [pkgconfig libX11 libXrender libXft libxkbfile libXaw ]; 1992 1996 }; 1993 1997 1994 1998 xf86videoati = stdenv.mkDerivation { ··· 2340 2344 md5 = "a3b65703a80cc0582757c595c0875612"; 2341 2345 }; 2342 2346 buildInputs = [pkgconfig libSM libX11 xproto kbproto ]; 2347 + # !!! prop libSM 2343 2348 }; 2344 2349 2345 2350 editres = stdenv.mkDerivation { ··· 2438 2443 url = http://nix.cs.uu.nl/dist/tarballs/xorg/libXaw-0.99.1.tar.bz2; 2439 2444 md5 = "731f8a6407765466d1170d609137a922"; 2440 2445 }; 2441 - buildInputs = [pkgconfig xproto libX11 libXext libXt libXmu libXpm libXp ]; 2446 + buildInputs = [pkgconfig xproto libX11 libXext libXt libXpm libXp ]; 2447 + propagatedBuildInputs = [libXmu]; 2442 2448 }; 2443 2449 2444 2450 x11perf = stdenv.mkDerivation {
+11
pkgs/servers/x11/xorg/xmkmf.sh
··· 1 + source $stdenv/setup 2 + 3 + postInstall=postInstall 4 + postInstall() { 5 + ensureDir $out/lib/X11/config 6 + ln -s $xorgcffiles/lib/X11/config/* $out/lib/X11/config 7 + touch $out/lib/X11/config/host.def # !!! hack 8 + touch $out/lib/X11/config/date.def # !!! hack 9 + } 10 + 11 + genericBuild
+30 -6
pkgs/system/all-packages-generic.nix
··· 14 14 15 15 ### Symbolic names. 16 16 17 - x11 = xlibs.xlibs; # !!! should be `x11ClientLibs' or some such 17 + useOldXLibs = true; 18 18 19 + # `xlibs' is the set of X library components. This used to be the 20 + # old modular X libraries project (called `xlibs') but now it's just 21 + # the set of packages in the modular X.org tree (which also includes 22 + # non-library components like the server, drivers, fonts, etc.). 23 + xlibs = if useOldXLibs then xlibsOld else xorg; 24 + 25 + # `xlibs.xlibs' is a wrapper packages that combines libX11 and a bunch 26 + # of other basic X client libraries. 27 + x11 = if useOldXLibs then xlibsOld.xlibs else xlibsWrapper; 28 + 19 29 20 30 ### BUILD SUPPORT 21 31 ··· 979 989 inherit fetchurl stdenv freetype expat; 980 990 }; 981 991 982 - xlibs = (import ../development/libraries/xlibs) { 992 + xlibsOld = (import ../development/libraries/xlibs) { 983 993 inherit fetchurl stdenv pkgconfig freetype fontconfig; 984 994 }; 985 995 986 - # Xaw3d = import ../development/libraries/Xaw3d { 987 - # inherit fetchurl stdenv; 988 - # }; 996 + xlibsWrapper = import ../development/libraries/xlibs-wrapper { 997 + inherit stdenv; 998 + packages = [ 999 + freetype fontconfig xlibs.xproto xlibs.libX11 xlibs.libXt 1000 + xlibs.libXft xlibs.libXext xlibs.libSM xlibs.libICE 1001 + xlibs.xextproto 1002 + ]; 1003 + }; 1004 + 1005 + Xaw3d = import ../development/libraries/Xaw3d { 1006 + inherit fetchurl stdenv x11 bison; 1007 + flex = flexnew; 1008 + # !!! makedepend is impure 1009 + inherit (xlibs) xmkmf makedepend libXmu libXpm libXp; 1010 + }; 989 1011 990 1012 libdrm = import ../development/libraries/libdrm { 991 1013 inherit fetchurl stdenv; ··· 1727 1749 }; 1728 1750 1729 1751 emacs = (import ../applications/editors/emacs) { 1730 - inherit fetchurl stdenv xlibs; 1752 + inherit fetchurl stdenv x11 Xaw3d; 1753 + inherit (xlibs) libXaw libXpm; 1754 + xaw3dSupport = false; 1731 1755 }; 1732 1756 1733 1757 nxml = (import ../applications/editors/emacs/modes/nxml) {