-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown: add support for webkit2gtk #746
Conversation
@@ -49,13 +49,13 @@ AC_DEFUN([GP_CHECK_MARKDOWN], | |||
GTK_VERSION=2.16 | |||
WEBKIT_VERSION=1.1.13 | |||
|
|||
GP_CHECK_GTK3([webkit_package=webkitgtk-3.0], | |||
GP_CHECK_GTK3([webkit_package=webkit2gtk-4.0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hyperair I wonder if we can cascade from webkit-1.0
to webkit-3.0
to webkitgtk-4.0
to try and support all versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested, but I mean like this:
GP_CHECK_GTK3([webkit_package=webkit2gtk-4.0], [
GP_CHECK_GTK3([webkit_package=webkitgtk-3.0], [
webkit_package=webkit-1.0
])
])
...
AM_CONDITIONAL([MARKDOWN_WEBKIT2], [test "x$webkit_package" = "xwebkit2gtk-4.0"])
...
@b4n @sardemff7 @dmaphy @evgeni @hyperair care to comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work, but you better not add fallback code for unsupported versions, distributions with older packages will use older plugin too. (And people really must stop thinking everything will always work for them without patching on older systems, do not but the maintenance burden on you.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the versions listed are "supported" in that they're known to build and work for the plugin, but not that they are "supported" upstream, obviously. IMO, if it's a simple matter of a few ugly #ifdef
it's worthwhile even if just to allow people on slightly older distros to compile the latest plugin release tarball.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful -- on Ubuntu's side, there's still one remaining release (trusty) that has webkitgtk-3.0 but not webkit2gtk-4.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don’t go with fallback checks, better drop the #else
s. Other comments inside.
@@ -35,4 +35,8 @@ markdown_la_CFLAGS += $(LIBMARKDOWN_CFLAGS) | |||
markdown_la_LIBADD += $(LIBMARKDOWN_LIBS) | |||
endif | |||
|
|||
if MARKDOWN_WEBKIT2 | |||
markdown_la_CFLAGS += -DMARKDOWN_WEBKIT2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not an AC_DEFINE
in markdown.m4
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it does seem better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AC_DEFINE
affects everything, so plugins that don't care about this variable will get it too. I originally wanted to just have a WEBKIT2
macro defined only for markdown
based on the MARKDOWN_WEBKIT2
conditional, but @codebrainz changed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't clash because I added the namespace prefix, so it doesn't seem like an issue.
@@ -49,13 +49,13 @@ AC_DEFUN([GP_CHECK_MARKDOWN], | |||
GTK_VERSION=2.16 | |||
WEBKIT_VERSION=1.1.13 | |||
|
|||
GP_CHECK_GTK3([webkit_package=webkitgtk-3.0], | |||
GP_CHECK_GTK3([webkit_package=webkit2gtk-4.0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work, but you better not add fallback code for unsupported versions, distributions with older packages will use older plugin too. (And people really must stop thinking everything will always work for them without patching on older systems, do not but the maintenance burden on you.)
TODO: rebase ontop of #747. |
@codebrainz Would you mind on doing thementioned rebase and I'd merge it |
Markdown-specific changes from #677.