Changeset 32479 for main/trunk/greenstone2/perllib/cpan/compile-zerossl.sh
- Timestamp:
- 2018-09-24T15:27:24+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cpan/compile-zerossl.sh
r32462 r32479 21 21 # existing folder structure. 22 22 # - However, for all packages that contain .bundle (mac, or .so for linux) and .xs or .bs bootstrap files, need to put the relevant 23 # products (both the "auto" and package folder inside the lib folder) into cpan/perl-<version> ( perl-5.18).23 # products (both the "auto" and package folder inside the lib folder) into cpan/perl-<version> ($PERL_FOLDER, e.g. "perl-5.18"). 24 24 # In this case, both Crypt::OpenSSL and Time::Piece once compiled up require this second treatment. 25 25 # 26 # Compiling as well as RUNNING the final Crypt::LE's le.pl executable requires PERL5LIB to have both the cpan and its perl-5.1826 # Compiling as well as RUNNING the final Crypt::LE's le.pl executable requires PERL5LIB to have both the cpan and its $PERL_FOLDER 27 27 # subdirectory included in env var PERL5LIB. 28 28 # … … 52 52 OLD_PERL5LIB=$PERL5LIB 53 53 54 # make the dirs cpan/perl-5.18 and its subdir auto if they don't already exist 55 mkdir -p $CPAN_DIR/perl-5.18/auto 54 # PERL_FOLDER is something like "$PERL_FOLDER" (even if the full version number is 5.18.2) 55 PERL_FOLDER=`perl -e 'print "perl-5.".substr($],3,2);'` 56 57 # make the dirs cpan/$PERL_FOLDER and its subdir auto if they don't already exist 58 mkdir -p $CPAN_DIR/$PERL_FOLDER/auto 56 59 57 60 # dependencies are not found if PERL5LIB is simply set to cpan. PERL5LIB Needs to specifically be exported 58 export PERL5LIB=$CPAN_DIR:$CPAN_DIR/ perl-5.18:$PERL5LIB61 export PERL5LIB=$CPAN_DIR:$CPAN_DIR/$PERL_FOLDER:$PERL5LIB 59 62 60 63 #echo "**** PERL5LIB is $PERL5LIB" … … 62 65 63 66 WGET_FLAGS=--no-check-certificate 64 TEMP_DIR=$CPAN_DIR/tmp 67 # folder where we'll put the downloaded files, the compile products and the temporary install products 68 # after everything is installed there, we copy just the relevant installed files to their final locations 69 # then the tmp file gets deleted 70 TEMP_DIR=$CPAN_DIR/tmp-crypt-le 71 65 72 66 73 OLD_C_INCLUDE_PATH=$C_INCLUDE_PATH … … 69 76 if [ "x$1" = "x--clean" ] ; then 70 77 cd $CPAN_DIR 71 rm -rf perl-5.18/Crypt perl-5.18/Time perl-5.18/auto/Crypt perl-5.18/auto/Time Log JSON/MaybeXS.pm Log Module JSON/PP.pm JSON/PP Crypt/LE Crypt/LE.pm78 rm -rf $PERL_FOLDER/Crypt $PERL_FOLDER/Time $PERL_FOLDER/auto/Crypt $PERL_FOLDER/auto/Time Log JSON/MaybeXS.pm Log Module JSON/PP.pm JSON/PP Crypt/LE Crypt/LE.pm 72 79 mv JSON/PP.old JSON/PP 73 80 mv JSON/PP.pm_old JSON/PP.pm … … 86 93 87 94 # 1 https://metacpan.org/pod/Crypt::OpenSSL::Bignum 88 if [ ! -d "$CPAN_DIR/ perl-5.18/Crypt/OpenSSL/Bignum" ]; then95 if [ ! -d "$CPAN_DIR/$PERL_FOLDER/Crypt/OpenSSL/Bignum" ]; then 89 96 CRYPT_OPENSSL_BIGNUM=Crypt-OpenSSL-Bignum 90 97 CRYPT_OPENSSL_BIGNUM_VER=$CRYPT_OPENSSL_BIGNUM-0.09 … … 99 106 make install 100 107 #cp -r $TEMP_DIR/$CRYPT_OPENSSL_BIGNUM/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/Crypt/OpenSSL $CPAN_DIR/Crypt/. 101 cp -r $TEMP_DIR/Crypt-OpenSSL-Bignum/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/Crypt $CPAN_DIR/ perl-5.18/.102 cp -r $TEMP_DIR/Crypt-OpenSSL-Bignum/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/auto/Crypt $CPAN_DIR/ perl-5.18/auto/.108 cp -r $TEMP_DIR/Crypt-OpenSSL-Bignum/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/Crypt $CPAN_DIR/$PERL_FOLDER/. 109 cp -r $TEMP_DIR/Crypt-OpenSSL-Bignum/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/auto/Crypt $CPAN_DIR/$PERL_FOLDER/auto/. 103 110 104 111 C_INCLUDE_PATH= … … 220 227 # 6 https://metacpan.org/pod/Time::Piece 221 228 222 if [ ! -f "$CPAN_DIR/ perl-5.18/Time/Piece.pm" ]; then229 if [ ! -f "$CPAN_DIR/$PERL_FOLDER/Time/Piece.pm" ]; then 223 230 TIME_PIECE=Time-Piece 224 231 TIME_PIECE_VER=$TIME_PIECE-1.33 … … 233 240 234 241 #cp -r $TEMP_DIR/$TIME_PIECE/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/Time $CPAN_DIR/. 235 cp -r $TEMP_DIR/$TIME_PIECE/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/Time $CPAN_DIR/ perl-5.18236 cp -r $TEMP_DIR/$TIME_PIECE/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/auto/Time $CPAN_DIR/ perl-5.18/auto/.242 cp -r $TEMP_DIR/$TIME_PIECE/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/Time $CPAN_DIR/$PERL_FOLDER 243 cp -r $TEMP_DIR/$TIME_PIECE/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/auto/Time $CPAN_DIR/$PERL_FOLDER/auto/. 237 244 238 245 cd $TEMP_DIR … … 283 290 PERL5LIB=$OLD_PERL5LIB 284 291 285 export PERL5LIB=$CPAN_DIR:$CPAN_DIR/perl-5.18:$PERL5LIB 286 287 echo "Restored environment and updated PERL5LIB to $PERL5LIB necessary to run Crypt::LE." 288 echo "You can now run $CPAN_DIR/Crypt/LE/bin/le.pl" 292 # for this export line to work, would need to source ./compile-zerossl.sh 293 #export PERL5LIB=$CPAN_DIR:$CPAN_DIR/$PERL_FOLDER:$PERL5LIB 294 295 echo "Restored environment" 296 echo "You can now run $CPAN_DIR/Crypt/LE/bin/le.pl after exporting PERL5LIB to contain both cpan and cpan/$PERL_FOLDER. Do:" 297 echo " export PERL5LIB=$CPAN_DIR:$CPAN_DIR/$PERL_FOLDER:$PERL5LIB"
Note:
See TracChangeset
for help on using the changeset viewer.