Bug 281857

Summary: gtk2-engines-oxygen: should query Gtk's libdir for installation of its engine
Product: [Plasma] Oxygen Reporter: Kai Wb. <curan>
Component: gtk2-engineAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: CLOSED FIXED    
Severity: wishlist CC: b7.10110111, hugo.pereira.da.costa, web
Priority: NOR    
Version: 4.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Query libdir (pkg-config) for engine install prefix

Description Kai Wb. 2011-09-12 08:42:07 UTC
Created attachment 63581 [details]
Query libdir (pkg-config) for engine install prefix

Version:           4.0 (using KDE 4.6.5) 
OS:                Linux

Debian (and subsequently all derivatives like *buntu) are moving to multiarch installation paths ([0]). The attached patch makes it easier for us (Debian maintainers) to build multiarchified packages and shouldn't impact non-multiarch systems.


[0] <http://wiki.debian.org/Multiarch>

Reproducible: Always



Expected Results:  
Installation of the engine should target the libdir of Gtk
Comment 1 Hugo Pereira Da Costa 2011-09-12 12:59:22 UTC
problem with this patch is that CMAKE_INSTALL_PREFIX is ignored, which is againts CMake policy, and would break "local" builds. Now, I can probably modify the patch so that it gets used only when no CMAKE_INSTALL_PREFIX is specified. 

Will investigate. Thanks for reporting and posting the patch.

Hugo
Comment 2 Ruslan Kabatsayev 2011-09-12 13:21:02 UTC
I think this patch makes sense, since using CMAKE_INSTALL_PREFIX looks just plain wrong in the way that GTK won't look for modules anywhere except its libdir. Additionally, this removes the need in LIB_SUFFIX.
I don't see any reason the user would use CMAKE_INSTALL_PREFIX with oxygen-gtk. Even if there're several GTK2 versions installed on the machine, the user had better use PKG_CONFIG_PATH to select proper one to compile against.
Comment 3 Hugo Pereira Da Costa 2011-09-12 13:25:01 UTC
Git commit 072e28ae20f33d752e29c17f16c04aa799c3fc14 by Hugo Pereira Da Costa.
Committed on 12/09/2011 at 15:22.
Pushed by hpereiradacosta into branch '1.1'.

Use pkg_config to determine the theme engine library installation path, when the default CMAKE_INSTALL_PREFIX is used, +and+ no
LIB_SUFFIX variable is specified, at the CMake stage.
Updated INSTALL accordingly.

CCBUG: 281857

M  +40   -24   CMakeLists.txt
M  +5    -1    INSTALL

http://commits.kde.org/oxygen-gtk/072e28ae20f33d752e29c17f16c04aa799c3fc14
Comment 4 Hugo Pereira Da Costa 2011-09-12 13:27:21 UTC
Done. I think it works.
Your patch is now used to automatically set the engine library path when neither CMAKE_INSTALL_PREFIX nor LIB_SUFFIX is passed to the cmake command line. Is that ok ? 

This was committed to both the 1.1 and master branch. I'll make something equivalent for gtk3.

I close the bug but feel free to re-open if there are still issues (I'm really no CMake, nor pkg_config expert).

Hugo
Comment 5 Hugo Pereira Da Costa 2011-09-12 13:44:11 UTC
CMAKE_INSTALL_PREFIX must be supported because people expect it so.
The use case is that you should be able, as a user, to install a new theme without being superuser or sudo. 
You actually can (with env variables) tell gtk to look for themes elsewhere.