Bug 251567 - graphics/libheif: multiple problem with options and depends
Summary: graphics/libheif: multiple problem with options and depends
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-03 19:50 UTC by Dmitry Marakasov
Modified: 2021-01-26 19:59 UTC (History)
2 users (show)

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


Attachments
Patch (2.46 KB, patch)
2020-12-07 17:28 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2020-12-03 19:50:01 UTC
All options apart from THREADS only affect port dependencies but do not instruct upstream build system to not use specific component even if it presents in the system. This leads to a bunch of problems (port built with all options except for EXAMPLES disabled):

====> Running Q/A tests (stage-qa)
Error: /usr/local/bin/heif-convert is linked to /usr/local/lib/libjpeg.so.8 from graphics/jpeg-turbo but it is not declared as a dependency
Warning: you need USES+=jpeg
Error: /usr/local/bin/heif-convert is linked to /usr/local/lib/libpng16.so.16 from graphics/png but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libpng16.so:graphics/png
Error: /usr/local/bin/heif-convert is linked to /usr/local/lib/libde265.so.0 from multimedia/libde265 but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libde265.so:multimedia/libde265
Error: /usr/local/bin/heif-convert is linked to /usr/local/lib/libx265.so.192 from multimedia/x265 but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libx265.so:multimedia/x265
Error: /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so is linked to /usr/local/lib/libgdk_pixbuf-2.0.so.0 from graphics/gdk-pixbuf2 but it is not declared as a dependency
Warning: you need USE_GNOME+=gdkpixbuf2
Error: /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so is linked to /usr/local/lib/libgobject-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so is linked to /usr/local/lib/libglib-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so is linked to /usr/local/lib/libintl.so.8 from devel/gettext-runtime but it is not declared as a dependency
Warning: you need USES+=gettext-runtime

Also, since examples are built regardless of EXAMPLES option, and --disable-go is passed only when examples are enabled, the build with disabled EXAMPLES fails as it uses go and fails:

--- heif-test-go ---
GOPATH= PKG_CONFIG_PATH=/usr/work/usr/ports/graphics/libheif/work/libheif-1.6.2 CGO_CFLAGS="-I/usr/work/usr/ports/graphics/libheif/work/libheif-1.6.2" CGO_LDFLAGS="-L/usr/work/usr/ports/graphics/libheif/work/libheif-1.6.2/libheif/.libs" LD_LIBRARY_PATH=/usr/work/usr/ports/graphics/libheif/work/libheif-1.6.2/libheif/.libs /usr/local/bin/go build -o heif-test-go heif-test.go
heif-test.go:39:2: cannot find package "github.com/strukturag/libheif/go/heif" in any of:
        /usr/local/go/src/github.com/strukturag/libheif/go/heif (from $GOROOT)
        /usr/work/usr/ports/graphics/libheif/work/go/src/github.com/strukturag/libheif/go/heif (from $GOPATH)
*** [heif-test-go] Error code 1

make[4]: stopped in /usr/work/usr/ports/graphics/libheif/work/libheif-1.6.2/examples
Comment 1 Fernando Apesteguía freebsd_committer 2020-12-04 12:18:28 UTC
^Triage: Reporter is committer, assign accordingly.
Comment 2 Dmitry Marakasov freebsd_committer 2020-12-07 17:28:54 UTC
Created attachment 220351 [details]
Patch
Comment 3 commit-hook freebsd_committer 2021-01-26 19:58:59 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Jan 26 19:58:38 UTC 2021
New revision: 562994
URL: https://svnweb.freebsd.org/changeset/ports/562994

Log:
  - Fix dependency handling

  PR:		251567
  Approved by:	maintainer timeout (freebsd@sebastiansteinmetz.ch, 7 weeks)

Changes:
  head/graphics/libheif/Makefile
  head/graphics/libheif/pkg-plist