ソースを参照

build: Set TAR variable at build time instead of hardcoding it

This allows for non-GNU systems to use another value for their GNU tar,
which usually is either gnutar or gtar.
Guillem Jover 12 年 前
コミット
09d43d4f21
共有4 個のファイルを変更した15 個の追加2 個の削除を含む
  1. 2 1
      configure.ac
  2. 3 0
      debian/changelog
  3. 0 1
      lib/dpkg/dpkg.h
  4. 10 0
      m4/dpkg-progs.m4

+ 2 - 1
configure.ac

@@ -31,8 +31,9 @@ DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
 DPKG_WITH_DIR([logdir], [${localstatedir}/log],
               [system logging directory [LOCALSTATEDIR/log]])
 
-# Set default dpkg-deb compressor
+# Set default dpkg-deb values
 DPKG_DEB_COMPRESSOR([xz])
+DPKG_DEB_PROG_TAR
 
 # Checks for programs.
 AC_PROG_CC

+ 3 - 0
debian/changelog

@@ -68,6 +68,9 @@ dpkg (1.17.7) UNRELEASED; urgency=low
       Suggested by Alex Mestiashvili <mailatgoogl@gmail.com>.
     - On GNU/Hurd do not link unnecessarily against libshouldbeinlibc and
       libihash.
+  * Set TAR preprocessor variable at build time instead of hardcoding it.
+    This will allow non-GNU systems to easily use another value for their
+    GNU tar, which is usually either gnutar or gtar.
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 0 - 1
lib/dpkg/dpkg.h

@@ -108,7 +108,6 @@ DPKG_BEGIN_DECLS
 #define DPKG		"dpkg"
 #define DEBSIGVERIFY	"/usr/bin/debsig-verify"
 
-#define TAR		"tar"
 #define RM		"rm"
 #define CAT		"cat"
 #define FIND		"find"

+ 10 - 0
m4/dpkg-progs.m4

@@ -39,3 +39,13 @@ AC_DEFUN([DPKG_PROG_POD2MAN], [
 AC_CHECK_PROGS([POD2MAN], [pod2man])
 AM_CONDITIONAL(BUILD_POD_DOC, [test "x$POD2MAN" != "x"])
 ])# DPKG_PROG_POD2MAN
+
+# DPKG_DEB_PROG_TAR
+# -----------------
+# Specify GNU tar program name to use by dpkg-deb. On GNU systems this is
+# usually simply tar, on BSD systems this is usually gnutar or gtar.
+AC_DEFUN([DPKG_DEB_PROG_TAR], [
+AC_ARG_VAR([TAR], [GNU tar program])
+AC_CHECK_PROGS([TAR], [gnutar gtar tar], [tar])
+AC_DEFINE_UNQUOTED([TAR], ["$TAR"], [GNU tar program])
+])# DPKG_DEB_PROG_TAR