[Midnightbsd-cvs] mports [18137] trunk/graphics: add python 3 cairo

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Mar 14 10:49:22 EDT 2015


Revision: 18137
          http://svnweb.midnightbsd.org/mports/?rev=18137
Author:   laffer1
Date:     2015-03-14 10:49:22 -0400 (Sat, 14 Mar 2015)
Log Message:
-----------
add python 3 cairo

Modified Paths:
--------------
    trunk/graphics/Makefile

Added Paths:
-----------
    trunk/graphics/py3-cairo/
    trunk/graphics/py3-cairo/Makefile
    trunk/graphics/py3-cairo/distinfo
    trunk/graphics/py3-cairo/files/
    trunk/graphics/py3-cairo/files/patch-wscript
    trunk/graphics/py3-cairo/files/pycairo-1.10.0-waf-py3_4.patch
    trunk/graphics/py3-cairo/pkg-descr
    trunk/graphics/py3-cairo/pkg-plist

Modified: trunk/graphics/Makefile
===================================================================
--- trunk/graphics/Makefile	2015-03-14 14:13:02 UTC (rev 18136)
+++ trunk/graphics/Makefile	2015-03-14 14:49:22 UTC (rev 18137)
@@ -138,6 +138,7 @@
 SUBDIR += py-cairo
 SUBDIR += py-clutter
 SUBDIR += py-clutter-gtk
+SUBDIR += py3-cairo
 SUBDIR += qt4-iconengines
 SUBDIR += qt4-imageformats
 SUBDIR += qt4-pixeltool

Added: trunk/graphics/py3-cairo/Makefile
===================================================================
--- trunk/graphics/py3-cairo/Makefile	                        (rev 0)
+++ trunk/graphics/py3-cairo/Makefile	2015-03-14 14:49:22 UTC (rev 18137)
@@ -0,0 +1,54 @@
+# $MidnightBSD$
+
+PORTNAME=	cairo
+PORTVERSION=	1.10.0
+CATEGORIES=	graphics python
+MASTER_SITES=	http://cairographics.org/releases/
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	py${PORTNAME}-${PORTVERSION}
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Python 3 bindings for Cairo
+
+LICENSE=	gpl3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+USES=		pkgconfig python:3 shebangfix tar:bzip2
+USE_GNOME=	cairo
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+python_OLD_CMD?=	/usr/bin/env python
+python_CMD?=		${LOCALBASE}/bin/python${PYTHON_VER}
+SHEBANG_FILES=		examples/*.py examples/*/*.py test/*.py
+
+PLIST_SUB+=	PYTVER=${PYTHON_VER:S/.//}
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \
+		${WRKSRC}/test/examples_test.py
+
+do-configure:
+# Run waf configure twice, once to extract waflib and patch and then actual configure
+	@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
+		./waf configure || :
+	@cd ${WRKSRC}/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/ && \
+		${PATCH} -p1 < ${FILESDIR}/pycairo-1.10.0-waf-py3_4.patch
+	@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
+		./waf configure
+
+do-build:
+	@cd ${WRKSRC} && ${PYTHON_CMD} ./waf
+
+do-install:
+	@cd ${WRKSRC} && ${PYTHON_CMD} ./waf install --destdir=${STAGEDIR}
+
+post-install:
+	@${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/__init__.py[co]
+	@cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
+		-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
+	@cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
+		-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/_cairo.so
+
+.include <bsd.port.mk>


Property changes on: trunk/graphics/py3-cairo/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/py3-cairo/distinfo
===================================================================
--- trunk/graphics/py3-cairo/distinfo	                        (rev 0)
+++ trunk/graphics/py3-cairo/distinfo	2015-03-14 14:49:22 UTC (rev 18137)
@@ -0,0 +1,2 @@
+SHA256 (pycairo-1.10.0.tar.bz2) = 9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be
+SIZE (pycairo-1.10.0.tar.bz2) = 246556


Property changes on: trunk/graphics/py3-cairo/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/py3-cairo/files/patch-wscript
===================================================================
--- trunk/graphics/py3-cairo/files/patch-wscript	                        (rev 0)
+++ trunk/graphics/py3-cairo/files/patch-wscript	2015-03-14 14:49:22 UTC (rev 18137)
@@ -0,0 +1,11 @@
+--- wscript.orig	2013-09-30 23:39:53.000000000 +0200
++++ wscript	2013-09-30 23:40:40.000000000 +0200
+@@ -61,7 +61,7 @@
+       'prefix'    : ctx.env['PREFIX'],
+       'includedir': os.path.join(ctx.env['PREFIX'], 'include'),
+       },
+-    install_path = os.path.join(ctx.env['LIBDIR'], 'pkgconfig'),
++    install_path = os.path.join(ctx.env['PREFIX'], 'libdata', 'pkgconfig'),
+     )
+ 
+ 


Property changes on: trunk/graphics/py3-cairo/files/patch-wscript
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/py3-cairo/files/pycairo-1.10.0-waf-py3_4.patch
===================================================================
--- trunk/graphics/py3-cairo/files/pycairo-1.10.0-waf-py3_4.patch	                        (rev 0)
+++ trunk/graphics/py3-cairo/files/pycairo-1.10.0-waf-py3_4.patch	2015-03-14 14:49:22 UTC (rev 18137)
@@ -0,0 +1,11 @@
+--- a/waflib/Tools/python.py
++++ b/waflib/Tools/python.py
+@@ -169,7 +169,7 @@
+ 		conf.find_program('python-config-%s'%num,var='PYTHON_CONFIG',mandatory=False)
+ 	includes=[]
+ 	if conf.env.PYTHON_CONFIG:
+-		for incstr in conf.cmd_and_log(conf.env.PYTHON+[conf.env.PYTHON_CONFIG,'--includes']).strip().split():
++		for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG,'--includes']).strip().split():
+ 			if(incstr.startswith('-I')or incstr.startswith('/I')):
+ 				incstr=incstr[2:]
+ 			if incstr not in includes:


Property changes on: trunk/graphics/py3-cairo/files/pycairo-1.10.0-waf-py3_4.patch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/py3-cairo/pkg-descr
===================================================================
--- trunk/graphics/py3-cairo/pkg-descr	                        (rev 0)
+++ trunk/graphics/py3-cairo/pkg-descr	2015-03-14 14:49:22 UTC (rev 18137)
@@ -0,0 +1,3 @@
+Python 3 bindings for Cairo.
+
+WWW: http://cairographics.org/


Property changes on: trunk/graphics/py3-cairo/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/py3-cairo/pkg-plist
===================================================================
--- trunk/graphics/py3-cairo/pkg-plist	                        (rev 0)
+++ trunk/graphics/py3-cairo/pkg-plist	2015-03-14 14:49:22 UTC (rev 18137)
@@ -0,0 +1,6 @@
+include/pycairo/py3cairo.h
+%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTVER%%.pyc
+%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTVER%%.pyo
+%%PYTHON_SITELIBDIR%%/cairo/__init__.py
+%%PYTHON_SITELIBDIR%%/cairo/_cairo.so
+libdata/pkgconfig/py3cairo.pc


Property changes on: trunk/graphics/py3-cairo/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list