Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701534 - [kde overlay] dev-libs/grantlee-9999 grantlee-5.1.0-slot.patch fails to apply
Summary: [kde overlay] dev-libs/grantlee-9999 grantlee-5.1.0-slot.patch fails to apply
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Overlays (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-30 10:48 UTC by jospezial
Modified: 2019-12-03 23:26 UTC (History)
0 users

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


Attachments
grantlee-9999-slot.patch (grantlee-9999-slot.patch,2.15 KB, patch)
2019-12-03 23:16 UTC, jospezial
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2019-11-30 10:48:41 UTC
>>> Preparing source in /var/tmp/portage/dev-libs/grantlee-9999/work/grantlee-9999 ...
 * Applying grantlee-0.3.0-nonfatal-warnings.patch ...
 *     /var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-0.3.0-nonfatal-warnings.patch: patch failed to apply without a fuzz factor, please rebase
patching file CMakeLists.txt
Hunk #1 succeeded at 51 with fuzz 2 (offset -11 lines).
 [ ok ]
 * Applying grantlee-5.1.0-slot.patch ...
 *     /var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-5.1.0-slot.patch: patch failed to apply without a fuzz factor, please rebase
patching file CMakeLists.txt
Hunk #1 FAILED at 100.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej
patching file templates/lib/CMakeLists.txt
Hunk #1 succeeded at 101 with fuzz 2 (offset -6 lines).
patching file textdocument/lib/CMakeLists.txt
Hunk #1 succeeded at 34 with fuzz 1 (offset -8 lines).
 [ !! ]
 * ERROR: dev-libs/grantlee-9999::kde failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-5.1.0-slot.patch
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 2640:  Called cmake-utils_src_prepare
 *             environment, line 1131:  Called default_src_prepare
 *      phase-functions.sh, line  937:  Called __eapi6_src_prepare
 *             environment, line  249:  Called eapply '/var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-0.3.0-nonfatal-warnings.patch' '/var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-5.1.0-slot.patch'
 *             environment, line 1328:  Called _eapply_patch '/var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-5.1.0-slot.patch'
 *             environment, line 1266:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/dev-libs/grantlee-9999/files/grantlee-5.1.0-slot.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
Comment 1 Larry the Git Cow gentoo-dev 2019-11-30 11:20:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=2d4aa530256e8a86df9357042ea6608e4b0d11e4

commit 2d4aa530256e8a86df9357042ea6608e4b0d11e4
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-11-30 11:05:46 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-11-30 11:20:00 +0000

    dev-libs/grantlee: Rebase patch on top of master
    
    Closes: https://bugs.gentoo.org/701534
    Package-Manager: Portage-2.3.80, Repoman-2.3.19
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-libs/grantlee/files/grantlee-5.1.0-slot.patch | 39 --------------
 dev-libs/grantlee/files/grantlee-9999-slot.patch  | 65 +++++++++++++++++++++++
 dev-libs/grantlee/grantlee-9999.ebuild            |  2 +-
 3 files changed, 66 insertions(+), 40 deletions(-)
Comment 2 jospezial 2019-12-03 14:37:11 UTC
The patch breaks compilation of kpimtextedit-9999

In file included from /var/tmp/portage/kde-apps/kpimtextedit-9999/work/kpimtextedit-9999/src/composer-ng/richtextcomposer.cpp:27:
/var/tmp/portage/kde-apps/kpimtextedit-9999/work/kpimtextedit-9999/src/grantleebuilder/plaintextmarkupbuilder.h:26:10: fatal error: grantlee/abstractmarkupbuilder.h: No such file or directory
   26 | #include <grantlee/abstractmarkupbuilder.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

With the patch the file is installed as
/usr/include/grantlee5/grantlee/abstractmarkupbuilder.h

Without the patch the file is installed as
/usr/include/grantlee/abstractmarkupbuilder.h

could be related to this:
https://github.com/steveire/grantlee/commit/ba5a184ece03c3eab23e9750bb9e3f53bd89cca1
"set( INCLUDE_INSTALL_DIR include )" variable has been removed in grantlee upstream and replaced by "include".

The old and new patch uses this variable but the old patch had
-set( INCLUDE_INSTALL_DIR include )
+set( INCLUDE_INSTALL_DIR include/grantlee5 )

So we should replace ${INCLUDE_INSTALL_DIR} with include/grantlee5 in the patch.
That changes in /usr/lib64/cmake/Grantlee5/GrantleeTargets.cmake
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
to
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/grantlee5;${_IMPORT_PREFIX}/include"

Tested.
Comment 3 Andreas Sturmlechner gentoo-dev 2019-12-03 22:20:04 UTC
Could you provide an updated patch since you are already into the code?
Comment 4 jospezial 2019-12-03 23:16:36 UTC
Created attachment 598380 [details, diff]
grantlee-9999-slot.patch

grantlee-9999-slot.patch with include/grantlee5 instead of the upstream removed variable INCLUDE_INSTALL_DIR
Comment 5 Larry the Git Cow gentoo-dev 2019-12-03 23:26:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=7051d6521ca70f23ea04df3bc29d7bb5dc63beed

commit 7051d6521ca70f23ea04df3bc29d7bb5dc63beed
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-12-03 23:26:04 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-12-03 23:26:04 +0000

    dev-libs/grantlee: Fix slot patch
    
    Thanks-to: jospezial <jospezial@gmx.de>
    Closes: https://bugs.gentoo.org/701534
    Package-Manager: Portage-2.3.80, Repoman-2.3.19
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-libs/grantlee/files/grantlee-9999-slot.patch | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)