Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#37774 closed defect (fixed)

webkit-gtk @1.10.2+universal: WebKitDOMNavigator.h header merged incorrectly

Reported by: ryandesign (Ryan Schmidt) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: haspatch Cc: dbevans (David B. Evans), chief1983@…, cooljeanius (Eric Gallager)
Port: webkit-gtk

Description

I have webkit-gtk @1.10.2+universal installed and am working on a portfile for gphpedit @0.9.98 and the build fails with:

/opt/local/include/webkitgtk-1.0/webkit/WebKitDOMNavigator.h:81:50: error: expected ';' after top level declarator
 * webkit_dom_navigator_register_protocol_handler:
                                                 ^
                                                 ;

Looking in /opt/local/include/webkitgtk-1.0/webkit/WebKitDOMNavigator.h I see that the muniversal portgroup has mangled this header; these are lines 68 thru 90 of that header:

/**
#ifndef __LP64__
 * webkit_dom_navigator_webkit_get_gamepads:
 * @self: A #WebKitDOMNavigator
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API WebKitDOMGamepadList*
webkit_dom_navigator_webkit_get_gamepads(WebKitDOMNavigator* self);

/**
#endif /* ! __LP64__ */
 * webkit_dom_navigator_register_protocol_handler:
 * @self: A #WebKitDOMNavigator
 * @scheme: A #gchar
 * @url: A #gchar
 * @title: A #gchar
 * @error: #GError
 *
 * Returns:
 *
**/

The "/* ! __LP64__ */" comment innocently inserted by the muniversal portgroup was unfortunately inserted inside an existing block comment, thus ending the block comment prematurely.

I think this is the only header that got mangled; it's the only file installed by the port that contains "__LP64__".

The solution should be to tell muniversal to not diff that file but to employ an alternate strategy, by setting "merger_dont_diff" to the list of files not to diff. I'll test and then attach a patch to do this.

Attachments (1)

webkit-gtk-muniversal.diff (569 bytes) - added by ryandesign (Ryan Schmidt) 7 years ago.
proposed patch

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by ryandesign (Ryan Schmidt)

Attachment: webkit-gtk-muniversal.diff added

proposed patch

comment:1 Changed 7 years ago by ryandesign (Ryan Schmidt)

Keywords: haspatch added

comment:2 Changed 7 years ago by chief1983@…

Cc: chief1983@… added

Cc Me!

comment:3 Changed 7 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

comment:4 Changed 7 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 Changed 7 years ago by chief1983@…

While running upgrade outdated, I suddenly hit this immediately after the previous port in the list was cleaned:

Error: webkit-gtk: Error executing quartz: invalid command name "quartz-include-widgetbackingstorecairo.patch"
Error: Unable to open port: Error evaluating variants

comment:6 in reply to:  5 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to chief1983@…:

Error: webkit-gtk: Error executing quartz: invalid command name "quartz-include-widgetbackingstorecairo.patch"
Error: Unable to open port: Error evaluating variants

r104903

comment:7 Changed 7 years ago by chief1983@…

I am still seeing problems caused by the comment in that header file. While building GIMP2:

:info:build In file included from dialog.c:34:
:info:build In file included from /opt/local/include/webkitgtk-1.0/webkit/webkit.h:27:
:info:build In file included from /opt/local/include/webkitgtk-1.0/webkit/webkitdom.h:135:
:info:build /opt/local/include/webkitgtk-1.0/webkit/WebKitDOMNavigator.h:80:8: warning: '/*' within block comment [-Wcomment]
:info:build #endif /* __LP64__ */
:info:build        ^
:info:build /opt/local/include/webkitgtk-1.0/webkit/WebKitDOMNavigator.h:81:4: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
:info:build  * webkit_dom_navigator_register_protocol_handler:
:info:build  ~ ^
:info:build /opt/local/include/webkitgtk-1.0/webkit/WebKitDOMNavigator.h:81:50: error: expected ';' after top level declarator
:info:build  * webkit_dom_navigator_register_protocol_handler:

And so on to more failure. I don't understand why that #ifdef was put in that header like that in the first place, it seems like it's shifted down one line from where it should be, so that it would be fully surrounding just one logical block of code. Is it not possible to fix it or have a patch that makes it end up like so?

#ifndef __LP64__
/**
 * webkit_dom_navigator_webkit_get_gamepads:
 * @self: A #WebKitDOMNavigator
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API WebKitDOMGamepadList*
webkit_dom_navigator_webkit_get_gamepads(WebKitDOMNavigator* self);

#endif /* ! __LP64__ */
/**
 * webkit_dom_navigator_register_protocol_handler:
 * @self: A #WebKitDOMNavigator
 * @scheme: A #gchar
 * @url: A #gchar
 * @title: A #gchar
 * @error: #GError
 *
 * Returns:
 *
**/

If so, there wouldn't be any issues with the comment blocks being terminated incorrectly. I really don't know much about macports though and how this would or wouldn't work.

comment:8 in reply to:  7 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to chief1983@…:

I am still seeing problems caused by the comment in that header file.

Make sure you actually have the fix installed...

$ cat /opt/local/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h
#ifndef __LP64__
#include "i386-WebKitDOMNavigator.h"
#else /* __LP64__ */
#include "x86_64-WebKitDOMNavigator.h"
#endif /* __LP64__ */
]}}

comment:9 Changed 7 years ago by chief1983@…

Sorry, I ran port selfupdate and then port upgrade outdated, which only left libgnome outdated because it is having an unrelated issue I believe. Then I tried to reinstall Gimp2. I haven't actually seen webkit-gtk show up in the outdated list after running selfupdate, so am I missing a step, or do I need manually apply something until the port commit is pushed to everyone or something?

comment:10 in reply to:  9 Changed 7 years ago by ryandesign (Ryan Schmidt)

Replying to chief1983@…:

I haven't actually seen webkit-gtk show up in the outdated list after running selfupdate,

Same; the reason is that the epoch was decreased from 2 to 1 in r104700. The epoch should be set back to 2.

comment:11 Changed 7 years ago by chief1983@…

That's making sense now. Yeah I'm still on webkit-gtk@1.10.2_2+quartz+universal+video. It hasn't attempted to upgrade it to 2.0.0 yet. Copying the new portfile to a local port repo and making that change, and then running portindex seems to then want to upgrade it to 2.0.0.

comment:12 Changed 7 years ago by ryandesign (Ryan Schmidt)

MacPorts will not present webkit-gtk 2.0.0 as an available update until the port's epoch is returned to its correct value. The epoch may never be decreased or removed from a port.

Note: See TracTickets for help on using tickets.