Codebase list libcryptx-perl / 56ac353
tuning update-libtom Karel Miko 4 years ago
1 changed file(s) with 16 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1212 warn "update libtommath from github (branch: $ltm_branch)..\n";
1313 system 'rm', '-rf', bsd_glob("$FindBin::Bin/ltm/*");
1414 system "rm -rf $tmpdir; mkdir $tmpdir";
15 system "git clone -b $ltm_branch https://github.com/libtom/libtommath.git $tmpdir && cp -R $tmpdir/bn*.c $tmpdir/tom*.h $FindBin::Bin/ltm/ && echo ok";
15 system "git clone -b $ltm_branch https://github.com/libtom/libtommath.git $tmpdir && cp $tmpdir/bn*.c $tmpdir/tom*.h $FindBin::Bin/ltm/ && echo ok";
16 system "(cd $tmpdir && git log --pretty='%h %ai %s') | head -1";
17 # avoid stdint.h hack
18 system "find '$FindBin::Bin/ltm/' -name '*.c' -o -name '*.h' | xargs sed -i"
19 . " -e 's/uint8_t/unsigned char/g'"
20 . " -e 's/uint16_t/unsigned short/g'"
21 . " -e 's/uint32_t/unsigned int/g'"
22 . " -e 's/uint64_t/unsigned long long/g'"
23 . " -e 's/int8_t/char/g'"
24 . " -e 's/int16_t/short/g'"
25 . " -e 's/int32_t/int/g'"
26 . " -e 's/int64_t/long long/g'"
27 . " -e 's/# *include *<stdint.h>//'";
1628
1729 warn "update libtomcrypt from github (branch: $ltc_branch)..\n";
1830 system 'rm', '-rf', bsd_glob("$FindBin::Bin/ltc/*");
1931 system "rm -rf $tmpdir; mkdir $tmpdir";
2032 system "git clone -b $ltc_branch https://github.com/libtom/libtomcrypt.git $tmpdir && cp -R $tmpdir/src/* $FindBin::Bin/ltc/ && echo ok";
33 system "(cd $tmpdir && git log --pretty='%h %ai %s') | head -1";
34
2135 system "rm -rf $tmpdir";
2236
2337 ### another style
5468 #fix modes
5569 warn "gonna chmod..\n";
5670 find({ wanted=>sub { system "chmod -x $_" if -f $_ && -x $_ && $_ =~ /\.(c|h)/ }, no_chdir=>1 }, "$FindBin::Bin/ltm", "$FindBin::Bin/ltc");
57
71
5872 my @objs = ();
5973 find({ wanted=>sub { push @objs, $_ if $_ =~ /\.c$/ && $_ !~ /tab\.c$/}, no_chdir=>1 }, "$FindBin::Bin/ltc");
6074 find({ wanted=>sub { push @objs, $_ if $_ =~ /\.c$/ }, no_chdir=>1 }, "$FindBin::Bin/ltm");