Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583506 - kde-base/kdelibs - FindQt4.cmake does not respect prefix
Summary: kde-base/kdelibs - FindQt4.cmake does not respect prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
: 565142 583508 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-19 16:28 UTC by gtkgfxp
Modified: 2016-10-22 15:28 UTC (History)
1 user (show)

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


Attachments
kdelibs-4.14.20-FindQt4.patch (kdelibs-4.14.20-FindQt4.patch,1.41 KB, patch)
2016-05-19 17:54 UTC, Johannes Huber (RETIRED)
Details | Diff
this one work (kdelibs-4.14.20-FindQt4.patch,1.41 KB, patch)
2016-05-20 01:51 UTC, gtkgfxp
Details | Diff
kdelibs-4.14.20.ebuild(using kdelibs-4.14.20-FindQt4.patch) (kdelibs-4.14.20.ebuild,8.29 KB, text/plain)
2016-05-20 01:54 UTC, gtkgfxp
Details
kdelibs-4.14.20-FindQt4.patch(this one work,use $ENV{EPREFIX} instead) (kdelibs-4.14.20-FindQt4.patch,1.41 KB, patch)
2016-05-20 01:57 UTC, gtkgfxp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gtkgfxp 2016-05-19 16:28:36 UTC
--- a/usr/portage/kde-base/kdelibs/kdelibs-4.14.19.ebuild	2016-04-21 18:26:13.088830841 +0800
+++ b/usr/local/portage/kde-base/kdelibs/kdelibs-4.14.19-r1.ebuild	2016-05-20 00:08:14.629774579 +0800
@@ -150,6 +150,8 @@
 	# Rename applications.menu (needs 01_gentoo_set_xdg_menu_prefix-1.patch to work)
 	sed -e 's|FILES:space:applications.menu|FILES applications.menu RENAME kde-4-applications.menu|g' \
 		-i kded/CMakeLists.txt || die "Sed on CMakeLists.txt for applications.menu failed."
+       sed -i -e  's@      /usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin@      $ENV{EPREFIX}/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin@' cmake/modules/FindQt4.cmake
+       sed -i -e  's@      /usr/bin@      $ENV{EPREFIX}/usr/bin@' cmake/modules/FindQt4.cmake
 
 	if use aqua; then
 		sed -i -e \

Reproducible: Always

Steps to Reproduce:
1.emerge =kde-base/kdelibs-4.14.19::kde
2.
3.
Actual Results:  
CMake Error at kdewebkit/CMakeLists.txt:6 (message):
  The QtWebkit module is required.
kde-base/kdelibs::gentoo_prefix - CMake Error :The QtWebkit module is required.

-- Configuring incomplete, errors occurred!

 * ERROR: kde-base/kdelibs-4.14.19::kde failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  133:  Called __call-ebuildshell 'src_configure'
 *     ebuild.sh, line  542:  Called src_configure
 *   environment, line 4152:  Called kde4-base_src_configure
 *   environment, line 3169:  Called cmake-utils_src_configure
 *   environment, line 1282:  Called _cmake_execute_optionally 'src_configure'
 *   environment, line  685:  Called enable_cmake-utils_src_configure
 *   environment, line 1713:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";

Expected Results:  
no cmake error
Comment 1 Johannes Huber (RETIRED) gentoo-dev 2016-05-19 16:33:13 UTC
*** Bug 583508 has been marked as a duplicate of this bug. ***
Comment 2 Johannes Huber (RETIRED) gentoo-dev 2016-05-19 16:37:40 UTC
> Steps to Reproduce:
> 1.emerge =kde-base/kdelibs-4.14.19::kde
> 2.
> 3.

This ebuild does not exist.
Comment 3 Johannes Huber (RETIRED) gentoo-dev 2016-05-19 16:56:53 UTC
*** Bug 583508 has been marked as a duplicate of this bug. ***
Comment 4 gtkgfxp 2016-05-19 17:21:42 UTC
Steps to Reproduce:
emerge --sync
ebuild `equery which kdelibs` configure
-->still got the same error
equery which kdelibs
-->/home/gtkgfxp/usr/portage/kde-base/kdelibs/kdelibs-4.14.20.ebuild

should I fire a new bug on kdelibs-4.14.20, or continue with this one?
Comment 5 gtkgfxp 2016-05-19 17:24:32 UTC
this bug is related to 
Bug 582242 - app-i18n/fcitx-9999::gentoo_prefix - Aborting due to QA concerns: there are files installed outside the prefix (caused by wrong path in FindQt4.cmake?)https://bugs.gentoo.org/show_bug.cgi?id=582242

Bug 582242 : /home/gtkgfxp/gentoo/usr/share/cmake/Modules/FindQt4.cmake
this bug :/home/gtkgfxp/gentoo/var/tmp/portage/kde-base/kdelibs-4.14.19/work/kdelibs-4.14.19/cmake/modules/FindQt4.cmake 
both  FindQt4.cmake has the following lines:
   if(CMAKE_BUILD_TYPE STREQUAL Gentoo)
		 find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
		   PATHS
	-        /usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
	-        /usr/bin
	+        $ENV{EPREFIX}/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
	+        $ENV{EPREFIX}/usr/bin
			 NO_DEFAULT_PATH
		   DOC "The qmake executable for the Qt installation to use"
		 )
both should take $ENV{EPREFIX} in concern?
Comment 6 Johannes Huber (RETIRED) gentoo-dev 2016-05-19 17:38:30 UTC
(In reply to gtkgfxp from comment #4)
> Steps to Reproduce:
> emerge --sync
> ebuild `equery which kdelibs` configure
> -->still got the same error
> equery which kdelibs
> -->/home/gtkgfxp/usr/portage/kde-base/kdelibs/kdelibs-4.14.20.ebuild
> 
> should I fire a new bug on kdelibs-4.14.20, or continue with this one?

No we will continue here.
Comment 7 Johannes Huber (RETIRED) gentoo-dev 2016-05-19 17:54:43 UTC
Created attachment 434732 [details, diff]
kdelibs-4.14.20-FindQt4.patch

Could you please test the updated FindQt4 patch? (Apply the patch in a local ebuild version instead of kdelibs-4.14.13-FindQt4.patch and drop your seds)
Comment 8 gtkgfxp 2016-05-20 01:47:33 UTC
>Could you please test the updated FindQt4 patch? (Apply the patch in a local >ebuild version instead of kdelibs-4.14.13-FindQt4.patch and drop your seds)

[1] step1
--- /home/gtkgfxp/gentoo/usr/portage/kde-base/kdelibs/kdelibs-4.14.20.ebuild	2016-05-19 03:56:04.713171799 +0800
+++ /home/gtkgfxp/gentoo/usr/local/portage/kde-base/kdelibs/kdelibs-4.14.20.ebuild	2016-05-20 09:09:59.060040053 +0800
@@ -133,7 +133,7 @@
 	"${FILESDIR}/${PN}-4.8.1-norpath.patch"
 	"${FILESDIR}/${PN}-4.9.3-werror.patch"
 	"${FILESDIR}/${PN}-4.10.0-udisks.patch"
-	"${FILESDIR}/${PN}-4.14.13-FindQt4.patch"
+	"${FILESDIR}/${PN}-4.14.20-FindQt4.patch"
 )
 step 2
rm -rf /home/gtkgfxp/gentoo/var/tmp/portage/kde-base/kdelibs-4.14.20
 ebuild /home/gtkgfxp/gentoo/usr/local/portage/kde-base/kdelibs/kdelibs-4.14.20.ebuild configure
 -->still got the same error
[2]
$EPREFIX should changed to $ENV{EPREFIX}
in  kdelibs-4.14.20-FindQt4.patch.
according to:
ENV

Access environment variables.

Use the syntax $ENV{VAR} to read environment variable VAR. See also the set() command to set ENV{VAR}.
https://cmake.org/cmake/help/v3.0/variable/ENV.html
[3] 
--- /home/gtkgfxp/gentoo/usr/local/portage/kde-base/kdelibs/files/kdelibs-4.14.20-FindQt4.patch.orig	2016-05-20 09:42:55.940005105 +0800
+++ /home/gtkgfxp/gentoo/usr/local/portage/kde-base/kdelibs/files/kdelibs-4.14.20-FindQt4.patch	2016-05-20 09:21:04.460028290 +0800
@@ -20,8 +20,8 @@
 +if(CMAKE_BUILD_TYPE STREQUAL Gentoo)
 +  find_program(QT_QMAKE_EXECUTABLE NAMES qmake
 +    PATHS
-+      ${EPREFIX}/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
-+      ${EPREFIX}/usr/bin
++      $ENV{EPREFIX}/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
++      $ENV{EPREFIX}/usr/bin
 +      NO_DEFAULT_PATH
 +    DOC "The qmake executable for the Qt installation to use"
 +  )

this one work
Comment 9 gtkgfxp 2016-05-20 01:51:25 UTC
Created attachment 434748 [details, diff]
this one work

this one work
Comment 10 gtkgfxp 2016-05-20 01:54:56 UTC
Created attachment 434750 [details]
kdelibs-4.14.20.ebuild(using kdelibs-4.14.20-FindQt4.patch)
Comment 11 gtkgfxp 2016-05-20 01:57:09 UTC
Created attachment 434752 [details, diff]
kdelibs-4.14.20-FindQt4.patch(this one work,use $ENV{EPREFIX} instead)
Comment 12 Michael Palimaka (kensington) gentoo-dev 2016-05-21 18:28:22 UTC
Thanks, fixed in git.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=940f9abe893ef064fb6617a6242c62305ad75f87
Comment 13 Toralf Förster gentoo-dev 2016-10-22 15:28:07 UTC
*** Bug 565142 has been marked as a duplicate of this bug. ***