FS#68969 - [hdf5-openmpi] pkg-config: hard-coded version number in filename

Attached to Project: Community Packages
Opened by Martin Diehl (MartinDiehl) - Monday, 14 December 2020, 08:22 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Sunday, 18 July 2021, 19:25 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Ronald van Haren (pressh)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


The *.pc files explicitly include the version number, e.g 'hdf5_hl-1.12.0.pc'. This requires to update build files of libraries that use hdf5 for each version update of HDF5. In addition, it breaks dependencies in HDF5 itself: 'pkg-config --libs hdf5_hl-1.12.0' gives an error message 'Package 'hdf5', required by 'hdf5_hl-1.12.0', not found'.

Are there any reasons against using the 'non-versioned' names, e.g. 'hdf5_hl' for the most recent HDF5 version? That seems to be the standard for pkg-config (but I know that HDF5 itself does some non-standard ways when it comes to versioning).

Note: I fill the same report to https://www.archlinux.org/packages/community/x86_64/hdf5. It uses a very similar PKGBUILD.
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Sunday, 18 July 2021, 19:25 GMT
Reason for closing:  Upstream
Additional comments about closing:  1.12.1
Comment by Martin Diehl (MartinDiehl) - Tuesday, 22 December 2020, 07:30 GMT
I've implemented in the AUR package 'hdf5-openmpi-java' the following changes:

- install -Dm644 ../build/CMakeFiles/hdf5{,_hl}{,_cpp}-${pkgver}.pc -t "${pkgdir}"/usr/lib/pkgconfig/
+ install -Dm644 ../build/CMakeFiles/hdf5-${pkgver}.pc -D "${pkgdir}"/usr/lib/pkgconfig/hdf5.pc
+ install -Dm644 ../build/CMakeFiles/hdf5_hl-${pkgver}.pc -D "${pkgdir}"/usr/lib/pkgconfig/hdf5_hl.pc
+ install -Dm644 ../build/CMakeFiles/hdf5_cpp-${pkgver}.pc -D "${pkgdir}"/usr/lib/pkgconfig/hdf5_cpp.pc
+ install -Dm644 ../build/CMakeFiles/hdf5_hl_cpp-${pkgver}.pc -D "${pkgdir}"/usr/lib/pkgconfig/hdf5_hl_cpp.pc

I will also report to the upstream developers, including the version string in the filename seems to oppose the purpose of using pkconfig.
Comment by Bruno Pagani (ArchangeGabriel) - Sunday, 18 July 2021, 18:58 GMT
Fixed upstream in 1.12.1, and thus in our package too now.