Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2001 04:10:16 -0800 (PST)
From:      perky@python.or.kr
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/26200: Update port: devel/py-coro
Message-ID:  <200103291210.f2TCAGh09585@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         26200
>Category:       ports
>Synopsis:       Update port: devel/py-coro
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 29 04:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Chang, Hye-Shik
>Release:        FreeBSD 4.2
>Organization:
Yonsei University
>Environment:
FreeBSD sbtm.yonsei.ac.kr 4.3-BETA FreeBSD 4.3-BETA #0: Mon Mar 19 22:23:56 KST 2001     root@sbtm.yonsei.ac.kr:/usr/src/sys/compile/AYANAMI  i386
>Description:
devel/py-coro port was so old-dated.
patched for python 2.0
>How-To-Repeat:

>Fix:
diff -ruN py-coro.orig/Makefile py-coro/Makefile
--- py-coro.orig/Makefile	Fri Sep  8 21:23:54 2000
+++ py-coro/Makefile	Thu Mar 29 21:00:19 2001
@@ -7,6 +7,7 @@
 
 PORTNAME=		coro
 PORTVERSION=		20000424
+PORTREVISION=		1
 CATEGORIES=		devel python
 MASTER_SITES=		http://www.egroups.com/files/python-coro/egroups/
 PKGNAMEPREFIX=		py-
@@ -14,9 +15,10 @@
 
 MAINTAINER=		kbyanc@posi.net
 
-BUILD_DEPENDS=		${LOCALBASE}/lib/libcoro.a:${PORTSDIR}/devel/libcoro \
-			python1.5:${PORTSDIR}/lang/python15
-RUN_DEPENDS=		python1.5:${PORTSDIR}/lang/python15
+BUILD_DEPENDS=		${LOCALBASE}/lib/libcoro.a:${PORTSDIR}/devel/libcoro
+
+PLIST_SUB+=		PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}
+USE_PYTHON=		yes
 
 CORO_MODULES=		coroutinemodule.so sendfilemodule.so
 CORO_PACKAGE=		coro corodns coromysql corourl \
@@ -26,19 +28,19 @@
 CORO_DOCS=		README coro.txt
 
 post-build:
-	@${LOCALBASE}/bin/python \
-		${LOCALBASE}/lib/python1.5/compileall.py ${WRKSRC}
+	@${PYTHON_CMD} \
+		${LOCALBASE}/lib/${PYTHON_VERSION}/compileall.py ${WRKSRC}
 
 do-install:
-	${MKDIR} ${PREFIX}/lib/python1.5/site-packages
-	${MKDIR} ${PREFIX}/lib/python1.5/site-packages/coro
+	${MKDIR} ${PYTHON_SITELIBDIR}/coro
+	${TOUCH} ${PYTHON_SITELIBDIR}/coro/__init__.py
 	${MKDIR} ${PREFIX}/share/examples/py-coro
 .for i in ${CORO_MODULES}
-	${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/lib/python1.5/site-packages
+	${INSTALL_DATA} ${WRKSRC}/${i} ${PYTHON_SITELIBDIR}
 .endfor
 .for i in ${CORO_PACKAGE}
 	${INSTALL_DATA} ${WRKSRC}/${i}.py ${WRKSRC}/$i.pyc \
-		${PREFIX}/lib/python1.5/site-packages/coro
+		${PYTHON_SITELIBDIR}/coro
 .endfor
 .for i in ${CORO_EXAMPLES}
 	${INSTALL_DATA} ${WRKSRC}/${i}.py ${WRKSRC}/$i.pyc \
diff -ruN py-coro.orig/files/patch-Makefile py-coro/files/patch-Makefile
--- py-coro.orig/files/patch-Makefile	Thu Jan  1 09:00:00 1970
+++ py-coro/files/patch-Makefile	Thu Mar 29 20:34:33 2001
@@ -0,0 +1,33 @@
+--- Makefile.orig	Mon Apr 24 18:51:16 2000
++++ Makefile	Thu Mar 29 20:32:54 2001
+@@ -1,13 +1,14 @@
++PREFIX?=	/usr/local
+ MODULES=	coroutinemodule.so sendfilemodule.so
+ OBJS=		coroutinemodule.o sendfilemodule.o
+-INCLUDES=	-I/usr/local/include/python1.5 -I/usr/local/include
++INCLUDES=	-I${LOCALBASE}/include/python2.0 -I${LOCALBASE}/include
+ # the location of the coro archive:
+-COROLIB=	/usr/local/lib/libcoro.a
+-OPTS=	-g -Wall -O6
+-#OPTS=	-g -Wall
++COROLIB=	-L${LOCALBASE}/lib -lcoro
++CFLAGS?=	-g -Wall -O6
++#CFLAGS?=	-g -Wall
+ 
+-CC=	gcc
+-LD=	ld
++CC?=	gcc
++LD?=	ld
+ RM=	rm -f
+ 
+ all: ${OBJS} ${MODULES}
+@@ -23,7 +24,7 @@
+ 	${LD} sendfilemodule.o -shared -o sendfilemodule.so
+ 
+ coroutinemodule.o: coroutinemodule.c
+-	${CC} ${INCLUDES} ${OPTS} -c coroutinemodule.c
++	${CC} ${CFLAGS} ${INCLUDES} -c coroutinemodule.c
+ 
+ sendfilemodule.o: sendfilemodule.c
+-	${CC} ${INCLUDES} ${OPTS} -c sendfilemodule.c
++	${CC} ${CFLAGS} ${INCLUDES} -c sendfilemodule.c
diff -ruN py-coro.orig/files/patch-aa py-coro/files/patch-aa
--- py-coro.orig/files/patch-aa	Fri Jul  7 22:27:22 2000
+++ py-coro/files/patch-aa	Thu Jan  1 09:00:00 1970
@@ -1,33 +0,0 @@
---- Makefile.orig	Mon Apr 24 12:51:16 2000
-+++ Makefile	Fri Jul  7 14:33:04 2000
-@@ -1,13 +1,14 @@
-+PREFIX?=	/usr/local
- MODULES=	coroutinemodule.so sendfilemodule.so
- OBJS=		coroutinemodule.o sendfilemodule.o
--INCLUDES=	-I/usr/local/include/python1.5 -I/usr/local/include
-+INCLUDES=	-I${LOCALBASE}/include/python1.5 -I${LOCALBASE}/include
- # the location of the coro archive:
--COROLIB=	/usr/local/lib/libcoro.a
--OPTS=	-g -Wall -O6
--#OPTS=	-g -Wall
-+COROLIB=	-L${LOCALBASE}/lib -lcoro
-+CFLAGS?=	-g -Wall -O6
-+#CFLAGS?=	-g -Wall
- 
--CC=	gcc
--LD=	ld
-+CC?=	gcc
-+LD?=	ld
- RM=	rm -f
- 
- all: ${OBJS} ${MODULES}
-@@ -23,7 +24,7 @@
- 	${LD} sendfilemodule.o -shared -o sendfilemodule.so
- 
- coroutinemodule.o: coroutinemodule.c
--	${CC} ${INCLUDES} ${OPTS} -c coroutinemodule.c
-+	${CC} ${CFLAGS} ${INCLUDES} -c coroutinemodule.c
- 
- sendfilemodule.o: sendfilemodule.c
--	${CC} ${INCLUDES} ${OPTS} -c sendfilemodule.c
-+	${CC} ${CFLAGS} ${INCLUDES} -c sendfilemodule.c
diff -ruN py-coro.orig/pkg-plist py-coro/pkg-plist
--- py-coro.orig/pkg-plist	Fri Jul  7 22:27:23 2000
+++ py-coro/pkg-plist	Thu Mar 29 21:00:40 2001
@@ -1,15 +1,16 @@
-lib/python1.5/site-packages/coro/coro.py
-lib/python1.5/site-packages/coro/coro.pyc
-lib/python1.5/site-packages/coro/corodns.py
-lib/python1.5/site-packages/coro/corodns.pyc
-lib/python1.5/site-packages/coro/coromysql.py
-lib/python1.5/site-packages/coro/coromysql.pyc
-lib/python1.5/site-packages/coro/corourl.py
-lib/python1.5/site-packages/coro/corourl.pyc
-lib/python1.5/site-packages/coro/coutil.py
-lib/python1.5/site-packages/coro/coutil.pyc
-lib/python1.5/site-packages/coroutinemodule.so
-lib/python1.5/site-packages/sendfilemodule.so
+%%PYTHON_SITELIBDIR%%/coro/__init__.py
+%%PYTHON_SITELIBDIR%%/coro/coro.py
+%%PYTHON_SITELIBDIR%%/coro/coro.pyc
+%%PYTHON_SITELIBDIR%%/coro/corodns.py
+%%PYTHON_SITELIBDIR%%/coro/corodns.pyc
+%%PYTHON_SITELIBDIR%%/coro/coromysql.py
+%%PYTHON_SITELIBDIR%%/coro/coromysql.pyc
+%%PYTHON_SITELIBDIR%%/coro/corourl.py
+%%PYTHON_SITELIBDIR%%/coro/corourl.pyc
+%%PYTHON_SITELIBDIR%%/coro/coutil.py
+%%PYTHON_SITELIBDIR%%/coro/coutil.pyc
+%%PYTHON_SITELIBDIR%%/coroutinemodule.so
+%%PYTHON_SITELIBDIR%%/sendfilemodule.so
 share/doc/py-coro/README
 share/doc/py-coro/coro.txt
 share/examples/py-coro/backdoor.py
@@ -26,6 +27,6 @@
 share/examples/py-coro/newpotato.pyc
 share/examples/py-coro/potato.py
 share/examples/py-coro/potato.pyc
-@dirrm lib/python1.5/site-packages/coro
+@dirrm %%PYTHON_SITELIBDIR%%/coro
 @dirrm share/examples/py-coro
 @dirrm share/doc/py-coro


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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103291210.f2TCAGh09585>