FS#64881 - libelfin package has incorrect pkg-config .pc

Attached to Project: Community Packages
Opened by Basile Clement (Elarnon) - Wednesday, 18 December 2019, 13:52 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 19 December 2019, 00:24 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The libelf++.pc and libdwarf++.pc distributed with libelfin (0.3-1) refer to paths relative to the pkgdir, e.g. `/build/libelfin/pkg/libelfin/usr/lib`.

Instead, the pkg-config files should provide the installed paths of the libraries on the user's machine. Attached is a patch to the PKGBUILD that fixes the values of `libdir` and `includedir` during packaging.
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Thursday, 19 December 2019, 00:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  libelfin-0.3-2
Comment by Jonas Witschel (diabonas) - Wednesday, 18 December 2019, 15:56 GMT
I confirm the issue, also see the upstream bug report https://github.com/aclements/libelfin/issues/35 Instead of patching the files manually in package(), I think it is much cleaner to make upstream support DESTDIR as suggested in the linked issue and use

VER=$pkgver PREFIX=/usr DESTDIR="$pkgdir" make install

in the PKGBUILD. I implemented this in https://github.com/aclements/libelfin/pull/42
Comment by Anatol Pomozov (anatolik) - Wednesday, 18 December 2019, 18:15 GMT
Thank you folks for the patches! Really appreciate it. I picked Jonas' approach as it is better for everyone (i.e. other distros) to fix the problem upstream.

I just pushed libelfin-0.3-2 to [community]. Please check that it works as expected.
Comment by Jonas Witschel (diabonas) - Wednesday, 18 December 2019, 22:52 GMT
Looks good to me, thanks for the fast update!

# pkgconf --keep-system-cflags --keep-system-libs --cflags --libs libdwarf++ libelf++
-I/usr/include -L/usr/lib -ldwarf++ -lelf++

Loading...