Ticket #26813: macports-1.9.2.patch
File macports-1.9.2.patch, 6.9 KB (added by mmpestorich (Mike M Pestorich), 14 years ago) |
---|
-
src/pextlib1.0/md5cmd.c
old new 44 44 45 45 #include "md5cmd.h" 46 46 47 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H 47 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H || defined(HAVE_LIBCRYPTO) 48 48 49 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H 49 50 #define COMMON_DIGEST_FOR_OPENSSL 50 51 #include <CommonCrypto/CommonDigest.h> 52 #endif 53 54 #if defined(HAVE_LIBCRYPTO) 55 #include <stdio.h> 56 #include <openssl/md5.h> 57 #endif 51 58 52 59 /* md5 functions are named differently */ 53 60 #define MD5Init(x) MD5_Init(x) … … 62 69 #include <sys/types.h> 63 70 #include <md5.h> 64 71 #else 65 #error CommonCrypto or libmd required72 #error CommonCrypto, OpenSSL (libcrypto) or libmd required 66 73 #endif 67 74 68 75 int MD5Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) -
src/pextlib1.0/sha1cmd.c
old new 45 45 46 46 #include "sha1cmd.h" 47 47 48 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H 48 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H || defined(HAVE_LIBCRYPTO) 49 49 50 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H 50 51 #define COMMON_DIGEST_FOR_OPENSSL 51 52 #include <CommonCrypto/CommonDigest.h> 52 53 53 #include "md_wrappers.h" 54 54 CHECKSUMEnd(SHA1_, SHA_CTX, SHA_DIGEST_LENGTH) 55 55 CHECKSUMFile(SHA1_, SHA_CTX) 56 #endif 57 58 #if defined(HAVE_LIBCRYPTO) 59 #include <stdio.h> 60 #include <openssl/sha.h> 61 #define SHA1Init(x) SHA1_Init(x) 62 #define SHA1Update(x,y,z) SHA1_Update(x,y,z) 63 #define SHA1Final(x,y) SHA1_Final(x,y) 64 #define SHA1_File(x,y) SHA1File(x,y) 65 #include "md_wrappers.h" 66 CHECKSUMEnd(SHA1, SHA_CTX, SHA_DIGEST_LENGTH) 67 CHECKSUMFile(SHA1, SHA_CTX) 68 #endif 69 56 70 57 71 #elif defined(HAVE_LIBMD) 58 72 #include <sys/types.h> … … 60 73 #define SHA_DIGEST_LENGTH (SHA_HASHBYTES) 61 74 #define SHA1_File(x,y) SHAFile(x,y) 62 75 #else 63 #error CommonCrypto or libmd required76 #error CommonCrypto, OpenSSL (libcrypto) or libmd required 64 77 #endif 65 78 66 79 int SHA1Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) -
src/pextlib1.0/sha256cmd.c
old new 44 44 45 45 #include "sha256cmd.h" 46 46 47 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H || defined(HAVE_LIBCRYPTO) 48 47 49 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H 48 50 49 51 #define COMMON_DIGEST_FOR_OPENSSL … … 58 60 #define SHA256_Final(m, c) CC_SHA256_Final(m,c) 59 61 #endif 60 62 63 #include "md_wrappers.h" 64 CHECKSUMEnd(SHA256_, SHA256_CTX, SHA256_DIGEST_LENGTH) 65 CHECKSUMFile(SHA256_, SHA256_CTX) 66 #endif 67 68 #if defined(HAVE_LIBCRYPTO) 69 #include <stdio.h> 70 #include <openssl/sha.h> 71 #define SHA256Init(x) SHA256_Init(x) 72 #define SHA256Update(x,y,z) SHA256_Update(x,y,z) 73 #define SHA256Final(x,y) SHA256_Final(x,y) 74 #define SHA256_File(x,y) SHA256File(x,y) 75 #include "md_wrappers.h" 76 CHECKSUMEnd(SHA256, SHA256_CTX, SHA256_DIGEST_LENGTH) 77 CHECKSUMFile(SHA256, SHA256_CTX) 78 #endif 79 61 80 #else 62 81 /* We do not have CommonCrypto. 63 82 * let's use our own version of sha256* libraries. … … 65 82 #include <sys/types.h> 66 83 #include "sha2.h" 67 84 #include "sha2.c" 68 #endif69 70 85 #include "md_wrappers.h" 71 86 CHECKSUMEnd(SHA256_, SHA256_CTX, SHA256_DIGEST_LENGTH) 72 87 CHECKSUMFile(SHA256_, SHA256_CTX) 88 #endif 73 89 74 90 int SHA256Cmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) 75 91 { -
aclocal.m4
old new 540 540 AC_MSG_ERROR([libmd was found, but md5.h is missing.]) 541 541 ]) 542 542 AC_DEFINE([HAVE_LIBMD], ,[Define if you have the `md' library (-lmd).]) 543 MD5_LIBS="-lmd" ]544 )543 MD5_LIBS="-lmd" 544 ]) 545 545 if test "x$MD5_LIBS" = "x"; then 546 AC_MSG_ERROR([Neither CommonCrypto nor libmd were found. A working md5 implementation is required.]) 546 AC_CHECK_LIB([crypto], [MD5_Update], [ 547 AC_CHECK_HEADERS([openssl/md5.h], , [ 548 AC_MSG_ERROR([OpenSSL's libcrypto was found, but the openssl/md5.h header file is missing.]) 549 ]) 550 AC_DEFINE([HAVE_LIBCRYPTO],,[Define if you have the `crypto' library (-lcrypto).]) 551 MD5_LIBS="-lcrypto" 552 ]) 553 fi 554 if test "x$MD5_LIBS" = "x"; then 555 AC_MSG_ERROR([Neither CommonCrypto nor libmd nor OpenSSL's libcrypto were found. A working md5 implementation is required.]) 547 556 fi 548 557 AC_SUBST([MD5_LIBS]) 549 558 ]) -
src/config.h.in
old new 83 83 /* Define to 1 if you have the <inttypes.h> header file. */ 84 84 #undef HAVE_INTTYPES_H 85 85 86 /* Define if you have the `crypto' library (-lcrypto). */ 87 #undef HAVE_LIBCRYPTO 88 86 89 /* Define if you have the `md' library (-lmd). */ 87 90 #undef HAVE_LIBMD 88 91 … … 110 113 /* Define to 1 if you have the <objc/objc.h> header file. */ 111 114 #undef HAVE_OBJC_OBJC_H 112 115 116 /* Define to 1 if you have the <openssl/md5.h> header file. */ 117 #undef HAVE_OPENSSL_MD5_H 118 113 119 /* Define to 1 if you have the <paths.h> header file. */ 114 120 #undef HAVE_PATHS_H 115 121 -
configure
old new 8417 8411 fi 8418 8412 8419 8413 if test "x$MD5_LIBS" = "x"; then 8420 as_fn_error $? "Neither CommonCrypto nor libmd were found. A working md5 implementation is required." "$LINENO" 5 8414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Update in -lcrypto" >&5 8415 $as_echo_n "checking for MD5_Update in -lcrypto... " >&6; } 8416 if ${ac_cv_lib_crypto_MD5_Update+:} false; then : 8417 $as_echo_n "(cached) " >&6 8418 else 8419 ac_check_lib_save_LIBS=$LIBS 8420 LIBS="-lcrypto $LIBS" 8421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8422 /* end confdefs.h. */ 8423 8424 /* Override any GCC internal prototype to avoid an error. 8425 Use char because int might match the return type of a GCC 8426 builtin and then its argument prototype would still apply. */ 8427 #ifdef __cplusplus 8428 extern "C" 8429 #endif 8430 char MD5_Update (); 8431 int 8432 main () 8433 { 8434 return MD5_Update (); 8435 ; 8436 return 0; 8437 } 8438 _ACEOF 8439 if ac_fn_c_try_link "$LINENO"; then : 8440 ac_cv_lib_crypto_MD5_Update=yes 8441 else 8442 ac_cv_lib_crypto_MD5_Update=no 8443 fi 8444 rm -f core conftest.err conftest.$ac_objext \ 8445 conftest$ac_exeext conftest.$ac_ext 8446 LIBS=$ac_check_lib_save_LIBS 8447 fi 8448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Update" >&5 8449 $as_echo "$ac_cv_lib_crypto_MD5_Update" >&6; } 8450 if test "x$ac_cv_lib_crypto_MD5_Update" = xyes; then : 8451 8452 for ac_header in openssl/md5.h 8453 do : 8454 ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" 8455 if test "x$ac_cv_header_openssl_md5_h" = xyes; then : 8456 cat >>confdefs.h <<_ACEOF 8457 #define HAVE_OPENSSL_MD5_H 1 8458 _ACEOF 8459 8460 else 8461 8462 as_fn_error $? "OpenSSL's libcrypto was found, but the openssl/md5.h header file is missing." "$LINENO" 5 8463 8464 fi 8465 8466 done 8467 8468 8469 $as_echo "#define HAVE_LIBCRYPTO /**/" >>confdefs.h 8470 8471 MD5_LIBS="-lcrypto" 8472 8473 fi 8474 8475 fi 8476 if test "x$MD5_LIBS" = "x"; then 8477 as_fn_error $? "Neither CommonCrypto nor libmd nor OpenSSL's libcrypto were found. A working md5 implementation is required." "$LINENO" 5 8421 8478 fi 8422 8479 8423 8480