Your message dated Mon, 29 Oct 2018 23:50:39 +0000
with message-id <e1ghhit-0001pl...@fasolo.debian.org>
and subject line Bug#911258: fixed in libopenhmd 0.2.0-4
has caused the Debian Bug report #911258,
regarding libopenhmd-dev: missing dependency on libhidapi-dev, required by 
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 ow...@bugs.debian.org
immediately.)


-- 
911258: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911258
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libopenhmd-dev
Version: 0.2.0-2
Severity: serious
Tags: patch
Justification: Policy 3.5

libopenhmd-dev contains openhmd.pc, which Requires hidapi-libusb.
hidapi-libusb.pc is provided by libhidapi-dev, which is a
build-dependency for libopenhmd but is not included in libopenhmd's
dependencies.

The pkg-config file also contains an incorrect includedir and libdir,
because it assumes that the .pc file is installed 2 directories below
${prefix} (typically ${prefix}/lib/pkgconfig), but this is not true in
Debian. I attach proposed patches to fix this. Note that they include a
non-upstreamed patch for the pkg-config metadata.

This class of bug is easy to detect with an autopkgtest that builds
and runs a simple program (also included in the attached patches).

Regards,
    smcv
>From f89ce3e8b599cf7783fb5db23d95d15315c1186e Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Wed, 17 Oct 2018 17:14:57 +0100
Subject: [PATCH 1/3] d/tests/build: Add a simple compile/link/execute test

---
 debian/changelog     |  6 ++++++
 debian/tests/build   | 23 +++++++++++++++++++++++
 debian/tests/control |  3 +++
 3 files changed, 32 insertions(+)
 create mode 100755 debian/tests/build
 create mode 100644 debian/tests/control

diff --git a/debian/changelog b/debian/changelog
index fdf402e..6d71daa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libopenhmd (0.2.0-3.1) UNRELEASED; urgency=medium
+
+  * d/tests/build: Add a simple compile/link/execute test
+
+ -- Simon McVittie <s...@debian.org>  Wed, 17 Oct 2018 17:14:22 +0100
+
 libopenhmd (0.2.0-3) unstable; urgency=medium
 
   * Fix filename in debian/watch
diff --git a/debian/tests/build b/debian/tests/build
new file mode 100755
index 0000000..9bb6c12
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+exec 2>&1
+set -u
+set -x
+
+cd "$AUTOPKGTEST_TMP"
+cat > example.c <<'EOF'
+/* A very much simplified version of examples/simple/simple.c */
+#include <openhmd.h>
+
+int main(void)
+{
+    ohmd_context *ctx = ohmd_ctx_create();
+    ohmd_ctx_destroy(ctx);
+    return 0;
+}
+EOF
+
+gcc -o example example.c $(pkg-config --cflags --libs openhmd)
+test -x ./example
+./example
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..9140881
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: build
+Restrictions: superficial
+Depends: build-essential, libopenhmd-dev, pkg-config
-- 
2.19.1

>From 66b6c5645d4edadbb2d80121e78a2ef4e901b357 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Wed, 17 Oct 2018 17:44:39 +0100
Subject: [PATCH 2/3] Make libopenhmd-dev depend on libhidapi-dev so the
 pkg-config metadata will work

---
 debian/changelog | 2 ++
 debian/control   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 6d71daa..b7423fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 libopenhmd (0.2.0-3.1) UNRELEASED; urgency=medium
 
   * d/tests/build: Add a simple compile/link/execute test
+  * Make libopenhmd-dev depend on libhidapi-dev so the pkg-config
+    metadata will work
 
  -- Simon McVittie <s...@debian.org>  Wed, 17 Oct 2018 17:14:22 +0100
 
diff --git a/debian/control b/debian/control
index 00f2ef4..38d4813 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,8 @@ Description: API and drivers for immersive technology (shared library)
 Package: libopenhmd-dev
 Architecture: any
 Section: libdevel
-Depends: libopenhmd0 (= ${binary:Version}),
+Depends: libhidapi-dev,
+         libopenhmd0 (= ${binary:Version}),
          ${misc:Depends}
 Description: API and drivers for immersive technology (development files)
  OpenHMD aims to provide a Free and Open Source API and drivers for
-- 
2.19.1

>From 3bdd4fd30d4dda02dd101a6954379ad45d3d5832 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Wed, 17 Oct 2018 17:53:03 +0100
Subject: [PATCH 3/3] Further fixes to the pkg-config metadata

---
 debian/changelog                              |  3 +
 ...code-the-hidapi-dependency-in-the-pk.patch | 70 +++++++++++++++++++
 ...titute-the-correct-libdir-includedir.patch | 27 +++++++
 debian/patches/series                         |  2 +
 4 files changed, 102 insertions(+)
 create mode 100644 debian/patches/Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch
 create mode 100644 debian/patches/pkg-config-Substitute-the-correct-libdir-includedir.patch
 create mode 100644 debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index b7423fd..dec15aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ libopenhmd (0.2.0-3.1) UNRELEASED; urgency=medium
   * d/tests/build: Add a simple compile/link/execute test
   * Make libopenhmd-dev depend on libhidapi-dev so the pkg-config
     metadata will work
+  * d/p/Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch,
+    d/p/pkg-config-Substitute-the-correct-libdir-includedir.patch:
+    Further fixes to the pkg-config metadata
 
  -- Simon McVittie <s...@debian.org>  Wed, 17 Oct 2018 17:14:22 +0100
 
diff --git a/debian/patches/Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch b/debian/patches/Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch
new file mode 100644
index 0000000..d762b52
--- /dev/null
+++ b/debian/patches/Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch
@@ -0,0 +1,70 @@
+From: Adrien Maglo <mags...@videolan.org>
+Date: Fri, 21 Jul 2017 19:53:37 +0200
+Subject: Autoconf: do not hard-code the hidapi dependency in the pkg-config
+ file
+
+Let autoconf generate the pkg-config file has hidapi has not the same on
+the different platforms (hidapi or hidapi-libusb).
+
+Origin: upstream, 0.3.0, commit:851bf6993ce9614c249933994000915a9889b3b6
+---
+ configure.ac             |  3 ++-
+ pkg-config/openhmd.pc    | 11 -----------
+ pkg-config/openhmd.pc.in | 11 +++++++++++
+ 3 files changed, 13 insertions(+), 12 deletions(-)
+ delete mode 100644 pkg-config/openhmd.pc
+ create mode 100644 pkg-config/openhmd.pc.in
+
+diff --git a/configure.ac b/configure.ac
+index 23a1ffb..19ec8e7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,6 +16,7 @@ PKG_PROG_PKG_CONFIG([0.24])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ 
+ hidapi="hidapi"
++AC_SUBST(hidapi)
+ 
+ AC_SUBST(PKG_CONFIG_EXTRA_PATH, "")
+ AC_SUBST(EXTRA_LD_FLAGS, "")
+@@ -103,5 +104,5 @@ AC_PROG_CC
+ AC_PROG_CC_C99
+ 
+ AC_CONFIG_HEADERS([config.h])
+-AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/unittests/Makefile examples/Makefile examples/opengl/Makefile examples/simple/Makefile])
++AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/unittests/Makefile examples/Makefile examples/opengl/Makefile examples/simple/Makefile pkg-config/openhmd.pc])
+ AC_OUTPUT 
+diff --git a/pkg-config/openhmd.pc b/pkg-config/openhmd.pc
+deleted file mode 100644
+index 638e6e0..0000000
+--- a/pkg-config/openhmd.pc
++++ /dev/null
+@@ -1,11 +0,0 @@
+-prefix=${pcfiledir}/../..
+-libdir=${prefix}/lib
+-includedir=${prefix}/include/openhmd
+-
+-Name: openhmd
+-Description: API and drivers for immersive technology devices such as HMDs
+-Version: 0.0.1
+-Requires: hidapi-libusb
+-Conflicts:
+-Libs: -L${libdir} -lopenhmd
+-Cflags: -I${includedir}
+diff --git a/pkg-config/openhmd.pc.in b/pkg-config/openhmd.pc.in
+new file mode 100644
+index 0000000..00d7331
+--- /dev/null
++++ b/pkg-config/openhmd.pc.in
+@@ -0,0 +1,11 @@
++prefix=${pcfiledir}/../..
++libdir=${prefix}/lib
++includedir=${prefix}/include/openhmd
++
++Name: openhmd
++Description: API and drivers for immersive technology devices such as HMDs
++Version: 0.0.1
++Requires: @hidapi@
++Conflicts:
++Libs: -L${libdir} -lopenhmd -l@hidapi@
++Cflags: -I${includedir}
diff --git a/debian/patches/pkg-config-Substitute-the-correct-libdir-includedir.patch b/debian/patches/pkg-config-Substitute-the-correct-libdir-includedir.patch
new file mode 100644
index 0000000..a33a439
--- /dev/null
+++ b/debian/patches/pkg-config-Substitute-the-correct-libdir-includedir.patch
@@ -0,0 +1,27 @@
+From: Simon McVittie <s...@debian.org>
+Date: Wed, 17 Oct 2018 17:52:15 +0100
+Subject: pkg-config: Substitute the correct libdir, includedir
+
+Libraries are not always installed in ${prefix}/lib, and pkg-config
+metadata is not always in ${prefix}/lib/pkgconfig.
+
+Origin: vendor, Debian
+---
+ pkg-config/openhmd.pc.in | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pkg-config/openhmd.pc.in b/pkg-config/openhmd.pc.in
+index 00d7331..575a061 100644
+--- a/pkg-config/openhmd.pc.in
++++ b/pkg-config/openhmd.pc.in
+@@ -1,6 +1,7 @@
+-prefix=${pcfiledir}/../..
+-libdir=${prefix}/lib
+-includedir=${prefix}/include/openhmd
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@/openhmd
+ 
+ Name: openhmd
+ Description: API and drivers for immersive technology devices such as HMDs
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8a723b3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch
+pkg-config-Substitute-the-correct-libdir-includedir.patch
-- 
2.19.1


--- End Message ---
--- Begin Message ---
Source: libopenhmd
Source-Version: 0.2.0-4

We believe that the bug you reported is fixed in the latest version of
libopenhmd, 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 911...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Balint Reczey <rbal...@ubuntu.com> (supplier of updated libopenhmd 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 ftpmas...@ftp-master.debian.org)


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

Format: 1.8
Date: Mon, 29 Oct 2018 21:44:08 +0100
Source: libopenhmd
Binary: libopenhmd0 libopenhmd-dev
Architecture: source
Version: 0.2.0-4
Distribution: unstable
Urgency: medium
Maintainer: Balint Reczey <bal...@balintreczey.hu>
Changed-By: Balint Reczey <rbal...@ubuntu.com>
Description:
 libopenhmd-dev - API and drivers for immersive technology (development files)
 libopenhmd0 - API and drivers for immersive technology (shared library)
Closes: 911258
Changes:
 libopenhmd (0.2.0-4) unstable; urgency=medium
 .
   [ Simon McVittie ]
   * d/tests/build: Add a simple compile/link/execute test
   * Make libopenhmd-dev depend on libhidapi-dev so the pkg-config
     metadata will work (Closes: #911258)
   * d/p/Autoconf-do-not-hard-code-the-hidapi-dependency-in-the-pk.patch,
     d/p/pkg-config-Substitute-the-correct-libdir-includedir.patch:
     Further fixes to the pkg-config metadata
 .
   [ Balint Reczey ]
   * debian/control: Point Vcs-* to Salsa.
     Thanks to Simon McVittie for migrating the repository
Checksums-Sha1:
 99bec8a1e14c92baebfb3453148c6bbb59c3cd56 2056 libopenhmd_0.2.0-4.dsc
 5fe8476053b313305034b530e4c0c5e447187e0e 4052 libopenhmd_0.2.0-4.debian.tar.xz
 804af12d8ac65ae8193e5c27adecdcb9c9a8a0a0 6242 
libopenhmd_0.2.0-4_source.buildinfo
Checksums-Sha256:
 b37bc5dba94c039d260a882e6c80f327a2bc3395eba370d15b490d0be83b9f89 2056 
libopenhmd_0.2.0-4.dsc
 bbd4e52cd8576e3d2cdb83c80cc7c8d57f64b928c73cc3d9295bbc91c4e21274 4052 
libopenhmd_0.2.0-4.debian.tar.xz
 1a27fda89a65fb8bc626a4c565a3974f9f858028c2823f4331549b736a42f82d 6242 
libopenhmd_0.2.0-4_source.buildinfo
Files:
 f277fa06cb5d0277d6f8cdc0ceea853d 2056 libs optional libopenhmd_0.2.0-4.dsc
 bfee2bf9648d0d9a4a42be6b5393c8d5 4052 libs optional 
libopenhmd_0.2.0-4.debian.tar.xz
 6108672aed2a9459e554bf7f5a69de6c 6242 libs optional 
libopenhmd_0.2.0-4_source.buildinfo

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

iQIzBAEBCgAdFiEEI/PvTgXX55rLQUfDg6KBkWslS0UFAlvXjpoACgkQg6KBkWsl
S0Vp7xAApjBWiKbMnqYgZ5G3P4x467SIwMUU76m0uTXgmsi9K6uV+lVMp0HF75Iw
hey+BppZzr2BPhBLJ4ftTPW3KqBjC4UXNyhtaejn/qynoWwEdrYUA9YuRraQKgzJ
3iGJS9AScWczTX3JZZsybq9fO3IRIi4K7Tl9o/koQHXnBFnsAmfgJK0eYeM+Nojm
s6JOElMIzivokf6bhA94gmiWF2KBD30+6Ry59Hl93V66Bzi+iHOMo3jiUjb04Rv/
kSaymhtiBpXesn31Q+HwAG4kXP2j1oGstLxv8J3ZP2bd4I1yJaOHaphq/b8s0EXY
dijSb74RBmen48d/CnQWbW0YNq3nep04U7VS4YsynqF5KEKCRQp4chRv9hqvXbNP
UfY2bJc9TaAx7/TV/g4i4JEkn2QUfB2cRdcszOJtoP9RrwJpVlbnUTodhBvoBmCK
sXIL+0MDM6ezScuur38A0ZcfT9MTTD+KvfTDcvvdLdqX7vRiG30/laJrxO4Z6w5E
SQ/9Z2fJWi+eR1CkzlSSN6cV0p8Zz3uoGc9h8k3jkdOWpw3AtCjrYBgBiDxjTn4Y
Wh8Kwcdz8giWVrk/NZgQOk0t8Yd8BRjUzR7Ml18kXpJ8p15jPWiCny905QN0IMo+
LRijZjEoaldoD7wzYsa6Wo3yW7T8p4alH3ayq5VIA+/GR2jEPuU=
=TeBv
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to