Update cairo python bindings to 1.14.1.
* Update MASTER_SITE and WWW to point the new home * Build from the same distfile * Use python distutils to build the port instead of waf * Drop stale MCom $Id * Add license Obtained from: gnome devel repo
This commit is contained in:
parent
20ea428aa7
commit
2d19dba0d0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=451329
@ -1,28 +1,30 @@
|
||||
# Created by: Michael Johnson <ahze@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
# $MCom: ports/graphics/py-cairo/Makefile,v 1.28 2010/11/15 14:12:13 kwm Exp $
|
||||
|
||||
PORTNAME= cairo
|
||||
PORTVERSION= 1.10.0
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 1.14.1
|
||||
CATEGORIES= graphics python
|
||||
MASTER_SITES= http://cairographics.org/releases/
|
||||
MASTER_SITES= https://github.com/pygobject/pycairo/releases/download/v${PORTVERSION}/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= py2${PORTNAME}-${PORTVERSION}
|
||||
DISTNAME= py${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= gnome@FreeBSD.org
|
||||
COMMENT= Python 2 bindings for Cairo
|
||||
|
||||
USES= pkgconfig python:2 shebangfix tar:bzip2 waf
|
||||
LICENSE= LGPL21 MPL11
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE_LGPL21= ${WRKSRC}/COPYING-LGPL-2.1
|
||||
LICENSE_FILE_MPL11= ${WRKSRC}/COPYING-MPL-1.1
|
||||
|
||||
PORTSCOUT= limitw:1,even
|
||||
|
||||
USES= gnome pkgconfig python:2
|
||||
USE_PYTHON= distutils
|
||||
USE_GNOME= cairo
|
||||
|
||||
SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py
|
||||
PLIST_SUB= PORTVER=${PORTVERSION}
|
||||
|
||||
post-install:
|
||||
@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}${PYTHONPREFIX_SITELIBDIR}/cairo/_cairo.so
|
||||
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/_cairo.so
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (py2cairo-1.10.0.tar.bz2) = d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431
|
||||
SIZE (py2cairo-1.10.0.tar.bz2) = 402070
|
||||
TIMESTAMP = 1506343145
|
||||
SHA256 (pycairo-1.14.1.tar.gz) = 0d13a0a6eeaf0c357db04392943eb9b25767445608d31dde1307f003f68c5754
|
||||
SIZE (pycairo-1.14.1.tar.gz) = 154394
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- test/examples_test.py.orig 2013-09-30 22:50:22.000000000 +0200
|
||||
+++ test/examples_test.py 2013-09-30 22:50:39.000000000 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
examples/cairo_snippets/snippets/
|
||||
'''
|
||||
def doSnippets(name):
|
||||
- retcode = subprocess.call('python %s -s' % name, shell=True)
|
||||
+ retcode = subprocess.call('python2 %s -s' % name, shell=True)
|
||||
assert retcode == 0, 'Error: retcode == {0}'.format(retcode)
|
||||
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), '..', 'examples',
|
@ -1,11 +0,0 @@
|
||||
--- 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'),
|
||||
)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Python 2 bindings for Cairo.
|
||||
|
||||
WWW: http://cairographics.org/
|
||||
WWW: https://github.com/pygobject/pycairo
|
||||
|
@ -1,6 +1,10 @@
|
||||
include/pycairo/pycairo.h
|
||||
%%PYTHON_SITELIBDIR%%/cairo/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/cairo/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/cairo/__init__.pyo
|
||||
%%PYTHON_SITELIBDIR%%/cairo/__init__.%%PYTHON_PYOEXTENSION%%
|
||||
%%PYTHON_SITELIBDIR%%/cairo/_cairo.so
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/PKG-INFO
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/SOURCES.txt
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/dependency_links.txt
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/top_level.txt
|
||||
libdata/pkgconfig/pycairo.pc
|
||||
|
@ -1,42 +1,30 @@
|
||||
# Created by: Michael Johnson <ahze@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
# $MCom: ports/graphics/py-cairo/Makefile,v 1.28 2010/11/15 14:12:13 kwm Exp $
|
||||
|
||||
PORTNAME= cairo
|
||||
PORTVERSION= 1.10.0
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 1.14.1
|
||||
CATEGORIES= graphics python
|
||||
MASTER_SITES= http://cairographics.org/releases/
|
||||
MASTER_SITES= https://github.com/pygobject/pycairo/releases/download/v${PORTVERSION}/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= py${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= gnome@FreeBSD.org
|
||||
COMMENT= Python 3 bindings for Cairo
|
||||
|
||||
USES= pkgconfig python:3 shebangfix tar:bzip2 waf
|
||||
LICENSE= LGPL21 MPL11
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE_LGPL21= ${WRKSRC}/COPYING-LGPL-2.1
|
||||
LICENSE_FILE_MPL11= ${WRKSRC}/COPYING-MPL-1.1
|
||||
|
||||
PORTSCOUT= limitw:1,even
|
||||
|
||||
USES= gnome pkgconfig python:3
|
||||
USE_PYTHON= distutils
|
||||
USE_GNOME= cairo
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
|
||||
SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \
|
||||
${WRKSRC}/test/examples_test.py
|
||||
|
||||
pre-configure:
|
||||
# Run waf configure twice, once to extract waflib and patch and then actual configure
|
||||
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} || :
|
||||
@cd ${WRKSRC}/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/ && \
|
||||
${PATCH} -p1 < ${FILESDIR}/pycairo-1.10.0-waf-py3_4.patch && \
|
||||
${PATCH} -p1 < ${FILESDIR}/pycairo-1.10.0-waf-py3_5.patch
|
||||
PLIST_SUB= PORTVER=${PORTVERSION}
|
||||
|
||||
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>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (pycairo-1.10.0.tar.bz2) = 9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be
|
||||
SIZE (pycairo-1.10.0.tar.bz2) = 246556
|
||||
TIMESTAMP = 1506344417
|
||||
SHA256 (pycairo-1.14.1.tar.gz) = 0d13a0a6eeaf0c357db04392943eb9b25767445608d31dde1307f003f68c5754
|
||||
SIZE (pycairo-1.14.1.tar.gz) = 154394
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- 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'),
|
||||
)
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- 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:
|
@ -1,10 +0,0 @@
|
||||
--- a/waflib/Build.py
|
||||
+++ b/waflib/Build.py
|
||||
@@ -151,6 +151,7 @@ class BuildContext(Context.Context):
|
||||
f.close()
|
||||
self.init_dirs()
|
||||
def store(self):
|
||||
+ return
|
||||
data={}
|
||||
for x in SAVED_ATTRS:
|
||||
data[x]=getattr(self,x)
|
@ -1,3 +1,3 @@
|
||||
Python 3 bindings for Cairo.
|
||||
|
||||
WWW: http://cairographics.org/
|
||||
WWW: https://github.com/pygobject/pycairo
|
||||
|
@ -3,4 +3,8 @@ include/pycairo/py3cairo.h
|
||||
%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%%
|
||||
%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
|
||||
%%PYTHON_SITELIBDIR%%/cairo/_cairo.so
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/PKG-INFO
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/SOURCES.txt
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/dependency_links.txt
|
||||
%%PYTHON_SITELIBDIR%%/pycairo-%%PORTVER%%-py%%PYTHON_VER%%.egg-info/top_level.txt
|
||||
libdata/pkgconfig/py3cairo.pc
|
||||
|
Loading…
Reference in New Issue
Block a user