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

Comparing cvsroot/App-Staticperl/staticperl.sh (file contents):
Revision 1.1 by root, Mon Dec 6 19:33:58 2010 UTC vs.
Revision 1.2 by root, Mon Dec 6 20:53:44 2010 UTC

39#export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow 39#export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow
40export EV_EXTRA_DEFS='-DEV_FEATURES=4+8+16+64 -DEV_USE_SELECT=0 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_NO_LOOPS -DEV_COMPAT3=0' 40export EV_EXTRA_DEFS='-DEV_FEATURES=4+8+16+64 -DEV_USE_SELECT=0 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_NO_LOOPS -DEV_COMPAT3=0'
41 41
42# which extra modules to install by default from CPAN that are 42# which extra modules to install by default from CPAN that are
43# required by mkbundle 43# required by mkbundle
44EXTRA_MODULES="common::sense Pod::Strip PPI::XS Pod::Usage" 44STATICPERL_MODULES="common::sense Pod::Strip PPI::XS Pod::Usage"
45
46# which extra modules you might want to install
47EXTRA_MODULES=""
45 48
46# overridable functions 49# overridable functions
47postconfigure() { : ; } 50postconfigure() { : ; }
48postbuild() { : ; } 51postbuild() { : ; }
49postinstall() { : ; } 52postinstall() { : ; }
194 -Doptimize="$PERL_OPTIMIZE" \ 197 -Doptimize="$PERL_OPTIMIZE" \
195 -Dldflags="$PERL_LDFLAGS" \ 198 -Dldflags="$PERL_LDFLAGS" \
196 -Dlibs="$PERL_LIBS" \ 199 -Dlibs="$PERL_LIBS" \
197 -Dprefix="$PREFIX" \ 200 -Dprefix="$PREFIX" \
198 -Dbin="$PREFIX/bin" \ 201 -Dbin="$PREFIX/bin" \
199 -Dprivlib="$PREFIX/plib" \ 202 -Dprivlib="$PREFIX/lib" \
200 -Darchlib="$PREFIX/plib" \ 203 -Darchlib="$PREFIX/lib" \
201 -Uusevendorprefix \ 204 -Uusevendorprefix \
202 -Dsitelib="$PREFIX/plib" \ 205 -Dsitelib="$PREFIX/lib" \
203 -Dsitearch="$PREFIX/plib" \ 206 -Dsitearch="$PREFIX/lib" \
204 -Usitelibexp \ 207 -Usitelibexp \
205 -Uman1dir \ 208 -Uman1dir \
206 -Uman3dir \ 209 -Uman3dir \
207 -Usiteman1dir \ 210 -Usiteman1dir \
208 -Usiteman3dir \ 211 -Usiteman3dir \
252 255
253 rm -rf "$PREFIX" 256 rm -rf "$PREFIX"
254 257
255 make install || fatal "make install: error while installing" 258 make install || fatal "make install: error while installing"
256 259
260 rcd "$PREFIX"
261
257 # create a "make install" replacement for CPAN 262 # create a "make install" replacement for CPAN
258 cat >"$PREFIX"/bin/cpan-make-install <<EOF 263 cat >"$PREFIX"/bin/cpan-make-install <<EOF
259make install UNINST=1 264make install UNINST=1
260if find blib/arch/auto -type f | grep -q -v .exists; then 265if find blib/arch/auto -type f | grep -q -v .exists; then
261 echo Probably an XS module, rebuilding perl 266 echo Probably an XS module, rebuilding perl
265 make -f Makefile.aperl map_clean 270 make -f Makefile.aperl map_clean
266fi 271fi
267EOF 272EOF
268 chmod 755 "$PREFIX"/bin/cpan-make-install 273 chmod 755 "$PREFIX"/bin/cpan-make-install
269 274
275 # try to trick CPAN into avoiding ~/.cpan completely
276 echo 1 >"$PREFIX/lib/CPAN/MyConfig.pm"
277
270 "$PREFIX"/bin/perl -MCPAN -e ' 278 "$PREFIX"/bin/perl -MCPAN -e '
271 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'"); 279 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'");
280 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
272 CPAN::Shell->o (conf => q<init>); 281 CPAN::Shell->o (conf => q<init>);
273 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan"); 282 CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
274 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build"); 283 CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build");
275 CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs"); 284 CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs");
276 CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile"); 285 CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile");
280 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<no>); 289 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<no>);
281 CPAN::Shell->o (conf => q<commit>); 290 CPAN::Shell->o (conf => q<commit>);
282 ' || fatal "error while initialising CPAN" 291 ' || fatal "error while initialising CPAN"
283 292
284 NOCHECK_INSTALL=+ 293 NOCHECK_INSTALL=+
285 instcpan $EXTRA_MODULES 294 instcpan $STATICPERL_MODULES
295 [ $EXTRA_MODULES ] && instcpan $EXTRA_MODULES
286 296
287 postinstall || fatal "postinstall hook failed" 297 postinstall || fatal "postinstall hook failed"
288 298
289 touch "$PREFIX/staticstamp.install" 299 touch "$PREFIX/staticstamp.install"
290} 300}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines