Просмотр исходного кода

build: Do not require passing the perl interpreter to run-script

We will try to use the PERL environment variable or fallback to use perl
for the scripts interpreter.
Guillem Jover лет назад: 10
Родитель
Сommit
fb391b608a
4 измененных файлов с 7 добавлено и 6 удалено
  1. 1 0
      debian/changelog
  2. 1 1
      debian/rules
  3. 1 1
      m4/dpkg-arch.m4
  4. 4 4
      run-script

+ 1 - 0
debian/changelog

@@ -77,6 +77,7 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
     - Make it possible to build without system libmd.
     - Add a configuration summary to configure output.
     - Make git log invocation immune to local configuration.
+    - Do not require passing the perl interpreter to run-script.
   * Test suite:
     - Add a unit test to compile perl code with warnings.
     - Add a unit test for the trigger deferred parser.

+ 1 - 1
debian/rules

@@ -15,7 +15,7 @@ dpkg_buildflags = \
 	$(if $(call cc_version_lt,4.9),$(hardening_old)) \
 	DEB_CFLAGS_MAINT_APPEND="$(WFLAGS)" \
 	DEB_CXXFLAGS_MAINT_APPEND="$(WFLAGS)" \
-	$(CURDIR)/run-script perl scripts/dpkg-buildflags.pl
+	$(CURDIR)/run-script scripts/dpkg-buildflags.pl
 
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

+ 1 - 1
m4/dpkg-arch.m4

@@ -8,7 +8,7 @@
 AC_DEFUN([_DPKG_ARCHITECTURE], [
 AC_REQUIRE([DPKG_PROG_PERL])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
-$2=$($srcdir/run-script $PERL scripts/dpkg-architecture.pl -t$host -q$1 2>/dev/null)
+$2=$(PERL=$PERL $srcdir/run-script scripts/dpkg-architecture.pl -t$host -q$1 2>/dev/null)
 ])# _DPKG_ARCHITECURE
 
 # DPKG_CPU_TYPE

+ 4 - 4
run-script

@@ -9,11 +9,11 @@ cwd="`pwd`"
 cd "$OLDPWD"
 
 # Set up the environment, to use local perl modules and data files.
+export PERL="${PERL:-perl}"
 export PERL5LIB="$cwd/scripts:$cwd/dselect/methods"
 export DPKG_DATADIR="$cwd"
 
-interp="$1"
-script="$2"
-shift 2
+script="$1"
+shift 1
 
-exec $interp "$cwd/$script" "$@"
+exec $PERL "$cwd/$script" "$@"