dpkg: upgrade to 1.17.1 and fix perl scripts
- Upgrade dpkg to 1.17.1 (most recent release, in debian unstable) - Disable dselect and update-alternatives, as they won't work as intended in homebrew. - Install dpkg Perl modules to $(prefix)/perl, and adjust the shebang on Perl scripts to point there using an existing do_perl_subst fn. Closes Homebrew/homebrew#21742. Signed-off-by: Jack Nagel <jacknagel@gmail.com>master
parent
c5f41964ba
commit
7bc6b4d127
|
@ -1,11 +1,12 @@
|
|||
require 'formula'
|
||||
|
||||
class Dpkg < Formula
|
||||
homepage 'http://en.wikipedia.org/wiki/Dpkg'
|
||||
url 'http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_1.15.8.13.tar.bz2'
|
||||
sha1 'd0b9386742f966345a23c3daa0391b37fa837a3f'
|
||||
homepage 'https://wiki.debian.org/Teams/Dpkg'
|
||||
url 'http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.1.tar.xz'
|
||||
sha1 'c94b33573806cf9662c5a6f2bbae64900113a538'
|
||||
|
||||
depends_on 'pkg-config' => :build
|
||||
depends_on 'xz' => :build
|
||||
depends_on 'gnu-tar'
|
||||
|
||||
fails_with :clang do
|
||||
|
@ -19,10 +20,10 @@ class Dpkg < Formula
|
|||
def install
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}",
|
||||
"--disable-compiler-warnings",
|
||||
"--disable-dselect",
|
||||
"--disable-linker-optimisations",
|
||||
"--disable-compiler-optimisations",
|
||||
"--without-start-stop-daemon"
|
||||
"--disable-start-stop-daemon",
|
||||
"--disable-update-alternatives"
|
||||
system "make"
|
||||
system "make install"
|
||||
end
|
||||
|
@ -36,32 +37,56 @@ end
|
|||
|
||||
__END__
|
||||
diff --git a/configure b/configure
|
||||
index a4e8516..de7f226 100755
|
||||
index 5d91530..dd2ca11 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -8180,9 +8180,9 @@ else
|
||||
$as_echo "no" >&6; }
|
||||
@@ -8388,9 +8388,7 @@ if test "$PERL" = "no" || test ! -x "$PERL"; then
|
||||
fi
|
||||
|
||||
# Let the user override the variable.
|
||||
if test -z "$PERL_LIBDIR"; then
|
||||
-PERL_LIBDIR=$($PERL -MConfig -e 'my $r = $Config{vendorlibexp};
|
||||
- $r =~ s/$Config{vendorprefixexp}/\$(prefix)/;
|
||||
- print $r')
|
||||
+PERL_LIBDIR=$($PERL -MConfig -e 'my $r = $Config{sitelib};
|
||||
+ $r =~ s/$Config{sitelib}/\$(prefix)/;
|
||||
+ print $r')
|
||||
+PERL_LIBDIR="$prefix/perl"
|
||||
fi
|
||||
|
||||
|
||||
for ac_prog in pod2man
|
||||
do
|
||||
diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
|
||||
index ba6066c..89a66ba 100644
|
||||
index c0f633d..b692806 100644
|
||||
--- a/lib/dpkg/dpkg.h
|
||||
+++ b/lib/dpkg/dpkg.h
|
||||
@@ -97,7 +97,7 @@
|
||||
#define DPKG "dpkg"
|
||||
@@ -108,7 +108,7 @@ DPKG_BEGIN_DECLS
|
||||
#define DPKG "dpkg"
|
||||
#define DEBSIGVERIFY "/usr/bin/debsig-verify"
|
||||
|
||||
-#define TAR "tar"
|
||||
+#define TAR "gnutar"
|
||||
#define RM "rm"
|
||||
#define CAT "cat"
|
||||
#define FIND "find"
|
||||
#define DIFF "diff"
|
||||
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
|
||||
index f83adff..d2b5043 100644
|
||||
--- a/scripts/Makefile.am
|
||||
+++ b/scripts/Makefile.am
|
||||
@@ -117,7 +117,7 @@ nobase_dist_perllib_DATA = \
|
||||
man3_MANS =
|
||||
|
||||
do_perl_subst = $(AM_V_GEN) \
|
||||
- sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \
|
||||
+ sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL) -I$(PERL_LIBDIR):" \
|
||||
-e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \
|
||||
-e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \
|
||||
-e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \
|
||||
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
|
||||
index 754488e..8b233fb 100644
|
||||
--- a/scripts/Makefile.in
|
||||
+++ b/scripts/Makefile.in
|
||||
@@ -486,7 +486,7 @@ nobase_dist_perllib_DATA = \
|
||||
# Keep it even if empty to have man3dir correctly set
|
||||
man3_MANS =
|
||||
do_perl_subst = $(AM_V_GEN) \
|
||||
- sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \
|
||||
+ sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL) -I$(PERL_LIBDIR):" \
|
||||
-e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \
|
||||
-e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \
|
||||
-e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \
|
||||
|
|
Loading…
Reference in New Issue