Bug 237738

Summary: emulators/qemu-utils: wrong dependencies
Product: Ports & Packages Reporter: Boris Samorodov <bsam>
Component: Individual Port(s)Assignee: Alan Somers <asomers>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi
Priority: --- Flags: bugzilla: maintainer-feedback? (asomers)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Switch GTK2 -> GTK3 none

Description Boris Samorodov freebsd_committer 2019-05-03 19:55:22 UTC
Created attachment 204202 [details]
Switch GTK2 -> GTK3

The port seems to list wrong dependencies. I've tried to install the package at FreeBSD-current system and got:
-----
Number of packages to be installed: 86
-----

Seems to be too much... Well, the port itself shows:
-----
% make -C /usr/ports/emulators/qemu-utils run-depends-list
/usr/ports/x11/libxkbcommon
/usr/ports/graphics/libepoxy
/usr/ports/devel/pcre2
/usr/ports/devel/gettext-runtime
/usr/ports/accessibility/atk
/usr/ports/graphics/cairo
/usr/ports/graphics/gdk-pixbuf2
/usr/ports/devel/glib20
/usr/ports/x11-toolkits/gtk30
/usr/ports/x11-toolkits/pango
/usr/ports/x11-toolkits/vte3
/usr/ports/graphics/mesa-libs
/usr/ports/x11/libX11
/usr/ports/x11/libXext
-----

Aha, the first problem is GTK2 actually should be GTK3 (at Makefile, see attachement). Now we get:
-----
% make -C /usr/ports/emulators/qemu-utils run-depends-list
/usr/ports/devel/gettext-runtime
/usr/ports/graphics/cairo
/usr/ports/graphics/gdk-pixbuf2
/usr/ports/devel/glib20
-----

Much better but it may be reduced further. At masterport there are lines:
-----
.if !defined(PKGNAMESUFFIX) || (${PKGNAMESUFFIX} != "-utils" && ${PKGNAMESUFFIX} != "-guest-agent")
ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64
USE_XORG=       pixman
USE_GNOME+=     cairo glib20 libxml2
.endif
-----

AFAIK cairo should not be a dependency for the port with "-utils" suffix. I'm not sure how to deal with this problem. :-(
Comment 1 Boris Samorodov freebsd_committer 2019-05-04 22:07:32 UTC
JFYI: poudriere testport build shows following library dependencies:
-----
=>> Checking shared library dependencies
 0x0000000000000001 NEEDED               Shared library: [libc++.so.1]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x0000000000000001 NEEDED               Shared library: [libcxxrt.so.1]
 0x0000000000000001 NEEDED               Shared library: [libglib-2.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libgthread-2.0.so.0]
 0x0000000000000001 NEEDED               Shared library: [libintl.so.8]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]
 0x0000000000000001 NEEDED               Shared library: [librt.so.1]
 0x0000000000000001 NEEDED               Shared library: [libthr.so.3]
 0x0000000000000001 NEEDED               Shared library: [libutil.so.9]
 0x0000000000000001 NEEDED               Shared library: [libxml2.so.2]
 0x0000000000000001 NEEDED               Shared library: [libz.so.6]
-----

OK, without my first path there were 111 dependent packages:
-----
make -C /usr/ports/emulators/qemu-utils package-depends-list | wc -l
     111
-----

With my first patch there are only 39 package dependencies.

Now I've done some more research and it shows that the culprit for cairo and it's dependencies is the following line from master port Makefile:
-----
X86_TARGETS_USE_OFF=   GNOME=cairo,gdkpixbuf2
-----

Should this line get commented current port has only 9 package dependencies.
However I still do not know what to do next...
Comment 2 Alan Somers freebsd_committer 2019-05-08 15:56:23 UTC
Looks like qemu-utils got broken by r499318, which updated the master port emulators/qemu.  I'll fix it.  I think it needs more changes that just the GTK3 change.
Comment 3 commit-hook freebsd_committer 2019-05-10 13:16:11 UTC
A commit references this bug:

Author: asomers
Date: Fri May 10 13:15:48 UTC 2019
New revision: 501174
URL: https://svnweb.freebsd.org/changeset/ports/501174

Log:
  emulators/qemu-utils: Don't depend on GTK3 or cairo.

  r499318 switched qemu from GTK2 to GTK3, accidentally making GTK3 a
  dependency of qemu-utils. This commit fixes that, and also removes cairo as
  a dependency for qemu-utils.

  PR:		237738
  Reported by:	bsam
  Reviewed by:	bsam, bofh
  Approved by:	bofh (qemu maintainer)
  Differential Revision:	https://reviews.freebsd.org/D20202

Changes:
  head/emulators/qemu/Makefile
  head/emulators/qemu-utils/Makefile