From beda10f5a2a69ac32ad91c8a80477fde19be6a83 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Mar 2004 15:23:53 +0000 Subject: [PATCH] * Make perl a dependency of Nix. --- configure.ac | 5 +++++ corepkgs/buildenv/Makefile.am | 4 +++- corepkgs/buildenv/{builder.pl => builder.pl.in} | 2 +- scripts/nix-collect-garbage.in | 2 +- scripts/nix-install-package.in | 2 +- scripts/nix-prefetch-url.in | 2 +- scripts/nix-pull.in | 2 +- scripts/nix-push.in | 2 +- substitute.mk | 1 + 9 files changed, 15 insertions(+), 7 deletions(-) rename corepkgs/buildenv/{builder.pl => builder.pl.in} (98%) diff --git a/configure.ac b/configure.ac index 689c2617e..093812e7a 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,11 @@ AC_PATH_PROG(xmllint, xmllint) AC_PATH_PROG(xsltproc, xsltproc) AC_PATH_PROG(flex, flex, false) AC_PATH_PROG(bison, bison, false) +AC_PATH_PROG(perl, perl) +if test -z "$perl"; then + echo "Perl is required for Nix." + exit 1 +fi AC_ARG_WITH(docbook-catalog, AC_HELP_STRING([--with-docbook-catalog=PATH], [path of the DocBook XML DTD]), diff --git a/corepkgs/buildenv/Makefile.am b/corepkgs/buildenv/Makefile.am index f6a14600f..7a5df476d 100644 --- a/corepkgs/buildenv/Makefile.am +++ b/corepkgs/buildenv/Makefile.am @@ -1,3 +1,5 @@ +all-local: builder.pl + install-exec-local: $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/buildenv @@ -6,4 +8,4 @@ install-exec-local: include ../../substitute.mk -EXTRA_DIST = default.nix builder.pl +EXTRA_DIST = default.nix builder.pl.in diff --git a/corepkgs/buildenv/builder.pl b/corepkgs/buildenv/builder.pl.in similarity index 98% rename from corepkgs/buildenv/builder.pl rename to corepkgs/buildenv/builder.pl.in index 3bbb178c8..d9ff73e17 100755 --- a/corepkgs/buildenv/builder.pl +++ b/corepkgs/buildenv/builder.pl.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! @perl@ -w use strict; use Cwd; diff --git a/scripts/nix-collect-garbage.in b/scripts/nix-collect-garbage.in index a3ee7bd5e..c701ad482 100755 --- a/scripts/nix-collect-garbage.in +++ b/scripts/nix-collect-garbage.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! @perl@ -w use strict; use IPC::Open2; diff --git a/scripts/nix-install-package.in b/scripts/nix-install-package.in index c71a6ca5f..73afead7d 100644 --- a/scripts/nix-install-package.in +++ b/scripts/nix-install-package.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! @perl@ -w use strict; use POSIX qw(tmpnam); diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in index 6cc3b7a26..d921e922b 100644 --- a/scripts/nix-prefetch-url.in +++ b/scripts/nix-prefetch-url.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! @perl@ -w use strict; use IPC::Open2; diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index 2b2d4e857..acb4c0732 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w -I@libexecdir@/nix +#! @perl@ -w -I@libexecdir@/nix use strict; use IPC::Open2; diff --git a/scripts/nix-push.in b/scripts/nix-push.in index 356fe1952..167d787b7 100644 --- a/scripts/nix-push.in +++ b/scripts/nix-push.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! @perl@ -w use strict; use POSIX qw(tmpnam); diff --git a/substitute.mk b/substitute.mk index 6882393bc..73a93963f 100644 --- a/substitute.mk +++ b/substitute.mk @@ -9,6 +9,7 @@ -e "s^@storedir\@^$(storedir)^g" \ -e "s^@system\@^$(system)^g" \ -e "s^@wget\@^$(wget)^g" \ + -e "s^@perl\@^$(perl)^g" \ -e "s^@version\@^$(VERSION)^g" \ < $< > $@ || rm $@ if test -x $<; then chmod +x $@; fi