Open danroberts opened 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.
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.
@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.
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.
@mcollina Thanks for the quick reply. I will see if @paolochiodi has any recommendations.
@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:
heroku run bash
). I'd suggest the latter method, but you need to be confident with curl to download the packages sources and upload the binaries to amazon s3 or somewhere you can reach them)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.
BTW, the moment you do this, you want to tackle also #7.
I've added @paolochiodi as a collaborator.
@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
@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.
@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
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.
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!