ports/134109: [PATCH] multimedia/devede: Fix Python Psyco support

Mario Sergio Fujikawa Ferreira lioux at FreeBSD.org
Thu Apr 30 11:30:02 UTC 2009


>Number:         134109
>Category:       ports
>Synopsis:       [PATCH] multimedia/devede: Fix Python Psyco support
>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:   Thu Apr 30 11:30:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Mario Sergio Fujikawa Ferreira
>Release:        FreeBSD 7.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD exxodus.fedaykin.here 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #79: Sun Apr 19 04:18:52 BRT 2009
>Description:
- Fix Python Psyco support
 - Only enable under ARCH == i386 since it does not work elsewhere
 - Import the Psyco module on the main devede python script in order
   to use Psyco
- Bump PORTREVISION since the previous version had broken support

Added file(s):
- files/extra-psyco-patch-devede.py

  Documentation on Psyco usage can be found at

http://psyco.sourceforge.net/psycoguide/node8.html

  Please, make sure that any scripts not directly imported by
devede.py have their own psyco import lines.

Port maintainer (lme at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- devede-3.12.c_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/multimedia/devede/Makefile,v
retrieving revision 1.8
diff -d -u -u -r1.8 Makefile
--- Makefile	6 Apr 2009 17:13:38 -0000	1.8
+++ Makefile	30 Apr 2009 11:25:30 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	devede
 DISTVERSION=	3.12c
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	http://www.rastersoft.com/descargas/ \
 		http://www.bsd-geek.de/FreeBSD/distfiles/
@@ -24,13 +25,21 @@
 USE_CDRTOOLS=	yes
 NO_BUILD=	yes
 
-OPTIONS=	PSYCO "Use psyco to compile the python scripts" Off \
+OPTIONS=	# start blank to enable it through the pre.mk fence
 
 # Strip last character not present in distribution.
 WRKSRC=		${WRKDIR}/${DISTNAME:C/b//}
 
 .include <bsd.port.pre.mk>
 
+.if ${ARCH} == "i386"
+OPTIONS+=	PSYCO "Enable Python Psyco optimization support" off
+.else
+.undef WITH_PSYCO
+
+WITHOUT_PSYCO=	yes
+.endif
+
 .if defined(WITHOUT_NLS)
 PLIST_SUB+=	NLS="@comment "
 .else
@@ -54,6 +63,7 @@
 
 .if defined(WITH_PSYCO)
 RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/psyco/_psyco.so:${PORTSDIR}/devel/py-psyco
+EXTRA_PATCHES+=	${FILESDIR}/extra-psyco-patch-devede.py
 .endif
 
 do-install:
Index: files/extra-psyco-patch-devede.py
===================================================================
RCS file: files/extra-psyco-patch-devede.py
diff -N files/extra-psyco-patch-devede.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/extra-psyco-patch-devede.py	30 Apr 2009 11:25:30 -0000
@@ -0,0 +1,16 @@
+--- ./devede.py.orig	2009-04-30 08:17:34.000000000 -0300
++++ ./devede.py	2009-04-30 08:18:03.000000000 -0300
+@@ -19,6 +19,13 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ 
++try:
++  import psyco
++  import re
++  psyco.cannotcompile(re.compile)
++  psyco.profile()
++except ImportError:
++  pass
+ 
+ import sys
+ import os
--- devede-3.12.c_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list