ports/136199: [PATCH] databases/py-gdbm: Fix building with python3*
Li-Wen Hsu
lwhsu at FreeBSD.org
Wed Jul 1 00:30:03 UTC 2009
>Number: 136199
>Category: ports
>Synopsis: [PATCH] databases/py-gdbm: Fix building with python3*
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jul 01 00:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Li-Wen Hsu
>Release: FreeBSD 7.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD lucky7 7.2-STABLE FreeBSD 7.2-STABLE #0: Thu Jun 11 00:29:36 CST 2009
>Description:
- Fix building with python3*
- Use checksum file under lang/python${PYTHON_SUFFIX}/,
for removal lang/python/distinfo
Added file(s):
- files/setup3.py
Port maintainer (perky at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- py26-gdbm-2.6.2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/py-gdbm/Makefile,v
retrieving revision 1.13
diff -u -u -r1.13 Makefile
--- Makefile 30 Jul 2007 09:41:05 -0000 1.13
+++ Makefile 30 Jun 2009 21:53:12 -0000
@@ -24,9 +24,15 @@
USE_PYDISTUTILS=yes
PYDISTUTILS_PKGVERSION= 0.0.0
WRKSRC= ${PYTHON_WRKSRC}/Modules
-MD5_FILE= ${PORTSDIR}/lang/python/distinfo
+MD5_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo
+
+.include <bsd.port.pre.mk>
post-extract:
+.if ${PYTHON_REL} < 300
@${CP} ${FILESDIR}/setup.py ${WRKSRC}
+.else
+ @${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: files/setup3.py
===================================================================
RCS file: files/setup3.py
diff -N files/setup3.py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/setup3.py 30 Jun 2009 21:53:12 -0000
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# To use:
+# python setup.py install
+#
+
+__version__ = "$FreeBSD$"
+
+try:
+ import distutils
+ from distutils import sysconfig
+ from distutils.command.install import install
+ from distutils.core import setup, Extension
+except:
+ raise SystemExit("Distutils problem")
+
+prefix = sysconfig.PREFIX
+inc_dirs = [prefix + "/include"]
+lib_dirs = [prefix + "/lib"]
+libs = ["gdbm"]
+
+setup(name = "gdbm",
+ description = "GDBM Extension to Python",
+
+ ext_modules = [Extension('gdbm', ['_gdbmmodule.c'],
+ include_dirs = inc_dirs,
+ libraries = libs,
+ library_dirs = lib_dirs)]
+ )
--- py26-gdbm-2.6.2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list