Bug 214827 - editors/focuswriter: Update to 1.6.2, Remove QT[45] options (Only QT5)
Summary: editors/focuswriter: Update to 1.6.2, Remove QT[45] options (Only QT5)
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: Jason E. Hale
URL:
Keywords: easy, patch
Depends on:
Blocks:
 
Reported: 2016-11-25 13:31 UTC by yamagi
Modified: 2016-12-04 01:33 UTC (History)
2 users (show)

See Also:
lightside: maintainer-feedback+


Attachments
Update focuswriter to 1.6.2 (1.96 KB, patch)
2016-11-25 13:31 UTC, yamagi
no flags Details | Diff
Proposed patch (since 418731 revision) (5.86 KB, patch)
2016-11-26 06:46 UTC, lightside
no flags Details | Diff
Proposed patch (since 418731 revision) (5.86 KB, patch)
2016-11-26 08:29 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch (since 418731 revision) (6.07 KB, patch)
2016-11-27 12:58 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for editors/focuswriter-qt4 (since 418731 revision) (3.26 KB, patch)
2016-11-27 13:16 UTC, lightside
no flags Details | Diff
Proposed patch for editors/focuswriter-qt4 (since 418731 revision) (3.25 KB, patch)
2016-11-27 13:20 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for editors/focuswriter-qt4 (since 418731 revision) (3.25 KB, patch)
2016-11-27 13:40 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch (since 418731 revision) (5.82 KB, patch)
2016-11-27 15:54 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for editors/focuswriter-qt4 (since 418731 revision) (3.18 KB, patch)
2016-11-28 08:25 UTC, lightside
lightside: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yamagi 2016-11-25 13:31:53 UTC
Created attachment 177385 [details]
Update focuswriter to 1.6.2

Hello,
the attached patch updates editors/focuswriter to the latest version. Changes to the port are:

  * Remove qt4 support as it was dropped upstream
  * Add a now required dependency to qt5-linguisttools
  * Update the plist

The update was tested with Poudriere on FreeBSD 11.0.
Comment 1 lightside 2016-11-26 06:41:33 UTC
Hello. Thanks for attention and patch.

Unfortunately, there is some issue with newer focuswriter versions (1.6.0 - 1.6.2, including latest dd1da12 commit), related to delay (about 30 or more seconds) between run and showing the window of focuswriter's application (which was tested on FreeBSD 10.2 amd64).

Did you experience the same issue (compared to current 1.5.7 version)?

Before, I just tested new versions for available fix from focuswriter's developer(s). But after this PR, I did some git bisect, which found related commit:
https://github.com/gottcode/focuswriter/commit/fcc746b5fb979dfaa4171b15806b9dbc0af9b24e
--8<--
% git bisect log
# bad: [1637211d3db3c862d6f0e5eb5ca97293f906a2aa] Bump version number.
# good: [b3ffd3b0bb765ee703535aabc38764fbbce61984] Bump version number.
git bisect start 'v1.6.0' 'v1.5.7' '--'
# good: [89f59fc9f39fd252d4314fa1d3de7cd43cb2f069] Bump version number.
git bisect good 89f59fc9f39fd252d4314fa1d3de7cd43cb2f069
# bad: [bd13fe4811ad19eda5202962e9650055ebeffc8d] Copy printing code from Qt to remove extra 2cm margin.
git bisect bad bd13fe4811ad19eda5202962e9650055ebeffc8d
# good: [8592605a2cee3b910bf9367d34d88b8fbf995cac] Update news file.
git bisect good 8592605a2cee3b910bf9367d34d88b8fbf995cac
# good: [c7cd0a1362e478137ebd992bd841d40ed1ae3ad9] Only write text spans that have formatting.
git bisect good c7cd0a1362e478137ebd992bd841d40ed1ae3ad9
# good: [e4f6914c6dcef33e7b009ecb4c5b518df011d6ae] FIXED: Did not fully qualify ODT styles.
git bisect good e4f6914c6dcef33e7b009ecb4c5b518df011d6ae
# bad: [fcc746b5fb979dfaa4171b15806b9dbc0af9b24e] Share printer instance between documents.
git bisect bad fcc746b5fb979dfaa4171b15806b9dbc0af9b24e
# good: [31f4278902c95f21b6ea8ad214b1a96eb47a4438] Remove QtZip namespace.
git bisect good 31f4278902c95f21b6ea8ad214b1a96eb47a4438
# good: [c5c6a4591fbc3a8124e1e3062dae5101d0f49c1a] Remove deprecated code for unsupported Mac OS X versions.
git bisect good c5c6a4591fbc3a8124e1e3062dae5101d0f49c1a
# first bad commit: [fcc746b5fb979dfaa4171b15806b9dbc0af9b24e] Share printer instance between documents.
-->8--

I used following patches to fix the build in the process:
https://github.com/gottcode/focuswriter/commit/954d3ac09dd928439dc6579aa4c9231edbd0b9f1
https://github.com/gottcode/focuswriter/commit/d9c81c8ce32026a275917ff72409a9c120cd91eb
-8<--
89f59fc9f39fd252d4314fa1d3de7cd43cb2f069 good (with 954d3ac and d9c81c8 patches)
bd13fe4811ad19eda5202962e9650055ebeffc8d bad (with d9c81c8 patch)
8592605a2cee3b910bf9367d34d88b8fbf995cac good (with 954d3ac and d9c81c8 patches)
c7cd0a1362e478137ebd992bd841d40ed1ae3ad9 good (with d9c81c8 patch)
e4f6914c6dcef33e7b009ecb4c5b518df011d6ae good (with d9c81c8 patch)
fcc746b5fb979dfaa4171b15806b9dbc0af9b24e bad (with d9c81c8 patch)
31f4278902c95f21b6ea8ad214b1a96eb47a4438 good (with d9c81c8 patch)
c5c6a4591fbc3a8124e1e3062dae5101d0f49c1a good (with d9c81c8 patch)
-->8-
Comment 2 lightside 2016-11-26 06:46:14 UTC
Created attachment 177401 [details]
Proposed patch (since 418731 revision)

I attached my version of proposed patch with (possible) fixes for mentioned issue in comment #1, including what you proposed, but in different form.

Look following links for changes:
https://github.com/gottcode/focuswriter/compare/v1.5.7...v1.6.2
https://github.com/gottcode/focuswriter/blob/v1.6.2/NEWS#L1-L33

- Update to 1.6.2 version [1][2]
- Switch to C++11 [2][3]
- Switch to Qt 5 [1][2][4]
- Add linguisttools_build to USE_QT5 [1][2]
- Cosmetic fixes [2]
- Add sed patch for std::lround on FreeBSD 9.3 [2]
- Add patch for QPrinter initialization on first usage [2]
- Adapt pkg-plist [1][2]

[1] - yamagi (PR's submitter) changes
[2] - lightside (maintainer) changes
[3] - https://github.com/gottcode/focuswriter/commit/9904864c0a142a1ef64a4dbde55067213651b3f5
[4] - https://github.com/gottcode/focuswriter/commit/2c1a12742563ff4015b2ae77f78bdd20953dfa37

To committer:
Please, remove editors/focuswriter-qt4 port after this update, because of [4].

Tested with using poudriere on FreeBSD 9.3 amd64 and native build on FreeBSD 10.2 amd64.
Comment 3 lightside 2016-11-26 06:54:28 UTC
Comment on attachment 177385 [details]
Update focuswriter to 1.6.2

To koobs@:
I removed maintainer-approval? requrest, because I proposed other patch in attachment #177401 [details] of comment #2 with additional changes.
Comment 4 lightside 2016-11-26 07:08:02 UTC
(In reply to comment #3)
> maintainer-approval? requrest
maintainer-approval? request
Comment 5 lightside 2016-11-26 08:29:19 UTC
Created attachment 177406 [details]
Proposed patch (since 418731 revision)

Silenced sed patch.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-11-26 08:38:17 UTC
@lightside, its better to explicitly deny a maintainer-approval flag (with "-", than remove it, which is undefined as far as authorization goes.

Obsolete attachments don't need to have their maintainer-approval flags removed either (as they're obsolete, and hidden by default)
Comment 7 lightside 2016-11-26 09:01:21 UTC
Comment on attachment 177385 [details]
Update focuswriter to 1.6.2

(In reply to comment #6)
> its better to explicitly deny a maintainer-approval flag
> (with "-", than remove it, which is undefined as far as authorization goes.
Ok, but I hope this is not considered as rejection and this proposal will be mentioned in commit, because these changes are included in attachment #177406 [details].

(In reply to comment #6)
> Obsolete attachments don't need to have their maintainer-approval flags
> removed either (as they're obsolete, and hidden by default)
Yes, but I did this.
Comment 8 yamagi 2016-11-27 08:31:59 UTC
I must admit, that I didn't notice the slowdown at startup. But it's defintely there, about 8 to 10 seconds an my old Thinkpad X220. With your patch startup is almost instantaneous.  So yes, it looks good. Thank you!
Comment 9 lightside 2016-11-27 12:58:55 UTC
Created attachment 177444 [details]
Proposed patch (since 418731 revision)

Ok, thanks for testing and review.

I also reported about mentioned issue (with related patch) to focuswriter's developer(s) with using "Report Bug" form on focuswriter's site. Looks like, the patch was accepted (in different parts):
https://github.com/gottcode/focuswriter/commit/e7311fb017782a0bbf017d0055f6f01b36233b89
https://github.com/gottcode/focuswriter/commit/1423754c4eae874857ce34613bddead8224ee887

I attached new proposed patch with mentioned links.
Comment 10 lightside 2016-11-27 13:16:15 UTC
Created attachment 177445 [details]
Proposed patch for editors/focuswriter-qt4 (since 418731 revision)

(In reply to comment #2)
> To committer:
> Please, remove editors/focuswriter-qt4 port after this update, because of [4].
Possible to transfer Qt 4 parts from current editors/focuswriter to editors/focuswriter-qt4 port with changes in pkg-descr file: "This is latest version, which uses Qt 4 toolkit.". This way, the editors/focuswriter-qt4 port may exists, while Qt 4 toolkit available in FreeBSD ports. I attached the patch for this, just in case.
Comment 11 lightside 2016-11-27 13:20:38 UTC
Created attachment 177446 [details]
Proposed patch for editors/focuswriter-qt4 (since 418731 revision)

Some fixes for editors/focuswriter-qt4.
Comment 12 lightside 2016-11-27 13:40:59 UTC
Created attachment 177448 [details]
Proposed patch for editors/focuswriter-qt4 (since 418731 revision)

Cosmetic fix.
Comment 13 lightside 2016-11-27 15:54:09 UTC
Created attachment 177452 [details]
Proposed patch (since 418731 revision)

Removed unnecessary check in patch.

(In reply to comment #2)
> - Add patch for QPrinter initialization on first usage [2]
This line may be changed to:
- Add upstream(ed) patch for QPrinter initialization on first usage [2]
Comment 14 lightside 2016-11-28 08:25:01 UTC
Created attachment 177471 [details]
Proposed patch for editors/focuswriter-qt4 (since 418731 revision)

(In reply to comment #10)
> Possible to transfer Qt 4 parts from current editors/focuswriter to
> editors/focuswriter-qt4 port with changes in pkg-descr file:
> "This is latest version, which uses Qt 4 toolkit."
Looks like, there is no need to bump PORTREVISION for editors/focuswriter-qt4 port, if don't change pkg-descr file. I attached this variant instead.
Comment 15 commit-hook freebsd_committer freebsd_triage 2016-12-04 01:17:04 UTC
A commit references this bug:

Author: jhale
Date: Sun Dec  4 01:16:11 UTC 2016
New revision: 427751
URL: https://svnweb.freebsd.org/changeset/ports/427751

Log:
  - Update to 1.6.2
  - Require c++11 library
  - Add upstreamed patch for QPrinter initialization on first usage,
    to remove startup delay
  - Qt 4.x support was dropped upstream, so editors/focuswriter-qt4 is removed

  PR:		214827
  Submitted by:	<yamagi@yamagi.org> (initial version)
  Patched by:	lightside <lightside@gmx.com> (maintainer)

Changes:
  head/MOVED
  head/editors/Makefile
  head/editors/focuswriter/Makefile
  head/editors/focuswriter/distinfo
  head/editors/focuswriter/files/
  head/editors/focuswriter/files/patch-QPrinter.diff
  head/editors/focuswriter/pkg-plist
  head/editors/focuswriter-qt4/
Comment 16 Jason E. Hale freebsd_committer freebsd_triage 2016-12-04 01:33:08 UTC
Committed update to 1.6.2. I did remove focuswriter-qt4 since it is no longer supported upstream. I based this decision on previous discussions between committers such as this one: https://lists.freebsd.org/pipermail/svn-ports-head/2016-November/132487.html and I think removal is best. Thanks!