aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-07 08:03:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-07 08:03:11 +0200
commitc46f5a1b3902ca78769b2294751e3bdae9ca6b47 (patch)
tree86ee3ecb3150e03f577f401564ca6665097bb463
parent4e2caf1e383a8e90d874b1c086343703f91475d9 (diff)
Handle new config.install.include_arch in Debian
-rw-r--r--bpkg/system-package-manager-debian.cxx35
1 files changed, 19 insertions, 16 deletions
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx
index 3fb93c3..c43e116 100644
--- a/bpkg/system-package-manager-debian.cxx
+++ b/bpkg/system-package-manager-debian.cxx
@@ -2011,10 +2011,9 @@ namespace bpkg
// name, which is the same. To keep things consistent we use the bpkg
// package name for <private> as well.
//
- // @@ Some libraries install what looks like architecture-specific
- // configuration files to /usr/include/$(DEB_HOST_MULTIARCH). Maybe we
- // should invent something like config.install.include_arch to support
- // this distinction?
+ // Note that some libraries have what looks like architecture-specific
+ // configuration files in /usr/include/$(DEB_HOST_MULTIARCH)/ which is
+ // what we use for our config.install.include_arch location.
//
// Note: we need to quote values that contain `$` so that they don't get
// expanded as build2 variables in the installed_entries() call.
@@ -2041,6 +2040,7 @@ namespace bpkg
"config.install.etc=/etc/",
"config.install.include=data_root/include/<private>/",
+ "config.install.include_arch='data_root/include/$(DEB_HOST_MULTIARCH)/<private>/'",
"config.install.share=data_root/share/",
"config.install.data=share/<private>/<project>/",
@@ -2949,15 +2949,16 @@ namespace bpkg
// NOTE: keep consistent with the config.install.* values above.
//
- dir_path bindir ("/usr/bin/");
- dir_path sbindir ("/usr/sbin/");
- dir_path etcdir ("/etc/");
- dir_path incdir ("/usr/include/" + pd);
- dir_path libdir ("/usr/lib/$(DEB_HOST_MULTIARCH)/" + pd);
- dir_path pkgdir (libdir / dir_path ("pkgconfig"));
- dir_path sharedir ("/usr/share/" + pd);
- dir_path docdir ("/usr/share/doc/" + pd);
- dir_path mandir ("/usr/share/man/");
+ dir_path bindir ("/usr/bin/");
+ dir_path sbindir ("/usr/sbin/");
+ dir_path etcdir ("/etc/");
+ dir_path incdir ("/usr/include/" + pd);
+ dir_path incarchdir ("/usr/include/$(DEB_HOST_MULTIARCH)/" + pd);
+ dir_path libdir ("/usr/lib/$(DEB_HOST_MULTIARCH)/" + pd);
+ dir_path pkgdir (libdir / dir_path ("pkgconfig"));
+ dir_path sharedir ("/usr/share/" + pd);
+ dir_path docdir ("/usr/share/doc/" + pd);
+ dir_path mandir ("/usr/share/man/");
// The main package contains everything that doesn't go to another
// packages.
@@ -2972,12 +2973,14 @@ namespace bpkg
if (!is_open (dev))
{
- if (ies.contains_sub (incdir)) add (main, incdir / "*");
- if (ies.contains_sub (libdir)) add (main, libdir / "*");
+ if (ies.contains_sub (incdir)) add (main, incdir / "*");
+ if (ies.contains_sub (incarchdir)) add (main, incarchdir / "*");
+ if (ies.contains_sub (libdir)) add (main, libdir / "*");
}
else
{
- if (ies.contains_sub (incdir)) add (dev, incdir / "*");
+ if (ies.contains_sub (incdir)) add (dev, incdir / "*");
+ if (ies.contains_sub (incarchdir)) add (dev, incarchdir / "*");
// Ok, time for things to get hairy: we need to split the contents
// of lib/ into the main and -dev packages. The -dev package should