Bug 234085

Summary: graphics/py-poppler-qt4: Resurrect as graphics/py-python-poppler-qt5, Update to 0.24.2
Product: Ports & Packages Reporter: Martin Neubauer <m.ne>
Component: Individual Port(s)Assignee: Tobias C. Berner <tcberner>
Status: Closed FIXED    
Severity: Affects Some People CC: koobs, m.ne, martin.dieringer, python, rhurlin, tcberner
Priority: --- Keywords: needs-qa
Version: LatestFlags: m.ne: maintainer-feedback+
koobs: maintainer-feedback? (martin.dieringer)
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 234084    
Attachments:
Description Flags
patch
none
updated patch
none
updated patch v3
none
updated patch v4
m.ne: maintainer-approval+
updated patch v5 m.ne: maintainer-approval+

Description Martin Neubauer 2018-12-17 02:58:20 UTC
Created attachment 200174 [details]
patch

Prerequisite to the print/frescobaldi update
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 05:00:11 UTC
Thank you for your patch.

Could you please update the patch to reflect resurrecting it as 'py-python-poppler-qt5', and bring the portname in line with its upstream canonical and registered PyPI (CHEESESHOP) name: python-poppler:

- PORTNAME python-poppler (DISTNAME override no longer necessary)
- PKGNAMESUFFIX=-qt5

I'm not entirely familiar with port/pkgnaming conventions/standards for qt/gnome, but, since qt4 has been deprecated, if a -qt5 suffix is not required, that can be dropped too (unless its mandatory, CC tcberner for feedback)
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2018-12-17 06:16:51 UTC
Moin moin

- The pkg-descr still talks about Qt4, and should be longer :)
- I think you can drop the suffix too. When Qt6 appears, we can move/rename/flavorize if necessary.

mfg Tobias
Comment 3 Martin Neubauer 2018-12-17 11:50:35 UTC
Created attachment 200190 [details]
updated patch

- added some text from package homepage to pkg_descr
- (hopefully) got rid of all references to Qt4
- changed package name

I hope the last one was how you meant it to be
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 12:01:30 UTC
(In reply to m.ne from comment #3)

The svn directory name needs to change to (py-python-poppler), but that can be handled by the committer during the svn copy to resurrect it. Also the -qt5 bit can be dropped too per comment 2
Comment 5 Martin Neubauer 2018-12-17 12:27:34 UTC
Created attachment 200192 [details]
updated patch v3
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 13:10:11 UTC
(In reply to m.ne from comment #5)

Looks good, nice work :)

One last thing: 

MAINTAINER should match the maintainers Bugzilla account email (or vice-versa), so Bugzilla can automatically notify you when issues are created for your ports, and so we can verify you when you set maintainer-approval flags on future patches/attachments.

I'm assuming you are setting yourself as the new maintainer (and that it's not someone else), so either update MAINTAINER or your Bugzilla account email address
Comment 7 Martin Neubauer 2018-12-17 13:33:50 UTC
(In reply to Kubilay Kocak from comment #6)
Actually I deliberately left the old MAINTAINER in place, because I didn't want to 'steal' someone else's port. That being said, I wouldn't mind maintaining the port in the future if the current maintainer decides to step down. But that doesn't seem too urgent to me and could be done separately. (That would also apply to the update of the print/frescobaldi port.)
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 13:35:31 UTC
(In reply to m.ne from comment #7)

Ah, I wasn't sure whether you were the same person (given the same domain)

Let's get Martin's thoughts  :)
Comment 9 martin.dieringer 2018-12-17 14:46:06 UTC
(In reply to m.ne from comment #7)

If you want to change the maintainer, please do. Also for frescobaldi.

For me fetching doesn't work:

# make
===>  License LGPL21 LGPL3 accepted by the user
===>   py36-python-poppler-0.24.2 depends on file: /usr/local/sbin/pkg - found
=> python-poppler-qt5-0.24.2.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://files.pythonhosted.org/packages/source/p/python-poppler/python-poppler-qt5-0.24.2.tar.gz
fetch: https://files.pythonhosted.org/packages/source/p/python-poppler/python-poppler-qt5-0.24.2.tar.gz: Not Found
=> Attempting to fetch https://pypi.org/packages/source/p/python-poppler/python-poppler-qt5-0.24.2.tar.gz
fetch: https://pypi.org/packages/source/p/python-poppler/python-poppler-qt5-0.24.2.tar.gz: Not Found
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/python-poppler-qt5-0.24.2.tar.gz
fetch: http://distcache.FreeBSD.org/ports-distfiles/python-poppler-qt5-0.24.2.tar.gz: Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1

Stop.
Comment 10 Martin Neubauer 2018-12-17 15:25:48 UTC
Created attachment 200201 [details]
updated patch v4

Turns out, I still had the source file in /usr/ports/distfiles so testing the port didn't run into that issue.

- fetch sources from github
- transfer maintainer
Comment 11 Martin Neubauer 2018-12-17 15:33:16 UTC
(In reply to martin.dieringer from comment #9)
I added myself as maintainer here and for frescobaldi. Thank you for maintaining these ports in the past, and adding them in the first place.
Comment 12 Tobias C. Berner freebsd_committer freebsd_triage 2018-12-19 06:09:00 UTC
building 'popplerqt5' extension
/usr/local/bin/sip-3.5 -I /usr/local/share/PyQtsip/3.5/sip -t POPPLER_V0_28_0 -c build/temp.freebsd-13.0-CURRENT-amd64-3.5 -b build/temp.freebsd-13.0-CURRENT-amd64-3.5/poppler-qt5.sbf -I /usr/local/share/PyQt5/3.5/sip -n PyQt5.sip -t WS_X11 -t Qt_5_12_0 poppler-qt5.sip
sip: Deprecation warning: poppler-qt5.sip:1: %Module version numbers are deprecated and ignored
sip: QDomElement is undefined
error: command '/usr/local/bin/sip-3.5' failed with exit status 1
*** Error code 1


This fails to build.

There is an upstream issue to this, and a fork that just disables QtXml... 

The real upstream had the last release on Feb 27, 2015. Do we really need this dead fish :) -- if so, you need to apply the fix or switch to the fork that includes it.



mfg Tobias
Comment 13 Martin Neubauer 2018-12-19 11:13:39 UTC
(In reply to Tobias C. Berner from comment #12)
I can't reproduce this on my end:

building 'popplerqt5' extension
/usr/local/bin/sip-3.6 -I /usr/local/share/PyQtsip/3.6/sip -t POPPLER_V0_28_0 -c build/temp.freebsd-12.0-STABLE-amd64-3.6 -b build/temp.freebsd-12.0-STABLE-amd64-3.6/poppler-qt5.sbf -I /usr/local/share/PyQt5/3.6/sip -n PyQt5.sip -t WS_X11 -t Qt_5_12_0 poppler-qt5.sip
sip: Deprecation warning: poppler-qt5.sip:1: %Module version numbers are deprecated and ignored
creating build/temp.freebsd-12.0-STABLE-amd64-3.6/build
creating build/temp.freebsd-12.0-STABLE-amd64-3.6/build/temp.freebsd-12.0-STABLE-amd64-3.6

Are you sure all patches got applied during your build?

I just re-created files/patch-poppler-qt5.sip with the relevant changeset from upstream (and also getting rid of that deprecation warning) and upload a new patch in a second.

I am not too concerned about the somewhat dated release. After all, the single purpose of the package is to make a fairly stable c++ api available to python.
Comment 14 Martin Neubauer 2018-12-19 11:14:21 UTC
Created attachment 200257 [details]
updated patch v5
Comment 15 Rainer Hurling freebsd_committer freebsd_triage 2018-12-19 18:41:12 UTC
(In reply to m.ne from comment #13)

The real problem seems to be, that there exists no path /usr/local/share/PyQtsip/3.6/sip, but instead /usr/local/share/PyQt5/3.6/sip/ should be used. I have the same problem with my work on an updated graphics/qgis port (bug #233726).

I suspect --pyqt-sip-dir=${PYQT_SIPDIR} does not create the correct path (or does not work at all)?!
Comment 16 Martin Neubauer 2018-12-19 19:22:57 UTC
(In reply to Rainer Hurling from comment #15)
At least on my machine --pyqt-sip-dir=${PYQT_SIPDIR} does what you'd expect it to. To me it looks like it's either related to some changes in the FreeBSD13 branch, or you have some local changes in /usr/ports/Mk that somehow affect the variable expansion. Maybe you could make sure to try it on a clean (and up to date) ports tree, and if it still fails provide the full build log. Maybe that would help me pinpoint the underlying issue.
Comment 17 Rainer Hurling freebsd_committer freebsd_triage 2018-12-19 19:33:57 UTC
(In reply to m.ne from comment #16)

Hmm, if this is true, how do you interpret the code snippets from comment #12 and comment #13, were '-I /usr/local/share/PyQtsip/3.6/sip' is included, which does not exist. If I change this one to '-I /usr/local/share/PyQt5/3.6/sip', sip found QtXml etc. again.


>building 'popplerqt5' extension
>/usr/local/bin/sip-3.6 -I /usr/local/share/PyQtsip/3.6/sip ...
                                            ^^^^^^^
Comment 18 Martin Neubauer 2018-12-20 00:11:04 UTC
(In reply to Rainer Hurling from comment #17)
I've just looked at my own build log, and I'm not convinced that's really the issue. In fact, in that line there is both »-I /usr/local/share/PyQtsip/3.6/sip« and »-I /usr/local/share/PyQt5/3.6/sip« present. The former is apparently caused by some issue in the PyQt5 base, which is why I'm passing PYQT_SIPDIR explicitely in the port's Makefile, giving the latter.

The PLIST_SUB section in the log indeed gives me »PYQT_SIPDIR=share/PyQt5/3.6/sip«.

In any case, if the port doesn't build on your computer, please send the full build log. Otherwise it's pretty hard for me to understand or reproduce the failure.
Comment 19 Tobias C. Berner freebsd_committer freebsd_triage 2018-12-27 20:05:46 UTC
Moin moin

As the upstream has the -qt5 in the name, I'll re-add it (that way we can save the GH_PROJECT variable) on commit.


mfg Tobias
Comment 20 commit-hook freebsd_committer freebsd_triage 2018-12-27 20:10:35 UTC
A commit references this bug:

Author: tcberner
Date: Thu Dec 27 20:10:31 UTC 2018
New revision: 488564
URL: https://svnweb.freebsd.org/changeset/ports/488564

Log:
  Reinstate graphics/py-poppler-qt4@r487595 as graphics/py-python-poppler-qt5

  PR:		234085
  Submitted by:	m.ne@gmx.net

Changes:
  head/graphics/Makefile
  head/graphics/py-python-poppler-qt5/
  head/graphics/py-python-poppler-qt5/Makefile
  head/graphics/py-python-poppler-qt5/distinfo
  head/graphics/py-python-poppler-qt5/files/patch-poppler-qt5.sip
  head/graphics/py-python-poppler-qt5/pkg-descr
Comment 21 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-28 01:39:26 UTC
Update summary to match what got committed