mcollina / heroku-buildpack-imagemagick

An heroku buildpack with the latest version of ImageMagick
45 stars 60 forks source link

Include librsvg [enhancement] #2

Open danroberts opened 11 years ago

danroberts commented 11 years ago

Imagemagick's base svg -> image conversion is terrible, doesn't implement most of the svg standard, there is a library called librsvg but the dependencies are a bit hairy.

I will try to see what I can do to make this compatible with the existing buildpack, but I'm new to creating buildpacks, so whatever guidance you might have would be amazing!

mcollina commented 11 years ago

The easy thing I can do it's to bundle libpng (#1), then you can fork this repo and add librsvg and its dependencies. You will need an AWS account for doing that, as it requires some uploading/downloading from there.

mcollina commented 11 years ago

I added support for libpng, it should be clear reading the two files:

How to add another library.

Let me know if you face any problems.

novito commented 10 years ago

@mcollina Thanks for this buildpack. I am also looking for a way to include librsvg. It would be really helpful if you could explain the steps in order to add a new library, or specifically how to add librsvg. Is not that you need to add the dependencies, but also that imagemagick needs to be installed with the +rsvg option.

mcollina commented 10 years ago

Here is the problem: the tool used to create this buildpack have been deprecated and it is now unmaintained (vulcan). Plus, I have no real bandwidth for this, as I switched job.

Maybe @paolochiodi can help.

novito commented 10 years ago

@mcollina Thanks for the quick reply. I will see if @paolochiodi has any recommendations.

paolochiodi commented 10 years ago

@novito modifying the buildpack shouldn't be hard. This buildpack is made of two parts: the actual buildpack (the bin folder) and the support scripts (you guess, the support folder). I'd consider the support folder deprecated and leave it as is: it contains the script to build imagemagick and dependencies with the now deprecated vulcan system provided by heroku. The scripts in the bin folder follow the build pack api requirements, and are only responsible for downloading the imagemagick and libpng binaries from an s3 bucket. In order to have imagemagick compiled with librsvg you should:

I'd like to help with the all the procedure, but I'll be on annual leave from wednesday and I'l be back on September, 1st and I don't know if I'll be able to complete everything before wednesday.

mcollina commented 10 years ago

BTW, the moment you do this, you want to tackle also #7.

I've added @paolochiodi as a collaborator.

paolochiodi commented 10 years ago

@novito Do you have experience building librsvg from scratch? I've spent some time building it (and its dependencies) from scratch on heroku and trying to get a cross-compiled and statically linked imagemagick version, but failed at both. If you can give me some guidance in building librsvg I would then be able to integrate it in the buildpack

novito commented 10 years ago

@mcollina @paolochiodi sorry for the late reply.

I spent a lot of time trying to create my own buildpack in order to support libsrvg on Heroku. It was a PAIN and I didn't get anywhere. A lot of dependencies were not compiling properly on the platform, so I give up.

Fortunately, the Cedar 14 comes with a newer version of Imagemagick with proper SVG support. So I finally chose that approach.

@paolochiodi unfortunately I don't have experience building librsvg from scratch, and I spent over a day with a friend of mine who works as a syadmin, trying to build the buildpack for a Heroku environment, and no luck.

Thanks for the time you guys spent on this.

paolochiodi commented 10 years ago

@novito I'm somehow "relieved" that someone else found it hard, like I did. The dependencies list for librsvg seem quite long and not well documented.

Cedar 14 is indeed a good news: I always prefer using default configurations and base packages provided directly by heroku

mcollina commented 10 years ago

Yep, I was told this Cedar 14 thing a couple of weeks ago :).

@paolochiodi can you still run some benches on it? It might seems that our graphicsmagick buildpack can still outbeat the stock version, or maybe not.