Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1020)

Unified Diff: third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Custom.pm

Issue 2411423002: Linux build: Use sysroot when calculating dependencies (Closed)
Patch Set: Update expected_deps Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Custom.pm
diff --git a/third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Custom.pm b/third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Custom.pm
new file mode 100644
index 0000000000000000000000000000000000000000..3ea9d05f87c29d2906362e74b1a4719343a7fcc0
--- /dev/null
+++ b/third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Custom.pm
@@ -0,0 +1,63 @@
+# Copyright © 2008 Raphaël Hertzog <hertzog@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+package Dpkg::Source::Package::V3::Custom;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+use parent qw(Dpkg::Source::Package);
+
+use Dpkg;
+use Dpkg::Gettext;
+use Dpkg::ErrorHandling;
+
+our $CURRENT_MINOR_VERSION = '0';
+
+sub parse_cmdline_option {
+ my ($self, $opt) = @_;
+ if ($opt =~ /^--target-format=(.*)$/) {
+ $self->{options}{target_format} = $1;
+ return 1;
+ }
+ return 0;
+}
+sub do_extract {
+ error(_g("Format `3.0 (custom)' is only used to create source packages"));
+}
+
+sub can_build {
+ my ($self, $dir) = @_;
+
+ return (0, _g('no files indicated on command line'))
+ unless scalar(@{$self->{options}{ARGV}});
+ return 1;
+}
+
+sub do_build {
+ my ($self, $dir) = @_;
+ # Update real target format
+ my $format = $self->{options}{target_format};
+ error(_g('--target-format option is missing')) unless $format;
+ $self->{fields}{'Format'} = $format;
+ # Add all files
+ foreach my $file (@{$self->{options}{ARGV}}) {
+ $self->add_file($file);
+ }
+}
+
+1;
« no previous file with comments | « third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Bzr.pm ('k') | third_party/dpkg-dev/scripts/Dpkg/Source/Package/V3/Git.pm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698