Bug 146590 - [GTK] Disable gtk-doc and gobject-introspection when crossbuilding
Summary: [GTK] Disable gtk-doc and gobject-introspection when crossbuilding
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-03 06:27 PDT by Emanuele Aina
Modified: 2015-07-03 08:21 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.59 KB, patch)
2015-07-03 06:46 PDT, Emanuele Aina
no flags Details | Formatted Diff | Diff
Patch (2.27 KB, patch)
2015-07-03 08:01 PDT, Emanuele Aina
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele Aina 2015-07-03 06:27:44 PDT
Neither gtk-doc nor gobject-introspection really work when cross-building, let's just disable them when cmake says we're cross-compiling.

Note that in the gtk-doc case, at the moment it is not possible to avoid it even by setting ENABLE_GTKDOC=OFF, since even then it is run as a syntax-check: https://trac.webkit.org/browser/trunk/Source/PlatformGTK.cmake#L35
Comment 1 Emanuele Aina 2015-07-03 06:46:28 PDT
Created attachment 256099 [details]
Patch
Comment 2 Martin Robinson 2015-07-03 07:34:42 PDT
Comment on attachment 256099 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256099&action=review

> Source/cmake/OptionsGTK.cmake:73
> +# Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building
> +if (CMAKE_CROSSCOMPILING)
> +    set(ENABLE_GTKDOC OFF)
> +    set(ENABLE_INTROSPECTION OFF)
> +endif ()

Lets move this down to after the USE_LIBHYPHEN check near line 429. It's a bit strange to do this in the middle of the definition of all the options.
Comment 3 Emanuele Aina 2015-07-03 08:01:47 PDT
Created attachment 256105 [details]
Patch
Comment 4 Emanuele Aina 2015-07-03 08:04:40 PDT
> Lets move this down to after the USE_LIBHYPHEN check near line 429. It's a bit strange to do this in the middle of the definition of all the options.

Indeed, I wasn't sure if it was better to keep the override close to the original definition or move it in a more appropriate place.

I've updated the patch and took the liberty of listing you as reviewer in the ChangeLog (is it correct to do so?).
Comment 5 Martin Robinson 2015-07-03 08:12:53 PDT
(In reply to comment #4)
> > Lets move this down to after the USE_LIBHYPHEN check near line 429. It's a bit strange to do this in the middle of the definition of all the options.
> 
> Indeed, I wasn't sure if it was better to keep the override close to the
> original definition or move it in a more appropriate place.
> 
> I've updated the patch and took the liberty of listing you as reviewer in
> the ChangeLog (is it correct to do so?).

It usually isn't necessary. The tools typically fill it in by reading who attaches the r+ in Bugzilla.
Comment 6 Martin Robinson 2015-07-03 08:15:07 PDT
Committed r186259: <http://trac.webkit.org/changeset/186259>
Comment 7 Martin Robinson 2015-07-03 08:16:10 PDT
Thanks for the patch! I took the liberty of landing it.
Comment 8 Emanuele Aina 2015-07-03 08:21:33 PDT
Thanks! :D