#12399: Get pycrypto to build on FreeBSD
----------------------------+-----------------------------------------------
       Reporter:  kcrisman  |         Owner:  pjeremy 
           Type:  defect    |        Status:  new     
       Priority:  major     |     Milestone:  sage-5.0
      Component:  FreeBSD   |    Resolution:          
       Keywords:            |   Work issues:          
Report Upstream:  N/A       |     Reviewers:          
        Authors:            |     Merged in:          
   Dependencies:            |      Stopgaps:          
----------------------------+-----------------------------------------------

Comment (by stephen):

 I can confirm that this ticket is still required for building sage with
 FreeBSD.  It should be harmless to all other OS builds.

 Add a new file patches/src.libtom.tomcrypt_pk.h (you will have to add the
 patches directory as well)
 {{{
 --- src/src/libtom/tomcrypt_pk.h-orig   2012-01-21 19:43:56.000000000
 +0000
 +++ src/src/libtom/tomcrypt_pk.h        2012-01-21 19:45:01.000000000
 +0000
 @@ -496,7 +496,7 @@
  int der_printable_value_decode(int v);

  /* UTF-8 */
 -#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L ||
 defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED)) &&
 !defined(LTC_NO_WCHAR)
 +#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L ||
 defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED) ||
 defined(_GCC_WCHAR_T)) && !defined(LTC_NO_WCHAR)
  #include <wchar.h>
  #else
  typedef ulong32 wchar_t;
 }}}

 and patch spkg-install as follows:

 {{{
 --- pycrypto-2.1.0/spkg-install-orig    2012-04-08 01:30:47.000000000
 +0000
 +++ pycrypto-2.1.0/spkg-install 2012-04-08 01:31:41.000000000 +0000
 @@ -12,6 +12,8 @@
      LDFLAGS="-m64 "; export LDFLAGS
  fi

 +patch -p0 < patches/src.libtom.tomcrypt_pk.h
 +
  CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib $CFLAGS"
  export CFLAGS

 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12399#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to