2011-12-21 23:28:59 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Dpkg < Formula
|
2013-08-07 22:18:43 +00:00
|
|
|
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'
|
2011-12-21 23:28:59 +00:00
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
2013-08-07 22:18:43 +00:00
|
|
|
depends_on 'xz' => :build
|
2011-12-23 03:01:24 +00:00
|
|
|
depends_on 'gnu-tar'
|
2011-12-21 23:28:59 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :clang do
|
2013-02-20 16:15:02 +00:00
|
|
|
cause 'cstdlib:142:3: error: declaration conflicts with target of using declaration already in scope'
|
2012-03-18 20:33:24 +00:00
|
|
|
end
|
|
|
|
|
2011-12-23 03:01:24 +00:00
|
|
|
# Fixes the PERL_LIBDIR.
|
|
|
|
# Uses Homebrew-install gnu-tar instead of bsd tar.
|
2011-12-21 23:28:59 +00:00
|
|
|
def patches; DATA; end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2013-08-07 22:18:43 +00:00
|
|
|
"--disable-dselect",
|
2011-12-21 23:28:59 +00:00
|
|
|
"--disable-linker-optimisations",
|
2013-08-07 22:18:43 +00:00
|
|
|
"--disable-start-stop-daemon",
|
|
|
|
"--disable-update-alternatives"
|
2011-12-21 23:28:59 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
2013-03-11 21:57:04 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
This installation of dpkg is not configured to install software, so
|
|
|
|
commands such as `dpkg -i`, `dpkg --configure` will fail.
|
|
|
|
EOS
|
|
|
|
end
|
2011-12-21 23:28:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/configure b/configure
|
2013-08-07 22:18:43 +00:00
|
|
|
index 5d91530..dd2ca11 100755
|
2011-12-21 23:28:59 +00:00
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
2013-08-07 22:18:43 +00:00
|
|
|
@@ -8388,9 +8388,7 @@ if test "$PERL" = "no" || test ! -x "$PERL"; then
|
2011-12-21 23:28:59 +00:00
|
|
|
fi
|
2013-08-07 22:18:43 +00:00
|
|
|
# Let the user override the variable.
|
|
|
|
if test -z "$PERL_LIBDIR"; then
|
2011-12-21 23:28:59 +00:00
|
|
|
-PERL_LIBDIR=$($PERL -MConfig -e 'my $r = $Config{vendorlibexp};
|
|
|
|
- $r =~ s/$Config{vendorprefixexp}/\$(prefix)/;
|
|
|
|
- print $r')
|
2013-08-07 22:18:43 +00:00
|
|
|
+PERL_LIBDIR="$prefix/perl"
|
|
|
|
fi
|
|
|
|
|
2011-12-21 23:28:59 +00:00
|
|
|
|
2011-12-23 03:01:24 +00:00
|
|
|
diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
|
2013-08-07 22:18:43 +00:00
|
|
|
index c0f633d..b692806 100644
|
2011-12-23 03:01:24 +00:00
|
|
|
--- a/lib/dpkg/dpkg.h
|
|
|
|
+++ b/lib/dpkg/dpkg.h
|
2013-08-07 22:18:43 +00:00
|
|
|
@@ -108,7 +108,7 @@ DPKG_BEGIN_DECLS
|
|
|
|
#define DPKG "dpkg"
|
2011-12-23 03:01:24 +00:00
|
|
|
#define DEBSIGVERIFY "/usr/bin/debsig-verify"
|
|
|
|
|
|
|
|
-#define TAR "tar"
|
2013-08-20 02:00:24 +00:00
|
|
|
+#define TAR "gtar"
|
2011-12-23 03:01:24 +00:00
|
|
|
#define RM "rm"
|
2013-08-07 22:18:43 +00:00
|
|
|
#define CAT "cat"
|
2011-12-23 03:01:24 +00:00
|
|
|
#define FIND "find"
|
2013-08-07 22:18:43 +00:00
|
|
|
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)':" \
|
2013-08-20 02:00:24 +00:00
|
|
|
|
|
|
|
diff --git a/scripts/Dpkg/Checksums.pm b/scripts/Dpkg/Checksums.pm
|
|
|
|
index 4a64fd1..bb19f59 100644
|
|
|
|
--- a/scripts/Dpkg/Checksums.pm
|
|
|
|
+++ b/scripts/Dpkg/Checksums.pm
|
|
|
|
@@ -50,15 +50,15 @@ about supported checksums.
|
|
|
|
|
|
|
|
my $CHECKSUMS = {
|
|
|
|
md5 => {
|
|
|
|
- program => [ 'md5sum' ],
|
|
|
|
+ program => [ 'md5', '-q' ],
|
|
|
|
regex => qr/[0-9a-f]{32}/,
|
|
|
|
},
|
|
|
|
sha1 => {
|
|
|
|
- program => [ 'sha1sum' ],
|
|
|
|
+ program => [ 'shasum', '-a', '1' ],
|
|
|
|
regex => qr/[0-9a-f]{40}/,
|
|
|
|
},
|
|
|
|
sha256 => {
|
|
|
|
- program => [ 'sha256sum' ],
|
|
|
|
+ program => [ 'shasum', '-a', '256' ],
|
|
|
|
regex => qr/[0-9a-f]{64}/,
|
|
|
|
},
|
|
|
|
};
|