Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2012 19:18:18 GMT
From:      Mamoru Sakaue <sakaue.mamoru@mwghennndo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/173772: Control of Python dependency of graphics/vigra
Message-ID:  <201211211918.qALJIIwF069685@red.freebsd.org>
Resent-Message-ID: <201211211920.qALJK0Y7031546@freefall.freebsd.org>

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

>Number:         173772
>Category:       ports
>Synopsis:       Control of Python dependency of graphics/vigra
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 21 19:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Mamoru Sakaue
>Release:        FreeBSD 8.3-RELEASE-p3 i386
>Organization:
MwGhennndo
>Environment:
System: FreeBSD Grubstake.EmpireNmw 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Mon Jun 11 23:5
2:38 UTC 2012 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

>Description:
>How-To-Repeat:
CASE 1:

# pkg_info -I python\*
# cd /usr/ports/graphics/vigra/
# make

Then the build succeeds without creating Python bindings.

CASE 2:

# pkg_info -I python\*
python27-2.7.3_3    An interpreted object-oriented programming language
# cd /usr/ports/graphics/vigra/
# make

Then the build succeeds with creating Python bindings.

CASE 3:
# pkg_info -I python\*
python27-2.7.3_3    An interpreted object-oriented programming language
python32-3.2.3_1    An interpreted object-oriented programming language
# cd /usr/ports/graphics/vigra/
# make

Then the build will fail.
This failure is also reproduced with python31-*.

CASE 4:
# pkg_info -I python\*
python32-3.2.3_1    An interpreted object-oriented programming language
# cd /usr/ports/graphics/vigra/
# make

Then the build will fail.
This failure is also reproduced with python31-*.

>Fix:
Apply the attached patch.

This adds an option configuration which controls installation of the Python bindings.

When this option is selected, Python dependency is explicitly registered to the package database and the binding modules are installed. Python2.* is installed if not yet. This choice causes conflict with python3* during build.

When this option is deselected, the binding modules are not installed even if any version of Python is installed. This is chosen as the default in order to keep the current default of package dependencies.


Patch attached with submission follows:

diff -urN /usr/ports/graphics/vigra/Makefile.orig /usr/ports/graphics/vigra/Makefile
--- /usr/ports/graphics/vigra/Makefile.orig	2012-11-17 14:58:24.000000000 +0900
+++ /usr/ports/graphics/vigra/Makefile	2012-11-21 18:42:10.000000000 +0900
@@ -11,6 +11,7 @@
 
 PORTNAME=	vigra
 PORTVERSION=	1.8.0
+PORTREVISION=	1
 CATEGORIES=	graphics
 MASTER_SITES=	http://hci.iwr.uni-heidelberg.de/vigra/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-src
@@ -27,6 +28,19 @@
 
 USE_LDCONFIG=	yes
 
+OPTIONS=	PYTHON "Python bindings" off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_PYTHON)
+CONFLICTS_BUILD=	python3*
+USE_PYTHON=	2.6-2.7
+.else
+CMAKE_ARGS+=	-DWITH_VIGRANUMPY=0
+.endif
+
+.include <bsd.port.pre.mk>
+
 # Vigra's CMakeLists.txt does not support disabling those so we hook them
 # as dependencies here unconditionally (without OPTIONS=) even though if
 # they are not present then Vigra/CMake will do without them (they are not
@@ -67,4 +81,4 @@
 # FIXME: This is ugly
 	@${RM} ${WRKSRC}/include/vigra/*.orig
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:
 
 CMakeLists.txt extracted from the tarball automatically inspects whether python is installed and builds Python binding modules if Python installed.
 
 However the current Makefile of the port does not control the Python dependency, so it cannot be registered to the package database.
 
 Moreover, if python3* is installed, the build process fails.
 



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