Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

cairo: add X11 support #728

Closed
wants to merge 1 commit into from
Closed

cairo: add X11 support #728

wants to merge 1 commit into from

Conversation

Rudloff
Copy link
Contributor

@Rudloff Rudloff commented Jan 19, 2016

Hello,

The cairo formula currently can't be built on Linux with the --with-x11 option.
This patch adds xlib support.

@paulhybryant
Copy link
Contributor

Curious, I have done this before as well. Do you have to fake the x11 packages? Because the pkgconfig files for e.g. xcb cannot be found otherwise.

@sjackman sjackman self-assigned this Jan 21, 2016
@sjackman
Copy link
Member

What error message are you seeing? Please report brew gist-logs cairo
Does it help to sudo apt-get install libx11-xcb-dev?

@Rudloff
Copy link
Contributor Author

Rudloff commented Jan 21, 2016

I don't get any error message. Without my patch, cairo is simply built without xlib support (the option is not available).
Then I get this kind of error when I try to build formulae like gtk+:
No package 'cairo-xlib' found

@sjackman
Copy link
Member

Ah, I see. Does installing libx11-xcb-dev help?

@Rudloff
Copy link
Contributor Author

Rudloff commented Jan 21, 2016

It is already installed.

@sjackman
Copy link
Member

I'd prefer to figure out why xcb is not working rather than disable it. Can you please report brew gist-logs cairo without this patch?

@Rudloff
Copy link
Contributor Author

Rudloff commented Jan 21, 2016

@sjackman
Copy link
Member

Sorry, I meant to say include the first chunk depends_on :x11 => :optional if MacOS.version > :leopard || OS.linux? but not the second chunk --enable-xcb=no and report brew install cairo --with-x11; brew gist-logs cairo

@Rudloff
Copy link
Contributor Author

Rudloff commented Jan 21, 2016

Oh, OK.
In this case, I do get an error:

checking for cairo's XCB surface backend feature... 
checking for xcb... no
checking whether cairo's XCB surface backend feature could be enabled... no (requires xcb >= 1.6 xcb-render >= 1.6 http://xcb.freedesktop.org)
configure: error:  XCB surface backend feature could not be enabled

Here are the logs: https://gist.github.com/Rudloff/229344610460955b98fd

@sjackman
Copy link
Member

Does sudo apt-get install libxcb-render0-dev help?
What version of xcb and xcb-render do you have installed?

@Rudloff
Copy link
Contributor Author

Rudloff commented Jan 22, 2016

It is already installed (1.10-3+b1).

@sjackman
Copy link
Member

https://gist.github.com/Rudloff/229344610460955b98fd#file-config-log-L2356-L2357

Package xcb was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb.pc'

Set PKG_CONFIG_PATH to the directory containing xcb.pc.
See also #47

@paulhybryant
Copy link
Contributor

Yeah, that is why I ask my question in my reply. I don't think linuxbrew supports the ":x11" dependencies or am I wrong? In the past what I have to do is to change PKG_CONFIG_PATH / PKG_CONFIG_LIB in the formula, but it seems in this PR adding the dependency of ":x11" will work just fine.

@sjackman
Copy link
Member

Correct. The :x11 dependency has no effect on Linuxbrew.

@paulhybryant
Copy link
Contributor

Thanks for the clarification @sjackman .

@Rudloff In that case I am wondering how this PR works as the pkgconfig for xcb will not be found from linuxbrew, unless it is manually symlinked somewhere in linuxbrew's pkgconfig search path (is that what you did?), or additional paths are added in PKG_CONFIG_PATH in the formula (which is not the case in this PR)

@sjackman
Copy link
Member

I've merged the first chunk of this patch.

-  depends_on :x11 => :optional if MacOS.version > :leopard
+  depends_on :x11 => :optional if MacOS.version > :leopard || !OS.mac?

Thank you for your contribution, Pierre.

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

Successfully merging this pull request may close these issues.

3 participants