Bug 235895

Summary: graphics/xpdf4: can't build without GUI after port was updated from 4.00 to 4.01
Product: Ports & Packages Reporter: VVD <vvd>
Component: Individual Port(s)Assignee: Cy Schubert <cy>
Status: Closed Works As Intended    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (cy)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Added GUI option to build xpdf4 without GUI
none
Added GUI option to build xpdf4 without GUI none

Description VVD 2019-02-20 19:21:25 UTC
After this commit https://svnweb.freebsd.org/ports?view=revision&revision=493404 can't build graphics/xpdf4 on headless virtual machine without GUI: qt5 and desktop-file-utils.
Commenting lines USE_QT=, "desktop-file-utils qt:5" from USES in Makefile and few lines in pkg-plist allow to build port.
Comment 1 Cy Schubert freebsd_committer 2019-02-20 20:07:54 UTC
Without GUI is no longer supported.
Comment 2 VVD 2019-02-20 22:32:46 UTC
I need only console libexec/xpdf/pdftotext, but not half of qt5 on small virtual machine.
graphics/poppler-utils have a lot of dependencies too.

If you want - I can write patch.
Comment 3 Cy Schubert freebsd_committer 2019-02-21 02:44:17 UTC
I'm sorry we cannot do that. Any patch you create must be forward ported for each successive release of xpdf. That is asking too much.

You are certainly welcome to push any patches upstream. I will include your patches here if your patches are accepted upstream.

Xpdf is a GUI tool. It is suggested that poppler be used instead. xpdf3 also has a no X11 option.

The other alternative is to write a brand new port that only builds pdftotext based on xpdf.
Comment 4 VVD 2019-02-27 18:16:34 UTC
Created attachment 202414 [details]
Added GUI option to build xpdf4 without GUI
Comment 5 VVD 2019-02-27 18:17:04 UTC
Tested on 11.2 amd64.
Comment 6 Cy Schubert freebsd_committer 2019-02-27 20:25:42 UTC
The patch doesn't work. It still installs the xpdf gui regardless. Except the dependencies are not registered.

====> Running Q/A tests (stage-qa)
Warning: you need USES=desktop-file-utils
Error: /usr/local/libexec/xpdf/xpdf is linked to /usr/local/lib/qt5/libQt5Network.so.5 from net/qt5-network but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=network
Error: /usr/local/libexec/xpdf/xpdf is linked to /usr/local/lib/qt5/libQt5PrintSupport.so.5 from print/qt5-printsupport but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=printsupport
Error: /usr/local/libexec/xpdf/xpdf is linked to /usr/local/lib/qt5/libQt5Widgets.so.5 from x11-toolkits/qt5-widgets but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=widgets
Error: /usr/local/libexec/xpdf/xpdf is linked to /usr/local/lib/qt5/libQt5Gui.so.5 from x11-toolkits/qt5-gui but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=gui
Error: /usr/local/libexec/xpdf/xpdf is linked to /usr/local/lib/qt5/libQt5Core.so.5 from devel/qt5-core but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=core

I cannot accept this patch as it is.
Comment 7 VVD 2019-02-27 21:08:31 UTC
Created attachment 202424 [details]
Added GUI option to build xpdf4 without GUI

Did some changes, but anyway it's weird - work for me with on and off GUI option.
Comment 8 Cy Schubert freebsd_committer 2019-02-28 03:21:03 UTC
Possible solution being investigated.
Comment 9 commit-hook freebsd_committer 2019-02-28 03:26:49 UTC
A commit references this bug:

Author: cy
Date: Thu Feb 28 03:26:44 UTC 2019
New revision: 494124
URL: https://svnweb.freebsd.org/changeset/ports/494124

Log:
  Rework and reimplementation of previous GUI option.

  PR:		235895

Changes:
  head/graphics/xpdf4/Makefile
  head/graphics/xpdf4/pkg-plist
Comment 10 Cy Schubert freebsd_committer 2019-02-28 03:27:15 UTC
Fixed.
Comment 11 VVD 2019-02-28 10:14:48 UTC
Thanks!

Why did you keep desktop-file-utils as mandatory dependency? It work fine with:
GUI_USES=      desktop-file-utils qt:5
And xpdf.desktop is required only for gui xpdf.
pkg-plist: %%GUI%%%%DESKTOPDIR%%/xpdf.desktop