Subject: Re: m2 crypto for pyton24
To: Derrick Lobo <derrick@givex.com>
From: Marc Recht <recht@netbsd.org>
List: tech-pkg
Date: 12/25/2005 11:17:12
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-2-432326338
Content-Type: multipart/mixed; boundary=Apple-Mail-1-432326222


--Apple-Mail-1-432326222
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

> python 23 has security/py-m2crypto... where do I get it in  
> python24.....

Please try the attached patch. It updates m2crypto to 0.13.1 and  
builds with Python 2.4.

cheers,
marc

--Apple-Mail-1-432326222
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="m2ctypto.diff"
Content-Disposition: attachment;
	filename=m2ctypto.diff

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/py-m2crypto/Makefile,v
retrieving revision 1.13
diff -u -u -r1.13 Makefile
--- Makefile	5 Dec 2005 20:50:58 -0000	1.13
+++ Makefile	25 Dec 2005 10:14:37 -0000
@@ -1,23 +1,25 @@
 # $NetBSD: Makefile,v 1.13 2005/12/05 20:50:58 rillig Exp $
 #
 
-DISTNAME=		m2crypto-0.12
-PKGNAME=		${PYPKGPREFIX}-m2crypto-0.12
-PKGREVISION=		2
+DISTNAME=		m2crypto-0.13
+PKGNAME=		${PYPKGPREFIX}-${DISTNAME}.1
 CATEGORIES=		security python
 MASTER_SITES=		http://sandbox.rulemaker.net/ngps/Dist/
 EXTRACT_SUFX=		.zip
 
+PATCH_SITES=		${MASTER_SITES}
+PATCHFILES=		0.13p1.patch
+
 MAINTAINER=		tech-pkg@NetBSD.org
 HOMEPAGE=		http://sandbox.rulemaker.net/ngps/m2/
 COMMENT=		Crypto and SSL toolkit for Python
 
 PYDISTUTILSPKG=			yes
-PYTHON_VERSIONS_ACCEPTED=	23 22 21
+PYTHON_VERSIONS_ACCEPTED=	24 23 22 21
 
 BUILDLINK_DEPENDS.openssl+=	openssl>=0.9.7b
 
 .include "../../lang/python/extension.mk"
-.include "../../devel/swig-build/buildlink3.mk"
+.include "../../devel/swig13/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/security/py-m2crypto/PLIST,v
retrieving revision 1.2
diff -u -u -r1.2 PLIST
--- PLIST	14 Sep 2003 16:43:55 -0000	1.2
+++ PLIST	25 Dec 2005 10:14:37 -0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2003/09/14 16:43:55 recht Exp $
+@comment $NetBSD$
 ${PYSITELIB}/M2Crypto/ASN1.py
 ${PYSITELIB}/M2Crypto/ASN1.pyc
 ${PYSITELIB}/M2Crypto/ASN1.pyo
@@ -87,6 +87,9 @@
 ${PYSITELIB}/M2Crypto/__init__.pyc
 ${PYSITELIB}/M2Crypto/__init__.pyo
 ${PYSITELIB}/M2Crypto/__m2crypto.so
+${PYSITELIB}/M2Crypto/_version.py
+${PYSITELIB}/M2Crypto/_version.pyc
+${PYSITELIB}/M2Crypto/_version.pyo
 ${PYSITELIB}/M2Crypto/callback.py
 ${PYSITELIB}/M2Crypto/callback.pyc
 ${PYSITELIB}/M2Crypto/callback.pyo
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/security/py-m2crypto/distinfo,v
retrieving revision 1.3
diff -u -u -r1.3 distinfo
--- distinfo	24 Feb 2005 13:10:12 -0000	1.3
+++ distinfo	25 Dec 2005 10:14:37 -0000
@@ -1,5 +1,9 @@
 $NetBSD: distinfo,v 1.3 2005/02/24 13:10:12 agc Exp $
 
-SHA1 (m2crypto-0.12.zip) = 33755f36d3d43d4c89281fcc57571eb99e275a3d
-RMD160 (m2crypto-0.12.zip) = c005e8b7e77651bbeb7d2df9267d0b2940ace0fb
-Size (m2crypto-0.12.zip) = 397229 bytes
+SHA1 (m2crypto-0.13.zip) = 53b722f6ca9a3661c42c18360b158f3e7ac5b5c2
+RMD160 (m2crypto-0.13.zip) = b2477dff6f49a80ab5508f18837009b4a634a0df
+Size (m2crypto-0.13.zip) = 410759 bytes
+SHA1 (0.13p1.patch) = e3a097459626f7f016d9f1e118776fa7c97d6328
+RMD160 (0.13p1.patch) = 3ed0aacb7f2d09208e9a6d70a69fbb96fe9c3ad0
+Size (0.13p1.patch) = 1645 bytes
+SHA1 (patch-aa) = 264579650002f184148ef6b2126e2a3d2ae846ae
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-aa	25 Dec 2005 10:14:37 -0000
@@ -0,0 +1,61 @@
+$NetBSD$
+
+--- setup.py.orig	Sun Mar 28 08:06:59 2004
++++ setup.py	Fri Mar 18 22:44:10 2005
+@@ -12,56 +12,6 @@
+ from distutils.core import setup, Extension
+ from distutils.command import build_ext
+ 
+-# This copy of swig_sources is from Python 2.2.
+-
+-def swig_sources (self, sources):
+-
+-    """Walk the list of source files in 'sources', looking for SWIG
+-    interface (.i) files.  Run SWIG on all that are found, and
+-    return a modified 'sources' list with SWIG source files replaced
+-    by the generated C (or C++) files.
+-    """
+-
+-    new_sources = []
+-    swig_sources = []
+-    swig_targets = {}
+-
+-    # XXX this drops generated C/C++ files into the source tree, which
+-    # is fine for developers who want to distribute the generated
+-    # source -- but there should be an option to put SWIG output in
+-    # the temp dir.
+-
+-    if self.swig_cpp:
+-        target_ext = '.cpp'
+-    else:
+-        target_ext = '.c'
+-
+-    for source in sources:
+-        (base, ext) = os.path.splitext(source)
+-        if ext == ".i":             # SWIG interface file
+-            new_sources.append(base + target_ext)
+-            swig_sources.append(source)
+-            swig_targets[source] = new_sources[-1]
+-        else:
+-            new_sources.append(source)
+-
+-    if not swig_sources:
+-        return new_sources
+-
+-    swig = self.find_swig()
+-    swig_cmd = [swig, "-python", "-ISWIG"]
+-    if self.swig_cpp:
+-        swig_cmd.append("-c++")
+-
+-    for source in swig_sources:
+-        target = swig_targets[source]
+-        self.announce("swigging %s to %s" % (source, target))
+-        self.spawn(swig_cmd + ["-o", target, source])
+-
+-    return new_sources
+-
+-build_ext.build_ext.swig_sources = swig_sources
+-
+ my_inc = os.path.join(os.getcwd(), 'SWIG')
+ 
+ if os.name == 'nt':

--Apple-Mail-1-432326222--

--Apple-Mail-2-432326338
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: Signierter Teil der Nachricht
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDrnGv7YQCetAaG3MRAnj6AJkBB4xfZuthl6fR8vHJCCefS7JY7QCghuo2
bf9qvw8AbONpjcnM1Qv0XGw=
=3khw
-----END PGP SIGNATURE-----

--Apple-Mail-2-432326338--