Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2013 21:03:23 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r328876 - in head/graphics/py-cairo: . files
Message-ID:  <201309302103.r8UL3NHK034445@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Mon Sep 30 21:03:23 2013
New Revision: 328876
URL: http://svnweb.freebsd.org/changeset/ports/328876

Log:
  Use new USE_PYTHON=2 , use shebangfix to change python -> python2.
  Remove part of post-patch because pathfix will do it for us.
  Stageify.

Added:
  head/graphics/py-cairo/files/
  head/graphics/py-cairo/files/patch-py-compile   (contents, props changed)
  head/graphics/py-cairo/files/patch-test_examples-test.py   (contents, props changed)
Modified:
  head/graphics/py-cairo/Makefile

Modified: head/graphics/py-cairo/Makefile
==============================================================================
--- head/graphics/py-cairo/Makefile	Mon Sep 30 21:02:13 2013	(r328875)
+++ head/graphics/py-cairo/Makefile	Mon Sep 30 21:03:23 2013	(r328876)
@@ -11,21 +11,22 @@ PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTNAME=	py2${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	gnome@FreeBSD.org
-COMMENT=	Python bindings for Cairo
-
-LIB_DEPENDS=	cairo.2:${PORTSDIR}/graphics/cairo
+COMMENT=	Python 2 bindings for Cairo
 
 WRKSRC=		${WRKDIR}/py${PORTNAME}-${PORTVERSION}
-USE_PYTHON=	2.6-2.7
-USES=	pathfix gmake pkgconfig
+USE_PYTHON=	2
+USES=		gmake pathfix pkgconfig shebangfix
+USE_GNOME=	cairo
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-NO_STAGE=	yes
+python_OLD_CMD?=	/usr/bin/env python
+python_CMD?=		${LOCALBASE}/bin/python2
+SHEBANG_FILES=		examples/*.py examples/*/*.py setup.py test/*.py
+
 post-patch:
-	@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
-		s|SUBDIRS = cairo examples test|SUBDIRS = cairo examples|' \
+	@${REINPLACE_CMD} -e 's|SUBDIRS = cairo examples test|SUBDIRS = cairo examples|g' \
 		${WRKSRC}/Makefile.in
 
 .include <bsd.port.mk>

Added: head/graphics/py-cairo/files/patch-py-compile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-cairo/files/patch-py-compile	Mon Sep 30 21:03:23 2013	(r328876)
@@ -0,0 +1,11 @@
+--- py-compile.orig	2013-09-30 22:50:15.000000000 +0200
++++ py-compile	2013-09-30 22:50:54.000000000 +0200
+@@ -29,7 +29,7 @@
+ # <automake-patches@gnu.org>.
+ 
+ if [ -z "$PYTHON" ]; then
+-  PYTHON=python
++  PYTHON=python2
+ fi
+ 
+ basedir=

Added: head/graphics/py-cairo/files/patch-test_examples-test.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-cairo/files/patch-test_examples-test.py	Mon Sep 30 21:03:23 2013	(r328876)
@@ -0,0 +1,11 @@
+--- 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',



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