使用vulcan为inkscape制作一个heroku buildpack

时间:2013-05-29 00:08:45

标签: heroku vulcan

我希望能够在heroku上的rails应用程序中使用命令行版本的inkscape(http://inkscape.org/)进行一些图像处理。不,imagemagick等不会这样做。

所以我开始使用inkscape作为包含的二进制文件处理我自己的buildpack。

要做到这一点,我安装了vulcan,下载了inkscape源代码,并试图像这样构建:

curl -L -O http://downloads.sourceforge.net/inkscape/inkscape-0.48.4.tar.gz
tar -xzvf inkscape-0.48.4.tar.gz
cd inkscape-0.48.4
vulcan build -v -c './configure && make && make install' 

现在,如果生活很简单,那就是'Just Work',但是因为'intltool'的版本太旧而错误了。

./configure: line 5371: intltool-update: command not found
checking for intltool >= 0.22...  found
configure: error: Your intltool is too old.  You need intltool 0.22 or later.

好的,很好,所以我尝试用vulcan构建那个二进制文件,以包含--deps。 现在失败了,因为我需要一个perl模块XML :: Parser。 我怎么能安装这个perl模块?

我蠢蠢欲动,接近一点,我使用cpanminus安装了XML :: Parser:

vulcan build -v -c 'curl -LO http://xrl.us/cpanm && chmod +x cpanm && ./cpanm -v XML::Parser && ./configure && make && make install'

这让我将XML :: Parser安装到/ app / perl5,但是如何让intltool configure在那里找到呢?

非常令人沮丧。许多牦牛剃光了。有什么建议吗?


已更新

我得到了intltool来构建,并且被inkscape configure脚本识别,这是最终的工作:

vulcan build -p /tmp/intltool -v -c 'curl --silent -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib && eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` && cpanm -n XML::Parser && ./configure --prefix=/tmp/intltool && make && make install'

之后,gettext是下一个依赖项,那个我还需要构建:

wget ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.2.1.tar.gz
tar -xzvf gettext-0.18.2.1.tar.gz
cd gettext-0.18.2.1.tar.gz
vulcan build -p /tmp/gettext -v -c './configure --prefix=/tmp/gettext && make && make install'

现在,当我去构建inkscape时,事情似乎随之而来 - 我甚至想出了多个--deps的正确语法,但后来停止使用这个gettext二进制文件。这是我正在尝试的编译命令:

vulcan build -p /tmp/inkscape -v -c './configure --prefix=/tmp/inkscape && make && make install' --deps=intltool-build.herokuapp.com/output/1a0ef36b-f134-497d-b970-06896d90f936 gettext-build.herokuapp.com/output/9b9853c0-dfcc-47c8-9d8b-f48e1453026d

但是当configure检查gettext可执行文件时,它声称找不到libgettextsrc-0.18.2.so,但是我查看了二进制文件,它就在那里,在正确的lib目录中

这是错误(你可以看到configure正确地找到intltool二进制文件,然后一些gettext二进制文件然后使用xgettext失败):

checking for intltool >= 0.22... 0.50.2 found
checking for intltool-update... /tmp/d20130529-2-9gtra6/deps/bin/intltool-update
checking for intltool-merge... /tmp/d20130529-2-9gtra6/deps/bin/intltool-merge
checking for intltool-extract... /tmp/d20130529-2-9gtra6/deps/bin/intltool-extract
checking for xgettext... /tmp/d20130529-2-9gtra6/deps/bin/xgettext
checking for msgmerge... /tmp/d20130529-2-9gtra6/deps/bin/msgmerge
checking for msgfmt... /tmp/d20130529-2-9gtra6/deps/bin/msgfmt
checking for gmsgfmt... /tmp/d20130529-2-9gtra6/deps/bin/msgfmt
/tmp/d20130529-2-9gtra6/deps/bin/xgettext: error while loading shared libraries: libgettextsrc-0.18.2.so: cannot open shared object file: No such file or directory
/tmp/d20130529-2-9gtra6/deps/bin/msgmerge: error while loading shared libraries: libgettextsrc-0.18.2.so: cannot open shared object file: No such file or directory
/tmp/d20130529-2-9gtra6/deps/bin/msgfmt: error while loading shared libraries: libgettextsrc-0.18.2.so: cannot open shared object file: No such file or directory
configure: error: GNU gettext tools not found; required for intltool

也许我的进步会帮助其他人使用vulcan来获得这种乐趣。 有关gettext二进制文件的任何想法?也许有人已经在heroku / vulcan上工作了吗?

0 个答案:

没有答案