| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # | 2 # |
| 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Sanitize environment. | 7 # Sanitize environment. |
| 8 set -e | 8 set -e |
| 9 export LANG=C | 9 export LANG=C |
| 10 export LC_ALL=C | 10 export LC_ALL=C |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 done | 397 done |
| 398 echo "$LIST" | 398 echo "$LIST" |
| 399 } | 399 } |
| 400 | 400 |
| 401 generate_gyp_file () { | 401 generate_gyp_file () { |
| 402 echo "# Auto-generated file - DO NOT EDIT" | 402 echo "# Auto-generated file - DO NOT EDIT" |
| 403 echo "# To regenerate - run import_from_android.sh." | 403 echo "# To regenerate - run import_from_android.sh." |
| 404 echo "# See 'import_from_android.sh --help' for details." | 404 echo "# See 'import_from_android.sh --help' for details." |
| 405 | 405 |
| 406 local ALL_PREFIXES="OPENSSL_CRYPTO OPENSSL_SSL" | 406 local ALL_PREFIXES="OPENSSL_CRYPTO OPENSSL_SSL" |
| 407 local ALL_ARCHS="arm mips x86 x86_64" | 407 local ALL_ARCHS="arm mips x86 x86_64 mac_ia32" |
| 408 local PREFIX ARCH LIST | 408 local PREFIX ARCH LIST |
| 409 | 409 |
| 410 print_gyp "{" | 410 print_gyp "{" |
| 411 incr_gyp_margin | 411 incr_gyp_margin |
| 412 | 412 |
| 413 print_gyp "'variables': {" | 413 print_gyp "'variables': {" |
| 414 incr_gyp_margin | 414 incr_gyp_margin |
| 415 | 415 |
| 416 # First, the common sources and defines | 416 # First, the common sources and defines |
| 417 print_gyp_source_variable "openssl_common_sources" \ | 417 print_gyp_source_variable "openssl_common_sources" \ |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 mkdir -p $PROGDIR/config/x64/openssl/ | 457 mkdir -p $PROGDIR/config/x64/openssl/ |
| 458 sed \ | 458 sed \ |
| 459 -e 's|^#define RC4_INT unsigned char|#define RC4_INT unsigned int|g' \ | 459 -e 's|^#define RC4_INT unsigned char|#define RC4_INT unsigned int|g' \ |
| 460 -e 's|^#define BN_LLONG|#undef BN_LLONG|g' \ | 460 -e 's|^#define BN_LLONG|#undef BN_LLONG|g' \ |
| 461 -e 's|^#define THIRTY_TWO_BIT|#undef THIRTY_TWO_BIT|g' \ | 461 -e 's|^#define THIRTY_TWO_BIT|#undef THIRTY_TWO_BIT|g' \ |
| 462 -e 's|^#undef SIXTY_FOUR_BIT_LONG|#define SIXTY_FOUR_BIT_LONG|g' \ | 462 -e 's|^#undef SIXTY_FOUR_BIT_LONG|#define SIXTY_FOUR_BIT_LONG|g' \ |
| 463 -e 's|^#define BF_PTR|#undef BF_PTR|g' \ | 463 -e 's|^#define BF_PTR|#undef BF_PTR|g' \ |
| 464 $PROGDIR/openssl/include/openssl/opensslconf.h \ | 464 $PROGDIR/openssl/include/openssl/opensslconf.h \ |
| 465 > $PROGDIR/config/x64/openssl/opensslconf.h | 465 > $PROGDIR/config/x64/openssl/opensslconf.h |
| 466 | 466 |
| 467 dump "Generating OS X 32-bit configuration header file." |
| 468 mkdir -p $PROGDIR/config/mac/ia32/openssl/ |
| 469 sed \ |
| 470 -e '4a#ifndef OPENSSL_SYSNAME_MACOSX\n# define OPENSSL_SYSNAME_MACOSX\n#endif'
\ |
| 471 -e 's|^#define RC4_INT unsigned char|#define RC4_INT unsigned int|g' \ |
| 472 -e 's|^#define DES_LONG unsigned int|#define DES_LONG unsigned long|g' \ |
| 473 $PROGDIR/openssl/include/openssl/opensslconf.h \ |
| 474 > $PROGDIR/config/mac/ia32/openssl/opensslconf.h |
| 475 |
| 467 dump "Generating .gypi file." | 476 dump "Generating .gypi file." |
| 468 . $ANDROID_SRC_DIR/openssl.config | 477 . $ANDROID_SRC_DIR/openssl.config |
| 469 generate_gyp_file > $PROGDIR/openssl.gypi.new | 478 generate_gyp_file > $PROGDIR/openssl.gypi.new |
| 470 run mv $PROGDIR/openssl.gypi $PROGDIR/openssl.gypi.old | 479 run mv $PROGDIR/openssl.gypi $PROGDIR/openssl.gypi.old |
| 471 run mv $PROGDIR/openssl.gypi.new $PROGDIR/openssl.gypi | 480 run mv $PROGDIR/openssl.gypi.new $PROGDIR/openssl.gypi |
| 472 run rm $PROGDIR/openssl.gypi.old | 481 run rm $PROGDIR/openssl.gypi.old |
| 473 | 482 |
| 474 dump "Done." | 483 dump "Done." |
| OLD | NEW |