[csw-devel] SF.net SVN: gar:[14837] csw/mgar/pkg/lang-python/pycrypto/trunk
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Sat Jun 18 13:51:58 CEST 2011
Revision: 14837
http://gar.svn.sourceforge.net/gar/?rev=14837&view=rev
Author: skayser
Date: 2011-06-18 11:51:57 +0000 (Sat, 18 Jun 2011)
Log Message:
-----------
lang-python/pycrypto/trunk: fix stdint.h related build errors
Modified Paths:
--------------
csw/mgar/pkg/lang-python/pycrypto/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/lang-python/pycrypto/trunk/files/0001-On-Solaris-Use-sys-inttypes.h-instead-of-stdint.h.patch
Modified: csw/mgar/pkg/lang-python/pycrypto/trunk/Makefile
===================================================================
--- csw/mgar/pkg/lang-python/pycrypto/trunk/Makefile 2011-06-18 02:36:54 UTC (rev 14836)
+++ csw/mgar/pkg/lang-python/pycrypto/trunk/Makefile 2011-06-18 11:51:57 UTC (rev 14837)
@@ -1,12 +1,13 @@
# $Id$
# TODO (release-critical prefixed with !, non release-critical with *)
#
-# ! Build fails
-# "src/RIPEMD160.c", line 47: cannot find include file: <stdint.h>
+# * pyconfig.h (via "Python.h") unconditionally sets _FILE_OFFSET_BITS = 64.
# "/opt/csw/include/python2.6/pyconfig.h", line 1016: warning: macro redefined: _FILE_OFFSET_BITS
-# cc: acomp failed for src/RIPEMD160.c
-# error: command '/opt/SUNWspro/bin/cc' failed with exit status 2
#
+# * setup.py unconditionally passes gcc flags
+# cc: Warning: illegal option -d=c99
+# cc: Warning: illegal option -fomit-frame-pointer
+#
NAME = pycrypto
VERSION = 2.3
@@ -23,6 +24,9 @@
MASTER_SITES = http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
DISTFILES = $(DISTNAME).tar.gz
+# c.f. https://bugs.launchpad.net/pycrypto/+bug/518871
+PATCHFILES += 0001-On-Solaris-Use-sys-inttypes.h-instead-of-stdint.h.patch
+
CONFIGURE_ARGS = $(DIRPATHS)
include gar/category.mk
Added: csw/mgar/pkg/lang-python/pycrypto/trunk/files/0001-On-Solaris-Use-sys-inttypes.h-instead-of-stdint.h.patch
===================================================================
--- csw/mgar/pkg/lang-python/pycrypto/trunk/files/0001-On-Solaris-Use-sys-inttypes.h-instead-of-stdint.h.patch (rev 0)
+++ csw/mgar/pkg/lang-python/pycrypto/trunk/files/0001-On-Solaris-Use-sys-inttypes.h-instead-of-stdint.h.patch 2011-06-18 11:51:57 UTC (rev 14837)
@@ -0,0 +1,70 @@
+From 002603e46cedd91813e2aa0dd1b2b0e24497079e Mon Sep 17 00:00:00 2001
+From: Sebastian Kayser <skayser at opencsw.org>
+Date: Sat, 18 Jun 2011 12:54:05 +0200
+Subject: [PATCH] On Solaris, Use sys/inttypes.h instead of stdint.h
+
+Required because Solaris < 10 doesn't ship with stdint.h. On Solaris 10,
+both (sys/inttypes.h and stdint.h) end up including sys/int_types.h, so
+this should also be fine for Solaris 10.
+---
+ src/Blowfish.c | 6 ++++++
+ src/RIPEMD160.c | 6 ++++++
+ src/_counter.h | 5 +++++
+ 3 files changed, 17 insertions(+), 0 deletions(-)
+
+diff --git a/src/Blowfish.c b/src/Blowfish.c
+index f0d8594..d6e4b7c 100644
+--- a/src/Blowfish.c
++++ b/src/Blowfish.c
+@@ -27,7 +27,13 @@
+ */
+
+ #include <assert.h>
++
++#if defined(__sun) || defined(__sun__)
++#include <sys/inttypes.h>
++#else
+ #include <stdint.h>
++#endif
++
+ #include <string.h>
+ #include "Python.h"
+
+diff --git a/src/RIPEMD160.c b/src/RIPEMD160.c
+index da2e72c..51cfcac 100644
+--- a/src/RIPEMD160.c
++++ b/src/RIPEMD160.c
+@@ -44,7 +44,13 @@
+ */
+
+ #include <assert.h>
++
++#if defined(__sun) || defined(__sun__)
++#include <sys/inttypes.h>
++#else
+ #include <stdint.h>
++#endif
++
+ #include <string.h>
+ #include "Python.h"
+
+diff --git a/src/_counter.h b/src/_counter.h
+index faaf63f..1f2a31c 100644
+--- a/src/_counter.h
++++ b/src/_counter.h
+@@ -24,7 +24,12 @@
+ #ifndef PCT__COUNTER_H
+ #define PCT__COUNTER_H
+
++#if defined(__sun) || defined(__sun__)
++#include <sys/inttypes.h>
++#else
+ #include <stdint.h>
++#endif
++
+ #include "Python.h"
+
+ typedef struct {
+--
+1.7.5.4
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list