aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-09 06:08:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-09 06:08:55 +0200
commitd90a76ca0e976fc1cf927cbb33f67be1b149f040 (patch)
tree8977465daa376ffbd4c558e3c83ce4a7c8ec8d19
parent74e6e7c09cb70e5ff0c457e2f0aa5d8d342a49c2 (diff)
Add --debian-{main,dev}-extradep, rename existing -depends to -langdep
-rw-r--r--bpkg/pkg-bindist.cli18
-rw-r--r--bpkg/system-package-manager-debian.cxx25
2 files changed, 35 insertions, 8 deletions
diff --git a/bpkg/pkg-bindist.cli b/bpkg/pkg-bindist.cli
index 4e03225..c269355 100644
--- a/bpkg/pkg-bindist.cli
+++ b/bpkg/pkg-bindist.cli
@@ -150,7 +150,7 @@ namespace bpkg
the main binary package. The default is \cb{any}."
}
- string --debian-main-depends
+ string --debian-main-langdep
{
"<v>",
"Override the language runtime dependencies (such as \cb{libc6},
@@ -158,13 +158,27 @@ namespace bpkg
value of the main binary package."
}
- string --debian-dev-depends
+ string --debian-dev-langdep
{
"<v>",
"Override the language runtime dependencies (such as \cb{libc-dev},
\cb{libstdc++-dev}, etc) in the \cb{Depends} \cb{control} file field
value of the development (\cb{-dev}) binary package."
}
+
+ string --debian-main-extradep
+ {
+ "<v>",
+ "Extra dependencies to add to the \cb{Depends} \cb{control} file field
+ value of the main binary package."
+ }
+
+ string --debian-dev-extradep
+ {
+ "<v>",
+ "Extra dependencies to add to the \cb{Depends} \cb{control} file field
+ value of the development (\cb{-dev}) binary package."
+ }
};
// NOTE: remember to add the corresponding `--class-doc ...=exclude-base`
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx
index f1c794d..a9937e0 100644
--- a/bpkg/system-package-manager-debian.cxx
+++ b/bpkg/system-package-manager-debian.cxx
@@ -2281,14 +2281,14 @@ namespace bpkg
depends += st.main + " (>= " + st.system_version + ')';
}
- if (ops_->debian_main_depends_specified ())
+ if (ops_->debian_main_langdep_specified ())
{
- if (!ops_->debian_main_depends ().empty ())
+ if (!ops_->debian_main_langdep ().empty ())
{
if (!depends.empty ())
depends += ", ";
- depends += ops_->debian_main_depends ();
+ depends += ops_->debian_main_langdep ();
}
}
else
@@ -2304,6 +2304,14 @@ namespace bpkg
// --debian-main-depends.
}
+ if (!ops_->debian_main_extradep ().empty ())
+ {
+ if (!depends.empty ())
+ depends += ", ";
+
+ depends += ops_->debian_main_extradep ();
+ }
+
os << '\n'
<< "Package: " << st.main << '\n'
<< "Architecture: " << arch << '\n'
@@ -2328,11 +2336,11 @@ namespace bpkg
depends += ", " + st.dev + " (>= " + st.system_version + ')';
}
- if (ops_->debian_dev_depends_specified ())
+ if (ops_->debian_dev_langdep_specified ())
{
- if (!ops_->debian_dev_depends ().empty ())
+ if (!ops_->debian_dev_langdep ().empty ())
{
- depends += ", " + ops_->debian_dev_depends ();
+ depends += ", " + ops_->debian_dev_langdep ();
}
}
else
@@ -2356,6 +2364,11 @@ namespace bpkg
if (cc || (cc = lang ("c", true))) depends += ", libc-dev";
}
+ if (!ops_->debian_dev_extradep ().empty ())
+ {
+ depends += ", " + ops_->debian_dev_extradep ();
+ }
+
// Feels like the architecture should be the same as for the main
// package.
//