From ak03@ork.gte.com  Wed Jan 10 11:10:15 2001
Return-Path: <ak03@ork.gte.com>
Received: from ork.gte.com (h132-197-97-51.gte.com [132.197.97.51])
	by hub.freebsd.org (Postfix) with ESMTP
	id 3B6AA37B400; Wed, 10 Jan 2001 11:10:15 -0800 (PST)
Received: (from ak03@localhost)
	by ork.gte.com (8.11.1/8.11.1) id f0AJAAK71362;
	Wed, 10 Jan 2001 14:10:10 -0500 (EST)
	(envelope-from ak03)
Message-Id: <200101101910.f0AJAAK71362@ork.gte.com>
Date: Wed, 10 Jan 2001 14:10:10 -0500 (EST)
From: ak03@gte.com
To: FreeBSD-gnats-submit@freebsd.org
Cc: tg@freebsd.org
Subject: Pyton 2.0: Add support for building pyexpat.so module 
X-Send-Pr-Version: 3.2

>Number:         24231
>Category:       ports
>Synopsis:       Enable pyexpat module in python port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 10 11:20:01 PST 2001
>Closed-Date:    Thu Mar 1 04:33:14 PST 2001
>Last-Modified:  Thu Mar 01 04:34:10 PST 2001
>Originator:     Alexander Kabaev
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Verizon Laboratories Inc.
>Environment:

	Builds on -CURRENT and -STABLE, tested on -STABLE

>Description:

	pyexpat.so is a Python interface to the well known expat
	parser. Attached patch adds required dependencies to the
	pythoin port in order to allow the pyexpat extension module
	to build successfully. 

>How-To-Repeat:

	N/A

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/python/Makefile,v
retrieving revision 1.74
diff -u -r1.74 Makefile
--- Makefile	2000/12/07 12:06:30	1.74
+++ Makefile	2001/01/10 18:37:29
@@ -61,6 +61,17 @@
 .endif
 
 #
+# The expat module
+#
+.if !defined(WITHOUT_EXPAT)
+SETUP_LOCAL+=	Setup.expat
+PLIST_EXPAT=	${PKGDIR}/pkg-plist.expat
+LIB_DEPENDS+=	expat.2:${PORTSDIR}/textproc/expat2
+CFLAGS+=	-I${LOCALBASE}/include
+CONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib" CPPFLAGS="-I${LOCALBASE}/include"
+.endif
+
+#
 # Install the Tools by default. It contains scripts ranging from an IDE
 # to a web tree checker, to a collection of simple scripts that are useful
 # while extending or managing Python.
@@ -116,7 +127,7 @@
 		${PREFIX}/lib/${PYTHON_VERSION}/${platform}/
 .endfor
 .endfor
-	@sort -r -o ${PLIST} ${PLIST_GMP} ${PLIST_TOOLS} ${PLIST_DEMO} ${PKGDIR}/pkg-plist
+	@sort -r -o ${PLIST} ${PLIST_GMP} ${PLIST_TOOLS} ${PLIST_DEMO} ${PLIST_EXPAT} ${PKGDIR}/pkg-plist
 
 post-install:
 	strip ${PREFIX}/bin/python
Index: pkg-plist.expat
===================================================================
RCS file: pkg-plist.expat
diff -N pkg-plist.expat
--- /dev/null	Wed Jan 10 13:43:03 2001
+++ pkg-plist.expat	Wed Jan 10 13:08:29 2001
@@ -0,0 +1 @@
+lib/%%PYTHON_VERSION%%/lib-dynload/pyexpat.so
Index: files/Setup.expat
===================================================================
RCS file: Setup.expat
diff -N Setup.expat
--- /dev/null	Wed Jan 10 13:43:03 2001
+++ Setup.expat	Wed Jan 10 13:15:29 2001
@@ -0,0 +1,23 @@
+*shared*
+
+# Interface to the Expat XML parser
+#
+# Expat is written by James Clark and must be downloaded separately
+# (see below).  The pyexpat module was written by Paul Prescod after a
+# prototype by Jack Jansen.
+#
+# The Expat dist includes Windows .lib and .dll files.  Home page is at
+# http://www.jclark.com/xml/expat.html, the current production release is
+# always ftp://ftp.jclark.com/pub/xml/expat.zip.
+#
+# EXPAT_DIR, below, should point to the expat/ directory created by
+# unpacking the Expat source distribution.
+#
+# Note: the expat build process doesn't yet build a libexpat.a; you can
+# do this manually while we try convince the author to add it.  To do so,
+# cd to EXPAT_DIR, run "make" if you have not done so, then run:
+#
+#    ar cr libexpat.a xmltok/*.o xmlparse/*.o
+#
+pyexpat pyexpat.c -lexpat
+
Index: files/patch-config.h.in
===================================================================
RCS file: patch-config.h.in
diff -N patch-config.h.in
--- /dev/null	Wed Jan 10 13:43:03 2001
+++ patch-config.h.in	Wed Jan 10 13:41:34 2001
@@ -0,0 +1,12 @@
+--- config.h.in.orig	Wed Jan 10 13:40:16 2001
++++ config.h.in	Wed Jan 10 13:40:52 2001
+@@ -620,6 +620,9 @@
+ /* Define if you have the <unistd.h> header file.  */
+ #undef HAVE_UNISTD_H
+ 
++/* Define if you have the <expat.h> header file.  */
++#undef HAVE_EXPAT_H
++
+ /* Define if you have the <utime.h> header file.  */
+ #undef HAVE_UTIME_H
+ 
Index: files/patch-configure
===================================================================
RCS file: patch-configure
diff -N patch-configure
--- /dev/null	Wed Jan 10 13:43:03 2001
+++ patch-configure	Wed Jan 10 13:24:05 2001
@@ -0,0 +1,11 @@
+--- configure	Wed Jan 10 13:19:29 2001
++++ configure.orig	Wed Jan 10 13:19:05 2001
+@@ -1549,7 +1549,7 @@
+ sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
+ sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
+ sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
+-ndbm.h db1/ndbm.h gdbm/ndbm.h
++ndbm.h db1/ndbm.h gdbm/ndbm.h expat.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6

>Release-Note:
>Audit-Trail:

From: Neil Blakey-Milner <nbm@mithrandr.moria.org>
To: ak03@gte.com
Cc: FreeBSD-gnats-submit@freebsd.org, tg@freebsd.org
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so module
Date: Wed, 10 Jan 2001 22:31:02 +0200

 On Wed 2001-01-10 (14:10), ak03@gte.com wrote:
 > 	pyexpat.so is a Python interface to the well known expat
 > 	parser. Attached patch adds required dependencies to the
 > 	pythoin port in order to allow the pyexpat extension module
 > 	to build successfully. 
 
 Doesn't the textproc/py-xml port provide this functionality?
 
 Neil
 -- 
 Neil Blakey-Milner
 nbm@mithrandr.moria.org
 

From: "Alexander N. Kabaev" <ak03@gte.com>
To: Neil Blakey-Milner <nbm@mithrandr.moria.org>
Cc: tg@freebsd.org, FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so 
Date: Wed, 10 Jan 2001 15:45:17 -0500 (EST)

 py-xml is a port for the XML processing stuf from Python XML SIG. The package
 is installed as _xmlplus if built under Python 2.0 and consequently will work
 only with code which is aware of this fact (none does, AFAIK). The Python 2.0
 built-in XML modules do not provide as many features as SIG code does, but I
 see no reason why they shouldn't  be built by default.
 
 On 10-Jan-2001 Neil Blakey-Milner wrote:
 > On Wed 2001-01-10 (14:10), ak03@gte.com wrote:
 >>      pyexpat.so is a Python interface to the well known expat
 >>      parser. Attached patch adds required dependencies to the
 >>      pythoin port in order to allow the pyexpat extension module
 >>      to build successfully. 
 > 
 > Doesn't the textproc/py-xml port provide this functionality?
 > 
 > Neil
 > -- 
 > Neil Blakey-Milner
 > nbm@mithrandr.moria.org
 
 ----------------------------------
 E-Mail: Alexander N. Kabaev <ak03@gte.com>
 Date: 10-Jan-2001
 Time: 15:36:18
 ----------------------------------
 

From: Thomas Gellekum <tg@melaten.rwth-aachen.de>
To: ak03@gte.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so module
Date: 11 Jan 2001 13:38:28 +0100

 ak03@gte.com writes:
 
 > Index: Makefile
 > ===================================================================
 > RCS file: /home/ncvs/ports/lang/python/Makefile,v
 
 I won't accept that. Please create a separate py-expat port, similar
 to py-tkinter or py-gdbm.
 
 tg
 

From: "Alexander N. Kabaev" <kabaev@mail.ru>
To: Thomas Gellekum <tg@melaten.rwth-aachen.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, ak03@gte.com
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so 
Date: Thu, 11 Jan 2001 08:55:55 -0500 (EST)

 It is a part of standard Python 2.0 distribution and it does not make sence to
 artificially separate pyexpat from the rest of the distribution.
 
 Why didn't you separate gmp and OpenSSL parts using the same logic?
 On 11-Jan-2001 Thomas Gellekum wrote:
 > ak03@gte.com writes:
 > 
 >> Index: Makefile
 >> ===================================================================
 >> RCS file: /home/ncvs/ports/lang/python/Makefile,v
 > 
 > I won't accept that. Please create a separate py-expat port, similar
 > to py-tkinter or py-gdbm.
 > 
 > tg
 
 ----------------------------------
 E-Mail: Alexander N. Kabaev <kabaev@mail.ru>
 Date: 11-Jan-2001
 Time: 08:51:10
 ----------------------------------
 

From: Johann Visagie <johann@egenetics.com>
To: Neil Blakey-Milner <nbm@mithrandr.moria.org>
Cc: FreeBSD-gnats-submit@freebsd.org, tg@freebsd.org
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so module
Date: Fri, 12 Jan 2001 15:01:03 +0200

 Neil Blakey-Milner on 2001-01-10 (Wed) at 12:40:02 -0800:
 > 
 >  On Wed 2001-01-10 (14:10), ak03@gte.com wrote:
 >  > 	pyexpat.so is a Python interface to the well known expat
 >  > 	parser. Attached patch adds required dependencies to the
 >  > 	pythoin port in order to allow the pyexpat extension module
 >  > 	to build successfully. 
 >  
 >  Doesn't the textproc/py-xml port provide this functionality?
 
 Yes, it does.
 
 -- Johann
 

From: Thomas Gellekum <tg@melaten.rwth-aachen.de>
To: "Alexander N. Kabaev" <kabaev@mail.ru>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, ak03@gte.com
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so
Date: 11 Jan 2001 15:10:24 +0100

 "Alexander N. Kabaev" <kabaev@mail.ru> writes:
 
 > Why didn't you separate gmp and OpenSSL parts using the same logic?
 
 The necessary gmp and SSL sources are part of the base system and the
 support can be compiled in without any {WANT,WITHOUT}_* options and
 without external dependencies.
 
 It's easy enough to create another port for more granularity and I
 prefer that way over make options. We have too many of those already.
 
 tg
 

From: Johann Visagie <johann@egenetics.com>
To: Neil Blakey-Milner <nbm@mithrandr.moria.org>
Cc: FreeBSD-gnats-submit@freebsd.org, tg@freebsd.org, ak03@gte.com,
	peterh@sapros.com
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so module
Date: Fri, 12 Jan 2001 15:33:50 +0200

 Allow me to clarify that my previous statement:
 
 PyXML contains the pyexpat.so source in its distribution tarball.  I believe
 that it is currently stock pyexpat (but I speak under correction).
 
 At present, PyXML's installation procedure...
 - checks for a pre-existing pyexpat, and if there is one
 - checks to see if its version is recent enough.
 
 If it is satisfied that a sufficiently recent pyexpat is already installed,
 it does install its own pyexpat.  This would of course play hell with the
 py-xml port's ${PLIST}, but it is probably something that can be overcome if
 a pyexpat port that meets tg's approval is submitted.
 
 However, it seems likely that in future versions PyXML will ship with a
 modified pyexpat, and will force the installation of its custom version.
 Sigh.
 
 [ Moving O/T ]
 
 These module interdependencies are going to get worse, not better.  PyXML and
 Fourthought's 4Suite have always been kissing cousins.  A port of 4Suite is
 desperately needed IMO.  (Peter Haight has submitted a 4Suite port three
 times but the PRs are still open.  The latest is ports/23903.)  The current
 PyXML 1.6.3 does "not cooperate" with 4Suite.  4Suite's authors have "had
 enough" of this, and as of 4Suite 0.10.1, PyXML will be bundled with it.
 Sigh again.
 
 Because of the close links between the core Python distribution and PyXML,
 and the fact that py-xml port dependencies are handled by bsd.python.mk,
 *and* the fact that PyXML is still so volatile, the whole pyexpat / PyXML /
 4Suite business should probably be handled with care.  I'll hopefully be able
 to come up with something once 4Suite 0.10.1 actually gets released.
 
 -- Johann
 

From: Thomas Gellekum <tg@melaten.rwth-aachen.de>
To: Johann Visagie <johann@egenetics.com>
Cc: Neil Blakey-Milner <nbm@mithrandr.moria.org>,
	FreeBSD-gnats-submit@freebsd.org, ak03@gte.com, peterh@sapros.com
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so module
Date: 12 Jan 2001 15:00:53 +0100

 Johann Visagie <johann@egenetics.com> writes:
 
 > PyXML contains the pyexpat.so source in its distribution tarball.  I believe
 > that it is currently stock pyexpat (but I speak under correction).
 > 
 > At present, PyXML's installation procedure...
 > - checks for a pre-existing pyexpat, and if there is one
 > - checks to see if its version is recent enough.
 > 
 > If it is satisfied that a sufficiently recent pyexpat is already installed,
 > it does install its own pyexpat.  This would of course play hell with the
      ^^^^
 ITYM "doesn't"?
 
 > py-xml port's ${PLIST}, but it is probably something that can be overcome if
 > a pyexpat port that meets tg's approval is submitted.
 
 Actually, I don't care where the source for pyexpat.so comes from. I
 just don't want more options in the base python port. A
 textproc/py-expat doesn't need my approval.
 
 tg
 

From: Johann Visagie <johann@egenetics.com>
To: Thomas Gellekum <tg@melaten.rwth-aachen.de>
Cc: Neil Blakey-Milner <nbm@mithrandr.moria.org>,
	FreeBSD-gnats-submit@freebsd.org, ak03@gte.com, peterh@sapros.com
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so module
Date: Fri, 12 Jan 2001 15:55:48 +0200

 Thomas Gellekum on 2001-01-12 (Fri) at 15:00:53 +0100:
 > 
 > > If it is satisfied that a sufficiently recent pyexpat is already installed,
 > > it does install its own pyexpat.  This would of course play hell with the
 >      ^^^^
 > ITYM "doesn't"?
 
 Sorry, yes.  That's what I meant.  :-)
 
 > Actually, I don't care where the source for pyexpat.so comes from. I
 > just don't want more options in the base python port. A
 > textproc/py-expat doesn't need my approval.
 
 Fair enough!
 
 -- Johann
 

From: "Alexander N. Kabaev" <ak03@gte.com>
To: Thomas Gellekum <tg@melaten.rwth-aachen.de>
Cc: peterh@sapros.com, FreeBSD-gnats-submit@freebsd.org,
	Neil Blakey-Milner <nbm@mithrandr.moria.org>,
	Johann Visagie <johann@egenetics.com>
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so 
Date: Fri, 12 Jan 2001 10:03:15 -0500 (EST)

 On 12-Jan-2001 Thomas Gellekum wrote:
 > Johann Visagie <johann@egenetics.com> writes:
 > 
 >> PyXML contains the pyexpat.so source in its distribution tarball.  I believe
 >> that it is currently stock pyexpat (but I speak under correction).
 >> 
 >> At present, PyXML's installation procedure...
 >> - checks for a pre-existing pyexpat, and if there is one
 >> - checks to see if its version is recent enough.
 >> 
 >> If it is satisfied that a sufficiently recent pyexpat is already installed,
 >> it does install its own pyexpat.  This would of course play hell with the
 >      ^^^^
 > ITYM "doesn't"?
 > 
 >> py-xml port's ${PLIST}, but it is probably something that can be overcome if
 >> a pyexpat port that meets tg's approval is submitted.
 > 
 > Actually, I don't care where the source for pyexpat.so comes from. I
 > just don't want more options in the base python port. A
 > textproc/py-expat doesn't need my approval.
 
 I always thought that having standard low-level interface that could be shared
 among PyXML, 4DOM etc was the reason why pyexpat has been included into the
 base Python 2.0 distribution. If that assumption is wrong and 4DOM and PyXML
 will be rolling their own possibly incompatible versions anyway, then I have to
 request my PR be closed. It does not make any sense to have py-expat as a
 separate port outside the base python distribution either.
  
 ------------------------------------------
 E-Mail: Alexander N. Kabaev <ak03@gte.com>
 Date: 12-Jan-2001
 Time: 09:28:38
 ------------------------------------------
 

From: Johann Visagie <johann@egenetics.com>
To: "Alexander N. Kabaev" <ak03@gte.com>
Cc: Thomas Gellekum <tg@melaten.rwth-aachen.de>, peterh@sapros.com,
	FreeBSD-gnats-submit@freebsd.org,
	Neil Blakey-Milner <nbm@mithrandr.moria.org>
Subject: Re: ports/24231: Pyton 2.0: Add support for building pyexpat.so
Date: Fri, 12 Jan 2001 17:15:15 +0200

 Alexander N. Kabaev on 2001-01-12 (Fri) at 10:03:15 -0500:
 > 
 > I always thought that having standard low-level interface that could be shared
 > among PyXML, 4DOM etc was the reason why pyexpat has been included into the
 > base Python 2.0 distribution.
 
 I'm searching the XML-SIG archives to see whether there is concrete thinking
 behind the status of expat.  If there is, I don't remember it (but I may have
 missed it).  Currently I think this is just one more example of the volatile
 and unfortunate mess surrounding Python's XML handling.  Decisions seem to
 get taken on an ad hoc basis and reversed often.  :-(
 
 > If that assumption is wrong and 4DOM and PyXML
 > will be rolling their own possibly incompatible versions anyway, then I have to
 > request my PR be closed. It does not make any sense to have py-expat as a
 > separate port outside the base python distribution either.
 
 Since Thomas doesn't want it in the Python port, the question is currently
 moot.
 
 Still looking into this.  More later.
 
 -- Johann
 
Responsible-Changed-From-To: freebsd-ports->tg 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sun Feb 25 18:24:00 PST 2001 
Responsible-Changed-Why:  
Over to port's maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24231 
State-Changed-From-To: open->closed 
State-Changed-By: tg 
State-Changed-When: Thu Mar 1 04:33:14 PST 2001 
State-Changed-Why:  
I have added py-expat as a port in the textproc category. 

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