Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629720 - app-text/coolreader: Merging of patches with additional issue resolving.
Summary: app-text/coolreader: Merging of patches with additional issue resolving.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-03 01:35 UTC by Sergey Torokhov
Modified: 2017-09-07 11:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cr3.1.2.71-r1_qt5_wx.diff (cr3.1.2.71-r1_qt5_wx.diff,9.83 KB, patch)
2017-09-03 01:35 UTC, Sergey Torokhov
Details | Diff
coolreader-3.1.2.71-r1.ebuild (coolreader-3.1.2.71-r1.ebuild,1.99 KB, text/plain)
2017-09-03 01:36 UTC, Sergey Torokhov
Details
coolreader-3.1.2.71-r2.ebuild (coolreader-3.1.2.71-r2.ebuild,2.00 KB, text/plain)
2017-09-04 22:46 UTC, Sergey Torokhov
Details
coolreader-3.1.2.71-r1.ebuild (coolreader-3.1.2.71-r1.ebuild,2.04 KB, text/plain)
2017-09-05 12:12 UTC, Sergey Torokhov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Torokhov 2017-09-03 01:35:26 UTC
Created attachment 491992 [details, diff]
cr3.1.2.71-r1_qt5_wx.diff

New revision of patch "cr3.1.2.71-r1_qt5_wx.diff":

* Merging previous "cr3.1.2.71-r1_qt5_wx.diff" patch with "cr3.1.2.71_wxGTK3.diff" path via conditional choise of wxGTK version.

That is the new patch allows to build Qt5 (https://sourceforge.net/p/crengine/bugs/370/ ) or WX (wxGTK 2.8 / wxGTK 3.0: https://sourceforge.net/p/crengine/bugs/371/) GUI additionally to Qt4 GUI.


NOTE1: There is no need of patch "cr3.1.2.71_wxGTK3.diff" anymore and internal .ebuild wxGTK version checking to apply additional patch..


NOTE2: wxGTK-gtk3:3.0  (not wxGTK 3.0) is compiling too but GUI is corrupted (for example a toolbar has no icons displaying).


Also 

* "iCCP: known incorrect sRGB profile" warning popup window when "Toolbar size" is setting to "Medium buttons" is disabled. This is the temporary solution until upstream fix iCCP profiles of "22x22/*.png" icons. See wxGTK upstream issue: http://trac.wxwidgets.org/ticket/15331  for more details.
Section with appropreate elog warning may be deleted.

* The wxWidgets version is displayed now in "About" window of WX GUI.
Comment 1 Sergey Torokhov 2017-09-03 01:36:26 UTC
Created attachment 491994 [details]
coolreader-3.1.2.71-r1.ebuild
Comment 2 Sergey Torokhov 2017-09-03 01:42:28 UTC
Github mirror of project has some new commits to fix page margins settings. Is it worth to backport (via patch) it to current version or leave this fixes for coolreader-9999.ebuild? 

Modification of ebuild to use live github branch also is made in coolreader-3.1.2.71-r1.ebuild in appropriate section. So coolreader-9999.ebuild may be obtained just by renaming of coolreader-3.1.2.71-r1.ebuild.
Comment 3 Sergey Torokhov 2017-09-04 22:46:28 UTC
Created attachment 492394 [details]
coolreader-3.1.2.71-r2.ebuild

Another variant of ebuild that differs from previous version of ebuild by adding "liberation-fonts" USE-flag as dependency as alternative of "corefonts" (if "wxwidgets" USE-flag is setting) and by deleting of string with creation of symlink that doesn't take any affect to application operation.

This variant also apply the attached patch.
Comment 4 Jonas Stein gentoo-dev 2017-09-05 11:03:33 UTC
Thank you.

What is elog good for in

src_install() {
	cmake-utils_src_install
	elog
}


please use eapply instead of epatch
see: https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6/
https://devmanual.gentoo.org/ebuild-writing/eapi/
Comment 5 Sergey Torokhov 2017-09-05 12:12:01 UTC
Created attachment 492424 [details]
coolreader-3.1.2.71-r1.ebuild

(In reply to Jonas Stein from comment #4)
> Thank you.
> 
> What is elog good for in
> 
> src_install() {
> 	cmake-utils_src_install
> 	elog
> }

Thank you for checkup.

It seems to be rest some early experiments with info messages in different places. In particular I tried to display some info message just after dependencies resolving, i.e. in the placement of "DESIRED_INFO_MESSAGE" (see example) but didn't find the way to do that.


> # emerge -1av coolreader
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild   R   ~] app-text/coolreader-3.1.2.71-r1::local  USE="liberation-fonts wxwidgets -corefonts -qt4 -qt5" 0 KiB
> 
> Total: 1 package (1 reinstall), Size of downloads: 0 KiB
> 
> DESIRED_INFO_MESSAGE
>
> Would you like to merge these packages? [Yes/No] 



> please use eapply instead of epatch
> see: https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6/
> https://devmanual.gentoo.org/ebuild-writing/eapi/

Thanks, 
on your advice I replaced my "src_prepare" with such section (attached ebuild-file):

# 1st patch: To save cr3.ini to ~homedir.
# 2nd patch: To build QT5 and WX GUI version of coolreader3;
# setting correct vesrion number and years of cr3qt/cr3wx;
# internal switching between wxGTK 2.8 or 3.0 version;
# show wxWidgets version in "About" dialog window;
# disabling "iCCP: known incorrect sRGB profile" warning popup window for wxwidgets GUI

PATCHES=( "${FILESDIR}/cr3ini.diff" "${FILESDIR}/cr3.1.2.71-r1_qt5_wx.diff" )

src_prepare() {
	default
}
Comment 6 Andrey Grozin gentoo-dev 2017-09-07 11:49:11 UTC
commit a575207ef53d0027692a554eee85626d69b8e0fb (HEAD -> master, origin/master, origin/HEAD)
Author: Andrey Grozin <grozin@gentoo.org>
Date:   Thu Sep 7 18:46:15 2017 +0700

    app-text/coolreader: cleaning old
    
    Package-Manager: Portage-2.3.6, Repoman-2.3.3

commit 9be972a8c6dcf63f4fd0768479f9ed73104737c4
Author: Andrey Grozin <grozin@gentoo.org>
Date:   Thu Sep 7 18:40:29 2017 +0700

    app-text/coolreader: Various improvements
    
    Thanks to  Sergey Torokhov <torokhov_s_a@mail.ru>
    Bug: 629720
    Package-Manager: Portage-2.3.6, Repoman-2.3.3