GithubHelp home page GithubHelp logo

heroku-buildpack-cairo's Introduction

heroku-buildpack-cairo

I am a Heroku buildpack that installs Cairo and its dependencies (Pango, Pixman, FreeType, HarfBuzz, and giflib) into a dyno slug.

When used with heroku-buildpack-multi, I enable subsequent buildpacks / steps to link to this library.

Using

Composed

You'll almost certainly want to use this in conjunction with one or more additional buildpacks. Heroku supports using multiple buildpacks for an app.

heroku buildpacks:add --index 1 https://github.com/mojodna/heroku-buildpack-cairo.git

Building

This uses Docker to build against Heroku stack-image-like images.

make

Artifacts will be dropped in dist/. See Dockerfiles for build options.

Cairo Configuration

cairo (version 1.14.6 [release]) will be compiled with:

The following surface backends:
  Image:         yes (always builtin)
  Recording:     yes (always builtin)
  Observer:      yes (always builtin)
  Mime:          yes (always builtin)
  Tee:           no (disabled, use --enable-tee to enable)
  XML:           no (disabled, use --enable-xml to enable)
  Skia:          no (disabled, use --enable-skia to enable)
  Xlib:          yes
  Xlib Xrender:  yes
  Qt:            no (disabled, use --enable-qt to enable)
  Quartz:        no (requires CoreGraphics framework)
  Quartz-image:  no (disabled, use --enable-quartz-image to enable)
  XCB:           yes
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  CairoScript:   yes
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  OpenGL:        no (disabled, use --enable-gl to enable)
  OpenGL ES 2.0: no (disabled, use --enable-glesv2 to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)
  OpenVG:        no (disabled, use --enable-vg to enable)
  DRM:           no (disabled, use --enable-drm to enable)
  Cogl:          no (disabled, use --enable-cogl to enable)

The following font backends:
  User:          yes (always builtin)
  FreeType:      yes
  Fontconfig:    yes
  Win32:         no (requires a Win32 platform)
  Quartz:        no (requires CoreGraphics framework)

The following functions:
  PNG functions:   yes
  GLX functions:   no (not required by any backend)
  WGL functions:   no (not required by any backend)
  EGL functions:   no (not required by any backend)
  X11-xcb functions: no (disabled, use --enable-xlib-xcb to enable)
  XCB-shm functions: yes

The following features and utilities:
  cairo-trace:                yes
  cairo-script-interpreter:   yes

And the following internal features:
  pthread:       yes
  gtk-doc:       no
  gcov support:  no
  symbol-lookup: no (requires bfd)
  test surfaces: no (disabled, use --enable-test-surfaces to enable)
  ps testing:    no (requires libspectre)
  pdf testing:   no (requires poppler-glib >= 0.17.4)
  svg testing:   no (requires librsvg-2.0 >= 2.35.0)

Harfbuzz Configuration

Build configuration:

Unicode callbacks (you want at least one):
	Glib:			true
	ICU:			false
	UCDN:			true

Font callbacks (the more the better):
	FreeType:		true

Tools used for command-line utilities:
	Cairo:			true
	Fontconfig:		true

Additional shapers (the more the better):
	Graphite2:		false

Platform shapers (not normally needed):
	CoreText:		false
	Uniscribe:		false
	DirectWrite:		false

Other features:
	Documentation:		no
	GObject bindings:	false
	Introspection:		false

heroku-buildpack-cairo's People

Contributors

airhadoken avatar mojodna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

heroku-buildpack-cairo's Issues

heroku build error permission denied

please help me
error:

remote:
node-pre-gyp install --fallback-to-build
remote:
remote: sh: 1: node-pre-gyp: Permission denied
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 126
remote: npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
remote: npm ERR! Exit status 126
remote: npm ERR!
remote: npm ERR! Failed at the [email protected] install script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.39gEe/_logs/2018-12-24T14_09_53_348Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: Some possible problems:
remote:
remote: - node_modules checked into source control
remote: https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
remote:
remote: - Node version not specified in package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to *****.
remote:
To https://git.heroku.com/****.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/*****.git'

Typographical Error on README.md

When modifying an existing Heroku app:
heroku buildpack:set https://github.com/ddollar/heroku-buildpack-multi.git

should be

When modifying an existing Heroku app:
heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git

No package 'pangocairo' found

Hi,

I'm using your cairo buildpack together with phantomjs and nodejs buildpacks. Unfortunately, I get the following error on Heroku:

Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found 

Note that I use node-canvas v1.2.1.

Any idea what is wrong here?

Thanks in advance,
Michael

heroku deploy error - gif_lib.h: No such file or directory

Getting an error using the latest version of node-canvas (1.3.10) and master branch of heroku-buildpack-cairo, using the method commented in the README.md
(pasting the conlicting lines only)

remote:        g++ '-DNODE_GYP_MODULE_NAME=canvas' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DHAVE_FREETYPE' '-DHAVE_JPEG' '-DHAVE_GIF' '-DBUILDING_NODE_EXTENSION' -I/app/.node-gyp/5.4.0/include/node -I/app/.node-gyp/5.4.0/src -I/app/.node-gyp/5.4.0/deps/uv/include -I/app/.node-gyp/5.4.0/deps/v8/include -I../../nan -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d.raw  -c -o Release/obj.target/canvas/src/CanvasPattern.o ../src/CanvasPattern.cc
remote:        In file included from ../src/CanvasPattern.cc:9:0:
remote:        ../src/Image.h:19:21: fatal error: gif_lib.h: No such file or directory
remote:        #include <gif_lib.h>
remote:        ^
remote:        compilation terminated.
remote:        make: *** [Release/obj.target/canvas/src/CanvasPattern.o] Error 1
remote:        make: Leaving directory `/tmp/build_70eeb9165bb4d01ecf2c04930e94c802/node_modules/canvas/build'

Is this a known issue? Are there workarounds or should i use a specific version of buildpack/canvas?

Package pangocairo not found.

I'm trying to install node-canvas and I keep getting this error:

Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing 'pangocairo.pc' to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found

It's the same error as an earlier issue, but I tried switching node-canvas versions to 1.1.6 as he did, but my error has persisted through this.

I am using the buildpack-multi; this and the nodejs buildpack.

This doesnt seem to work

I get the following error when I try to push:

Total 928 (delta 472), reused 94 (delta 47)

-----> Deleting 1 files matching .slugignore patterns.
-----> Fetching custom git buildpack... done

! Push rejected, no Cedar-supported app detected

To [email protected]:mean3444-ali.git
! [remote rejected] master -> master (pre-receive hook declined)

Issues with update made on 4/17/2015

Hi @mojodna , just wanted to give you a head's up... I just spent the last three hours trying to figure out why my site's layout was suddenly broken when I only made some minor js changes that had nothing to do with layout. I finally isolated the problem to the latest updates in this buildpack. I forked heroku-buildpack-cairo, rolled it back to before the pull request three hours ago, set my rolled back fork as the buildpack for heroku to use, and now everything in my app works fine again. Thought I would post here in case anyone else has trouble. Aside from these recent changes, this has been a great addition to my multipack app. Thanks!

Upgrade fontconfig package

So I've been in contact with Heroku support and some of the contributors of node-canvas about a fontconfig problem and I think the root of problem was this in this buildpack the whole time.

There is an issue with version 2.11.93 of fontconfig that doesn't allow for custom font registration on the system and the bug was fixed in 2.11.94.

The whole discussion around this issue can be found here but it would be nice to get the package within this buildpack upgraded to at least 2.11.94. I was going to submit a PR but it looks like the packages are hosted on your S3 bucket.

Can't build Meteor + Cairo

Hi, I'm trying to use node-canvas with Meteor. Meteor is platform based on Node.js. I've created my own Meteor buildpack for Heroku that works well but it doesn't with Cairo Buildpack.

My BUILDPACK_URL is set to https://github.com/mojodna/heroku-buildpack-multi.git#build-env

and content of .buildpacks file looks like follows:

https://github.com/mojodna/heroku-buildpack-cairo.git
https://github.com/jagi/heroku-buildpack-meteor.git

When building I get the errors that I've placed below. My application works perfectly locally on both MacOS and Ubuntu machines. Do you know what can cause the problem? Maybe my Meteor buildpack can't talk with Cairo? Thanks

canvas: updating npm dependencies -- canvas...
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
In file included from ../src/Canvas.cc:7:
../src/Canvas.h:19:25: warning: cairo/cairo.h: No such file or directory
In file included from ../src/Canvas.cc:9:
../src/CanvasRenderingContext2d.h:17:22: warning: cairo-ft.h: No such file or directory
../src/CanvasRenderingContext2d.h:18:10: error: #include expects "FILENAME" or <FILENAME>
../src/Canvas.cc:15:29: warning: cairo/cairo-pdf.h: No such file or directory
In file included from ../src/Canvas.cc:7:
../src/Canvas.h:65: error: 'cairo_status_t' has not been declared
../src/Canvas.h:81: error: ISO C++ forbids declaration of 'cairo_surface_t' with no type
../src/Canvas.h:81: error: 'cairo_surface_t' declared as an 'inline' field
../src/Canvas.h:81: error: expected ';' before '*' token
../src/Canvas.h:82: error: expected ';' before 'inline'
../src/Canvas.h:90: error: ISO C++ forbids declaration of 'cairo_surface_t' with no type
../src/Canvas.h:90: error: expected ';' before '*' token
../src/Canvas.h: In member function 'uint8_t* Canvas::data()':
../src/Canvas.h:83: error: '_surface' was not declared in this scope
../src/Canvas.h:83: error: 'cairo_image_surface_get_data' was not declared in this scope
../src/Canvas.h: In member function 'int Canvas::stride()':
../src/Canvas.h:84: error: '_surface' was not declared in this scope
../src/Canvas.h:84: error: 'cairo_image_surface_get_stride' was not declared in this scope
In file included from ../src/PNG.h:8,
                 from ../src/Canvas.cc:8:
../src/closure.h: At global scope:
../src/closure.h:32: error: 'cairo_status_t' does not name a type
../src/closure.h:41: error: 'cairo_status_t' does not name a type
In file included from ../src/Canvas.cc:8:
../src/PNG.h:67: error: 'cairo_write_func_t' does not name a type
../src/PNG.h:71: error: 'cairo_status_t' does not name a type
In file included from ../src/Canvas.cc:8:
../src/PNG.h: In function 'void canvas_stream_write_func(png_struct*, png_byte*, png_size_t)':
../src/PNG.h:201: error: 'cairo_status_t' was not declared in this scope
../src/PNG.h:201: error: expected ';' before 'status'
../src/PNG.h:205: error: 'status' was not declared in this scope
../src/PNG.h:205: error: 'struct canvas_png_write_closure_t' has no member named 'write_func'
../src/PNG.h:207: error: 'error' was not declared in this scope
../src/PNG.h:207: error: expected primary-expression before ')' token
../src/PNG.h:207: error: expected ';' before 'png_get_error_ptr'
../src/PNG.h:208: error: 'CAIRO_STATUS_SUCCESS' was not declared in this scope
../src/PNG.h: At global scope:
../src/PNG.h:215: error: 'cairo_status_t' does not name a type
In file included from ../src/CanvasRenderingContext2d.h:13,
                 from ../src/Canvas.cc:9:
../src/CanvasGradient.h:21: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasGradient.h:21: error: 'cairo_pattern_t' declared as an 'inline' field
../src/CanvasGradient.h:21: error: expected ';' before '*' token
../src/CanvasGradient.h:23: error: expected ';' before 'private'
../src/CanvasGradient.h:25: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasGradient.h:25: error: expected ';' before '*' token
In file included from ../src/Canvas.cc:9:
../src/CanvasRenderingContext2d.h:39: error: 'cairo_filter_t' does not name a type
../src/CanvasRenderingContext2d.h:40: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:40: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:41: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:41: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:42: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:42: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:43: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:43: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:148: error: 'cairo_t' has not been declared
../src/CanvasRenderingContext2d.h:149: error: ISO C++ forbids declaration of 'cairo_t' with no type
../src/CanvasRenderingContext2d.h:149: error: 'cairo_t' declared as an 'inline' field
../src/CanvasRenderingContext2d.h:149: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:150: error: expected ';' before 'inline'
../src/CanvasRenderingContext2d.h:154: error: 'cairo_surface_t' has not been declared
../src/CanvasRenderingContext2d.h:155: error: expected ',' or '...' before '(' token
../src/CanvasRenderingContext2d.h:155: error: 'fn' has incomplete type
../src/CanvasRenderingContext2d.h:155: error: invalid use of 'void'
../src/CanvasRenderingContext2d.h:175: error: ISO C++ forbids declaration of 'cairo_t' with no type
../src/CanvasRenderingContext2d.h:175: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:176: error: ISO C++ forbids declaration of 'cairo_path_t' with no type
../src/CanvasRenderingContext2d.h:176: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h: In member function 'void Context2d::setContext(int*)':
../src/CanvasRenderingContext2d.h:148: error: '_context' was not declared in this scope
In file included from ../src/Canvas.cc:19:
../src/JPEGStream.h: At global scope:
../src/JPEGStream.h:110: error: variable or field 'write_to_jpeg_stream' declared void
../src/JPEGStream.h:110: error: 'cairo_surface_t' was not declared in this scope
../src/JPEGStream.h:110: error: 'surface' was not declared in this scope
../src/JPEGStream.h:110: error: expected primary-expression before 'int'
../src/JPEGStream.h:110: error: expected primary-expression before 'int'
../src/JPEGStream.h:110: error: expected primary-expression before 'bool'
../src/JPEGStream.h:110: error: expected primary-expression before '*' token
../src/JPEGStream.h:110: error: 'closure' was not declared in this scope
../src/PNG.h:22: warning: 'void canvas_png_flush(png_struct*)' defined but not used
../src/PNG.h:28: warning: 'void canvas_convert_data_to_bytes(png_struct*, png_row_info*, png_byte*)' defined but not used
../src/PNG.h:45: warning: 'void canvas_unpremultiply_data(png_struct*, png_row_info*, png_byte*)' defined but not used
../src/PNG.h:200: warning: 'void canvas_stream_write_func(png_struct*, png_byte*, png_size_t)' defined but not used
make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/app/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.8.11-ec2
gyp ERR! command "node" "/app/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/build_ea80d1a08a83d3498c33b31c55ca7a03/web/packages/canvas/.npm/package-new-smekf0/node_modules/canvas
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.8.11-ec2
npm ERR! command "/app/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/bin/node" "/app/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/bin/npm" "install"
npm ERR! cwd /tmp/build_ea80d1a08a83d3498c33b31c55ca7a03/web/packages/canvas/.npm/package-new-smekf0
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /tmp/build_ea80d1a08a83d3498c33b31c55ca7a03/web/packages/canvas/.npm/package-new-smekf0/npm-debug.log
npm ERR! not ok code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.