ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/staticperl.sh
(Generate patch)

Comparing App-Staticperl/staticperl.sh (file contents):
Revision 1.8 by root, Tue Dec 7 19:55:56 2010 UTC vs.
Revision 1.9 by root, Tue Dec 7 20:03:15 2010 UTC

246 246
247 postbuild || fatal "postbuild hook failed" 247 postbuild || fatal "postbuild hook failed"
248} 248}
249 249
250install() { 250install() {
251 [ -e "$PERL_PREFIX/staticstamp.install" ] && return 251 if ! [ -e "$PERL_PREFIX/staticstamp.install" ]; then
252
253 build 252 build
254 253
255 verblock <<EOF 254 verblock <<EOF
256installing $STATICPERL/src/perl-$PERL_VERSION 255installing $STATICPERL/src/perl-$PERL_VERSION
257to $PERL_PREFIX 256to $PERL_PREFIX
258EOF 257EOF
259 258
260 rm -rf "$PERL_PREFIX" 259 rm -rf "$PERL_PREFIX"
261 260
262 make install || fatal "make install: error while installing" 261 make install || fatal "make install: error while installing"
263 262
264 rcd "$PERL_PREFIX" 263 rcd "$PERL_PREFIX"
265 264
266 # create a "make install" replacement for CPAN 265 # create a "make install" replacement for CPAN
267 cat >"$PERL_PREFIX"/bin/cpan-make-install <<EOF 266 cat >"$PERL_PREFIX"/bin/cpan-make-install <<EOF
268make install UNINST=1 267make install UNINST=1
269if find blib/arch/auto -type f | grep -q -v .exists; then 268if find blib/arch/auto -type f | grep -q -v .exists; then
270 echo Probably an XS module, rebuilding perl 269 echo Probably an XS module, rebuilding perl
271 make perl 270 make perl
272 rm -f "$PERL_PREFIX"/bin/perl 271 rm -f "$PERL_PREFIX"/bin/perl
273 make -f Makefile.aperl inst_perl 272 make -f Makefile.aperl inst_perl
274 make -f Makefile.aperl map_clean 273 make -f Makefile.aperl map_clean
275fi 274fi
276EOF 275EOF
277 chmod 755 "$PERL_PREFIX"/bin/cpan-make-install 276 chmod 755 "$PERL_PREFIX"/bin/cpan-make-install
278 277
279 # trick CPAN into avoiding ~/.cpan completely 278 # trick CPAN into avoiding ~/.cpan completely
280 echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm" 279 echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm"
281 280
282 "$PERL_PREFIX"/bin/perl -MCPAN -e ' 281 "$PERL_PREFIX"/bin/perl -MCPAN -e '
283 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); 282 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'");
284 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 283 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
285 CPAN::Shell->o (conf => q<init>); 284 CPAN::Shell->o (conf => q<init>);
286 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 285 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
287 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); 286 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build");
288 CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs"); 287 CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs");
289 CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile"); 288 CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile");
290 CPAN::Shell->o (conf => q<keep_source_where>, "'"$STATICPERL"'/cpan/sources"); 289 CPAN::Shell->o (conf => q<keep_source_where>, "'"$STATICPERL"'/cpan/sources");
291 CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/cpan-make-install"); 290 CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/cpan-make-install");
292 CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>); 291 CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>);
293 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<no>); 292 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<no>);
294 CPAN::Shell->o (conf => q<commit>); 293 CPAN::Shell->o (conf => q<commit>);
295 ' || fatal "error while initialising CPAN" 294 ' || fatal "error while initialising CPAN"
296 295
296 touch "$PERL_PREFIX/staticstamp.install"
297 fi
298
299 if ! [ -e "$PERL_PREFIX/staticstamp.postinstall"; then
297 NOCHECK_INSTALL=+ 300 NOCHECK_INSTALL=+
298 instcpan $STATICPERL_MODULES 301 instcpan $STATICPERL_MODULES
299 [ $EXTRA_MODULES ] && instcpan $EXTRA_MODULES 302 [ $EXTRA_MODULES ] && instcpan $EXTRA_MODULES
300 303
301 postinstall || fatal "postinstall hook failed" 304 postinstall || fatal "postinstall hook failed"
302 305
303 touch "$PERL_PREFIX/staticstamp.install" 306 touch "$PERL_PREFIX/staticstamp.postinstall"
307 fi
304} 308}
305 309
306############################################################################# 310#############################################################################
307# install a module from CPAN 311# install a module from CPAN
308 312

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines