Difference between revisions of "Perlbrew"
Line 46: | Line 46: | ||
The given process has a new IM library installed under ~/local. I'm likely to modify it to something like ~/opt/ImageMagick-VERSION-NAME. This should be documented here. | The given process has a new IM library installed under ~/local. I'm likely to modify it to something like ~/opt/ImageMagick-VERSION-NAME. This should be documented here. | ||
+ | |||
+ | Proposed install script (has not been tested yet!): | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | IM=ImageMagick-6.8.9-0 | ||
+ | IM_DOWNLOADS="http://www.imagemagick.org/download" | ||
+ | OPT="$HOME/opt" | ||
+ | FONT_PATH="$HOME/.fonts" | ||
+ | PB_NAME="your perlbrew install name" | ||
+ | PB_DIR="$PERLBREW_ROOT/perls/$PB_NAME" | ||
+ | PB_PERL="$PB_DIR/bin/perl" | ||
+ | PB_CORE="$PB_DIR"/lib/5.*.*/*/CORE | ||
+ | PREFIX="$OPT/$IM-$PB_NAME" | ||
+ | |||
+ | WITHOUT_THREADS=`"$PB_PERL" -MConfig -E '$Config{useithreads} or say "--without-threads"'` | ||
+ | |||
+ | wget "$IM_DOWNLOADS/$IM.tar.xz" && | ||
+ | tar xJvf "$IM.tar.xz" && | ||
+ | cd "$IM" && | ||
+ | LDFLAGS=-L"$PB_CORE" \ | ||
+ | ./configure \ | ||
+ | --prefix "$PREFIX" \ | ||
+ | --with-perl="$PB_PERL" \ | ||
+ | --enable-shared \ | ||
+ | $WITHOUT_THREADS \ | ||
+ | --with-fontpath="$FONT_PATH" \ | ||
+ | --with-rsvg \ | ||
+ | && | ||
+ | read -p "Press enter to make and install." && | ||
+ | make install | ||
+ | </syntaxhighlight> |
Revision as of 14:28, 15 April 2014
perlbrew is a manager for sudo-free, user-level perl installations.
Installation
cd ~/tmp
wget --no-check-certificate https://raw.github.com/gugod/App-perlbrew/master/perlbrew
perl perlbrew self-install
cat 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.bashrc # restart bash for this to take effect
At this point, you should also install patchperl, but the default command to do this,
perl perlbrew install-patchperl
failed for me because of a certificate issue. A workaround is to get it directly:
curl -kL https://raw.github.com/gugod/patchperl-packing/master/patchperl > ~/perl5/perlbrew/bin/patchperl
chmod +x ~/perl5/perlbrew/bin/patchperl
Alternatively, perlbrew can be patched to add the -k option to ignore cert issues. However, the program is minified, so this is currently more straightforward.
Add a new perl install
Do this in a screen
session. It is a long-running process that you won't want interrupted by connectivity problems.
perlbrew install --as $your_install_name stable
- The
--as
switch is optional. Omitting it causes the version to be used instead of a name when managing. - The
stable
specifier may be replaced with any version number orblead
. - Other options are available.
This is a full perl install process and will take a substantial about of time. You will be given a tail -f
command to follow the log if desired.
I believe it is supposed to work to install the same version twice as long as the names are different. However, don't try to perform the actual installs simultaneously; wait for one to finish before starting the next.
Image::Magick
One process that is claimed to work for installing Image::Magick is given on perltricks.com.
The given process has a new IM library installed under ~/local. I'm likely to modify it to something like ~/opt/ImageMagick-VERSION-NAME. This should be documented here.
Proposed install script (has not been tested yet!):
IM=ImageMagick-6.8.9-0
IM_DOWNLOADS="http://www.imagemagick.org/download"
OPT="$HOME/opt"
FONT_PATH="$HOME/.fonts"
PB_NAME="your perlbrew install name"
PB_DIR="$PERLBREW_ROOT/perls/$PB_NAME"
PB_PERL="$PB_DIR/bin/perl"
PB_CORE="$PB_DIR"/lib/5.*.*/*/CORE
PREFIX="$OPT/$IM-$PB_NAME"
WITHOUT_THREADS=`"$PB_PERL" -MConfig -E '$Config{useithreads} or say "--without-threads"'`
wget "$IM_DOWNLOADS/$IM.tar.xz" &&
tar xJvf "$IM.tar.xz" &&
cd "$IM" &&
LDFLAGS=-L"$PB_CORE" \
./configure \
--prefix "$PREFIX" \
--with-perl="$PB_PERL" \
--enable-shared \
$WITHOUT_THREADS \
--with-fontpath="$FONT_PATH" \
--with-rsvg \
&&
read -p "Press enter to make and install." &&
make install