-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
cairo: 'new' version 1.18.0 (now also MesonPackage) #43586
base: develop
Are you sure you want to change the base?
Conversation
Hi @wdconinc! I noticed that the following package(s) don't yet have maintainers:
Are you interested in adopting any of these package(s)? If so, simply add the following to the package class: maintainers("wdconinc") If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with $ spack blame cairo Thank you for your help! Please don't add maintainers without their consent. You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer. |
@spackbot fix style |
Let me see if I can fix that for you! |
I was able to run spack style --fix==> Running style checks on spack
selected: isort, black, flake8, mypy
==> Modified files
var/spack/repos/builtin/packages/cairo/package.py
==> Running isort checks
isort checks were clean
==> Running black checks
reformatted var/spack/repos/builtin/packages/cairo/package.py
All done! ✨ 🍰 ✨
1 file reformatted.
black checks were clean
==> Running flake8 checks
flake8 checks were clean
==> Running mypy checks
lib/spack/spack/version/version_types.py:145: error: Argument 2 to "StandardVersion" has incompatible type "*Tuple[Tuple[Any, ...], Tuple[Any, ...]]"; expected "Tuple[Tuple[Any, ...], Tuple[Any, ...]]" [arg-type]
lib/spack/spack/version/version_types.py:447: error: Argument 2 to "StandardVersion" has incompatible type "*Tuple[Tuple[Any, ...], Tuple[Any, ...]]"; expected "Tuple[Tuple[Any, ...], Tuple[Any, ...]]" [arg-type]
lib/spack/spack/version/version_types.py:476: error: Argument 2 to "StandardVersion" has incompatible type "*Tuple[Tuple[Any, ...], Tuple[Any, ...]]"; expected "Tuple[Tuple[Any, ...], Tuple[Any, ...]]" [arg-type]
Found 3 errors in 1 file (checked 618 source files)
mypy found errors
I've updated the branch with style fixes. |
This comment was marked as resolved.
This comment was marked as resolved.
|
@AlexanderRichert-NOAA Do you want to review in the context of #40302 ? |
Yes, thanks-- I'll test it out with |
Installing 1.18.0 fails with freetype~shared, let me see if I can suggest a fix... |
I can get it to build with the following placed in the MesonBuilder block (alongside
Note the CFLAGS setting, unlike in the autotools build. Without it, or if I try to use LDFLAGS and LIBS as before, then I get a failure in the src/libcairo.so.2.11800.0 build step:
|
This is most likely due to a recently added test dependency in py-matplotlib: #43597 |
|
||
def autoreconf(self, spec, prefix): | ||
class MesonBuilder(spack.build_systems.meson.MesonBuilder): | ||
def meson_args(self): |
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.
def meson_args(self): | |
def setup_build_environment(self, env): | |
if self.spec.satisfies("+ft ^freetype~shared"): | |
pkgconf = which("pkg-config") | |
env.append_flags("CFLAGS", pkgconf("--libs", "--static", "freetype2", output=str)) | |
def meson_args(self): |
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.
or
def meson_args(self): | |
@when("+ft ^freetype~shared") | |
def setup_build_environment(self, env): | |
pkgconf = which("pkg-config") | |
env.append_flags("CFLAGS", pkgconf("--libs", "--static", "freetype2", output=str)) | |
def meson_args(self): |
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.
Either approach is fine with me.
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, sorry for the delay on this. I started testing with freetype ~shared
and now I'm not able to build fontconfig without those changes either. I'm not sure adding all these extra cflags to packages downstream from freetype is the right thing to do. It seems something is missing in freetype's pc files: they should get picked up by spack, and the ldflags should include the -lpng
library.
This PR 'adds' cairo version 1.18.0. This is in quotes since the version was there already; it just wasn't buildable. With version 1.18.0 (actually 1.17.6) the build system was switched to meson and no more autotools stuff is inside cairo for 1.18.0. Because 1.16.0 was set as preferred, this was likely not noticed.
Not all options can be trivially translated from autotools to meson. Several are counter-intuitive (like
+pdf
is achieved by ensuring that zlib is installed... and+svg
and+png
are identical now... and+svg
leads to a circular dependency anyway). Main changes:--disable-trace
doesn't have an equivalent,This builds with meson now, and with identical features in
include/cairo/cairo-features.h
, from 1.17.4 to 1.18.0 with+X+fc+ft+gobject+pdf+png~svg
.