From bminard@flatfoot.ca  Sat Apr 30 15:25:02 2005
Return-Path: <bminard@flatfoot.ca>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 20E9216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 15:25:02 +0000 (GMT)
Received: from flatfoot.ca (flatfoot.ca [209.161.255.211])
	by mx1.FreeBSD.org (Postfix) with SMTP id 6CD1643D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 15:25:01 +0000 (GMT)
	(envelope-from bminard@flatfoot.ca)
Received: from spud.flatfoot.ca (spud.flatfoot.ca [172.16.1.2])
	by flatfoot.ca (8.12.11/8.12.11) with ESMTP id j3UFO1Bu040241
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 11:24:01 -0400 (EDT)
	(envelope-from bminard@flatfoot.ca)
Received: from yop.flatfoot.ca (yop.flatfoot.ca [172.16.1.6])
	by spud.flatfoot.ca (8.13.3/8.13.3) with ESMTP id j3UFO07E019959
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 11:24:00 -0400 (EDT)
	(envelope-from bminard@flatfoot.ca)
Received: from yop.flatfoot.ca (localhost [127.0.0.1])
	by yop.flatfoot.ca (8.13.3/8.13.3) with ESMTP id j3UFNvNt062145
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Apr 2005 11:23:57 -0400 (EDT)
	(envelope-from bminard@yop.flatfoot.ca)
Received: (from bminard@localhost)
	by yop.flatfoot.ca (8.13.3/8.13.3/Submit) id j3UFNv34062144;
	Sat, 30 Apr 2005 11:23:57 -0400 (EDT)
	(envelope-from bminard)
Message-Id: <200504301523.j3UFNv34062144@yop.flatfoot.ca>
Date: Sat, 30 Apr 2005 11:23:57 -0400 (EDT)
From: Brian Minard <bminard@flatfoot.ca>
Reply-To: Brian Minard <bminard@flatfoot.ca>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Port devel/apr doesn't need Python
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         80479
>Category:       ports
>Synopsis:       [PATCH] Port devel/apr doesn't need Python
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rodrigc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 30 15:30:02 GMT 2005
>Closed-Date:    Wed Jul 13 04:11:17 GMT 2005
>Last-Modified:  Wed Jul 13 04:11:17 GMT 2005
>Originator:     Brian Minard
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
System: FreeBSD yop.flatfoot.ca 4.11-STABLE FreeBSD 4.11-STABLE #15: Fri Apr 1 06:29:13 EST 2005 root@yop.flatfoot.ca:/usr/obj/usr/src/sys/YOP i386

>Description:

The APR port introduces a dependency upon Python which isn't always needed. Python is needed to run
the buildconf script. This script is needed to build APR from CVS. The port is using an APR distribution
tarball and because of this running buildconf is unnecessary. See the README.dev file in apr-1.0.1.tar.gz
for additional information.

The attached patch uses the WITH_PYTHON directive to introduce the Python dependency and run buildconf.
WITH_PYTHON brings the APR port Makefile in line with the Subversion Makefile which installs Python only
when this directive is defined.

>How-To-Repeat:

Install APR from the ports tree.

>Fix:

--- Makefile	Thu Nov 25 03:13:33 2004
+++ Makefile	Sat Apr 30 11:16:56 2005
@@ -13,6 +13,8 @@
 # (the database bindings are detected and recorded automatically if these
 # switches are not set)
 # APR_UTIL_WITH_LDAP:		force dependency on OpenLDAP
+# WITH_PYTHON:                  force dependency on Python and run APR's buildconf.
+# Really only needed if built from APR's CVS depot.
 
 PORTNAME=	apr
 PORTVERSION=	1.0.1
@@ -25,7 +27,12 @@
 MAINTAINER=	rodrigc@crodrigues.org
 COMMENT=	The Apache Group's Portability Library
 
+.if defined(WITH_PYTHON)
 BUILD_DEPENDS=	${PYTHON_CMD}:${PYTHON_PORTSDIR}
+USE_PYTHON=		yes
+PYTHON_NO_DEPENDS=	yes
+.endif
+
 LIB_DEPENDS+=	expat.5:${PORTSDIR}/textproc/expat2
 
 USE_ICONV=		yes
@@ -35,8 +42,6 @@
 USE_REINPLACE=		yes
 USE_PERL5=		yes
 USE_GMAKE=		yes
-USE_PYTHON=		yes
-PYTHON_NO_DEPENDS=	yes
 INSTALLS_SHLIB=		yes
 GNU_CONFIGURE=		yes
 WRKSRC=	${WRKDIR}
@@ -141,12 +146,14 @@
 .endfor
 
 run-autotools:
+.if defined(WITH_PYTHON)
 	cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${SCRIPTS_ENV} ${SH} ./buildconf
 	cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
 	${RM} -fr xml/expat
 	cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
 		${SETENV} ${SCRIPTS_ENV} ${SH} ./buildconf \
 		--with-apr=../apr-${PORTVERSION}
+.endif
 	cd ${WRKDIR}/apr-${PORTVERSION}; \
 		${SETENV} ${SCRIPTS_ENV} ${SH} ./configure ${CONFIGURE_ARGS}
 	cd ${WRKDIR}/apr-util-${PORTVERSION}; \
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->rodrigc 
Responsible-Changed-By: arved 
Responsible-Changed-When: Sun May 8 20:41:31 GMT 2005 
Responsible-Changed-Why:  
Over to Maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80479 
State-Changed-From-To: open->closed 
State-Changed-By: rodrigc 
State-Changed-When: Mon Jun 6 15:17:11 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80479 
State-Changed-From-To: closed->open 
State-Changed-By: lofi 
State-Changed-When: Thu Jun 9 19:17:57 GMT 2005 
State-Changed-Why:  
The fix has issues, reopening. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=80479 

From: Michael Nottebrock <lofi@freebsd.org>
To: bug-followup@freebsd.org, bminard@flatfoot.ca
Cc:  
Subject: Re: ports/80479: [PATCH] Port devel/apr doesn't need Python
Date: Thu, 9 Jun 2005 21:15:59 +0200

 This change causes the apr ports to install libtool archives (libapr-1.la and 
 libaprutil.la) in the WITH_PYTHON case.

From: Michael Nottebrock <lofi@freebsd.org>
To: bug-followup@freebsd.org
Cc: bminard@flatfoot.ca
Subject: Re: ports/80479: [PATCH] Port devel/apr doesn't need Python
Date: Thu, 9 Jun 2005 21:17:24 +0200

 On Thursday, 9. June 2005 21:15, Michael Nottebrock wrote:
 > This change causes the apr ports to install libtool archives (libapr-1.la
 > and libaprutil.la) in the WITH_PYTHON case.
 
 Typo: In the non-WITH_PYTHON case, i.e., if buildconf isn't run.

From: Michael Nottebrock <lofi@freebsd.org>
To: bug-followup@freebsd.org, bminard@flatfoot.ca
Cc:  
Subject: Re: ports/80479: [PATCH] Port devel/apr doesn't need Python
Date: Sat, 11 Jun 2005 21:53:24 +0200

 On Saturday, 11. June 2005 15:06, Brian Minard <bminard@flatfoot.ca> wrote:
 > Is the intallation of .la files a bad thing?
 
 Not per se, but if they are installed, they need to be installed in *all* 
 possible cases, otherwise there's a chance of other stuff referencing the 
 archives and causing build failures when the libtool archives are suddenly 
 gone (for example because somebody recompiled apr WITH_PYTHON set).
 
 Most importantly, they need to be added to pkg-plist and PORTREVISION needs to 
 be bumped again to get them registered in users' pkgdbs.

From: Michael Nottebrock <lofi@freebsd.org>
To: bug-followup@freebsd.org
Cc: bminard@flatfoot.ca
Subject: Re: ports/80479: [PATCH] Port devel/apr doesn't need Python
Date: Sat, 11 Jun 2005 22:02:44 +0200

 FWIW, the USE_PYTHON_BUILD knob has been fixed for a while now, so it's 
 possible to use that instead of the kludge in the port - this would also 
 avoid a runtime-dependency on python even when WITH_PYTHON is defined.
State-Changed-From-To: open->closed 
State-Changed-By: rodrigc 
State-Changed-When: Wed Jul 13 04:09:29 GMT 2005 
State-Changed-Why:  
This patch caused different pkg-plists to be produced 
in the WITH_PYTHON=yes and WITH_PYTHON=no cases, causing the 
ports build to complain.  I reverted this patch. 
It is not worth fixing this issue, since it will involve 
descending into the autoconf mess of APR's makefiles. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=80479 
>Unformatted:
