From 94dbdc53b25de7564b338eb9c3b75d7f2828f047 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Apr 2003 15:33:50 +0000 Subject: [PATCH] * Cleaned up the semantics of Fix expressions. * Conditionals and variables in Fix expressions. This allows, e.g., Descr( [ Bind("pkgId", "subversion-0.21.0") , Bind("httpsClient", Bool(True)) , Bind("httpServer", Bool(True)) , Bind("ssl", If(Var("httpsClient"), Fix("./openssl-0.9.7b.fix"), "")) , Bind("httpd", If(Var("httpServer"), Fix("./httpd-2.0.45.fix"), "")) ... ]) which introduces domain feature variables httpsClient and httpServer (i.e., whether Subversion is built with https client and webdav server support); the values of the variables influences package dependencies and the build scripts. The next step is to allow that packages can express constraints on each other. E.g., StrategoXT is dependent on an ATerm library with the "gcc" variant enabled. In fact, this may cause several Nix instantiations to be created from a single Fix descriptor. If possible, Fix should try to find the least set of instantiations that obeys the constraints. svn path=/nix/trunk/test/; revision=53 --- build/httpd-build.sh | 12 ++++++++++++ build/openssl-build.sh | 12 ++++++++++++ build/subversion-build.sh | 16 ++++++++++++++-- fixdescriptors/aterm-2.0.fix | 10 +++++----- fixdescriptors/atk-1.2.0.fix | 12 ++++++------ fixdescriptors/glib-2.2.1.fix | 10 +++++----- fixdescriptors/gnet-1.1.8.fix | 12 ++++++------ fixdescriptors/gtk+-2.2.1.fix | 16 ++++++++-------- fixdescriptors/gtkspell-2.0.2.fix | 20 ++++++++++---------- fixdescriptors/httpd-2.0.45.fix | 10 ++++++++++ fixdescriptors/openssl-0.9.7b.fix | 8 ++++++++ fixdescriptors/pan-0.13.95.fix | 24 ++++++++++++------------ fixdescriptors/pango-1.2.1.fix | 12 ++++++------ fixdescriptors/pkgconfig-0.15.0.fix | 8 ++++---- fixdescriptors/pspell-.12.2.fix | 8 ++++---- fixdescriptors/subversion-0.21.0.fix | 16 ++++++++++++---- fixdescriptors/system.fix | 24 ++++++++++++------------ 17 files changed, 146 insertions(+), 84 deletions(-) create mode 100755 build/httpd-build.sh create mode 100755 build/openssl-build.sh create mode 100644 fixdescriptors/httpd-2.0.45.fix create mode 100644 fixdescriptors/openssl-0.9.7b.fix diff --git a/build/httpd-build.sh b/build/httpd-build.sh new file mode 100755 index 000000000000..a5b43d744329 --- /dev/null +++ b/build/httpd-build.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +export PATH=/bin:/usr/bin + +top=`pwd` +tar xvfz $src || exit 1 +cd httpd-* || exit 1 +./configure --prefix=$top --enable-ssl --with-ssl=$ssl --enable-mods-shared=all || exit 1 +make || exit 1 +make install || exit 1 +cd $top || exit 1 +rm -rf httpd-* || exit 1 diff --git a/build/openssl-build.sh b/build/openssl-build.sh new file mode 100755 index 000000000000..23437a37b336 --- /dev/null +++ b/build/openssl-build.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +export PATH=/bin:/usr/bin + +top=`pwd` +tar xvfz $src || exit 1 +cd openssl-* || exit 1 +./config --prefix=$top || exit 1 +make || exit 1 +make install || exit 1 +cd $top || exit 1 +rm -rf openssl-* || exit 1 diff --git a/build/subversion-build.sh b/build/subversion-build.sh index cc1eba214e4f..3d1922c98ad5 100755 --- a/build/subversion-build.sh +++ b/build/subversion-build.sh @@ -5,10 +5,22 @@ export PATH=/bin:/usr/bin export LDFLAGS=-s top=`pwd` + +if test $httpsClient; then + extraflags="--with-ssl --with-libs=$ssl $extraflags" +fi + +if test $httpServer; then + extraflags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $extraflags" + extrainst="APACHE_LIBEXECDIR=$top/modules $extrainst" +fi + +echo "extra flags: $extraflags" + tar xvfz $src || exit 1 cd subversion-* || exit 1 -./configure --prefix=$top --with-ssl || exit 1 +./configure --prefix=$top $extraflags || exit 1 make || exit 1 -make install || exit 1 +make install $extrainst || exit 1 cd $top || exit 1 rm -rf subversion-* || exit 1 diff --git a/fixdescriptors/aterm-2.0.fix b/fixdescriptors/aterm-2.0.fix index 17e90ca8baec..8b1ba8560583 100644 --- a/fixdescriptors/aterm-2.0.fix +++ b/fixdescriptors/aterm-2.0.fix @@ -1,10 +1,10 @@ Descr( - [ Bind("pkgId", Str("aterm-2.0")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "aterm-2.0") + , Bind("releaseId", "1") - , Bind("createGCC", Bool(True)) + , Bind("createGCC", True) - , Bind("src", File(Url("http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz"))) - , Bind("build", File(Local("../build/aterm-build.sh"))) + , Bind("src", Source(Url("http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz"))) + , Bind("build", Source("../build/aterm-build.sh")) ] ) diff --git a/fixdescriptors/atk-1.2.0.fix b/fixdescriptors/atk-1.2.0.fix index 74e560327ca3..ab302a5ed7f4 100644 --- a/fixdescriptors/atk-1.2.0.fix +++ b/fixdescriptors/atk-1.2.0.fix @@ -1,11 +1,11 @@ Descr( - [ Bind("pkgId", Str("atk-1.2.0")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "atk-1.2.0") + , Bind("releaseId", "1") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("glib", Pkg(Fix("./glib-2.2.1.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("glib", Fix("./glib-2.2.1.fix")) - , Bind("src", File(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/atk-1.2.0.tar.bz2"))) - , Bind("build", File(Local("../build/atk-build.sh"))) + , Bind("src", Source(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/atk-1.2.0.tar.bz2"))) + , Bind("build", Source("../build/atk-build.sh")) ] ) diff --git a/fixdescriptors/glib-2.2.1.fix b/fixdescriptors/glib-2.2.1.fix index 2585c7ffb5b5..86a266707a3f 100644 --- a/fixdescriptors/glib-2.2.1.fix +++ b/fixdescriptors/glib-2.2.1.fix @@ -1,10 +1,10 @@ Descr( - [ Bind("pkgId", Str("glib-2.2.1")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "glib-2.2.1") + , Bind("releaseId", "1") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) - , Bind("src", File(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/glib-2.2.1.tar.bz2"))) - , Bind("build", File(Local("../build/glib-build.sh"))) + , Bind("src", Source(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/glib-2.2.1.tar.bz2"))) + , Bind("build", Source("../build/glib-build.sh")) ] ) diff --git a/fixdescriptors/gnet-1.1.8.fix b/fixdescriptors/gnet-1.1.8.fix index 34d9d10cd19f..526c2e865300 100644 --- a/fixdescriptors/gnet-1.1.8.fix +++ b/fixdescriptors/gnet-1.1.8.fix @@ -1,11 +1,11 @@ Descr( - [ Bind("pkgId", Str("gnet-1.1.8")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "gnet-1.1.8") + , Bind("releaseId", "1") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("glib", Pkg(Fix("./glib-2.2.1.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("glib", Fix("./glib-2.2.1.fix")) - , Bind("src", File(Url("http://www.gnetlibrary.org/src/gnet-1.1.8.tar.gz"))) - , Bind("build", File(Local("../build/gnet-build.sh"))) + , Bind("src", Source(Url("http://www.gnetlibrary.org/src/gnet-1.1.8.tar.gz"))) + , Bind("build", Source("../build/gnet-build.sh")) ] ) diff --git a/fixdescriptors/gtk+-2.2.1.fix b/fixdescriptors/gtk+-2.2.1.fix index 6793cac451be..7fc3da2d78d9 100644 --- a/fixdescriptors/gtk+-2.2.1.fix +++ b/fixdescriptors/gtk+-2.2.1.fix @@ -1,13 +1,13 @@ Descr( - [ Bind("pkgId", Str("gtk+-2.2.1")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "gtk+-2.2.1") + , Bind("releaseId", "1") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("glib", Pkg(Fix("./glib-2.2.1.fix"))) - , Bind("atk", Pkg(Fix("./atk-1.2.0.fix"))) - , Bind("pango", Pkg(Fix("./pango-1.2.1.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("glib", Fix("./glib-2.2.1.fix")) + , Bind("atk", Fix("./atk-1.2.0.fix")) + , Bind("pango", Fix("./pango-1.2.1.fix")) - , Bind("src", File(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/gtk+-2.2.1.tar.bz2"))) - , Bind("build", File(Local("../build/gtk+-build.sh"))) + , Bind("src", Source(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/gtk+-2.2.1.tar.bz2"))) + , Bind("build", Source("../build/gtk+-build.sh")) ] ) diff --git a/fixdescriptors/gtkspell-2.0.2.fix b/fixdescriptors/gtkspell-2.0.2.fix index e6d614f64a5d..3cb0b0bf12a7 100644 --- a/fixdescriptors/gtkspell-2.0.2.fix +++ b/fixdescriptors/gtkspell-2.0.2.fix @@ -1,15 +1,15 @@ Descr( - [ Bind("pkgId", Str("gtkspell-2.0.2")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "gtkspell-2.0.2") + , Bind("releaseId", "1") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("glib", Pkg(Fix("./glib-2.2.1.fix"))) - , Bind("atk", Pkg(Fix("./atk-1.2.0.fix"))) - , Bind("pango", Pkg(Fix("./pango-1.2.1.fix"))) - , Bind("gtk", Pkg(Fix("./gtk+-2.2.1.fix"))) - , Bind("pspell", Pkg(Fix("./pspell-.12.2.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("glib", Fix("./glib-2.2.1.fix")) + , Bind("atk", Fix("./atk-1.2.0.fix")) + , Bind("pango", Fix("./pango-1.2.1.fix")) + , Bind("gtk", Fix("./gtk+-2.2.1.fix")) + , Bind("pspell", Fix("./pspell-.12.2.fix")) - , Bind("src", File(Url("http://pan.rebelbase.com/download/extras/gtkspell/SOURCES/gtkspell-2.0.2.tar.gz"))) - , Bind("build", File(Local("../build/gtkspell-build.sh"))) + , Bind("src", Source(Url("http://pan.rebelbase.com/download/extras/gtkspell/SOURCES/gtkspell-2.0.2.tar.gz"))) + , Bind("build", Source("../build/gtkspell-build.sh")) ] ) diff --git a/fixdescriptors/httpd-2.0.45.fix b/fixdescriptors/httpd-2.0.45.fix new file mode 100644 index 000000000000..bb8365b450b1 --- /dev/null +++ b/fixdescriptors/httpd-2.0.45.fix @@ -0,0 +1,10 @@ +Descr( + [ Bind("pkgId", "httpd-2.0.45") + , Bind("releaseId", "1") + + , Bind("ssl", Fix("./openssl-0.9.7b.fix")) + + , Bind("src", Source(Url("http://apache.cs.uu.nl/dist/httpd/httpd-2.0.45.tar.gz"))) + , Bind("build", Source("../build/httpd-build.sh")) + ] +) diff --git a/fixdescriptors/openssl-0.9.7b.fix b/fixdescriptors/openssl-0.9.7b.fix new file mode 100644 index 000000000000..a0df665e5db4 --- /dev/null +++ b/fixdescriptors/openssl-0.9.7b.fix @@ -0,0 +1,8 @@ +Descr( + [ Bind("pkgId", "openssl-0.9.7b") + , Bind("releaseId", "1") + + , Bind("src", Source(Url("http://www.openssl.org/source/openssl-0.9.7b.tar.gz"))) + , Bind("build", Source("../build/openssl-build.sh")) + ] +) diff --git a/fixdescriptors/pan-0.13.95.fix b/fixdescriptors/pan-0.13.95.fix index 3a32756b66c5..c9e5b9ab6d30 100644 --- a/fixdescriptors/pan-0.13.95.fix +++ b/fixdescriptors/pan-0.13.95.fix @@ -1,17 +1,17 @@ Descr( - [ Bind("pkgId", Str("pan-0.13.95")) - , Bind("releaseId", Str("2")) + [ Bind("pkgId", "pan-0.13.95") + , Bind("releaseId", "2") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("glib", Pkg(Fix("./glib-2.2.1.fix"))) - , Bind("atk", Pkg(Fix("./atk-1.2.0.fix"))) - , Bind("pango", Pkg(Fix("./pango-1.2.1.fix"))) - , Bind("gtk", Pkg(Fix("./gtk+-2.2.1.fix"))) - , Bind("gnet", Pkg(Fix("./gnet-1.1.8.fix"))) - , Bind("pspell", Pkg(Fix("./pspell-.12.2.fix"))) - , Bind("gtkspell", Pkg(Fix("./gtkspell-2.0.2.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("glib", Fix("./glib-2.2.1.fix")) + , Bind("atk", Fix("./atk-1.2.0.fix")) + , Bind("pango", Fix("./pango-1.2.1.fix")) + , Bind("gtk", Fix("./gtk+-2.2.1.fix")) + , Bind("gnet", Fix("./gnet-1.1.8.fix")) + , Bind("pspell", Fix("./pspell-.12.2.fix")) + , Bind("gtkspell", Fix("./gtkspell-2.0.2.fix")) - , Bind("src", File(Url("http://pan.rebelbase.com/download/releases/0.13.95/SOURCE/pan-0.13.95.tar.bz2"))) - , Bind("build", File(Local("../build/pan-build-2.sh"))) + , Bind("src", Source(Url("http://pan.rebelbase.com/download/releases/0.13.95/SOURCE/pan-0.13.95.tar.bz2"))) + , Bind("build", Source("../build/pan-build-2.sh")) ] ) diff --git a/fixdescriptors/pango-1.2.1.fix b/fixdescriptors/pango-1.2.1.fix index 7ee2486a6dce..419c4f6906c7 100644 --- a/fixdescriptors/pango-1.2.1.fix +++ b/fixdescriptors/pango-1.2.1.fix @@ -1,11 +1,11 @@ Descr( - [ Bind("pkgId", Str("pango-1.2.1")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "pango-1.2.1") + , Bind("releaseId", "1") - , Bind("pkgconfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("glib", Pkg(Fix("./glib-2.2.1.fix"))) + , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("glib", Fix("./glib-2.2.1.fix")) - , Bind("src", File(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/pango-1.2.1.tar.bz2"))) - , Bind("build", File(Local("../build/pango-build.sh"))) + , Bind("src", Source(Url("ftp://ftp.gtk.org/pub/gtk/v2.2/pango-1.2.1.tar.bz2"))) + , Bind("build", Source("../build/pango-build.sh")) ] ) diff --git a/fixdescriptors/pkgconfig-0.15.0.fix b/fixdescriptors/pkgconfig-0.15.0.fix index 27f32aba6419..28fe34a4b633 100644 --- a/fixdescriptors/pkgconfig-0.15.0.fix +++ b/fixdescriptors/pkgconfig-0.15.0.fix @@ -1,8 +1,8 @@ Descr( - [ Bind("pkgId", Str("pkgconfig-0.15.0")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "pkgconfig-0.15.0") + , Bind("releaseId", "1") - , Bind("src", File(Url("http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-0.15.0.tar.gz"))) - , Bind("build", File(Local("../build/pkgconfig-build.sh"))) + , Bind("src", Source(Url("http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-0.15.0.tar.gz"))) + , Bind("build", Source("../build/pkgconfig-build.sh")) ] ) diff --git a/fixdescriptors/pspell-.12.2.fix b/fixdescriptors/pspell-.12.2.fix index f19600c25935..61741407982c 100644 --- a/fixdescriptors/pspell-.12.2.fix +++ b/fixdescriptors/pspell-.12.2.fix @@ -1,8 +1,8 @@ Descr( - [ Bind("pkgId", Str("pspell-.12.2")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "pspell-.12.2") + , Bind("releaseId", "1") - , Bind("src", File(Url("http://unc.dl.sourceforge.net/sourceforge/pspell/pspell-.12.2.tar.gz"))) - , Bind("build", File(Local("../build/pspell-build.sh"))) + , Bind("src", Source(Url("http://unc.dl.sourceforge.net/sourceforge/pspell/pspell-.12.2.tar.gz"))) + , Bind("build", Source("../build/pspell-build.sh")) ] ) diff --git a/fixdescriptors/subversion-0.21.0.fix b/fixdescriptors/subversion-0.21.0.fix index 90d9d8d42b0d..dfe1f2482a7c 100644 --- a/fixdescriptors/subversion-0.21.0.fix +++ b/fixdescriptors/subversion-0.21.0.fix @@ -1,8 +1,16 @@ Descr( - [ Bind("pkgId", Str("subversion-0.21.0")) - , Bind("releaseId", Str("1")) + [ Bind("pkgId", "subversion-0.21.0") + , Bind("releaseId", "1") - , Bind("src", File(Url("http://subversion.tigris.org/files/documents/15/3712/subversion-0.21.0.tar.gz"))) - , Bind("build", File(Local("../build/subversion-build.sh"))) + , Bind("httpsClient", Bool(True)) + , Bind("httpServer", Bool(True)) + , Bind("httpsServer", Bool(True)) + + , Bind("ssl", If(Var("httpsClient"), Fix("./openssl-0.9.7b.fix"), "")) + + , Bind("httpd", If(Var("httpServer"), Fix("./httpd-2.0.45.fix"), "")) + + , Bind("src", Source(Url("http://subversion.tigris.org/files/documents/15/3712/subversion-0.21.0.tar.gz"))) + , Bind("build", Source("../build/subversion-build.sh")) ] ) diff --git a/fixdescriptors/system.fix b/fixdescriptors/system.fix index 62d4eae406a7..5e9f497d1491 100644 --- a/fixdescriptors/system.fix +++ b/fixdescriptors/system.fix @@ -2,18 +2,18 @@ Descr( [ Bind("pkgId", Str("system")) , Bind("releaseId", Str("2")) - , Bind("actATerm", Pkg(Fix("./aterm-2.0.fix"))) - , Bind("actPkgConfig", Pkg(Fix("./pkgconfig-0.15.0.fix"))) - , Bind("actGlib", Pkg(Fix("./glib-2.2.1.fix"))) - , Bind("actAtk", Pkg(Fix("./atk-1.2.0.fix"))) - , Bind("actPango", Pkg(Fix("./pango-1.2.1.fix"))) - , Bind("actGtk", Pkg(Fix("./gtk+-2.2.1.fix"))) - , Bind("actGnet", Pkg(Fix("./gnet-1.1.8.fix"))) - , Bind("actPspell", Pkg(Fix("./pspell-.12.2.fix"))) - , Bind("actGtkspell", Pkg(Fix("./gtkspell-2.0.2.fix"))) - , Bind("actPan", Pkg(Fix("./pan-0.13.95.fix"))) - , Bind("actSubversion", Pkg(Fix("./subversion-0.21.0.fix"))) + , Bind("actATerm", Fix("./aterm-2.0.fix")) + , Bind("actPkgConfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("actGlib", Fix("./glib-2.2.1.fix")) + , Bind("actAtk", Fix("./atk-1.2.0.fix")) + , Bind("actPango", Fix("./pango-1.2.1.fix")) + , Bind("actGtk", Fix("./gtk+-2.2.1.fix")) + , Bind("actGnet", Fix("./gnet-1.1.8.fix")) + , Bind("actPspell", Fix("./pspell-.12.2.fix")) + , Bind("actGtkspell", Fix("./gtkspell-2.0.2.fix")) + , Bind("actPan", Fix("./pan-0.13.95.fix")) + , Bind("actSubversion", Fix("./subversion-0.21.0.fix")) - , Bind("build", File(Local("../../scripts/nix-populate"))) + , Bind("build", Source("../../scripts/nix-populate")) ] )