Skip to content
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

Merged
merged 1 commit into from
Jun 3, 2018

Conversation

codebrainz
Copy link
Member

Markdown-specific changes from #677.

@@ -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],
Copy link
Member Author

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?

Copy link
Member Author

@codebrainz codebrainz May 21, 2018

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?

Copy link
Contributor

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.)

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Contributor

@sardemff7 sardemff7 left a 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 #elses. 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
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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],
Copy link
Contributor

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.)

@codebrainz
Copy link
Member Author

TODO: rebase ontop of #747.

@frlan
Copy link
Member

frlan commented May 31, 2018

@codebrainz Would you mind on doing thementioned rebase and I'd merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants