Subject: pkg/6976: fix to prevent python package from depending on environment variable $OPT
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@proven.weird.com>
List: netbsd-bugs
Date: 02/09/1999 15:50:00
>Number:         6976
>Category:       pkg
>Synopsis:       fix to prevent python package from depending on environment variable $OPT
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb  9 13:05:01 1999
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        pkgsrc-current Tue Feb  9 08:18:01 EST 1999
>Environment:

System: NetBSD proven 1.3I i386

>Description:

	The python package depends at "run-time" on the setting of an
	environment variable $OPT.  I.e. the tools installed by the
	python package for building additional python modules are
	affected by any setting of $OPT in the environment at the time
	the python package is first compiled and built.

	Unfortunately this dependency is hidden until well after the
	time the package is compiled and installed.

>How-To-Repeat:

	$ export OPT=/some/path/name
	$ cd /usr/pkgsrc/lang/python
	$ make && su -c 'make install'
	# now try building a python module that uses the installed tools

>Fix:

	Ideally the python distribution should be fixed so that it
	doesn't rely on such a poorly named environment variable.

	as a workaround apply the following patch to the python package:

Index: Makefile
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/lang/python/Makefile,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 lang/python/Makefile
*** lang/python/Makefile	1999/01/18 18:02:06	1.1.1.10
--- lang/python/Makefile	1999/02/09 20:26:47
***************
*** 26,31 ****
--- 26,35 ----
  
  GNU_CONFIGURE=	yes
  MAKE_FLAGS+=	'OPT=${CFLAGS}'
+ # use these to override any current environment variable $OPT
+ MAKE_ENV+=	'OPT=${CFLAGS}'
+ CONFIGURE_ENV+=	'OPT=${CFLAGS}'
+ SCRIPTS_ENV+=	'OPT=${CFLAGS}'
  
  # Handle the module setup file:
  #   - disable a few broken modules on 64 bit platforms (nothing important)
>Audit-Trail:
>Unformatted: