Bug 117168 - [GTK] Respect PKG_CONFIG env variable when generating gtk-doc
Summary: [GTK] Respect PKG_CONFIG env variable when generating gtk-doc
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-03 14:12 PDT by Erik van Pienbroek
Modified: 2013-06-03 15:25 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (2.93 KB, patch)
2013-06-03 14:13 PDT, Erik van Pienbroek
no flags Details | Formatted Diff | Diff
Proposed patch (try2) (2.82 KB, patch)
2013-06-03 14:37 PDT, Erik van Pienbroek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik van Pienbroek 2013-06-03 14:12:43 PDT
The tool generate-gtkdoc internally calls pkg-config.
When cross-compiling it shouldn't use pkg-config, but
it should use the pkg-config which was detected by
the ./configure script (for example this can be
i686-w64-mingw32-pkg-config when cross-compiling)
Comment 1 Erik van Pienbroek 2013-06-03 14:13:29 PDT
Created attachment 203627 [details]
Proposed patch
Comment 2 Zan Dobersek 2013-06-03 14:26:45 PDT
Comment on attachment 203627 [details]
Proposed patch

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

> Tools/gtk/gtkdoc.py:402
> +        if os.environ.get('PKG_CONFIG'):
> +            pkg_config = os.environ['PKG_CONFIG']
> +        else:
> +            pkg_config = 'pkg-config'

Can be simplified into:
pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
http://docs.python.org/2/library/stdtypes.html#dict.get
Comment 3 Erik van Pienbroek 2013-06-03 14:37:42 PDT
Created attachment 203628 [details]
Proposed patch (try2)

Simplified the python code
Comment 4 WebKit Commit Bot 2013-06-03 15:25:17 PDT
Comment on attachment 203628 [details]
Proposed patch (try2)

Clearing flags on attachment: 203628

Committed r151135: <http://trac.webkit.org/changeset/151135>
Comment 5 WebKit Commit Bot 2013-06-03 15:25:19 PDT
All reviewed patches have been landed.  Closing bug.