Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2013 07:56:15 +0000 (UTC)
From:      Jason Helfman <jgh@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r338260 - in head/devel: . py-libvirt py-libvirt/files
Message-ID:  <201312310756.rBV7uGKs074318@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jgh
Date: Tue Dec 31 07:56:15 2013
New Revision: 338260
URL: http://svnweb.freebsd.org/changeset/ports/338260

Log:
  Add py-libvirt 1.2.0, python bindings for Libvirt virtualization API.
  
  Many thanks to kwm@ for initial port work :)
  And to novel@ for testing that it actually works!

Added:
  head/devel/py-libvirt/
  head/devel/py-libvirt/Makefile   (contents, props changed)
  head/devel/py-libvirt/distinfo   (contents, props changed)
  head/devel/py-libvirt/files/
  head/devel/py-libvirt/files/patch-libvirt-utils.h   (contents, props changed)
  head/devel/py-libvirt/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Tue Dec 31 07:48:47 2013	(r338259)
+++ head/devel/Makefile	Tue Dec 31 07:56:15 2013	(r338260)
@@ -3641,6 +3641,7 @@
     SUBDIR += py-levenshtein
     SUBDIR += py-liblarch
     SUBDIR += py-libplist
+    SUBDIR += py-libvirt
     SUBDIR += py-ll-core
     SUBDIR += py-lock_file
     SUBDIR += py-lockfile

Added: head/devel/py-libvirt/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libvirt/Makefile	Tue Dec 31 07:56:15 2013	(r338260)
@@ -0,0 +1,38 @@
+# Created by: Jason Helfman <jgh@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	libvirt
+PORTVERSION=	1.2.0
+CATEGORIES=	devel
+MASTER_SITES=	http://libvirt.org/sources/python/ \
+		ftp://libvirt.org/libvirt/python/
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	${PORTNAME}-python-${PORTVERSION}
+
+MAINTAINER=	jgh@FreeBSD.org
+COMMENT=	Python bindings for Libvirt virtualization API
+
+LICENSE=	GPLv2
+
+LIB_DEPENDS=	libvirt.so:${PORTSDIR}/devel/libvirt
+
+USES=	pkgconfig shebangfix
+SHEBANG_LANG=	python
+SHEBANG_FILES=	generator.py sanitytest.py setup.py
+
+USE_PYTHON_BUILD=	yes
+USE_PYTHON_RUN=		yes
+USE_PYDISTUTILS=	yes
+PYDISTUTILS_NOEGGINFO=  yes
+PYDISTUTILS_AUTOPLIST=	yes
+
+post-patch-script:
+	@${REINPLACE_CMD} -e 's|"python"|"${PYTHON_CMD}"|g' \
+		${WRKSRC}/setup.py
+
+post-install:
+.for lib in libvirtmod libvirtmod_qemu libvirtmod_lxc
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/site-packages/${lib}.so
+.endfor
+
+.include <bsd.port.mk>

Added: head/devel/py-libvirt/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libvirt/distinfo	Tue Dec 31 07:56:15 2013	(r338260)
@@ -0,0 +1,2 @@
+SHA256 (libvirt-python-1.2.0.tar.gz) = 2fe7e341cb1b35cff130b7a04d0d58f3607094e63cbca689bc16c7b47da0f52b
+SIZE (libvirt-python-1.2.0.tar.gz) = 140757

Added: head/devel/py-libvirt/files/patch-libvirt-utils.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libvirt/files/patch-libvirt-utils.h	Tue Dec 31 07:56:15 2013	(r338260)
@@ -0,0 +1,18 @@
+--- libvirt-utils.h.orig	2013-12-22 12:53:26.000000000 +0100
++++ libvirt-utils.h	2013-12-22 13:00:31.000000000 +0100
+@@ -54,6 +54,15 @@
+     ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+ 
+ 
++#ifndef __GNUC_PREREQ
++# if defined  __GNUC__ && defined __GNUC_MINOR__
++#  define __GNUC_PREREQ(maj, min) \
++	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++# else
++#  define __GNUC_PREREQ(maj, min) 0
++# endif
++#endif /* __GNUC_PREREQ */
++
+ /* The __attribute__((__warn_unused_result__)) feature
+    is available in gcc versions 3.4 and newer,
+    while the typeof feature has been available since 2.7 at least.  */

Added: head/devel/py-libvirt/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libvirt/pkg-descr	Tue Dec 31 07:56:15 2013	(r338260)
@@ -0,0 +1,3 @@
+Python bindings for Libvirt virtualization API
+
+WWW: http://libvirt.org/python.html



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