-
Notifications
You must be signed in to change notification settings - Fork 57
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
Building Cairo.jl for AWS Lambda #134
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
09a805b
Remove runtime = false for libraries that are required at runtime
28c9ff3
add harfbuzz
fdc2932
update libfontconfig version
d2dfad6
add JULIA_BINDEPS_DISABLE_SYSTEM_PACKAGE_MANAGERS option
58642ab
remove gettext
3f35f43
add option JULIA_BINDEPS_IGNORE_SYSTEM_FONT_LIBS
f24b4ea
split groups
3861e5e
Merge remote-tracking branch 'origin/lambda_branch'
b794116
put more specific gobject alias first
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,24 @@ using BinDeps | |
|
||
using Compat | ||
|
||
group = library_group("cairo") | ||
group1 = library_group("cairo1") | ||
group2 = library_group("cairo2") | ||
|
||
ignore_system_font_libs(n, h) = !(haskey(ENV, "JULIA_BINDEPS_IGNORE_SYSTEM_FONT_LIBS") && ismatch(r"^/usr/lib", n)) | ||
|
||
deps = [ | ||
libpng = library_dependency("png", aliases = ["libpng","libpng-1.5.14","libpng15","libpng12.so.0"], runtime = false, group = group) | ||
pixman = library_dependency("pixman", aliases = ["libpixman","libpixman-1","libpixman-1-0","libpixman-1.0"], depends = [libpng], runtime = false, group = group) | ||
libffi = library_dependency("ffi", aliases = ["libffi"], runtime = false, group = group) | ||
gettext = library_dependency("gettext", aliases = ["libintl", "preloadable_libintl", "libgettextpo"], os = :Unix, group = group) | ||
gobject = library_dependency("gobject", aliases = ["libgobject-2.0-0", "libgobject-2.0", "libgobject-2_0-0", "libgobject-2.0.so.0"], depends=[libffi, gettext], group = group) | ||
freetype = library_dependency("freetype", aliases = ["libfreetype"], runtime = false, group = group) | ||
fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], runtime = false, group = group) | ||
cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo","libcairo.so.2"], depends = [gobject,fontconfig,libpng], group = group) | ||
pango = library_dependency("pango", aliases = ["libpango-1.0-0", "libpango-1.0","libpango-1.0.so.0", "libpango-1_0-0"], group = group) | ||
pangocairo = library_dependency("pangocairo", aliases = ["libpangocairo-1.0-0", "libpangocairo-1.0", "libpangocairo-1.0.so.0"], depends = [cairo], group = group) | ||
zlib = library_dependency("zlib", aliases = ["libzlib","zlib1"], os = :Windows, group = group) | ||
libffi = library_dependency("ffi", aliases = ["libffi"], group = group1) | ||
gobject = library_dependency("gobject", aliases = ["libgobject-2.0.so.0", "libgobject-2.0-0", "libgobject-2.0", "libgobject-2_0-0"], depends=[libffi], group = group1) | ||
zlib = library_dependency("zlib", aliases = ["libzlib","zlib1"], os = :Windows, group = group1) | ||
libpng = library_dependency("png", aliases = ["libpng","libpng-1.5.14","libpng15","libpng12.so.0"], group = group1) | ||
pixman = library_dependency("pixman", aliases = ["libpixman","libpixman-1","libpixman-1-0","libpixman-1.0"], depends = [libpng], group = group1) | ||
|
||
freetype = library_dependency("freetype", aliases = ["libfreetype"], group = group2, validate = ignore_system_font_libs) | ||
fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], group = group2, validate = ignore_system_font_libs) | ||
cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo","libcairo.so.2"], depends = [gobject,fontconfig,libpng], group = group2) | ||
harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group2, validate = ignore_system_font_libs) | ||
pango = library_dependency("pango", aliases = ["libpango-1.0-0", "libpango-1.0","libpango-1.0.so.0", "libpango-1_0-0"], depends = [harfbuzz], group = group2) | ||
pangocairo = library_dependency("pangocairo", aliases = ["libpangocairo-1.0-0", "libpangocairo-1.0", "libpangocairo-1.0.so.0"], depends = [cairo], group = group2) | ||
] | ||
|
||
|
||
|
@@ -44,12 +48,13 @@ end | |
provides( Homebrew.HB, "fontconfig", fontconfig, os = :Darwin ) | ||
provides( Homebrew.HB, "glib", gobject, os = :Darwin ) | ||
provides( Homebrew.HB, "libpng", libpng, os = :Darwin ) | ||
provides( Homebrew.HB, "gettext", gettext, os = :Darwin ) | ||
provides( Homebrew.HB, "freetype", freetype, os = :Darwin ) | ||
provides( Homebrew.HB, "libffi", libffi, os = :Darwin ) | ||
provides( Homebrew.HB, "pixman", pixman, os = :Darwin ) | ||
end | ||
|
||
if !haskey(ENV, "JULIA_BINDEPS_DISABLE_SYSTEM_PACKAGE_MANAGERS") | ||
|
||
# System Package Managers | ||
provides(AptGet, | ||
@compat Dict( | ||
|
@@ -58,8 +63,7 @@ provides(AptGet, | |
"libpango1.0-0" => [pango,pangocairo], | ||
"libglib2.0-0" => gobject, | ||
"libpng12-0" => libpng, | ||
"libpixman-1-0" => pixman, | ||
"gettext" => gettext | ||
"libpixman-1-0" => pixman | ||
)) | ||
|
||
# TODO: check whether these are accurate | ||
|
@@ -69,19 +73,20 @@ provides(Yum, | |
"fontconfig" => fontconfig, | ||
"pango" => [pango,pangocairo], | ||
"glib2" => gobject, | ||
"libpng" => libpng, | ||
"gettext-libs" => gettext | ||
"libpng" => libpng | ||
)) | ||
|
||
end | ||
|
||
const png_version = "1.5.14" | ||
|
||
provides(Sources, | ||
@compat Dict( | ||
URI("http://www.cairographics.org/releases/pixman-0.28.2.tar.gz") => pixman, | ||
URI("http://www.cairographics.org/releases/cairo-1.12.16.tar.xz") => cairo, | ||
URI("http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.gz") => freetype, | ||
URI("http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.2.tar.gz") => fontconfig, | ||
URI("http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz") => gettext, | ||
URI("https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.2.6.tar.bz2") => harfbuzz, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use HTTPS everywhere possible, or nowhere. |
||
URI("http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz") => fontconfig, | ||
URI("ftp://ftp.simplesystems.org/pub/libpng/png/src/history/libpng15/libpng-$(png_version).tar.gz") => libpng, | ||
URI("ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz") => libffi, | ||
URI("http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xz") => gobject, | ||
|
@@ -95,12 +100,12 @@ provides(BuildProcess, | |
@compat Dict( | ||
Autotools(libtarget = "pixman/libpixman-1.la", installed_libname = xx("libpixman-1-0.","libpixman-1.","libpixman-1.0.")*BinDeps.shlib_ext) => pixman, | ||
Autotools(libtarget = xx("objs/.libs/libfreetype.la","libfreetype.la")) => freetype, | ||
Autotools(libtarget = "src/libfontconfig.la") => fontconfig, | ||
Autotools(libtarget = "src/libharfbuzz.la") => harfbuzz, | ||
Autotools(libtarget = "src/libfontconfig.la", configure_options = ["--enable-libxml2"]) => fontconfig, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we need to add libxml2 too? |
||
Autotools(libtarget = "src/libcairo.la", configure_options = append!(append!( | ||
AbstractString[], | ||
OS_NAME != :Linux ? AbstractString["--without-x","--disable-xlib","--disable-xcb"] : AbstractString[]), | ||
OS_NAME == :Darwin ? AbstractString["--enable-quartz","--enable-quartz-font","--enable-quartz-image","--disable-gl"] : AbstractString[])) => cairo, | ||
Autotools(libtarget = "gettext-tools/gnulib-lib/.libs/libgettextlib.la") => gettext, | ||
Autotools(libtarget = "libffi.la") => libffi, | ||
Autotools(libtarget = "gobject/libgobject-2.0.la") => gobject, | ||
Autotools(libtarget = "pango/libpango-1.0.la") => [pango,pangocairo] | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this make any difference? If so, the commit message should give it.
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.
The commit message is "put more specific gobject alias first". This ensures that the more specific pattern is tried first. In this case it makes a difference because the build box has a symlink "libgobject-2.0.so -> libgobject-2.0.so.0" but the deployment box does not (it only has "libgobject-2.0.so.0"). Putting "libgobject-2.0.so.0" first ensures that this is what ends up in the generated code.