From bd56b7d65c9c28414ca6c8002830d048acef2285 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 27 Mar 2004 21:59:31 +0000 Subject: [PATCH] * Started moving from XFree86 to the freedesktop.org Xlibs libraries. svn path=/nixpkgs/trunk/; revision=860 --- pkgs/BUGS | 50 +++ pkgs/TODO | 6 + .../libraries/freedesktop/libICE/builder.sh | 3 + .../libraries/freedesktop/libICE/default.nix | 13 + .../libraries/freedesktop/libSM/builder.sh | 8 + .../libraries/freedesktop/libSM/default.nix | 14 + .../libraries/freedesktop/libX11/builder.sh | 10 + .../libraries/freedesktop/libX11/default.nix | 14 + .../libraries/freedesktop/libXau/builder.sh | 5 + .../libraries/freedesktop/libXau/default.nix | 13 + .../libraries/freedesktop/libXt/builder.sh | 3 + .../libraries/freedesktop/libXt/default.nix | 15 + .../libraries/freedesktop/libXt/patch | 360 ++++++++++++++++++ .../freedesktop/libXtrans/builder.sh | 5 + .../freedesktop/libXtrans/default.nix | 12 + .../freedesktop/xextensions/builder.sh | 5 + .../freedesktop/xextensions/default.nix | 12 + .../libraries/freedesktop/xlibs/builder.sh | 7 + .../libraries/freedesktop/xlibs/default.nix | 12 + .../libraries/freedesktop/xproto/builder.sh | 5 + .../libraries/freedesktop/xproto/default.nix | 12 + .../libraries/gtk+-1/gdk-pixbuf/builder.sh | 13 +- .../libraries/gtk+-1/gdk-pixbuf/default.nix | 7 +- .../libraries/gtk+-1/glib/builder.sh | 12 +- .../libraries/gtk+-1/glib/default.nix | 6 +- .../libraries/gtk+-1/gtk+/builder.sh | 17 +- .../libraries/gtk+-1/gtk+/default.nix | 6 +- pkgs/system/all-packages-generic.nix | 76 ++-- 28 files changed, 659 insertions(+), 62 deletions(-) create mode 100644 pkgs/BUGS create mode 100644 pkgs/TODO create mode 100755 pkgs/development/libraries/freedesktop/libICE/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/libICE/default.nix create mode 100755 pkgs/development/libraries/freedesktop/libSM/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/libSM/default.nix create mode 100755 pkgs/development/libraries/freedesktop/libX11/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/libX11/default.nix create mode 100755 pkgs/development/libraries/freedesktop/libXau/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/libXau/default.nix create mode 100755 pkgs/development/libraries/freedesktop/libXt/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/libXt/default.nix create mode 100644 pkgs/development/libraries/freedesktop/libXt/patch create mode 100755 pkgs/development/libraries/freedesktop/libXtrans/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/libXtrans/default.nix create mode 100755 pkgs/development/libraries/freedesktop/xextensions/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/xextensions/default.nix create mode 100755 pkgs/development/libraries/freedesktop/xlibs/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/xlibs/default.nix create mode 100755 pkgs/development/libraries/freedesktop/xproto/builder.sh create mode 100644 pkgs/development/libraries/freedesktop/xproto/default.nix diff --git a/pkgs/BUGS b/pkgs/BUGS new file mode 100644 index 000000000000..31cb7dc51eaf --- /dev/null +++ b/pkgs/BUGS @@ -0,0 +1,50 @@ +* If NIX_DEBUG is turned on (set to "1"), autoconf configure scripts + may fail to find the correct preprocessor: + + checking how to run the C preprocessor... /lib/cpp + + +* When building gcc using a Nix gcc, generated libraries link against + the libraries of the latter: + + $ ldd /nix/store/3b1d3995c4edbf026be5c73f66f69245-gcc-3.3.3/lib/libstdc++.so + ... + libgcc_s.so.1 => /nix/store/1f19e61d1b7051f1131f78b41b2a0e7e-gcc-3.3.2/lib/libgcc_s.so.1 (0x400de000) + (wrong! should be .../3b1d.../lib/libgcc_s...) + ... + + +* Subtle problems can occur if the Nix store directory or one of its + parents is a symlink. E.g., purity checks can barf: + + impure path `/data/nix/store/099cd9aee7d056a9922fd6dd116a3f5c-gcc-3.3.3/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.3.3/crtbegin.o' used in link + + (This happened because /nix was a symlink to /data/nix.) Maybe we + should disallow this entirely, since, exactly because it is + perfectly legal for a builder to expand a symlink, we can end up + with derivates referring to paths that existed in the build + environment but not in the target environment. + + Disallowing this can be highly inconvenient, since it makes it + harder to move the Nix store to a different file system. (On Linux, + `bind' mounts can help here.) + + +* In libXt: + +/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c -o ActionHook.lo `test -f 'ActionHook.c' || echo './'`ActionHook.c +mkdir .libs + gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c ActionHook.c -fPIC -DPIC -o .libs/ActionHook.o +In file included from IntrinsicI.h:55, + from ActionHook.c:69: +include/X11/IntrinsicP.h:54:27: X11/Intrinsic.h: No such file or directory + + +* Then: + + gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include -I./include/X11 -g -O2 -c ActionHook.c -fPIC -DPIC -o .libs/ActionHook.o +In file included from IntrinsicI.h:55, + from ActionHook.c:69: +include/X11/IntrinsicP.h:202:25: X11/ObjectP.h: No such file or directory + +(moved to include/X11; should edit include/Makefile.am) \ No newline at end of file diff --git a/pkgs/TODO b/pkgs/TODO new file mode 100644 index 000000000000..42bd96b25d41 --- /dev/null +++ b/pkgs/TODO @@ -0,0 +1,6 @@ +* Add $propagatedBuildInputs to $buildInputs in setup.sh. Then clean + up freedesktop/libX11/default.nix, libSM. + +* In setup.sh: create $out prior to calling `make install'. + +* In setup.sh: `mkdir -f' -> `if ! test -x $out/...; then mkdir ...'. diff --git a/pkgs/development/libraries/freedesktop/libICE/builder.sh b/pkgs/development/libraries/freedesktop/libICE/builder.sh new file mode 100755 index 000000000000..a73f5a6d5b8d --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libICE/builder.sh @@ -0,0 +1,3 @@ +#! /bin/sh -e +. $stdenv/setup +genericBuild diff --git a/pkgs/development/libraries/freedesktop/libICE/default.nix b/pkgs/development/libraries/freedesktop/libICE/default.nix new file mode 100644 index 000000000000..58dc8794c180 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libICE/default.nix @@ -0,0 +1,13 @@ +{stdenv, fetchurl, pkgconfig, libX11}: + +derivation { + name = "libICE-6.3.2"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/libICE-6.3.2.tar.bz2; + md5 = "06db02e3df846b127a6e2dc3e345039c"; + }; + buildInputs = [pkgconfig libX11]; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/libSM/builder.sh b/pkgs/development/libraries/freedesktop/libSM/builder.sh new file mode 100755 index 000000000000..3f0cb5a15052 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libSM/builder.sh @@ -0,0 +1,8 @@ +#! /bin/sh -e +. $stdenv/setup +genericBuild + +if test -n "$_propagatedBuildInputs"; then + if ! test -x $out/nix-support; then mkdir $out/nix-support; fi + echo "$_propagatedBuildInputs" > $out/nix-support/propagated-build-inputs +fi diff --git a/pkgs/development/libraries/freedesktop/libSM/default.nix b/pkgs/development/libraries/freedesktop/libSM/default.nix new file mode 100644 index 000000000000..28295b4e9b42 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libSM/default.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, pkgconfig, libX11, libICE}: + +derivation { + name = "libSM-6.0.2"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/libSM-6.0.2.tar.bz2; + md5 = "0ecc3ec75391d9158f25a94a652bd387"; + }; + buildInputs = [pkgconfig libX11 libICE]; + _propagatedBuildInputs = [libICE]; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/libX11/builder.sh b/pkgs/development/libraries/freedesktop/libX11/builder.sh new file mode 100755 index 000000000000..bb81d4bdb325 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libX11/builder.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. $stdenv/setup + +genericBuild + +if test -n "$_propagatedBuildInputs"; then + if ! test -x $out/nix-support; then mkdir $out/nix-support; fi + echo "$_propagatedBuildInputs" > $out/nix-support/propagated-build-inputs +fi diff --git a/pkgs/development/libraries/freedesktop/libX11/default.nix b/pkgs/development/libraries/freedesktop/libX11/default.nix new file mode 100644 index 000000000000..f432a03a3f61 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libX11/default.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, pkgconfig, xproto, xextensions, libXtrans, libXau}: + +derivation { + name = "libX11-6.2.1"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/libX11-6.2.1.tar.bz2; + md5 = "59b6fa7cd6fe7ee1da92fd1b56d1cee3"; + }; + buildInputs = [pkgconfig xproto xextensions libXtrans libXau]; + _propagatedBuildInputs = [xproto xextensions libXtrans libXau]; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/libXau/builder.sh b/pkgs/development/libraries/freedesktop/libXau/builder.sh new file mode 100755 index 000000000000..dc844d758a83 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXau/builder.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. $stdenv/setup + +genericBuild diff --git a/pkgs/development/libraries/freedesktop/libXau/default.nix b/pkgs/development/libraries/freedesktop/libXau/default.nix new file mode 100644 index 000000000000..be6d6e262c0a --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXau/default.nix @@ -0,0 +1,13 @@ +{stdenv, fetchurl, pkgconfig, xproto}: + +derivation { + name = "libXau-0.1.1"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/libXau-0.1.1.tar.bz2; + md5 = "3d747ada4a7d17538fa21c62d5608656"; + }; + buildInputs = [pkgconfig xproto]; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/libXt/builder.sh b/pkgs/development/libraries/freedesktop/libXt/builder.sh new file mode 100755 index 000000000000..a73f5a6d5b8d --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXt/builder.sh @@ -0,0 +1,3 @@ +#! /bin/sh -e +. $stdenv/setup +genericBuild diff --git a/pkgs/development/libraries/freedesktop/libXt/default.nix b/pkgs/development/libraries/freedesktop/libXt/default.nix new file mode 100644 index 000000000000..5d2e62c8c33f --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXt/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, pkgconfig, libX11, libSM, patch}: + +derivation { + name = "libXt-0.1.4"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/libXt-0.1.4.tar.bz2; + md5 = "32b6528c9deb058d1a9ed17ffa848df8"; + }; + buildInputs = [pkgconfig libX11 libSM patch]; + # This patch should become unnecessary soon; already been fixed in CVS. + patches = [./patch]; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/libXt/patch b/pkgs/development/libraries/freedesktop/libXt/patch new file mode 100644 index 000000000000..85cd4c87c60b --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXt/patch @@ -0,0 +1,360 @@ +diff -x '*~' -rcN libXt-0.1.4-orig/include/X11/ObjectP.h libXt-0.1.4/include/X11/ObjectP.h +*** libXt-0.1.4-orig/include/X11/ObjectP.h 1970-01-01 01:00:00.000000000 +0100 +--- libXt-0.1.4/include/X11/ObjectP.h 2004-01-14 06:09:40.000000000 +0100 +*************** +*** 0 **** +--- 1,139 ---- ++ /* $Xorg: ObjectP.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ ++ ++ /*********************************************************** ++ ++ Copyright 1987, 1988, 1994, 1998 The Open Group ++ ++ Permission to use, copy, modify, distribute, and sell this software and its ++ documentation for any purpose is hereby granted without fee, provided that ++ the above copyright notice appear in all copies and that both that ++ copyright notice and this permission notice appear in supporting ++ documentation. ++ ++ The above copyright notice and this permission notice shall be included in ++ all copies or substantial portions of the Software. ++ ++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ ++ Except as contained in this notice, the name of The Open Group shall not be ++ used in advertising or otherwise to promote the sale, use or other dealings ++ in this Software without prior written authorization from The Open Group. ++ ++ ++ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. ++ ++ All Rights Reserved ++ ++ Permission to use, copy, modify, and distribute this software and its ++ documentation for any purpose and without fee is hereby granted, ++ provided that the above copyright notice appear in all copies and that ++ both that copyright notice and this permission notice appear in ++ supporting documentation, and that the name of Digital not be ++ used in advertising or publicity pertaining to distribution of the ++ software without specific, written prior permission. ++ ++ DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ++ ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ++ DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ++ ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, ++ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ++ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ++ SOFTWARE. ++ ++ ******************************************************************/ ++ ++ #ifndef _Xt_ObjectP_h_ ++ #define _Xt_ObjectP_h_ ++ ++ #include ++ ++ /********************************************************** ++ * Object Instance Data Structures ++ * ++ **********************************************************/ ++ /* these fields match CorePart and can not be changed */ ++ ++ typedef struct _ObjectPart { ++ Widget self; /* pointer to widget itself */ ++ WidgetClass widget_class; /* pointer to Widget's ClassRec */ ++ Widget parent; /* parent widget */ ++ XrmName xrm_name; /* widget resource name quarkified */ ++ Boolean being_destroyed; /* marked for destroy */ ++ XtCallbackList destroy_callbacks; /* who to call when widget destroyed */ ++ XtPointer constraints; /* constraint record */ ++ } ObjectPart; ++ ++ typedef struct _ObjectRec { ++ ObjectPart object; ++ } ObjectRec; ++ ++ /******************************************************** ++ * Object Class Data Structures ++ * ++ ********************************************************/ ++ /* these fields match CoreClassPart and can not be changed */ ++ /* ideally these structures would only contain the fields required; ++ but because the CoreClassPart cannot be changed at this late date ++ extraneous fields are necessary to make the field offsets match */ ++ ++ typedef struct _ObjectClassPart { ++ ++ WidgetClass superclass; /* pointer to superclass ClassRec */ ++ String class_name; /* widget resource class name */ ++ Cardinal widget_size; /* size in bytes of widget record */ ++ XtProc class_initialize; /* class initialization proc */ ++ XtWidgetClassProc class_part_initialize; /* dynamic initialization */ ++ XtEnum class_inited; /* has class been initialized? */ ++ XtInitProc initialize; /* initialize subclass fields */ ++ XtArgsProc initialize_hook; /* notify that initialize called */ ++ XtProc obj1; /* NULL */ ++ XtPointer obj2; /* NULL */ ++ Cardinal obj3; /* NULL */ ++ XtResourceList resources; /* resources for subclass fields */ ++ Cardinal num_resources; /* number of entries in resources */ ++ XrmClass xrm_class; /* resource class quarkified */ ++ Boolean obj4; /* NULL */ ++ XtEnum obj5; /* NULL */ ++ Boolean obj6; /* NULL */ ++ Boolean obj7; /* NULL */ ++ XtWidgetProc destroy; /* free data for subclass pointers */ ++ XtProc obj8; /* NULL */ ++ XtProc obj9; /* NULL */ ++ XtSetValuesFunc set_values; /* set subclass resource values */ ++ XtArgsFunc set_values_hook; /* notify that set_values called */ ++ XtProc obj10; /* NULL */ ++ XtArgsProc get_values_hook; /* notify that get_values called */ ++ XtProc obj11; /* NULL */ ++ XtVersionType version; /* version of intrinsics used */ ++ XtPointer callback_private; /* list of callback offsets */ ++ String obj12; /* NULL */ ++ XtProc obj13; /* NULL */ ++ XtProc obj14; /* NULL */ ++ XtPointer extension; /* pointer to extension record */ ++ }ObjectClassPart; ++ ++ typedef struct { ++ XtPointer next_extension; /* 1st 4 required for all extension records */ ++ XrmQuark record_type; /* NULLQUARK; when on ObjectClassPart */ ++ long version; /* must be XtObjectExtensionVersion */ ++ Cardinal record_size; /* sizeof(ObjectClassExtensionRec) */ ++ XtAllocateProc allocate; ++ XtDeallocateProc deallocate; ++ } ObjectClassExtensionRec, *ObjectClassExtension; ++ ++ typedef struct _ObjectClassRec { ++ ObjectClassPart object_class; ++ } ObjectClassRec; ++ ++ externalref ObjectClassRec objectClassRec; ++ ++ #define XtObjectExtensionVersion 1L ++ #define XtInheritAllocate ((XtAllocateProc) _XtInherit) ++ #define XtInheritDeallocate ((XtDeallocateProc) _XtInherit) ++ ++ #endif /*_Xt_ObjectP_h_*/ +diff -x '*~' -rcN libXt-0.1.4-orig/Makefile.in libXt-0.1.4/Makefile.in +*** libXt-0.1.4-orig/Makefile.in 2004-01-17 05:14:05.000000000 +0100 +--- libXt-0.1.4/Makefile.in 2004-03-27 22:27:07.000000000 +0100 +*************** +*** 163,169 **** + + SUBDIRS = include util + +! AM_CFLAGS = $(RENDER_CFLAGS) $(X_CFLAGS) -I$(top_srcdir)/include/X11 + + lib_LTLIBRARIES = libXt.la + +--- 163,169 ---- + + SUBDIRS = include util + +! AM_CFLAGS = $(RENDER_CFLAGS) $(X_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/include/X11 + + lib_LTLIBRARIES = libXt.la + +*************** +*** 899,904 **** +--- 899,905 ---- + $(top_builddir)/util/makestrs $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c + install -d include/X11/ + install -m644 $(top_builddir)/StringDefs.h include/X11/ ++ install -m644 $(top_builddir)/Shell.h include/X11/ + + $(top_builddir)/util/makestrs$(EXEEXT): force + cd util; $(MAKE) +diff -x '*~' -rcN libXt-0.1.4-orig/ObjectP.h libXt-0.1.4/ObjectP.h +*** libXt-0.1.4-orig/ObjectP.h 2004-01-14 06:09:40.000000000 +0100 +--- libXt-0.1.4/ObjectP.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,139 **** +- /* $Xorg: ObjectP.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ +- +- /*********************************************************** +- +- Copyright 1987, 1988, 1994, 1998 The Open Group +- +- Permission to use, copy, modify, distribute, and sell this software and its +- documentation for any purpose is hereby granted without fee, provided that +- the above copyright notice appear in all copies and that both that +- copyright notice and this permission notice appear in supporting +- documentation. +- +- The above copyright notice and this permission notice shall be included in +- all copies or substantial portions of the Software. +- +- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +- OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- +- Except as contained in this notice, the name of The Open Group shall not be +- used in advertising or otherwise to promote the sale, use or other dealings +- in this Software without prior written authorization from The Open Group. +- +- +- Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. +- +- All Rights Reserved +- +- Permission to use, copy, modify, and distribute this software and its +- documentation for any purpose and without fee is hereby granted, +- provided that the above copyright notice appear in all copies and that +- both that copyright notice and this permission notice appear in +- supporting documentation, and that the name of Digital not be +- used in advertising or publicity pertaining to distribution of the +- software without specific, written prior permission. +- +- DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +- DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +- ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +- SOFTWARE. +- +- ******************************************************************/ +- +- #ifndef _Xt_ObjectP_h_ +- #define _Xt_ObjectP_h_ +- +- #include +- +- /********************************************************** +- * Object Instance Data Structures +- * +- **********************************************************/ +- /* these fields match CorePart and can not be changed */ +- +- typedef struct _ObjectPart { +- Widget self; /* pointer to widget itself */ +- WidgetClass widget_class; /* pointer to Widget's ClassRec */ +- Widget parent; /* parent widget */ +- XrmName xrm_name; /* widget resource name quarkified */ +- Boolean being_destroyed; /* marked for destroy */ +- XtCallbackList destroy_callbacks; /* who to call when widget destroyed */ +- XtPointer constraints; /* constraint record */ +- } ObjectPart; +- +- typedef struct _ObjectRec { +- ObjectPart object; +- } ObjectRec; +- +- /******************************************************** +- * Object Class Data Structures +- * +- ********************************************************/ +- /* these fields match CoreClassPart and can not be changed */ +- /* ideally these structures would only contain the fields required; +- but because the CoreClassPart cannot be changed at this late date +- extraneous fields are necessary to make the field offsets match */ +- +- typedef struct _ObjectClassPart { +- +- WidgetClass superclass; /* pointer to superclass ClassRec */ +- String class_name; /* widget resource class name */ +- Cardinal widget_size; /* size in bytes of widget record */ +- XtProc class_initialize; /* class initialization proc */ +- XtWidgetClassProc class_part_initialize; /* dynamic initialization */ +- XtEnum class_inited; /* has class been initialized? */ +- XtInitProc initialize; /* initialize subclass fields */ +- XtArgsProc initialize_hook; /* notify that initialize called */ +- XtProc obj1; /* NULL */ +- XtPointer obj2; /* NULL */ +- Cardinal obj3; /* NULL */ +- XtResourceList resources; /* resources for subclass fields */ +- Cardinal num_resources; /* number of entries in resources */ +- XrmClass xrm_class; /* resource class quarkified */ +- Boolean obj4; /* NULL */ +- XtEnum obj5; /* NULL */ +- Boolean obj6; /* NULL */ +- Boolean obj7; /* NULL */ +- XtWidgetProc destroy; /* free data for subclass pointers */ +- XtProc obj8; /* NULL */ +- XtProc obj9; /* NULL */ +- XtSetValuesFunc set_values; /* set subclass resource values */ +- XtArgsFunc set_values_hook; /* notify that set_values called */ +- XtProc obj10; /* NULL */ +- XtArgsProc get_values_hook; /* notify that get_values called */ +- XtProc obj11; /* NULL */ +- XtVersionType version; /* version of intrinsics used */ +- XtPointer callback_private; /* list of callback offsets */ +- String obj12; /* NULL */ +- XtProc obj13; /* NULL */ +- XtProc obj14; /* NULL */ +- XtPointer extension; /* pointer to extension record */ +- }ObjectClassPart; +- +- typedef struct { +- XtPointer next_extension; /* 1st 4 required for all extension records */ +- XrmQuark record_type; /* NULLQUARK; when on ObjectClassPart */ +- long version; /* must be XtObjectExtensionVersion */ +- Cardinal record_size; /* sizeof(ObjectClassExtensionRec) */ +- XtAllocateProc allocate; +- XtDeallocateProc deallocate; +- } ObjectClassExtensionRec, *ObjectClassExtension; +- +- typedef struct _ObjectClassRec { +- ObjectClassPart object_class; +- } ObjectClassRec; +- +- externalref ObjectClassRec objectClassRec; +- +- #define XtObjectExtensionVersion 1L +- #define XtInheritAllocate ((XtAllocateProc) _XtInherit) +- #define XtInheritDeallocate ((XtDeallocateProc) _XtInherit) +- +- #endif /*_Xt_ObjectP_h_*/ +--- 0 ---- +diff -x '*~' -rcN libXt-0.1.4-orig/Xtos.h libXt-0.1.4/Xtos.h +*** libXt-0.1.4-orig/Xtos.h 2004-01-14 06:09:41.000000000 +0100 +--- libXt-0.1.4/Xtos.h 2004-03-27 21:53:47.000000000 +0100 +*************** +*** 53,61 **** + #ifndef _Xtos_h + #define _Xtos_h + +! #define ALLOCATE_LOCAL_FALLBACK(_size) XtMalloc((unsigned long)(_size)) +! #define DEALLOCATE_LOCAL_FALLBACK(_ptr) XtFree((XtPointer)(_ptr)) +! #include + + #ifdef CRAY + #define WORD64 +--- 53,77 ---- + #ifndef _Xtos_h + #define _Xtos_h + +! #if HAVE_ALLOCA +! /* AIX requires this to be the first thing in the file. */ +! # if HAVE_ALLOCA_H +! # include +! # else +! # ifdef _AIX +! #pragma alloca +! # else +! # ifndef alloca /* predefined by HP cc +Olibcalls */ +! char *alloca (); +! # endif +! # endif +! # endif +! #define ALLOCATE_LOCAL(size) alloca((int)(size)) +! #define DEALLOCATE_LOCAL(ptr) /* as nothing */ +! #else +! #define ALLOCATE_LOCAL(_size) XtMalloc((unsigned long)(_size)) +! #define DEALLOCATE_LOCAL(_ptr) XtFree((XtPointer)(_ptr)) +! #endif + + #ifdef CRAY + #define WORD64 diff --git a/pkgs/development/libraries/freedesktop/libXtrans/builder.sh b/pkgs/development/libraries/freedesktop/libXtrans/builder.sh new file mode 100755 index 000000000000..dc844d758a83 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXtrans/builder.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. $stdenv/setup + +genericBuild diff --git a/pkgs/development/libraries/freedesktop/libXtrans/default.nix b/pkgs/development/libraries/freedesktop/libXtrans/default.nix new file mode 100644 index 000000000000..b5f9eb590b5b --- /dev/null +++ b/pkgs/development/libraries/freedesktop/libXtrans/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl}: + +derivation { + name = "libXtrans-0.1"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/libXtrans-0.1.tar.bz2; + md5 = "a5ae4c7a75f930053b8327f7bd0c1361"; + }; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/xextensions/builder.sh b/pkgs/development/libraries/freedesktop/xextensions/builder.sh new file mode 100755 index 000000000000..dc844d758a83 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/xextensions/builder.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. $stdenv/setup + +genericBuild diff --git a/pkgs/development/libraries/freedesktop/xextensions/default.nix b/pkgs/development/libraries/freedesktop/xextensions/default.nix new file mode 100644 index 000000000000..f22195154b98 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/xextensions/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl}: + +derivation { + name = "xextensions-1.0.1"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/xextensions-1.0.1.tar.bz2; + md5 = "e61bca2a4757b736c9557dc8a7df2217"; + }; + inherit stdenv; +} diff --git a/pkgs/development/libraries/freedesktop/xlibs/builder.sh b/pkgs/development/libraries/freedesktop/xlibs/builder.sh new file mode 100755 index 000000000000..0151f8c7eba5 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/xlibs/builder.sh @@ -0,0 +1,7 @@ +#! /bin/sh -e + +. $stdenv/setup + +mkdir $out +mkdir $out/nix-support +echo "$propagatedBuildInputs" > $out/nix-support/propagated-build-inputs diff --git a/pkgs/development/libraries/freedesktop/xlibs/default.nix b/pkgs/development/libraries/freedesktop/xlibs/default.nix new file mode 100644 index 000000000000..a5ef56ba46c7 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/xlibs/default.nix @@ -0,0 +1,12 @@ +{stdenv, libX11, libXt}: + +derivation { + name = "xlib-1.0"; + system = stdenv.system; + builder = ./builder.sh; + propagatedBuildInputs = [libX11 libXt]; + inherit stdenv; +} // { + # For compatability with XFree86. + buildClientLibs = true; +} diff --git a/pkgs/development/libraries/freedesktop/xproto/builder.sh b/pkgs/development/libraries/freedesktop/xproto/builder.sh new file mode 100755 index 000000000000..dc844d758a83 --- /dev/null +++ b/pkgs/development/libraries/freedesktop/xproto/builder.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. $stdenv/setup + +genericBuild diff --git a/pkgs/development/libraries/freedesktop/xproto/default.nix b/pkgs/development/libraries/freedesktop/xproto/default.nix new file mode 100644 index 000000000000..008590ef43df --- /dev/null +++ b/pkgs/development/libraries/freedesktop/xproto/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl}: + +derivation { + name = "xproto-6.6.1"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://freedesktop.org/~xlibs/release/xlibs-1.0/xproto-6.6.1.tar.bz2; + md5 = "8a7546a607dcd61b2ee595c763fd7f85"; + }; + inherit stdenv; +} diff --git a/pkgs/development/libraries/gtk+-1/gdk-pixbuf/builder.sh b/pkgs/development/libraries/gtk+-1/gdk-pixbuf/builder.sh index c3dc02383054..a73f5a6d5b8d 100755 --- a/pkgs/development/libraries/gtk+-1/gdk-pixbuf/builder.sh +++ b/pkgs/development/libraries/gtk+-1/gdk-pixbuf/builder.sh @@ -1,10 +1,3 @@ -#! /bin/sh - -buildinputs="$gtk $libtiff $libjpeg $libpng" -. $stdenv/setup || exit 1 - -tar xvfj $src || exit 1 -cd gdk-pixbuf-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 +#! /bin/sh -e +. $stdenv/setup +genericBuild diff --git a/pkgs/development/libraries/gtk+-1/gdk-pixbuf/default.nix b/pkgs/development/libraries/gtk+-1/gdk-pixbuf/default.nix index 8fe9f5e0e140..1b05fdb0ea43 100644 --- a/pkgs/development/libraries/gtk+-1/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gtk+-1/gdk-pixbuf/default.nix @@ -13,9 +13,6 @@ derivation { md5 = "05fcb68ceaa338614ab650c775efc2f2"; }; - stdenv = stdenv; - gtk = gtk; - libtiff = libtiff; - libjpeg = libjpeg; - libpng = libpng; + buildInputs = [gtk libtiff libjpeg libpng]; + inherit stdenv; } diff --git a/pkgs/development/libraries/gtk+-1/glib/builder.sh b/pkgs/development/libraries/gtk+-1/glib/builder.sh index e6f721de3f4b..a73f5a6d5b8d 100755 --- a/pkgs/development/libraries/gtk+-1/glib/builder.sh +++ b/pkgs/development/libraries/gtk+-1/glib/builder.sh @@ -1,9 +1,3 @@ -#! /bin/sh - -. $stdenv/setup || exit 1 - -tar xvfz $src || exit 1 -cd glib-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 +#! /bin/sh -e +. $stdenv/setup +genericBuild diff --git a/pkgs/development/libraries/gtk+-1/glib/default.nix b/pkgs/development/libraries/gtk+-1/glib/default.nix index 7ae9be406b3e..eb61048c3af7 100644 --- a/pkgs/development/libraries/gtk+-1/glib/default.nix +++ b/pkgs/development/libraries/gtk+-1/glib/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl}: derivation { +{stdenv, fetchurl}: + +derivation { name = "glib-1.2.10"; system = stdenv.system; builder = ./builder.sh; @@ -6,5 +8,5 @@ url = ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz; md5 = "6fe30dad87c77b91b632def29dd69ef9"; }; - stdenv = stdenv; + inherit stdenv; } diff --git a/pkgs/development/libraries/gtk+-1/gtk+/builder.sh b/pkgs/development/libraries/gtk+-1/gtk+/builder.sh index 14ba61f7054d..3f0cb5a15052 100755 --- a/pkgs/development/libraries/gtk+-1/gtk+/builder.sh +++ b/pkgs/development/libraries/gtk+-1/gtk+/builder.sh @@ -1,13 +1,8 @@ -#! /bin/sh - -buildinputs="$x11 $glib" +#! /bin/sh -e . $stdenv/setup +genericBuild -tar xvfz $src -cd gtk+-* -./configure --prefix=$out -make -make install - -mkdir $out/nix-support -echo "$x11 $glib" > $out/nix-support/propagated-build-inputs +if test -n "$_propagatedBuildInputs"; then + if ! test -x $out/nix-support; then mkdir $out/nix-support; fi + echo "$_propagatedBuildInputs" > $out/nix-support/propagated-build-inputs +fi diff --git a/pkgs/development/libraries/gtk+-1/gtk+/default.nix b/pkgs/development/libraries/gtk+-1/gtk+/default.nix index 856b2ffcad0e..fc8f45736d97 100644 --- a/pkgs/development/libraries/gtk+-1/gtk+/default.nix +++ b/pkgs/development/libraries/gtk+-1/gtk+/default.nix @@ -13,7 +13,7 @@ derivation { md5 = "4d5cb2fc7fb7830e4af9747a36bfce20"; }; - stdenv = stdenv; - x11 = x11; - glib = glib; + buildInputs = [x11 glib]; + _propagatedBuildInputs = [x11 glib]; + inherit stdenv; } diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index edabc1799b35..489a6b393ae2 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -9,6 +9,11 @@ rec { inherit stdenv; + ### Symbolic names. + + x11 = xlibs; # !!! should be `x11ClientLibs' or some such + + ### BUILD SUPPORT fetchurl = (import ../build-support/fetchurl) { @@ -104,8 +109,7 @@ rec { }; graphviz = (import ../tools/graphics/graphviz) { - inherit fetchurl stdenv libpng libjpeg expat; - x11 = xfree86; + inherit fetchurl stdenv libpng libjpeg expat x11; }; @@ -371,13 +375,11 @@ rec { }; fontconfig = (import ../development/libraries/fontconfig) { - inherit fetchurl stdenv freetype expat ed; - x11 = xfree86; + inherit fetchurl stdenv freetype expat ed x11; }; xft = (import ../development/libraries/xft) { - inherit fetchurl stdenv pkgconfig fontconfig; - x11 = xfree86; + inherit fetchurl stdenv pkgconfig fontconfig x11; }; zlib = (import ../development/libraries/zlib) { @@ -414,14 +416,12 @@ rec { }; pango = (import ../development/libraries/gtk+/pango) { - inherit fetchurl stdenv pkgconfig glib xft; - x11 = xfree86; + inherit fetchurl stdenv pkgconfig glib xft x11; }; gtk = (import ../development/libraries/gtk+/gtk+) { inherit fetchurl stdenv pkgconfig glib atk pango perl - libtiff libjpeg libpng; - x11 = xfree86; + libtiff libjpeg libpng x11; }; glib1 = (import ../development/libraries/gtk+-1/glib) { @@ -429,8 +429,7 @@ rec { }; gtk1 = (import ../development/libraries/gtk+-1/gtk+) { - inherit fetchurl stdenv; - x11 = xfree86; + inherit fetchurl stdenv x11; glib = glib1; }; @@ -541,9 +540,8 @@ rec { }; zvbi = (import ../development/libraries/zvbi) { - inherit fetchurl stdenv libpng; + inherit fetchurl stdenv libpng x11; pngSupport = true; - x11 = xfree86; libpng = libpng; }; @@ -555,6 +553,44 @@ rec { inherit fetchurl stdenv zlib; }; + xproto = (import ../development/libraries/freedesktop/xproto) { + inherit fetchurl stdenv; + }; + + xextensions = (import ../development/libraries/freedesktop/xextensions) { + inherit fetchurl stdenv; + }; + + libXtrans = (import ../development/libraries/freedesktop/libXtrans) { + inherit fetchurl stdenv; + }; + + libXau = (import ../development/libraries/freedesktop/libXau) { + inherit fetchurl stdenv pkgconfig xproto; + }; + + libX11 = (import ../development/libraries/freedesktop/libX11) { + inherit fetchurl stdenv pkgconfig xproto xextensions libXtrans libXau; + }; + + + libICE = (import ../development/libraries/freedesktop/libICE) { + inherit fetchurl stdenv pkgconfig libX11; + }; + + libSM = (import ../development/libraries/freedesktop/libSM) { + inherit fetchurl stdenv pkgconfig libX11 libICE; + }; + + libXt = (import ../development/libraries/freedesktop/libXt) { + inherit fetchurl stdenv pkgconfig libX11 libSM; + patch = gnupatch; + }; + + xlibs = (import ../development/libraries/freedesktop/xlibs) { + inherit stdenv libX11 libXt; + }; + perlBerkeleyDB = (import ../development/perl-modules/BerkeleyDB) { inherit fetchurl stdenv perl db4; }; @@ -651,28 +687,24 @@ rec { }; MPlayer = (import ../applications/video/MPlayer) { - inherit fetchurl stdenv freetype; + inherit fetchurl stdenv freetype x11; alsaSupport = true; - x11 = xfree86; alsa = alsaLib; }; MPlayerPlugin = (import ../applications/video/mplayerplug-in) { - inherit fetchurl stdenv; - x11 = xfree86; + inherit fetchurl stdenv x11; }; vlc = (import ../applications/video/vlc) { inherit fetchurl stdenv wxGTK libdvdcss libdvdplay - mpeg2dec a52dec libmad; - x11 = xfree86; + mpeg2dec a52dec libmad x11; alsa = alsaLib; }; zapping = (import ../applications/video/zapping) { inherit fetchurl stdenv pkgconfig perl python libgnomeui libglade - scrollkeeper esound gettext zvbi libjpeg libpng; - x11 = xfree86; + scrollkeeper esound gettext zvbi libjpeg libpng x11; teletextSupport = true; jpegSupport = true; pngSupport = true;