From 6b5d678bf396b0a6ad5d177dde1de44f5e6ba76c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 31 Mar 2009 09:46:33 +0000 Subject: [PATCH] Fix parsing of CUE files. Bump portrevision. Submitted by: maintainer via email --- audio/libmp3splt/Makefile | 3 ++- audio/libmp3splt/files/patch-cddb.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 audio/libmp3splt/files/patch-cddb.c diff --git a/audio/libmp3splt/Makefile b/audio/libmp3splt/Makefile index 3043125affd4..3189f3fe3b52 100644 --- a/audio/libmp3splt/Makefile +++ b/audio/libmp3splt/Makefile @@ -7,6 +7,7 @@ PORTNAME= libmp3splt PORTVERSION= 0.5.4 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mp3splt @@ -60,6 +61,6 @@ PLIST_FILES+= lib/libmp3splt/libsplt_ogg.a \ .endif CONFIGURE_ENV+= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \ - CFLAGS="${CFLAGS} -I${LOCALBASE}/include" + CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" .include diff --git a/audio/libmp3splt/files/patch-cddb.c b/audio/libmp3splt/files/patch-cddb.c new file mode 100644 index 000000000000..a479194792ed --- /dev/null +++ b/audio/libmp3splt/files/patch-cddb.c @@ -0,0 +1,19 @@ +--- src/cddb.c.orig ++++ src/cddb.c +@@ -393,6 +393,16 @@ + //we read the file line by line + while (fgets(line, 2048, file_input)!=NULL) + { ++ //if windows file with '\r', then pretend is a unix file ++ if (strlen(line) > 1) ++ { ++ if (line[strlen(line)-2] == '\r') ++ { ++ line[strlen(line)-2] = '\n'; ++ line[strlen(line)-1] = '\0'; ++ } ++ } ++ + type = SPLT_CUE_NOTHING; + + //we read strings from file TRACK,TITLE,AUDIO,PERFORMER,INDEX