Bug 259320 - misc/shared-mime-info: some builds with USES=shared-mime-info are broken
Summary: misc/shared-mime-info: some builds with USES=shared-mime-info are broken
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-20 15:58 UTC by Felix Palmen
Modified: 2021-10-21 06:29 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (desktop)


Attachments
0001-Mk-Uses-shared-mime-info.mk-add-build-argument (2.38 KB, patch)
2021-10-20 16:13 UTC, Felix Palmen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Palmen 2021-10-20 15:58:57 UTC
It seems commit ddacf99b4fc010511a09e1af376d0fca7399e208 broke a few builds of ports depending on shared-mime-info.

Examples:

graphics/gdk-pixbuf2:
---
Run-time dependency shared-mime-info found: NO (tried pkgconfig)

meson.build:198:2: ERROR: Dependency "shared-mime-info" not found, tried pkgconfig
---

security/kpkpass:
---
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find SharedMimeInfo (missing: UPDATE_MIME_DATABASE_EXECUTABLE)
  (Required is at least version "1.3")
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/ECM/find-modules/FindSharedMimeInfo.cmake:52 (find_package_handle_standard_args)
  CMakeLists.txt:34 (find_package)
---

(Both errors in configure phase)

I also commented on https://reviews.freebsd.org/D32452

I see it makes little sense to require shared-mime-info as a build-time dependency, but some build systems seem to check for it nevertheless. Maybe adding it as a build-time dependency should be optional?
Comment 1 Felix Palmen 2021-10-20 16:13:32 UTC
Created attachment 228892 [details]
0001-Mk-Uses-shared-mime-info.mk-add-build-argument

Here's an example that makes my builds work again, but I'd assume there might be more ports affected.
Comment 2 Felix Palmen 2021-10-20 16:43:59 UTC
Additional doubt: Maybe there are ports with an "automagic" dependency that just opt to *not* install their mime data when shared-mime-info isn't found during configure phase? This would be caught by pkg-plist I guess?
Comment 3 Marco Beishuizen 2021-10-20 17:34:45 UTC
www/luakit-devel builds and installs, but gives errors about unable to load favicons now:

Lua error: unable to load image file: Couldn’t recognize the image file format for file “/usr/local/share/luakit/resources/icons/tab-icon-page.pngâ€
Traceback:
(1) [C]                                             in function filename
(2) /usr/local/share/luakit/lib/tab_favicons.lua:46 in function [anonymous]
Comment 4 Felix Palmen 2021-10-20 17:38:33 UTC
(In reply to Marco Beishuizen from comment #3)
And re-adding the build dependency solves it?

Maybe it should be re-added unconditionally for now, so the situation can be analyzed…
Comment 5 Felix Palmen 2021-10-21 06:29:37 UTC
(In reply to Felix Palmen from comment #4)

Seems this was already done in commit 41347bb5ca04d0c05261c22faac96c5b75589627