From rhh@ipass.net Fri Aug 20 16:51:30 1999
Return-Path: <rhh@ipass.net>
Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5])
	by hub.freebsd.org (Postfix) with ESMTP id 96F9814E81
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Aug 1999 16:51:29 -0700 (PDT)
	(envelope-from rhh@ipass.net)
Received: from stealth.ipass.net. (ppp-1-181.dialup.rdu.ipass.net [209.170.132.181])
	by pluto.ipass.net (8.9.3/8.9.3) with ESMTP id TAA15645;
	Fri, 20 Aug 1999 19:49:24 -0400 (EDT)
Received: (from rhh@localhost)
	by stealth.ipass.net. (8.9.3/8.8.8) id TAA15973;
	Fri, 20 Aug 1999 19:50:19 -0400 (EDT)
	(envelope-from rhh)
Message-Id: <199908202350.TAA15973@stealth.ipass.net.>
Date: Fri, 20 Aug 1999 19:50:19 -0400 (EDT)
From: aa8vb@ipass.net
Sender: rhh@ipass.net
Reply-To: aa8vb@ipass.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: aa8vb@ipass.net
Subject: Python port needs a hack for FreeBSD's non-standard /bin/sh read command
X-Send-Pr-Version: 3.2

>Number:         13276
>Category:       ports
>Synopsis:       Python port needs a hack for FreeBSD's non-standard /bin/sh read com\
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 20 17:00:01 PDT 1999
>Closed-Date:    Mon Aug 23 05:06:27 PDT 1999
>Last-Modified:  Mon Aug 23 05:09:17 PDT 1999
>Originator:     Randall Hopper
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
self
>Environment:

        Stock 3.2-RELEASE.  Python 1.5.2 (built from ports).

>Description:

        See the PR:

           bin/13274: /bin/sh 'read' command does not work correctly

        for details, but basically FreeBSD /bin/sh 'read' does not honor
        continuation lines like other UNIXes do by default.  One has to
        specify a FreeBSD-specific switch to get it to behavior in the
        standard way.

        The effect for the Python port/package is that Python's makesetup
        fails when fed a standard Setup file (e.g. PyOpenGL) because it
        doesn't honor the continuation lines by default.  One could hack
        Setup files each time, but the better hack (until FreeBSD's /bin/sh
        read command is brought in line) is to patch the Python makesetup
        script when the package is built to invoke read with the
        FreeBSD-specific handle-continuation-lines option (see below).

>How-To-Repeat:

        Grab PyOpenGL, untar, cd src, cp Setup.CONFIGURE Setup.proto,
        python BUILD.py, and you will see this breakage:

            /usr/local/lib/python1.5/config/makesetup  -m Makefile.pre -c /usr/local/lib/python1.5/config/config.c.in Setup -n  /usr/local/lib/python1.5/config/Setup.thread /usr/local/lib/python1.5/config/Setup.local /usr/local/lib/python1.5/config/Setup
            bad word \ in _glut     \
            *** Error code 1

            Stop.
            *** Error code 1

            Stop.

        Under the hood, what's going on is this:

               $ read line
               some text here \
               $ more text
               text: No such file or directory
               $ echo $line
               some text here \
            
            # NOTE: On other unices you get this:

               > sh
               $ read line
               some text here \
               more text
               $ echo $line
               some text here more text

>Fix:

      Please insert this patch into the patches subdirectory of the Python
      port.  Thanks.

      --- ./Modules/ORIG/makesetup    Tue May 11 13:15:09 1999
      +++ ./Modules/makesetup Fri Aug 20 19:47:32 1999
      @@ -101,7 +101,7 @@
              LIBS=
              LOCALLIBS=
              BASELIBS=
      -       while read line
      +       while read -e line
              do
                      # Output DEFS in reverse order so first definition overrides
                      case $line in

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: tg 
State-Changed-When: Mon Aug 23 05:06:27 PDT 1999 
State-Changed-Why:  
Patch committed, thanks. 
>Unformatted:
 mand
