From lewiz@fajita.org  Wed Jun 16 23:38:55 2004
Return-Path: <lewiz@fajita.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D644616A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jun 2004 23:38:55 +0000 (GMT)
Received: from infidel.fajita.org (oldhallfarm.demon.co.uk [80.176.128.55])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2F26B43D55
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jun 2004 23:38:54 +0000 (GMT)
	(envelope-from lewiz@fajita.org)
Received: from majic.fajita.org (majic.fajita.org [192.168.0.4])
	by infidel.fajita.org (8.12.10/8.12.10) with ESMTP id i5GNcoY5000107
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Jun 2004 00:38:50 +0100 (BST)
	(envelope-from lewiz@fajita.org)
Received: (from lewiz@localhost)
	by majic.fajita.org (8.12.10/8.12.10/Submit) id i5GNcof6000106;
	Thu, 17 Jun 2004 00:38:50 +0100 (BST)
	(envelope-from lewiz)
Message-Id: <200406162338.i5GNcof6000106@majic.fajita.org>
Date: Thu, 17 Jun 2004 00:38:50 +0100 (BST)
From: Lewis Thompson <purple@lewiz.net>
Reply-To: Lewis Thompson <purple@lewiz.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: UPDATE PORT: multimedia/mmpython
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68025
>Category:       ports
>Synopsis:       UPDATE PORT: multimedia/mmpython
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 16 23:40:15 GMT 2004
>Closed-Date:    Fri Jun 18 08:27:52 GMT 2004
>Last-Modified:  Fri Jun 18 08:27:52 GMT 2004
>Originator:     Lewis Thompson
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD majic.fajita.org 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #9: Thu May 27 21:29:56 BST 2004 lewiz@amnesia.fajita.org:/usr/src/sys/i386/compile/AMNESIA i386


	
>Description:
	This is an update to multimedia/mmpython.  I have bumped the
PORTREVISION to reflect the changes.

	This fixes a fairly major compile-time bug that causes
ifoparser.so not to get compiled, which in turns prevents lsdvd from
working.

	This also fixes a bug that would cause a traceback if no disc
was in a given device.

	Comments have also been added to patches.
>How-To-Repeat:
>Fix:
diff -ruN mmpython.orig/Makefile mmpython/Makefile
--- mmpython.orig/Makefile	Thu Jun 10 20:11:48 2004
+++ mmpython/Makefile	Thu Jun 17 00:32:13 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	mmpython
 PORTVERSION=	0.4.3
+PORTREVISION=	1
 CATEGORIES=	multimedia python
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -27,5 +28,9 @@
 #USE_BZIP2=	yes
 USE_PYTHON=	yes
 USE_PYDISTUTILS=yes
+USE_REINPLACE=	yes
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|gcc -ldvdread|gcc -L${LOCALBASE}/lib -ldvdread|' ${WRKSRC}/setup.py
 
 .include <bsd.port.mk>
diff -ruN mmpython.orig/files/patch-disc_discinfo.py mmpython/files/patch-disc_discinfo.py
--- mmpython.orig/files/patch-disc_discinfo.py	Thu Jun 10 20:04:24 2004
+++ mmpython/files/patch-disc_discinfo.py	Thu Jun 17 00:08:38 2004
@@ -1,9 +1,17 @@
-
-$FreeBSD: ports/multimedia/mmpython/files/patch-disc_discinfo.py,v 1.1 2004/06/10 19:04:24 krion Exp $
-
---- disc/discinfo.py.orig	Thu Jun 10 20:51:51 2004
-+++ disc/discinfo.py	Thu Jun 10 20:52:32 2004
-@@ -223,22 +223,10 @@
+--- disc/discinfo.py	Sun Feb  8 17:44:05 2004
++++ disc/discinfo.py	Thu Jun 17 00:04:48 2004
+@@ -191,7 +191,9 @@
+     
+     fd = open(device, 'rb')
+     try:
+-    	fd.seek(0x0000832d)
++	fd.seek(32768) # 2048 multiple boundary for FreeBSD
++	# FreeBSD doesn't return IOError unless we try and read:
++	fd.read(1)
+     except IOError:
+     	fd.close()
+ 	return 3
+@@ -223,22 +225,12 @@
      else:
          f = open(device,'rb')
  
@@ -23,6 +31,8 @@
 -            id = id[813:829]
 -        else:
 -            label = f.read(32)
++        # FreeBSD can only seek to 2048 multiple boundaries.
++        # Below works on Linux and FreeBSD:
 +        f.seek(32768)
 +        id = f.read(829)
 +        label = id[40:72]
diff -ruN mmpython.orig/files/patch-disc_dvdinfo.py mmpython/files/patch-disc_dvdinfo.py
--- mmpython.orig/files/patch-disc_dvdinfo.py	Thu Jun 10 20:04:24 2004
+++ mmpython/files/patch-disc_dvdinfo.py	Thu Jun 17 00:08:38 2004
@@ -9,8 +9,8 @@
          f = open(device,'rb')
 -        f.seek(32808, 0)
 -        buffer = f.read(50000)
-+        f.seek(32768, 0)
-+        buffer = f.read(50040)
++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple boundary.
++        buffer = f.read(50040) # Read 40 more to compensate for above seek.
  
          if buffer.find('UDF') == -1:
              f.close()
@@ -20,8 +20,8 @@
          # brute force reading of the device to find out if it is a DVD
 -        f.seek(32808, 0)
 -        buffer = f.read(50000)
-+        f.seek(32768, 0)
-+        buffer = f.read(50040)
++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple boundary.
++        buffer = f.read(50040) # Read 40 more to compensate for above seek.
  
          if buffer.find('UDF') == -1:
              return 0
diff -ruN mmpython.orig/files/patch-disc_lsdvd.py mmpython/files/patch-disc_lsdvd.py
--- mmpython.orig/files/patch-disc_lsdvd.py	Thu Jun 10 20:04:24 2004
+++ mmpython/files/patch-disc_lsdvd.py	Thu Jun 17 00:08:38 2004
@@ -9,8 +9,8 @@
          f = open(device,'rb')
 -        f.seek(32808, 0)
 -        buffer = f.read(50000)
-+        f.seek(32768, 0)
-+        buffer = f.read(50040)
++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple boundary.
++        buffer = f.read(50040) # Read 40 more to compensate for above seek.
  
          if buffer.find('UDF') == -1:
              f.close()
diff -ruN mmpython.orig/files/patch-disc_vcdinfo.py mmpython/files/patch-disc_vcdinfo.py
--- mmpython.orig/files/patch-disc_vcdinfo.py	Thu Jun 10 20:04:24 2004
+++ mmpython/files/patch-disc_vcdinfo.py	Thu Jun 17 00:08:38 2004
@@ -10,9 +10,9 @@
 -        f.seek(32808, 0)
 -        buffer = f.read(50000)
 -        f.close()
-+	f.seek(32768, 0)
-+        buffer = f.read(50040)
-+	f.close()
++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple boundary.
++        buffer = f.read(50040) # Read 40 more to compensate for above seek.
++        f.close()
  
          if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
                 buffer.find('ENTRIES.SVD') > 0:
diff -ruN mmpython.orig/files/patch-video_vcdinfo.py mmpython/files/patch-video_vcdinfo.py
--- mmpython.orig/files/patch-video_vcdinfo.py	Thu Jun 10 20:04:24 2004
+++ mmpython/files/patch-video_vcdinfo.py	Thu Jun 17 00:08:38 2004
@@ -10,9 +10,9 @@
 -        f.seek(32808, 0)
 -        buffer = f.read(50000)
 -        f.close()
-+        f.seek(32768, 0)
-+        buffer = f.read(50040)
-+	f.close()
++        f.seek(32768, 0) # FreeBSD requires seeking to 2048 multiple boundary.
++        buffer = f.read(50040) # Read 40 more to compensate for above seek.
++        f.close()
  
          if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
                 buffer.find('ENTRIES.SVD') > 0:
diff -ruN mmpython.orig/pkg-plist mmpython/pkg-plist
--- mmpython.orig/pkg-plist	Thu Jun 10 15:16:10 2004
+++ mmpython/pkg-plist	Thu Jun 17 00:33:12 2004
@@ -66,6 +66,7 @@
 %%PYTHON_SITELIBDIR%%/mmpython/disc/dvdinfo.py
 %%PYTHON_SITELIBDIR%%/mmpython/disc/dvdinfo.pyc
 %%PYTHON_SITELIBDIR%%/mmpython/disc/dvdinfo.pyo
+%%PYTHON_SITELIBDIR%%/mmpython/disc/ifoparser.so
 %%PYTHON_SITELIBDIR%%/mmpython/disc/lsdvd.py
 %%PYTHON_SITELIBDIR%%/mmpython/disc/lsdvd.pyc
 %%PYTHON_SITELIBDIR%%/mmpython/disc/lsdvd.pyo
>Release-Note:
>Audit-Trail:

From: Lewis Thompson <purple@lewiz.net>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/68025: UPDATE PORT: multimedia/mmpython
Date: Thu, 17 Jun 2004 13:42:13 +0100

 --SUOF0GtieIMvvwua
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jun 16, 2004 at 11:40:15PM +0000, FreeBSD-gnats-submit@FreeBSD.org =
 wrote:
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D68025
 >=20
 > >Category:       ports
 > >Responsible:    freebsd-ports-bugs
 > >Synopsis:       UPDATE PORT: multimedia/mmpython
 > >Arrival-Date:   Wed Jun 16 23:40:15 GMT 2004
 
 Having spoken to the current maintainer we have agreed for me to take
 over as maintainer of this port.  When committing this patch could you
 please confirm with Lars Eggert and change the MAINTAINER bit, thanks :)
 
 -lewiz.
 
 --=20
 I was so much older then, I'm younger than that now.  --Bob Dylan, 1964.
 ------------------------------------------------------------------------
 -| msn:purple@lewiz.net | jabber:lewiz@jabber.org | url:www.lewiz.org |-
 
 --SUOF0GtieIMvvwua
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFA0ZGlItq0KFQv7T8RAoreAKDnYuvV/qzV0tqnpH0lHS4UY3apTQCgsDwp
 3m5vArvI+PClAX1ClPGRYyA=
 =JYew
 -----END PGP SIGNATURE-----
 
 --SUOF0GtieIMvvwua--

From: Lewis Thompson <purple@lewiz.net>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/68025: UPDATE PORT: multimedia/mmpython
Date: Thu, 17 Jun 2004 15:24:49 +0100

 --bjuZg6miEcdLYP6q
 Content-Type: multipart/mixed; boundary="7gGkHNMELEOhSGF6"
 Content-Disposition: inline
 
 
 --7gGkHNMELEOhSGF6
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 I think I messed that patch up.  Here's a proper one ;)
 
 -lewiz.
 
 --=20
 I was so much older then, I'm younger than that now.  --Bob Dylan, 1964.
 ------------------------------------------------------------------------
 -| msn:purple@lewiz.net | jabber:lewiz@jabber.org | url:www.lewiz.org |-
 
 --7gGkHNMELEOhSGF6
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch-mmpython
 Content-Transfer-Encoding: quoted-printable
 
 diff -ruN mmpython.orig/Makefile mmpython/Makefile
 --- mmpython.orig/Makefile	Thu Jun 10 20:11:48 2004
 +++ mmpython/Makefile	Thu Jun 17 15:19:59 2004
 @@ -7,6 +7,7 @@
 =20
  PORTNAME=3D	mmpython
  PORTVERSION=3D	0.4.3
 +PORTREVISION=3D	1
  CATEGORIES=3D	multimedia python
  MASTER_SITES=3D	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=3D	${PORTNAME}
 @@ -27,5 +28,9 @@
  #USE_BZIP2=3D	yes
  USE_PYTHON=3D	yes
  USE_PYDISTUTILS=3Dyes
 +USE_REINPLACE=3D	yes
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e 's|gcc -ldvdread|gcc -L${LOCALBASE}/lib -ldvdread|' =
 ${WRKSRC}/setup.py
 =20
  .include <bsd.port.mk>
 diff -ruN mmpython.orig/files/patch-disc_discinfo.py mmpython/files/patch-d=
 isc_discinfo.py
 --- mmpython.orig/files/patch-disc_discinfo.py	Thu Jun 10 20:04:24 2004
 +++ mmpython/files/patch-disc_discinfo.py	Thu Jun 17 15:19:59 2004
 @@ -1,9 +1,17 @@
 -
 -$FreeBSD: ports/multimedia/mmpython/files/patch-disc_discinfo.py,v 1.1 200=
 4/06/10 19:04:24 krion Exp $
 -
 ---- disc/discinfo.py.orig	Thu Jun 10 20:51:51 2004
 -+++ disc/discinfo.py	Thu Jun 10 20:52:32 2004
 -@@ -223,22 +223,10 @@
 +--- disc/discinfo.py	Sun Feb  8 17:44:05 2004
 ++++ disc/discinfo.py	Thu Jun 17 00:04:48 2004
 +@@ -191,7 +191,9 @@
 +    =20
 +     fd =3D open(device, 'rb')
 +     try:
 +-    	fd.seek(0x0000832d)
 ++	fd.seek(32768) # 2048 multiple boundary for FreeBSD
 ++	# FreeBSD doesn't return IOError unless we try and read:
 ++	fd.read(1)
 +     except IOError:
 +     	fd.close()
 + 	return 3
 +@@ -223,22 +225,12 @@
       else:
           f =3D open(device,'rb')
  =20
 @@ -23,6 +31,8 @@
  -            id =3D id[813:829]
  -        else:
  -            label =3D f.read(32)
 ++        # FreeBSD can only seek to 2048 multiple boundaries.
 ++        # Below works on Linux and FreeBSD:
  +        f.seek(32768)
  +        id =3D f.read(829)
  +        label =3D id[40:72]
 diff -ruN mmpython.orig/files/patch-disc_dvdinfo.py mmpython/files/patch-di=
 sc_dvdinfo.py
 --- mmpython.orig/files/patch-disc_dvdinfo.py	Thu Jun 10 20:04:24 2004
 +++ mmpython/files/patch-disc_dvdinfo.py	Thu Jun 17 15:19:59 2004
 @@ -9,8 +9,8 @@
           f =3D open(device,'rb')
  -        f.seek(32808, 0)
  -        buffer =3D f.read(50000)
 -+        f.seek(32768, 0)
 -+        buffer =3D f.read(50040)
 ++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple bo=
 undary.
 ++        buffer =3D f.read(50040) # Read 40 more to compensate for above s=
 eek.
  =20
           if buffer.find('UDF') =3D=3D -1:
               f.close()
 @@ -20,8 +20,8 @@
           # brute force reading of the device to find out if it is a DVD
  -        f.seek(32808, 0)
  -        buffer =3D f.read(50000)
 -+        f.seek(32768, 0)
 -+        buffer =3D f.read(50040)
 ++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple bo=
 undary.
 ++        buffer =3D f.read(50040) # Read 40 more to compensate for above s=
 eek.
  =20
           if buffer.find('UDF') =3D=3D -1:
               return 0
 diff -ruN mmpython.orig/files/patch-disc_lsdvd.py mmpython/files/patch-disc=
 _lsdvd.py
 --- mmpython.orig/files/patch-disc_lsdvd.py	Thu Jun 10 20:04:24 2004
 +++ mmpython/files/patch-disc_lsdvd.py	Thu Jun 17 15:19:59 2004
 @@ -9,8 +9,8 @@
           f =3D open(device,'rb')
  -        f.seek(32808, 0)
  -        buffer =3D f.read(50000)
 -+        f.seek(32768, 0)
 -+        buffer =3D f.read(50040)
 ++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple bo=
 undary.
 ++        buffer =3D f.read(50040) # Read 40 more to compensate for above s=
 eek.
  =20
           if buffer.find('UDF') =3D=3D -1:
               f.close()
 diff -ruN mmpython.orig/files/patch-disc_vcdinfo.py mmpython/files/patch-di=
 sc_vcdinfo.py
 --- mmpython.orig/files/patch-disc_vcdinfo.py	Thu Jun 10 20:04:24 2004
 +++ mmpython/files/patch-disc_vcdinfo.py	Thu Jun 17 15:19:59 2004
 @@ -10,9 +10,9 @@
  -        f.seek(32808, 0)
  -        buffer =3D f.read(50000)
  -        f.close()
 -+	f.seek(32768, 0)
 -+        buffer =3D f.read(50040)
 -+	f.close()
 ++        f.seek(32768, 0) # FreeBSD requires seeking to a 2048 multiple bo=
 undary.
 ++        buffer =3D f.read(50040) # Read 40 more to compensate for above s=
 eek.
 ++        f.close()
  =20
           if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
                  buffer.find('ENTRIES.SVD') > 0:
 diff -ruN mmpython.orig/files/patch-video_vcdinfo.py mmpython/files/patch-v=
 ideo_vcdinfo.py
 --- mmpython.orig/files/patch-video_vcdinfo.py	Thu Jun 10 20:04:24 2004
 +++ mmpython/files/patch-video_vcdinfo.py	Thu Jun 17 15:21:24 2004
 @@ -10,9 +10,9 @@
  -        f.seek(32808, 0)
  -        buffer =3D f.read(50000)
  -        f.close()
 -+        f.seek(32768, 0)
 -+        buffer =3D f.read(50040)
 -+	f.close()
 ++        f.seek(32768, 0) # FreeBSD requires seeking to 2048 multiple boun=
 dary.
 ++        buffer =3D f.read(50040) # Read 40 more to compensate for above s=
 eek.)
 ++        f.close(
  =20
           if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
                  buffer.find('ENTRIES.SVD') > 0:
 diff -ruN mmpython.orig/pkg-plist mmpython/pkg-plist
 --- mmpython.orig/pkg-plist	Thu Jun 10 15:16:10 2004
 +++ mmpython/pkg-plist	Thu Jun 17 15:19:59 2004
 @@ -66,6 +66,7 @@
  %%PYTHON_SITELIBDIR%%/mmpython/disc/dvdinfo.py
  %%PYTHON_SITELIBDIR%%/mmpython/disc/dvdinfo.pyc
  %%PYTHON_SITELIBDIR%%/mmpython/disc/dvdinfo.pyo
 +%%PYTHON_SITELIBDIR%%/mmpython/disc/ifoparser.so
  %%PYTHON_SITELIBDIR%%/mmpython/disc/lsdvd.py
  %%PYTHON_SITELIBDIR%%/mmpython/disc/lsdvd.pyc
  %%PYTHON_SITELIBDIR%%/mmpython/disc/lsdvd.pyo
 
 --7gGkHNMELEOhSGF6--
 
 --bjuZg6miEcdLYP6q
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFA0amxItq0KFQv7T8RAv/FAJsEQpGIRaObTqoaL2JiaNe88r/j4QCeIntO
 8gU7sv1BNXFdkz/8M6IgRdU=
 =aQnO
 -----END PGP SIGNATURE-----
 
 --bjuZg6miEcdLYP6q--
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Thu Jun 17 19:19:54 GMT 2004 
State-Changed-Why:  
Can you resend your fixed patch in a way to keep it from 
being mangled by quoted-printable? text/plain attachment 
or direct mail to me will do. thanks 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Thu Jun 17 19:19:54 GMT 2004 
Responsible-Changed-Why:  
Handle. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68025 
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Fri Jun 18 08:27:44 GMT 2004 
State-Changed-Why:  
Updated version committed, thanks. 

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