Package: libhowardhinnant-date-dev
Version: 3.0.1-4
Severity: normal
X-Debbugs-Cc: none, Michael Welsh Duggan <m...@md5i.com>

Dear Maintainer,

This report addresses two problems caused by the cmake-rename patch, one
of which is a bug, and the other of which is, in my opinion, a
misfeature.

First, the bug.  The added cmake/howardhinnant-dateConfig.cmake file
tests for the existence of target howardhinnant-date::date-tz, but the
renaming actually names it howardhinnant-date::howardhinnant-date-tz
instead.  As a result, find_dependency(Threads REQUIRED) never gets
called.

The idea that 'date' is too generic a name for the cmake project name
makes some sense.  Projects that depend on this library can easily
adjust for having different names like this:

  find_package(date CONFIG NAMES date howardhinnant-date REQUIRED)

This will find the config regardless of name, but the fact that the
target names have also changed forces me to add hacks like this to make
linkage work with either the Debian package or a manually installed
package (from upstream):

  # Date package required Threads::Threads but does not set it up
  find_package(Threads REQUIRED)
  find_package(date CONFIG NAMES date howardhinnant-date REQUIRED)
  if(TARGET howardhinnant-date::howardhinnant-date-tz)
    add_library(date::date-tz ALIAS howardhinnant-date::howardhinnant-date-tz)
  endif()

I argue that changing the name of the target isn't really desirable.  If
you disagree, I think that howardhinnant-date::date-tz makes more sense
than howardhinnant-date::howardhinnant-date-tz.  Ditto for the ...::date
target.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.17.0-1-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libhowardhinnant-date-dev depends on:
ii  libhowardhinnant-date-tz3  3.0.1-4

libhowardhinnant-date-dev recommends no packages.

libhowardhinnant-date-dev suggests no packages.

-- no debconf information

-- 
Michael Welsh Duggan
(m...@md5i.com)

Reply via email to