Bug 222283 - graphics/xpdf cannot print anymore
Summary: graphics/xpdf cannot print anymore
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-13 10:59 UTC by Marco Beishuizen
Modified: 2017-09-19 00:23 UTC (History)
0 users

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


Attachments
xpdf4 print patch (4.15 KB, patch)
2017-09-18 05:37 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Beishuizen 2017-09-13 10:59:52 UTC
Since the recent update of xpdf from 3 to 4, xpdf lost the ability to print.

uname -a
FreeBSD yokozuna 11.1-STABLE FreeBSD 11.1-STABLE #0 r322753: Mon Aug 21 22:56:30 CEST 2017     root@yokozuna:/usr/obj/usr/src/sys/YOKOZUNA  amd64
Comment 1 Cy Schubert freebsd_committer 2017-09-18 05:37:47 UTC
Created attachment 186501 [details]
xpdf4 print patch

Can you please give this patch a try?
Comment 2 Marco Beishuizen 2017-09-18 15:12:34 UTC
(In reply to Cy Schubert from comment #1)
After placing the patch in de files directory I did a "make makepatch". The make after that failed with:

...
[84/126] /usr/bin/c++   -I/usr/ports/graphics/xpdf4/work/xpdf-4.00 -I. -I/usr/ports/graphics/xpdf4/work/xpdf-4.00/goo -I/usr/ports/graphics/xpdf4/work/xpdf-4.00/fofi -I/usr/ports/graphics/xpdf4/work/xpdf-4.00/splash -I/usr/local/include -O2 -pipe -march=nocona -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -MD -MT xpdf/CMakeFiles/pdftopng.dir/SplashOutputDev.cc.o -MF xpdf/CMakeFiles/pdftopng.dir/SplashOutputDev.cc.o.d -o xpdf/CMakeFiles/pdftopng.dir/SplashOutputDev.cc.o -c /usr/ports/graphics/xpdf4/work/xpdf-4.00/xpdf/SplashOutputDev.cc
[85/126] /usr/bin/c++   -I/usr/ports/graphics/xpdf4/work/xpdf-4.00 -I. -I/usr/ports/graphics/xpdf4/work/xpdf-4.00/goo -I/usr/ports/graphics/xpdf4/work/xpdf-4.00/fofi -I/usr/ports/graphics/xpdf4/work/xpdf-4.00/splash -I/usr/local/include -O2 -pipe -march=nocona -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -MD -MT xpdf/CMakeFiles/pdftoppm.dir/SplashOutputDev.cc.o -MF xpdf/CMakeFiles/pdftoppm.dir/SplashOutputDev.cc.o.d -o xpdf/CMakeFiles/pdftoppm.dir/SplashOutputDev.cc.o -c /usr/ports/graphics/xpdf4/work/xpdf-4.00/xpdf/SplashOutputDev.cc
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/xpdf4
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/xpdf4
Comment 3 Cy Schubert freebsd_committer 2017-09-18 18:59:42 UTC
cd /usr/ports/graphics/xpdf4 && patch < xpdf4.diff && cd ../xpdf && make install
Comment 4 Marco Beishuizen 2017-09-18 19:28:06 UTC
Hi Cy,

Thanks for the comment. The patch applies cleanly and xpdf4 makes/installs and runs. I don't use cups and with the print buildoption marked, cups isn't installed as a dependency. Xpdf does have a print option now in the menu, but it can only print to file/pdf.

Regards,
Marco
Comment 5 Cy Schubert freebsd_committer 2017-09-18 19:43:36 UTC
Correct.

The fact that it built on your system implies that cups is already installed. It won't build without cups. To verify do pkg info cups. To print cups would need to be configured. (Cups generally replaced lpr/lpd.)

xpdf4 only supports printing through cups. This is one reason I renamed graphics/xpdf to xpdf3, added xpdf4 and made xpdf a meta-port, in case of regressions such as this. If you want I can open up a thread about this on http://www.xpdfreader.com/support.html. )There are no guarantees he will accept the bug report though.)

To revert back to xpdf3 you can either rebuild with XPDF_VERSION=3 or use graphics/xpdf3.

Let me know how you would like to proceed.

I'll go ahead and commit this anyway. Someone might find it useful.
Comment 6 commit-hook freebsd_committer 2017-09-18 19:46:14 UTC
A commit references this bug:

Author: cy
Date: Mon Sep 18 19:45:46 UTC 2017
New revision: 450077
URL: https://svnweb.freebsd.org/changeset/ports/450077

Log:
  Add a printer output option, providing a menu item to print
  to file or hardcopy.

  Note: xpdf4 only supports printing to CUPS.

  PR:		222283

Changes:
  head/graphics/xpdf4/Makefile
  head/graphics/xpdf4/files/patch-aconf.h.in
  head/graphics/xpdf4/files/patch-cmake-config.txt
  head/graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc
Comment 7 Marco Beishuizen 2017-09-18 20:03:57 UTC
(In reply to Cy Schubert from comment #5)

Hmm, seems that I actually have cups installed (probably as a dependency). Don't use it though because lpr/lpd is much simpler and faster. Unfortunately looks like using lpd with Qt5 applications isn't possible anymore.

Thanks for all the help. Guess I'll keep using xpdf3.

Thanks & Regards,
Marco
Comment 8 Cy Schubert freebsd_committer 2017-09-19 00:23:55 UTC
At least what was committed can be used by CUPS users. Closing this ticket.