From 09a805bc86a0d51e37551a452e89c079e85d1247 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 01:11:31 +0000 Subject: [PATCH 1/8] Remove runtime = false for libraries that are required at runtime See ldd output in https://github.com/JuliaLang/Cairo.jl/issues/133 --- deps/build.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 06f8c63..816eff9 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -7,13 +7,13 @@ using Compat group = library_group("cairo") 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) + libpng = library_dependency("png", aliases = ["libpng","libpng-1.5.14","libpng15","libpng12.so.0"], group = group) + pixman = library_dependency("pixman", aliases = ["libpixman","libpixman-1","libpixman-1-0","libpixman-1.0"], depends = [libpng], group = group) + libffi = library_dependency("ffi", aliases = ["libffi"], 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) + freetype = library_dependency("freetype", aliases = ["libfreetype"], group = group) + fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], 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) From 28c9ff3dd181a148530430b2677f698e8bd27f89 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 01:20:25 +0000 Subject: [PATCH 2/8] add harfbuzz --- deps/build.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 816eff9..080159a 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -13,9 +13,10 @@ deps = [ 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"], group = group) + harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group) fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], 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) + pango = library_dependency("pango", aliases = ["libpango-1.0-0", "libpango-1.0","libpango-1.0.so.0", "libpango-1_0-0"], depends = [harfbuzz], 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) ] @@ -80,6 +81,7 @@ provides(Sources, 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("https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.2.6.tar.bz2") => harfbuzz, 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("ftp://ftp.simplesystems.org/pub/libpng/png/src/history/libpng15/libpng-$(png_version).tar.gz") => libpng, @@ -95,6 +97,7 @@ 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/libharfbuzz.la") => harfbuzz, Autotools(libtarget = "src/libfontconfig.la") => fontconfig, Autotools(libtarget = "src/libcairo.la", configure_options = append!(append!( AbstractString[], From fdc2932fef3ba07c095fd0147498de0fde88446c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 01:25:08 +0000 Subject: [PATCH 3/8] update libfontconfig version dont try to build libfontconfig against expat --- deps/build.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 080159a..41fc17e 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -82,7 +82,7 @@ provides(Sources, 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("https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.2.6.tar.bz2") => harfbuzz, - URI("http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.2.tar.gz") => fontconfig, + URI("http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz") => fontconfig, URI("http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz") => gettext, 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, @@ -98,7 +98,7 @@ provides(BuildProcess, 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/libharfbuzz.la") => harfbuzz, - Autotools(libtarget = "src/libfontconfig.la") => fontconfig, + Autotools(libtarget = "src/libfontconfig.la", configure_options = ["--enable-libxml2"]) => fontconfig, Autotools(libtarget = "src/libcairo.la", configure_options = append!(append!( AbstractString[], OS_NAME != :Linux ? AbstractString["--without-x","--disable-xlib","--disable-xcb"] : AbstractString[]), From d2dfad6f6ca5034e568833d96ccead619fe0e346 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 01:32:59 +0000 Subject: [PATCH 4/8] add JULIA_BINDEPS_DISABLE_SYSTEM_PACKAGE_MANAGERS option --- deps/build.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 41fc17e..4331f1e 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -13,9 +13,9 @@ deps = [ 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"], group = group) - harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group) fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], group = group) cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo","libcairo.so.2"], depends = [gobject,fontconfig,libpng], group = group) + harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group) pango = library_dependency("pango", aliases = ["libpango-1.0-0", "libpango-1.0","libpango-1.0.so.0", "libpango-1_0-0"], depends = [harfbuzz], 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) @@ -51,6 +51,8 @@ end provides( Homebrew.HB, "pixman", pixman, os = :Darwin ) end +if !haskey(ENV, "JULIA_BINDEPS_DISABLE_SYSTEM_PACKAGE_MANAGERS") + # System Package Managers provides(AptGet, @compat Dict( @@ -74,6 +76,8 @@ provides(Yum, "gettext-libs" => gettext )) +end + const png_version = "1.5.14" provides(Sources, From 58642ab84d04f0b05597a3c44169627ee1d4f3d8 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 01:43:39 +0000 Subject: [PATCH 5/8] remove gettext --- deps/build.jl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 4331f1e..496869b 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -10,8 +10,7 @@ deps = [ libpng = library_dependency("png", aliases = ["libpng","libpng-1.5.14","libpng15","libpng12.so.0"], group = group) pixman = library_dependency("pixman", aliases = ["libpixman","libpixman-1","libpixman-1-0","libpixman-1.0"], depends = [libpng], group = group) libffi = library_dependency("ffi", aliases = ["libffi"], 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) + gobject = library_dependency("gobject", aliases = ["libgobject-2.0-0", "libgobject-2.0", "libgobject-2_0-0", "libgobject-2.0.so.0"], depends=[libffi], group = group) freetype = library_dependency("freetype", aliases = ["libfreetype"], group = group) fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], group = group) cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo","libcairo.so.2"], depends = [gobject,fontconfig,libpng], group = group) @@ -45,7 +44,6 @@ 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 ) @@ -61,8 +59,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 @@ -72,8 +69,7 @@ provides(Yum, "fontconfig" => fontconfig, "pango" => [pango,pangocairo], "glib2" => gobject, - "libpng" => libpng, - "gettext-libs" => gettext + "libpng" => libpng )) end @@ -87,7 +83,6 @@ provides(Sources, URI("http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.gz") => freetype, URI("https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.2.6.tar.bz2") => harfbuzz, URI("http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz") => fontconfig, - URI("http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz") => gettext, 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, @@ -107,7 +102,6 @@ provides(BuildProcess, 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] From 3f35f4374d0aa13888449faa49abe656728bf2e5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 02:06:09 +0000 Subject: [PATCH 6/8] add option JULIA_BINDEPS_IGNORE_SYSTEM_FONT_LIBS --- deps/build.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 496869b..8d5e6be 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -6,15 +6,18 @@ using Compat group = library_group("cairo") + +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"], group = group) pixman = library_dependency("pixman", aliases = ["libpixman","libpixman-1","libpixman-1-0","libpixman-1.0"], depends = [libpng], group = group) libffi = library_dependency("ffi", aliases = ["libffi"], 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], group = group) - freetype = library_dependency("freetype", aliases = ["libfreetype"], group = group) - fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], group = group) + freetype = library_dependency("freetype", aliases = ["libfreetype"], group = group, validate = ignore_system_font_libs) + fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], group = group, validate = ignore_system_font_libs) cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo","libcairo.so.2"], depends = [gobject,fontconfig,libpng], group = group) - harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group) + harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group, 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 = 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) From f24b4eaa4ac169445418566c794d3355ec130f58 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 02:15:41 +0000 Subject: [PATCH 7/8] split groups --- deps/build.jl | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 8d5e6be..2f503b4 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -4,23 +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"], group = group) - pixman = library_dependency("pixman", aliases = ["libpixman","libpixman-1","libpixman-1-0","libpixman-1.0"], depends = [libpng], group = group) - libffi = library_dependency("ffi", aliases = ["libffi"], 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], group = group) - freetype = library_dependency("freetype", aliases = ["libfreetype"], group = group, validate = ignore_system_font_libs) - fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], group = group, validate = ignore_system_font_libs) - cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo","libcairo.so.2"], depends = [gobject,fontconfig,libpng], group = group) - harfbuzz = library_dependency("harfbuzz", aliases = ["libharfbuzz", "libharfbuzz.so.0"], depends = [cairo,freetype], os = :Unix, group = group, 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 = 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-0", "libgobject-2.0", "libgobject-2_0-0", "libgobject-2.0.so.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) ] From b794116038f232f68da27f276be94477ba5a0469 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2016 06:18:01 +0000 Subject: [PATCH 8/8] put more specific gobject alias first --- deps/build.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 2f503b4..7b54ef0 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -11,7 +11,7 @@ ignore_system_font_libs(n, h) = !(haskey(ENV, "JULIA_BINDEPS_IGNORE_SYSTEM_FONT_ deps = [ libffi = library_dependency("ffi", aliases = ["libffi"], group = group1) - gobject = library_dependency("gobject", aliases = ["libgobject-2.0-0", "libgobject-2.0", "libgobject-2_0-0", "libgobject-2.0.so.0"], depends=[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)