Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#38350 closed enhancement (fixed)

poppler: subport poppler-quartz

Reported by: NicosPavlov Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: mojca (Mojca Miklavec), dliessi (Davide Liessi), cooljeanius (Eric Gallager)
Port: poppler

Description

Several port require poppler to be specifically installed with +qt4 +quartz variants. This forces users to clean and rebuild with required variant, which can be confusing, and breaks compilation from buildbots.

As a workaround, would it be possible to create a subport poppler-quartz within the portfile, which would build a version similar to the +qt4+quartz variant which could be referenced as a dependency by ports requiring it.

There is a diff in attachment with a suggestion of subport. As I don't have much experience with subports, it should probably get reviewed.

Ports could then declare a dependency to poppler-quartz if needed, or path:/lib/libpoppler.dylib:poppler when either port or subport can be employed.

Attachments (11)

Portfile.diff (1.1 KB) - added by NicosPavlov 12 years ago.
Portfile-poppler.diff (2.6 KB) - added by dliessi (Davide Liessi) 11 years ago.
subport named poppler-qt4
nomaintainer.diff (4.0 KB) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports with nomaintainer
openmaintainer.diff (6.3 KB) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports with openmaintainer
devans.diff (2.4 KB) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports maintained by devans
dports.diff (524 bytes) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports maintained by dports
john.diff (510 bytes) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports maintained by macports.swinbank.org:john
kimuraw.diff (571 bytes) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports maintained by kimuraw
raimue.diff (503 bytes) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports maintained by raimue
ryandesign.diff (1.5 KB) - added by dliessi (Davide Liessi) 11 years ago.
fix dependencies of ports maintained by ryandesign
poppler-subport.diff (1.1 KB) - added by NicosPavlov 11 years ago.

Download all attachments as: .zip

Change History (36)

Changed 12 years ago by NicosPavlov

Attachment: Portfile.diff added

comment:1 Changed 11 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:2 Changed 11 years ago by mojca (Mojca Miklavec)

I tried to install a new port and I find it very confusing that sudo port install poppler +qt4 tries to install qt4-x11.

I wanted to open a new ticker requesting a change in options (I would expect +qt4 to imply qt4-mac automatically), but I see that this ticket is somewhat related. If there would be a new subport, it might make sense to call it poppler-qt rather than poppler-quartz, but the decision is not up to me.

comment:3 Changed 11 years ago by dliessi (Davide Liessi)

Cc: davide.liessi@… added

Cc Me!

comment:4 Changed 11 years ago by dliessi (Davide Liessi)

I think that this subport would be very useful, and I agree with the naming suggestion in comment:2.

Anyway, even without the subport, given #20309, variant qt4 should imply variant quartz by default.

comment:5 Changed 11 years ago by dliessi (Davide Liessi)

For example, the port I submitted as #40138 would benefit from the existence of this subport.

comment:6 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:7 Changed 11 years ago by dbevans (David B. Evans)

Status: newassigned

I'll take a look at this today. I agree that the variant scheme leaves a lot to be desired. Note that poppler now has support for qt5 so that needs to be considered as well (#37331). Am I correct in understanding there's not much interest in qt4-x11? I'd prefer not to remove functionality but I'm only an occasional qt user.

comment:8 in reply to:  7 Changed 11 years ago by dliessi (Davide Liessi)

Replying to devans@…:

Am I correct in understanding there's not much interest in qt4-x11?

I don't know if it is still used by somebody, but it apparently can't compile since 10.6 (#20309).

comment:9 Changed 11 years ago by dliessi (Davide Liessi)

What is the state of this ticket? Can I somehow help with the addition of the subport?

(By the way, the subport name should be poppler-qt4, instead of just poppler-qt.)

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile-poppler.diff added

subport named poppler-qt4

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: nomaintainer.diff added

fix dependencies of ports with nomaintainer

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: openmaintainer.diff added

fix dependencies of ports with openmaintainer

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: devans.diff added

fix dependencies of ports maintained by devans

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: dports.diff added

fix dependencies of ports maintained by dports

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: john.diff added

fix dependencies of ports maintained by macports.swinbank.org:john

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: kimuraw.diff added

fix dependencies of ports maintained by kimuraw

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: raimue.diff added

fix dependencies of ports maintained by raimue

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: ryandesign.diff added

fix dependencies of ports maintained by ryandesign

comment:10 Changed 11 years ago by dliessi (Davide Liessi)

In order to speed up the solution of this ticket, I uploaded a series of patches.

The patches change the dependencies on port:poppler to path:lib/libpoppler.dylib:poppler, except for okular, py-python-poppler-qt4 and texstudio, which required the variants +qt4 +quartz, so their dependency on port:poppler is changed to path:lib/libpoppler-qt4.dylib:poppler-qt4. I didn't change the latter to port:poppler-qt4, so the user is not required to uninstall poppler +qt4 +quartz in case it is already installed.

I also fixed a typo in the Portfile for gdal.

I cannot add addresses to the Cc field: can anybody please add the maintainers of the ports without openmaintainer? Here is the list of the maintainers:

  • devans (owner of this ticket)
  • dports
  • kimuraw
  • raimue
  • ryandesign
  • macports.swinbank.org:john

In case you want to Cc also the maintainers of ports with openmaintainer (not necessary, in my opinion: I think that these changes qualify as minor changes not requiring intervention by the maintainers), this is the list:

  • cal
  • devans (owner of this ticket)
  • mojca (already in Cc)
  • nicos (reporter of this ticket)
  • aero.org:scottm
  • dockes.org:jf
  • gmail.com:davide.liessi (me)
  • gmail.com:seanasy
  • gmx.de:Torsten.Maehne
  • iapa.in:iapain
  • jacobs-university.de:m.thon
  • laposte.fr:joel.brogniart

All patches should be applied in the root of the ports tree (also attachment:Portfile-poppler.diff). If this is inconvenient, I can provide individual patches to be applied in the port directory of each port.

comment:11 Changed 11 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: assignedclosed

I've committed a slightly simpler approach in r115965, r115966.

I've removed the previous variants and replaced them with subport poppler-qt4-mac which depends on poppler and only installs the additional qt4 bindings bits avoiding any conflicts. Ports that previously used poppler +qt4 +quartz now can just depend on poppler-qt4-mac without having to check for active variants. The naming allows for additional subports such as poppler-qt4-x11 (if someone can fix it) and poppler-qt5-* (when a qt5 port is available).

Details from commit message

poppler: general overhaul.
  * update to version 0.24.5, ABI compatible with previous version
  * update dependencies, configuration
  * remove variant +doc which has absolutely no effect on installed content
  * remove variant +quartz, poppler is quartz/x11 agnostic
  * remove theoretical support for broken qt4-x11
  * replace variant +qt4 with new subport poppler-qt4-mac which depends on
    poppler and adds the additional poppler bindings for qt4-mac.
  * framework in place to support bindings for qt4-x11, qt5 as additional subports
    if and when those ports become available.

Thanks for all your input.

comment:12 Changed 11 years ago by dliessi (Davide Liessi)

poppler-qt4 support in py-python-poppler-qt4 is now broken.

I don't know how to investigate this issue.

comment:13 Changed 11 years ago by dbevans (David B. Evans)

Ok, start by telling me what is happening vs what you expect. That is, how does broken manifest itself and how can I reproduce the result? Attach any log files that might pertain.

comment:14 Changed 11 years ago by dliessi (Davide Liessi)

With the old Portfiles, install poppler +qt4 +quartz and py27-python-poppler-qt4, then enter in the Terminal:

/opt/local/bin/python2.7 /opt/local/share/examples/py27-python-poppler-qt4/demo.py /path/to/file.pdf

A window pops up with the first page of the PDF file.

Now with the new Portfiles install poppler-qt4-mac and py27-python-poppler-qt4, then enter the same line in the Terminal. A small empty window pops up; no error messages.

comment:15 Changed 11 years ago by dbevans (David B. Evans)

What's the version number of your old poppler? As in

port installed poppler

comment:16 Changed 11 years ago by dliessi (Davide Liessi)

$ port installed poppler
The following ports are currently installed:
  poppler @0.24.4_1+qt4+quartz
  poppler @0.24.5_0 (active)

comment:17 Changed 11 years ago by dbevans (David B. Evans)

Ok, you're right, the new port is broken. I see the problem not only with py-python-poppler-qt4 as you describe but also with okular (after opening a new PDF document, okular shows the correct number of pages but blank content.

My evidence:

Old port structure built with either 0.24.4 or 0.24.5 works correctly for both apps
New port structure built with either 0.24.4 or 0.24.5 produces blank pages in both apps
Either structure with either version works with evince (which uses the poppler-glib bindings)

So problem seems to not be related to version but is related to the new structure effecting the Qt4 bindings only.

The subport appears to be the culprit :-(.

I will do more testing to see if I can just fix the problem in the current structure but if not then the fallbacks that I currently see are the following:

  • Go back to the old port structure using variants (ugly)
  • Make two conflicting ports/subports one with Qt4 support and one without and adjust all poppler dependents as appropriate. This gets really ugly if more flavors are introduced.
  • Just have one poppler port (no variants/subports) and enable everything. Everyone just depends on poppler. Man up if you don't want qt4-mac installed on your system.

If I can't fix the current subport then I'm currently favoring this last option on the basis of simpler is better.

comment:18 in reply to:  17 Changed 11 years ago by dliessi (Davide Liessi)

Replying to devans@…:

okular shows the correct number of pages but blank content.

The same happens in frescobaldi, which uses py-python-poppler-qt4: blank content, correct number of pages.

I will do more testing to see if I can just fix the problem in the current structure but if not then the fallbacks that I currently see are the following:

  • Go back to the old port structure using variants (ugly)
  • Make two conflicting ports/subports one with Qt4 support and one without and adjust all poppler dependents as appropriate. This gets really ugly if more flavors are introduced.
  • Just have one poppler port (no variants/subports) and enable everything. Everyone just depends on poppler. Man up if you don't want qt4-mac installed on your system.

If I can't fix the current subport then I'm currently favoring this last option on the basis of simpler is better.

+1 (but I use Qt4 anyway, so I'm not objective on the last option :) )

comment:19 in reply to:  17 Changed 11 years ago by su-v

Replying to devans@…:

  • Just have one poppler port (no variants/subports) and enable everything. Everyone just depends on poppler. Man up if you don't want qt4-mac installed on your system.

If I can't fix the current subport then I'm currently favoring this last option on the basis of simpler is better.

-1 (If possible, please don't make Qt4 a mandatory dependency for GTK+ apps which happen to use poppler, thx).

comment:20 Changed 11 years ago by NicosPavlov

Hello, I checked a little bit the new subport, and I think that the issue is that the qt4 module of poppler needs to be built alongside other options to work properly. According to my testing, enabling splash-output seems to solve the issue with both the python bindings and okular. I attach the patch which seemed to do the trick for me.

Changed 11 years ago by NicosPavlov

Attachment: poppler-subport.diff added

comment:21 in reply to:  20 Changed 11 years ago by dliessi (Davide Liessi)

Replying to nicos@…:

According to my testing, enabling splash-output seems to solve the issue with both the python bindings and okular. I attach the patch which seemed to do the trick for me.

The patch solves the issue for py-python-poppler-qt4 on my machine.

comment:22 Changed 11 years ago by dliessi (Davide Liessi)

Can you please commit the patch?

comment:23 Changed 11 years ago by NicosPavlov

Committed in r116256 with a revbump.

comment:24 Changed 11 years ago by dliessi (Davide Liessi)

Thanks!

comment:25 Changed 11 years ago by dbevans (David B. Evans)

Thanks for the patch and for committing it. Looks like this indeed solves the problem.

Note: See TracTickets for help on using tickets.