aboutsummaryrefslogtreecommitdiff
path: root/audio/mpg321
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2004-01-07 20:24:23 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2004-01-07 20:24:23 +0000
commit70080bf1f64cd75261937c728c0d97d8c92fb3d2 (patch)
treea22599bc25561798171ffa3e4977e8d0260cedbe /audio/mpg321
parentb9b77268ede57b5f2c0c5005382071265bc62fbf (diff)
downloadports-70080bf1f64cd75261937c728c0d97d8c92fb3d2.tar.gz
ports-70080bf1f64cd75261937c728c0d97d8c92fb3d2.zip
* Fix libmad and libid3tag dependencies.
Submitted by: sheldonh * Don't leak file descriptors on error. Obtained from: Debian
Notes
Notes: svn path=/head/; revision=97597
Diffstat (limited to 'audio/mpg321')
-rw-r--r--audio/mpg321/Makefile5
-rw-r--r--audio/mpg321/files/patch-mpg321.c31
2 files changed, 30 insertions, 6 deletions
diff --git a/audio/mpg321/Makefile b/audio/mpg321/Makefile
index 15cb1028f465..9dc930eccbec 100644
--- a/audio/mpg321/Makefile
+++ b/audio/mpg321/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mpg321
PORTVERSION= 0.2.10
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mpg321
@@ -16,7 +16,8 @@ MAINTAINER= naddy@FreeBSD.org
COMMENT= A free command-line mp3 player, compatible with mpg123
LIB_DEPENDS= ao.3:${PORTSDIR}/audio/libao \
- mad.2:${PORTSDIR}/audio/mad
+ id3tag.2:${PORTSDIR}/audio/libid3tag \
+ mad.2:${PORTSDIR}/audio/libmad
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-mpg123-symlink
diff --git a/audio/mpg321/files/patch-mpg321.c b/audio/mpg321/files/patch-mpg321.c
index ec792ebd7091..344e69a6908a 100644
--- a/audio/mpg321/files/patch-mpg321.c
+++ b/audio/mpg321/files/patch-mpg321.c
@@ -2,7 +2,7 @@
$FreeBSD$
--- mpg321.c.orig Sun Mar 24 06:49:20 2002
-+++ mpg321.c Tue Sep 3 01:29:40 2002
++++ mpg321.c Wed Jan 7 21:12:40 2004
@@ -188,7 +188,7 @@
else
@@ -21,7 +21,30 @@ $FreeBSD$
free (names[i]);
}
if (i%2) fprintf (stderr, "\n");
-@@ -509,9 +509,6 @@
+@@ -410,12 +410,14 @@
+
+ if(fstat(fd, &stat) == -1)
+ {
++ close(fd);
+ mpg321_error(currentfile);
+ continue;
+ }
+
+ if (!S_ISREG(stat.st_mode))
+ {
++ close(fd);
+ continue;
+ }
+
+@@ -432,6 +434,7 @@
+ if((playbuf.buf = mmap(0, playbuf.length, PROT_READ, MAP_SHARED, fd, 0))
+ == MAP_FAILED)
+ {
++ close(fd);
+ mpg321_error(currentfile);
+ continue;
+ }
+@@ -509,9 +512,6 @@
mad_decoder_finish(&decoder);
@@ -31,7 +54,7 @@ $FreeBSD$
if (playbuf.frames)
free(playbuf.frames);
-@@ -521,6 +518,7 @@
+@@ -521,6 +521,7 @@
if (playbuf.fd == -1)
{
munmap(playbuf.buf, playbuf.length);
@@ -39,7 +62,7 @@ $FreeBSD$
}
else
-@@ -535,10 +533,6 @@
+@@ -535,10 +536,6 @@
ao_close(playdevice);
ao_shutdown();