[publican-list] Compiling Publican in Mac OSX Lion

Jeff Fearn jfearn at redhat.com
Mon Nov 7 07:07:55 UTC 2011


On 11/07/2011 04:35 PM, Misty Stanley-Jones wrote:
> I have succeeded in compiling Publican in Mac OSX Lion. First I'll describe what I did. Then I'll ask some questions about some problems.
>
> 1. Download the source for Publican from SVN.
> 2. Install the XCode developer tools from the Mac App Store.
> 3. Install Mac Ports (http://www.macports.org/)
>     a. This was needed in order to get the module Image::Magick installed properly. With the native Perl, it was failing to build.
> 4. Install ImageMagick with PerlMagick via Mac Ports:
>     a. port install ImageMagick +no_x11 +perl
> 5. Change to the branch/publican-2.x/ directory in the Publican source.
> 6. Execute perl ./Build.PL
> 7. Note the first dependency missing, open cpan, and do "install<module_name>".
> 8. Repeat #6 and #7 a bunch of times.
>     a. Note: I had to do "force install Makefile:Parser" because otherwise it was failing
> 9. When I got a clean run of "perl ./Build.PL" I ran "./Build" and then "sudo ./Build install"
>     a. It installed Publican into /opt/local/bin
>     b. It installed the Common config into /usr/share/publican
> 10. Run "publican create --name=testbook" and note that the book is created.
> 11. Change to "testbook" and run "publican build --format=html --langs=en-US"
>     a. It takes a long time.
>     b. Then it fails because it can't find the common brand files.
> 12. Specify the directory for the brand and common config:
>     publican build --format=html --langs=en-US --common_config=/usr/share/publican --common_content=/usr/share/publican/Common_Content
>     a. It takes a looooooong time.
>     b. It works.
>
> So my questions are:
>
> 1. How can I troubleshoot the "It takes a long time"? It is during the " Using XML::LibXSLT on /usr/share/publican/Common_Content/JBoss_EAP6/xsl/html.xsl" phase, and I think it might be because it's trying to find the file in several different locations before it finds the proper one. I actually used dtruss, which is the equivalent of strace in linux. It almost looked like it was having trouble finding the DTD file, even though the URL is accessible.

It's probably looking for the DocBook XSL files, can't find them 
locally, so it goes off and downloads them. It doesn't cache things 
though, so it does this every time. You'd need to install them locally 
then workout how to set up an XML catalogue on OSX.

> 2. Is there a way for me to run the "./Build install" in such a way that it installs everything into /opt? That might help a bit.

You can try setting the base path, it might work ... or it might be 
creative O_O

./Build install --install_base /opt

Failing that you can override the paths individually, gives greater control:

./Build install --install_path datadir=/opt/???/publican --install_path 
generated=/opt/???/publican/sitetemplate  --install_path 
web=/opt/???/publican/sitetemplate --install_path 
templates=/opt/???/publican/templates --install_path etc=/opt/??? 
--install_path completion=???

Basically in Build.PL there is an entry 'install_path' and for each of 
the fields in there you can add an --install_path argument and override 
it to wherever you want.

Cheers, Jeff.

-- 
"Reply All" why you shouldn't use it: 
http://www.emailreplies.com/#12replytoall




More information about the publican-list mailing list