Created attachment 227741 [details] v1: adjust RUN_DEPENDS $ pkg install libdrm $ pkg-config libdrm_intel --cflags Package pthread-stubs was not found in the pkg-config search path. Perhaps you should add the directory containing `pthread-stubs.pc' to the PKG_CONFIG_PATH environment variable Package 'pthread-stubs', required by 'libdrm_intel', not found
Created attachment 227742 [details] v2: drop pthread-stubs Alternatively, pthread-stubs dependency can be dropped.
*** Bug 258296 has been marked as a duplicate of this bug. ***
*** Bug 258298 has been marked as a duplicate of this bug. ***
.private in .pc files is only used by pkg-config --static but it's nop in libdrm because .a files (static libraries) are not installed. https://man.freebsd.org/pc/5
libdrm_<vendor>.a never existed but libdrm.a did until ports d423519fdb82.
I confirm, both v1 and v2 fix PR 258296.
v2 looks ok. Even without the libpthread-stubs dep a -lpthread is added so no need to depends on this package. Can you open an MR upstream please ?
(In reply to Emmanuel Vadot from comment #7) > Can you open an MR upstream please ? https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/193 Here's a list of consumers where pthread-stubs dependency leaked to. Often non-issue due to bootlegging pthread-stubs via x11/libxcb. $ pkg rquery %o\ %B | awk '/libdrm_/ { print $1 }' | sort -u graphics/intel-backlight graphics/mesa-devel graphics/mesa-dri graphics/mesa-gallium-va graphics/mesa-gallium-vdpau graphics/piglit lang/clover multimedia/cmrt multimedia/intel-media-sdk multimedia/libva-intel-driver multimedia/libva-intel-hybrid-driver sysutils/radeontop x11-drivers/xf86-video-amdgpu x11-drivers/xf86-video-ati x11-drivers/xf86-video-intel
Created attachment 227755 [details] v2.1 (apply via "git am") - Replace with the version submitted upstream (larger due to cleanup) - Drop ports 1c02555442ed leftover per https://gitlab.freedesktop.org/mesa/drm/-/commit/90c9175c8197
Created attachment 227756 [details] v2.2 (apply via "git am") v2 -> v2.1 accidentally lost BUILD_DEPENDS removal as I rewrote the patch from scratch.
(In reply to Jan Beich from comment #9) > - Drop ports 1c02555442ed leftover per https://gitlab.freedesktop.org/mesa/drm/-/commit/90c9175c8197 I've split this into a separate commit locally but propagating to Bugzilla is PITA (Phabricator is no better, requiring tons of scripts just for basic workflow).
And the cleanup is only necessary because manu@ made a style mistake (let's ignore variable order which was also wrong) a year ago using his fork in PATCH_SITES instead of upstream which now conflicts with the fix here as it needs different fork. GitLab unlike GitHub only allows referencing hashes from forks when part of a merge-request. For example, https://gitlab.freedesktop.org/manu/drm/-/commit/9ef84bbc6269 doesn't exist because it wasn't submitted to manu's fork but rather to its upstream.
Do I need another approval for v2.2 or comment 7 covers it? Ideally, it should land before 01:00 UTC today to avoid annoying "poudriere bulk -b <branch>" users after harfbuzz update obsoleted some heavy dependencies only to be obseleted again by libdrm update.
Go for it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1a01638104b4a6f4b72483d00ce817bb2a64c7a9 commit 1a01638104b4a6f4b72483d00ce817bb2a64c7a9 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-09-07 18:45:30 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-09-08 15:11:37 +0000 graphics/libdrm: drop dependency on pthread-stubs Avoid empty private library (only passes -pthread) leaking into consumers. PR: 258346 Tested by: Evgeniy Khramtsov Approved by: manu graphics/libdrm/Makefile | 5 ++++- graphics/libdrm/distinfo | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7c2f9e20523fe097d644c9d11547df7811abaa61 commit 7c2f9e20523fe097d644c9d11547df7811abaa61 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-09-08 10:50:59 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-09-08 15:11:37 +0000 graphics/libdrm: drop upstreamed patch after 1c02555442ed https://gitlab.freedesktop.org/mesa/drm/-/commit/90c9175c8197 PR: 258346 Approved by: manu graphics/libdrm/Makefile | 3 --- graphics/libdrm/distinfo | 2 -- 2 files changed, 5 deletions(-)