Your message dated Tue, 05 Jan 2021 13:03:56 +0000
with message-id <[email protected]>
and subject line Bug#968092: fixed in croaring 0.2.66+ds-2
has caused the Debian Bug report #968092,
regarding libroaring-dev:amd64: please provide pkg-config metadata
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
968092: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968092
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libroaring-dev
Version: 0.2.66+ds-1
Severity: wishlist
Tags: patch fixed-upstream
Forwarded: https://github.com/RoaringBitmap/CRoaring/pull/235

It would be useful for libroaring to provide pkg-config metadata, which
lets Autotools- and make-based build systems discover it, and also lets
meson discover it without needing cmake installed.

This is the sort of "API" thing that should almost always be done upstream
first, so I sent a pull request upstream and it was accepted. If it
takes a while for upstream to make another release, it might be useful
to backport that change. See attached 0001-Add-pkg-config-metadata.patch.

After the upstream developers have made a release with this in, the only
part of that patch that is still necessary will be the addition to
debian/libroaring-dev.install.

It would also be good to have an autopkgtest for linking using pkg-config,
to make sure it doesn't regress. See attached
0002-Add-an-autopkgtest-for-building-with-pkg-config.patch for an example
of how to do that (based on the corresponding CMake autopkgtest that I
provided on #968063).

Thanks,
    smcv

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-debug'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 
'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.7.0-2-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libroaring-dev:amd64 depends on:
ii  libroaring0  0.2.66+ds-1

libroaring-dev:amd64 recommends no packages.

libroaring-dev:amd64 suggests no packages.

-- no debconf information
>From cacd7286475f39be7d420259ebeca4947a1ae672 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Sat, 8 Aug 2020 10:21:02 +0100
Subject: [PATCH 1/2] Add pkg-config metadata

---
 debian/libroaring-dev.install                 |  1 +
 ...-and-install-pkg-config-metadata-235.patch | 48 +++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 50 insertions(+)
 create mode 100644 debian/patches/Generate-and-install-pkg-config-metadata-235.patch

diff --git a/debian/libroaring-dev.install b/debian/libroaring-dev.install
index 994ef05..6ec71e3 100644
--- a/debian/libroaring-dev.install
+++ b/debian/libroaring-dev.install
@@ -1,3 +1,4 @@
 usr/include/roaring
 usr/lib/*/libroaring.so
 usr/lib/*/cmake/roaring
+usr/lib/*/pkgconfig
diff --git a/debian/patches/Generate-and-install-pkg-config-metadata-235.patch b/debian/patches/Generate-and-install-pkg-config-metadata-235.patch
new file mode 100644
index 0000000..784a30b
--- /dev/null
+++ b/debian/patches/Generate-and-install-pkg-config-metadata-235.patch
@@ -0,0 +1,48 @@
+From: Simon McVittie <[email protected]>
+Date: Fri, 7 Aug 2020 21:17:12 +0100
+Subject: Generate and install pkg-config metadata (#235)
+
+This provides a way for dependent projects with non-CMake build
+systems to locate libroaring. Multiple build systems can read these
+files, either directly (like Meson) or via the pkg-config or pkgconf
+tools (like Autotools).
+
+Signed-off-by: Simon McVittie <[email protected]>
+Applied-upstream: 0.2.67, commit:d7e15791d85fca9ba62591e29ef6b05fc43f5aaa
+---
+ CMakeLists.txt |  4 ++++
+ roaring.pc.in  | 10 ++++++++++
+ 2 files changed, 14 insertions(+)
+ create mode 100644 roaring.pc.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 54de391..b2e91df 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,6 +43,10 @@ find_package(CTargets)
+ find_package(Options)
+ find_package(LTO)
+ 
++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/roaring.pc.in"
++               "${CMAKE_CURRENT_BINARY_DIR}/roaring.pc" @ONLY)
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/roaring.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
++
+ ## C header files get installed to /usr/local/include/roaring typically
+ install(DIRECTORY include/${ROARING_LIB_NAME} DESTINATION include)
+ 
+diff --git a/roaring.pc.in b/roaring.pc.in
+new file mode 100644
+index 0000000..e3b2391
+--- /dev/null
++++ b/roaring.pc.in
+@@ -0,0 +1,10 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: roaring
++Description: Roaring bitmap implementation in C
++Version: @ROARING_LIB_VERSION@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lroaring
diff --git a/debian/patches/series b/debian/patches/series
index d66f89e..2b4d2f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 001-containerptr_roaring_bitmap_add-public.patch
+Generate-and-install-pkg-config-metadata-235.patch
-- 
2.28.0

>From 4167e74679edbce9498e274e851c510e9134ba77 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Sat, 8 Aug 2020 10:25:04 +0100
Subject: [PATCH 2/2] Add an autopkgtest for building with pkg-config

This is using a shell script for simplicity, but if this works, then
dependent projects using Autotools, Meson and plain make should work
equally well.
---
 debian/tests/control    |  4 ++++
 debian/tests/pkg-config | 20 ++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100755 debian/tests/pkg-config

diff --git a/debian/tests/control b/debian/tests/control
index c5429d4..eedd5e8 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,7 @@
 Tests: cmake
 Depends: build-essential, cmake, libroaring-dev
 Restrictions: superficial, allow-stderr
+
+Tests: pkg-config
+Depends: build-essential, libroaring-dev, pkg-config
+Restrictions: superficial, allow-stderr
diff --git a/debian/tests/pkg-config b/debian/tests/pkg-config
new file mode 100755
index 0000000..3374812
--- /dev/null
+++ b/debian/tests/pkg-config
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# Copyright 2020 Simon McVittie
+# SPDX-License-Identifier: Apache-2.0
+
+set -eux
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+    CROSS_COMPILE=
+fi
+
+cp debian/tests/cmake.d/hello.c "$AUTOPKGTEST_TMP"
+cd "$AUTOPKGTEST_TMP"
+
+# Deliberately word-splitting pkg-config's output:
+# shellcheck disable=SC2046
+"${CROSS_COMPILE}gcc" -otrivial hello.c $("${CROSS_COMPILE}pkg-config" --cflags --libs roaring)
+./trivial
-- 
2.28.0


--- End Message ---
--- Begin Message ---
Source: croaring
Source-Version: 0.2.66+ds-2
Done: Alexander GQ Gerasiov <[email protected]>

We believe that the bug you reported is fixed in the latest version of
croaring, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alexander GQ Gerasiov <[email protected]> (supplier of updated croaring package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 05 Jan 2021 15:44:54 +0300
Source: croaring
Architecture: source
Version: 0.2.66+ds-2
Distribution: unstable
Urgency: medium
Maintainer: Alexander GQ Gerasiov <[email protected]>
Changed-By: Alexander GQ Gerasiov <[email protected]>
Closes: 968063 968092
Changes:
 croaring (0.2.66+ds-2) unstable; urgency=medium
 .
   [ Simon McVittie ]
   * d/libroaring-dev.install: Do not override path of CMake metadata.
     The file varies between architectures, so /usr/share is not the right
     place for it. Moving it to a location with a different number of path
     segments also causes it to fail to find the library on non-merged-/usr
     systems. (Closes: #968063)
   * d/tests: Add a superficial compile/link/run autopkgtest
 .
   [ Alexander Gerasiov ]
   * 001-containerptr_roaring_bitmap_add-public.patch: Add patch headers.
   * Backport 0002-Generate-and-install-pkg-config-metadata-235.patch from
     upstream (Closes: #968092).
Checksums-Sha1:
 91b77adcf3496a6a958215b926e8e458030c566f 1671 croaring_0.2.66+ds-2.dsc
 2b512bce859c0e111a9bd18453e17e45d290464f 6084 
croaring_0.2.66+ds-2.debian.tar.xz
 4ea587a6aa8ac106e5bf342d1fe2d874caf7e26b 6495 
croaring_0.2.66+ds-2_source.buildinfo
Checksums-Sha256:
 77078b98a9c29852c07e1e567242c6764a584fa0913973eb1321a28bdb9f10e2 1671 
croaring_0.2.66+ds-2.dsc
 14a0e070c1cb70ba2700b2ba94d5dfd0ec04ed771b1b1a831c7a0852adecb852 6084 
croaring_0.2.66+ds-2.debian.tar.xz
 f7cb0ee6eaecead5ff6aa6e97588b648201fd5b4f1fbb56a9716b3293d1e0150 6495 
croaring_0.2.66+ds-2_source.buildinfo
Files:
 1e77be7bc6298cec023153c1bea57609 1671 libs optional croaring_0.2.66+ds-2.dsc
 845ad7b9334a828a294c83a4ace82885 6084 libs optional 
croaring_0.2.66+ds-2.debian.tar.xz
 d4f694e287a623f91f10add83ca0f770 6495 libs optional 
croaring_0.2.66+ds-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFCBAEBCgAsFiEEBLWdkN98wqvNSbrqyofp6CqsM/EFAl/0YAEOHGdxQGRlYmlh
bi5vcmcACgkQyofp6CqsM/G2dgf/RggO/1q7JOxNDYvgKdC13H5gY0eRm8JsRV7J
7d/K2ZVIBnQ9fhuJEFdPergLG4a8y/UIIjFKxD3h2BZ3bLv5QNplywrJ98FU+NHK
uUnYuZmZt3/nwotuXDNzCCYNeNdkjnjOVi4eJWtUKgs5FdXWeLv+V2h3Ba4KAehv
wBWGHFhhBjhhFns4CJKnxlaRBli8kyEAr9KnJscSzbC1QkbxgYIvBgltsIhZ3Wwt
kpl5RisfQwuICNbZxlm0+8CB1choWnK9R3FkvyNjZ55FLpeD7MAvg8d/aOvcHBcy
AnScCPWJYLtoq+Fc6ppnniUrnr3TZwLoLMRM5MYodgIftVzInQ==
=5FPe
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to