MantisBT - CMake
View Issue Details
0012596CMakeCMakepublic2011-11-28 17:422013-03-04 08:38
Guillaume Duhamel 
Philip Lowman 
normalminoralways
closedfixed 
NetBSD5.1
CMake 2.8.6 
CMake 2.8.10CMake 2.8.10 
0012596: Missing paths for FindGTK2 on NetBSD
The FindGTK2 module is not able to find an installation of GTK2 on NetBSD.

The attached patch adds three paths to the FindGTK2 module and fix the problem.
No tags attached.
patch findgtk2-netbsd.patch (532) 2011-11-28 17:42
https://public.kitware.com/Bug/file/4125/findgtk2-netbsd.patch
patch findgtk2-netbsd-2.patch (502) 2012-10-02 15:52
https://public.kitware.com/Bug/file/4507/findgtk2-netbsd-2.patch
patch findgtk2-netbsd-3.patch (493) 2012-10-02 18:49
https://public.kitware.com/Bug/file/4508/findgtk2-netbsd-3.patch
? FindGTK2.cmake (21,535) 2012-10-02 23:53
https://public.kitware.com/Bug/file/4509/FindGTK2.cmake
? FindGTK2-2.cmake (21,568) 2012-10-03 15:26
https://public.kitware.com/Bug/file/4511/FindGTK2-2.cmake
? FindGTK2-3.cmake (22,101) 2012-10-04 01:22
https://public.kitware.com/Bug/file/4512/FindGTK2-3.cmake
Issue History
2011-11-28 17:42Guillaume DuhamelNew Issue
2011-11-28 17:42Guillaume DuhamelFile Added: findgtk2-netbsd.patch
2011-11-29 08:26Brad KingAssigned To => Philip Lowman
2011-11-29 08:26Brad KingStatusnew => assigned
2012-10-02 15:52Guillaume DuhamelFile Added: findgtk2-netbsd-2.patch
2012-10-02 15:53Guillaume DuhamelNote Added: 0031153
2012-10-02 18:49Guillaume DuhamelFile Added: findgtk2-netbsd-3.patch
2012-10-02 18:49Guillaume DuhamelNote Added: 0031155
2012-10-02 23:52Philip LowmanNote Added: 0031156
2012-10-02 23:52Philip LowmanTarget Version => CMake 2.8.10
2012-10-02 23:53Philip LowmanFile Added: FindGTK2.cmake
2012-10-03 15:26Guillaume DuhamelFile Added: FindGTK2-2.cmake
2012-10-03 15:26Guillaume DuhamelNote Added: 0031167
2012-10-04 01:18Philip LowmanNote Added: 0031169
2012-10-04 01:22Philip LowmanFile Added: FindGTK2-3.cmake
2012-10-18 15:59Philip LowmanStatusassigned => resolved
2012-10-18 15:59Philip LowmanFixed in Version => CMake 2.8.10
2012-10-18 15:59Philip LowmanResolutionopen => fixed
2013-03-04 08:38Robert MaynardNote Added: 0032477
2013-03-04 08:38Robert MaynardStatusresolved => closed

Notes
(0031153)
Guillaume Duhamel   
2012-10-02 15:53   
Uploaded a new version of the patch as the first one added a useless path (/usr/pkg/include is already search by find_path as /usr/pkg is a system path and include a standard suffix)
(0031155)
Guillaume Duhamel   
2012-10-02 18:49   
Uploaded yet another version that applies on the current repository head.
(0031156)
Philip Lowman   
2012-10-02 23:52   
Guillaume, thanks for the patch. There was a regression introduced recently in FindGTK2 (8/14/12) by someone trying to improve suffix searching in many CMake modules. This may explain the different changes you had to do -- sorry about that -- I wasn't aware of the regression until this evening.

Please try the attached version and let me know if it works for you and/or if anything can be safely removed or needs to be added. For now I included the 2 lines listed in your latest patch.
(0031167)
Guillaume Duhamel   
2012-10-03 15:26   
I updated it a bit again as there was some paths not found:

/usr/pkg/include/glib/glib-2.0/glib.h
    This one was previously found by: /usr/pkg/include/glib + ${_d},
    but ${_d} is not in the suffixes anymore, so I added it back.

/usr/pkg/lib/gtk-2.0/include
/usr/pkg/lib/glib-2.0/include
    I modified /usr/pkg/lib to /usr/pkg as the "lib" part is now
    in the suffix. (ie: "lib/${_d}/include").
    An alternative would be to keep /usr/pkg/lib in the paths and
    add "${_d}/include" in the suffixes.
(0031169)
Philip Lowman   
2012-10-04 01:18   
Turns out I was mistaken and the approach that the person who regressed FindGTK2 was taking simply doesn't work at all (although I thought I had it working last night). The code was making an assumption that find_path() would search CMAKE_SYSTEM_PREFIXES and you could tack on "lib" and "include" but it turns out this isn't the case (find_path only searches <prefix>/include for each entry in CMAKE_SYSTEM_PREFIXES.

Anyways, I've basically reverted that work and applied your initial patch along with another fix for Debian. I've merged the latest version (attached) to next.

Really sorry for all the back and forth on this one.
(0032477)
Robert Maynard   
2013-03-04 08:38   
Closing resolved issues that have not been updated in more than 4 months.