pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56156: print/electrix can no long open pdf files



>Number:         56156
>Category:       pkg
>Synopsis:       print/electrix can no long open pdf files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 07 16:25:00 +0000 2021
>Originator:     scole_mail
>Release:        pkgsrc-2021Q1
>Organization:
none
>Environment:
NetBSD dstar.dstar.net 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Fri Apr 30 09:44:29 PDT 2021  scole%dstar.dstar.net@localhost:/home/scole/nbsd/cvs/9_0/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
After upgrading to pkgsrc to 2021Q1, electrix-0.2.0nb72 can no longer open pdf files.  I get an error like
 "File type is not supported"
when trying to a view a pdf file.

From the configure stage, the check for the PDF viewing feature is failing now:
....
Checking for 'gcc' (c compiler)          : /usr/pkgsrc/print/electrix/work/.cwrapper/bin/gcc 
Checking for program glib-genmarshal     : /usr/pkg/bin/glib-genmarshal 
Checking for program perl                : /usr/pkgsrc/print/electrix/work/.tools/bin/perl 
Checking for 'glib-mkenums'              : /usr/pkg/bin/glib-mkenums 
Checking for program glib-compile-schemas : /usr/pkg/bin/glib-compile-schemas 
Checking for program pkg-config           : /usr/pkgsrc/print/electrix/work/.tools/bin/pkg-config 
Checking for 'gtk+-2.0' >= 2.20.0         : yes 
Checking for 'cairo'                      : yes 
Checking for feature PDF                  : not available 
Checking for feature PS                   : enabled 
Checking for feature NLS                  : enabled 
Checking for feature D-Bus                : enabled 
'configure' finished successfully (0.421s)

Apparently, there is a check in wscript for a "poppler-cairo" library, and it doesn't find it:
...
      conf.check_cfg (package = 'poppler-cairo', uselib_store = 'POPPLER_CAIRO', 
                      args = '--cflags --libs')

I don't understand all the nuance of poppler and pkgsrc, but there is a line about poppler-cairo in
pkgsrc/print/poppler/Makefile:7:PKGCONFIG_OVERRIDE+=	${WRKSRC}/poppler-cairo.pc.cmake

Here is a kludgy patch that allowed PDF support to be built by not looking for the poppler-cairo library since it might be included in the poppler package already:

--- work/electrix-0.2.0/wscript 2011-11-06 08:55:13.000000000 -0800
+++ /tmp/wscript        2021-05-07 09:12:41.292986686 -0700
@@ -47,11 +47,12 @@
     try:
       conf.check_cfg (package = 'poppler-glib', uselib_store = 'POPPLER_GLIB', 
                       atleast_version='0.12.0', args = '--cflags --libs')
-      conf.check_cfg (package = 'poppler-cairo', uselib_store = 'POPPLER_CAIRO', 
-                      args = '--cflags --libs')
+      #conf.check_cfg (package = 'poppler-cairo', uselib_store = 'POPPLER_CAIRO', 
+      #                args = '--cflags --libs')
     except:
       pass
-    if conf.env['HAVE_POPPLER_GLIB' and 'HAVE_POPPLER_CAIRO']:
+    #if conf.env['HAVE_POPPLER_GLIB' and 'HAVE_POPPLER_CAIRO']:
+    if conf.env['HAVE_POPPLER_GLIB']:
       message = 'enabled'
       conf.define ('ENABLE_PDF', 1)
       conf.env['ENABLE_PDF'] = 1

>How-To-Repeat:
install electrix, try to open a pdf
>Fix:
adjust electrix wscript/configure or PKGCONFIG_OVERRIDE in pkgsrc/print/poppler somehow to not check for poppler-cairo or actually check and find it



Home | Main Index | Thread Index | Old Index