[csw-devel] SF.net SVN: gar:[15750] csw/mgar/pkg/xcdroast/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Sun Sep 25 19:16:20 CEST 2011


Revision: 15750
          http://gar.svn.sourceforge.net/gar/?rev=15750&view=rev
Author:   dmichelsen
Date:     2011-09-25 17:16:20 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
xcdroast: Add patches

Modified Paths:
--------------
    csw/mgar/pkg/xcdroast/trunk/Makefile
    csw/mgar/pkg/xcdroast/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/xcdroast/trunk/files/0001-Upstream-patch-parse-version.patch
    csw/mgar/pkg/xcdroast/trunk/files/0002-Upstream-patch-io-compile.patch
    csw/mgar/pkg/xcdroast/trunk/files/0003-Upstream-patch-cdda2wav-version.patch
    csw/mgar/pkg/xcdroast/trunk/files/0004-Upstream-patch-fix-cddb-hidden-tracks.patch

Modified: csw/mgar/pkg/xcdroast/trunk/Makefile
===================================================================
--- csw/mgar/pkg/xcdroast/trunk/Makefile	2011-09-25 16:51:00 UTC (rev 15749)
+++ csw/mgar/pkg/xcdroast/trunk/Makefile	2011-09-25 17:16:20 UTC (rev 15750)
@@ -11,8 +11,21 @@
 endef
 
 MASTER_SITES = $(SF_MIRRORS)
+MASTER_SITES += http://www.xcdroast.org/xcdr098/patches/
 DISTFILES  = $(DISTNAME).tar.gz
 
+# The upstream patches have different patch levels, convert to git patches below
+#PATCHFILES += cdda2wav_version.patch
+##PATCHFILES += change_norwegian_locale.txt
+#PATCHFILES += fix_cddb_hidden_tracks.patch
+#PATCHFILES += io_compile.patch
+#PATCHFILES += parse_version.patch
+
+PATCHFILES += 0001-Upstream-patch-parse-version.patch
+PATCHFILES += 0002-Upstream-patch-io-compile.patch
+PATCHFILES += 0003-Upstream-patch-cdda2wav-version.patch
+PATCHFILES += 0004-Upstream-patch-fix-cddb-hidden-tracks.patch
+
 BUILD_DEP_PKGS += CSWgdkpixbuf
 
 PACKAGES += CSWxcdroast

Modified: csw/mgar/pkg/xcdroast/trunk/checksums
===================================================================
--- csw/mgar/pkg/xcdroast/trunk/checksums	2011-09-25 16:51:00 UTC (rev 15749)
+++ csw/mgar/pkg/xcdroast/trunk/checksums	2011-09-25 17:16:20 UTC (rev 15750)
@@ -1 +1,6 @@
+1e85ee759a197cd05a4ccdce6f41bf9f  cdda2wav_version.patch
+1637bf54a60e16193997dc7d976714c5  change_norwegian_locale.txt
+14cd6fda3e58847edba4a61435e47fb5  fix_cddb_hidden_tracks.patch
+6e676e94e8b6922ed3e2d0feef05fd60  io_compile.patch
+1004a1aed29b463d3b2c849460c2dca0  parse_version.patch
 bc3d335a30f292067eaaf1ea03ebaf17  xcdroast-0.98alpha16.tar.gz

Added: csw/mgar/pkg/xcdroast/trunk/files/0001-Upstream-patch-parse-version.patch
===================================================================
--- csw/mgar/pkg/xcdroast/trunk/files/0001-Upstream-patch-parse-version.patch	                        (rev 0)
+++ csw/mgar/pkg/xcdroast/trunk/files/0001-Upstream-patch-parse-version.patch	2011-09-25 17:16:20 UTC (rev 15750)
@@ -0,0 +1,25 @@
+From 7222135755ec8ffeea4553951b8e2833fa0dc25c Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 25 Sep 2011 19:02:58 +0200
+Subject: [PATCH 1/4] Upstrea patch: parse version
+
+---
+ src/xtools.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/xtools.c b/src/xtools.c
+index b199369..6ffb507 100644
+--- a/src/xtools.c
++++ b/src/xtools.c
+@@ -3086,7 +3086,7 @@ gint parse_version_str(gchar *str, version_id_t *ver) {
+ gchar tmp[MAXLINE];
+ gchar *p,*q,*r;
+ 
+-        ver->major = ver->minor = ver->patch = 0;
++        ver->major = ver->minor = ver->patch = ver->branch = 0;
+ 	ver->devel='h';
+ 
+ 	strncpy(tmp, str, MAXLINE);
+-- 
+1.7.6.1
+

Added: csw/mgar/pkg/xcdroast/trunk/files/0002-Upstream-patch-io-compile.patch
===================================================================
--- csw/mgar/pkg/xcdroast/trunk/files/0002-Upstream-patch-io-compile.patch	                        (rev 0)
+++ csw/mgar/pkg/xcdroast/trunk/files/0002-Upstream-patch-io-compile.patch	2011-09-25 17:16:20 UTC (rev 15750)
@@ -0,0 +1,35 @@
+From cd43333693cb1829d9211bbc559be98a6e0be60e Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 25 Sep 2011 19:04:10 +0200
+Subject: [PATCH 2/4] Upstream patch: io compile
+
+---
+ src/io.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/io.c b/src/io.c
+index 89937ca..a7a7933 100644
+--- a/src/io.c
++++ b/src/io.c
+@@ -1903,7 +1903,8 @@ FILE *fpin;
+ 	}
+ 
+ 	strcpy(str,"");
+-	fgets(str,MAXLINE,fpin); 
++	if (fgets(str,MAXLINE,fpin) == NULL)
++                g_error("fgets error\n");
+ 
+         if (pclose(fpin) == -1) {
+                 g_error("pclose error\n");
+@@ -4720,7 +4721,7 @@ gint fd;
+ 	dolog(3, "Saving extended output to %s\n", fname);
+ 
+ 	/* write to file */
+-	fd = open(fname,O_WRONLY | O_CREAT);
++	fd = open(fname, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
+ 	if (fd < 0) {
+ 		g_warning("Can't open file %s for writing\n",fname);
+ 		return 1;
+-- 
+1.7.6.1
+

Added: csw/mgar/pkg/xcdroast/trunk/files/0003-Upstream-patch-cdda2wav-version.patch
===================================================================
--- csw/mgar/pkg/xcdroast/trunk/files/0003-Upstream-patch-cdda2wav-version.patch	                        (rev 0)
+++ csw/mgar/pkg/xcdroast/trunk/files/0003-Upstream-patch-cdda2wav-version.patch	2011-09-25 17:16:20 UTC (rev 15750)
@@ -0,0 +1,67 @@
+From f799e9bd48cf923e9116f5e15040ae44a415a594 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 25 Sep 2011 19:05:56 +0200
+Subject: [PATCH 3/4] Upstream patch: cdda2wav version
+
+---
+ src/io.c |   15 +++++++++++----
+ 1 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/src/io.c b/src/io.c
+index a7a7933..fda393e 100644
+--- a/src/io.c
++++ b/src/io.c
+@@ -10063,6 +10063,7 @@ gchar *p;
+ 
+ gint check_version_cdda2wav(gchar *match, gchar *found) {
+ gchar line[MAXLINE];
++gchar vline[MAXLINE];
+ gchar ver[MAXLINE];
+ FILE *fpin;
+ gchar *p;
+@@ -10077,32 +10078,38 @@ gchar *p;
+         }
+ 
+ 	strcpy(line,"");
++	strcpy(vline,"");
+         for (;;) {
+                 if (fgets(line,MAXLINE,fpin) == NULL) 
+                         break;
+ 		dodebug(10,"got: %s",line);
++
++	        /* only get first line */
++        	if (strcmp(vline,"") == 0) {
++                	strncpy(vline, line, MAXLINE);
++        	}
+         }
+ 
+         if (pclose(fpin) == -1) {
+                 g_error("pclose error\n");
+         }
+ 
+-	if (strcmp(line,"") == 0 || strstr(line,"sh:") != NULL) {
++	if (strcmp(vline,"") == 0 || strstr(vline,"sh:") != NULL) {
+ 		/* failed to open - permission denied */
+ 		return 2;
+ 	}
+ 
+-	/* now line contains the version string of cdda2wav */
++	/* now vline contains the version string of cdda2wav */
+ 	/* try to extract the version number */
+ 
+-	p = strstr(line,"version");
++	p = strstr(vline,"version");
+ 	if (p != NULL) {
+ 		p = strtok(p+8, " _");
+ 		if (p != NULL) {
+ 			strcpy(ver,p);
+ 		}
+ 	} else {
+-		p = strstr(line,"cdda2wav");
++		p = strstr(vline,"cdda2wav");
+ 		if (p != NULL) {
+ 			p = strtok(p+9, " ");
+ 			if (p != NULL) {
+-- 
+1.7.6.1
+

Added: csw/mgar/pkg/xcdroast/trunk/files/0004-Upstream-patch-fix-cddb-hidden-tracks.patch
===================================================================
--- csw/mgar/pkg/xcdroast/trunk/files/0004-Upstream-patch-fix-cddb-hidden-tracks.patch	                        (rev 0)
+++ csw/mgar/pkg/xcdroast/trunk/files/0004-Upstream-patch-fix-cddb-hidden-tracks.patch	2011-09-25 17:16:20 UTC (rev 15750)
@@ -0,0 +1,58 @@
+From 35d4b336a8e27c673864a6f5f6978e0518455c0c Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 25 Sep 2011 19:06:31 +0200
+Subject: [PATCH 4/4] Upstream patch: fix cddb hidden tracks
+
+---
+ src/io.c |   15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/src/io.c b/src/io.c
+index fda393e..18a9a3d 100644
+--- a/src/io.c
++++ b/src/io.c
+@@ -2665,6 +2665,8 @@ gint ret;
+ 		g_error("Unexpected output in cdda2wav toc-output\n");
+ 	}
+ 	trackinfo[tocnr]->track_nr = atoi(p1);
++	if (trackinfo[tocnr]->track_nr == 0)
++		cdinfo.nr_tracks++;
+ 	trackinfo[tocnr]->isosize = -1;
+ 
+ 	/* reststring into tmp2 - strip to remove leading spaces */
+@@ -8401,6 +8403,9 @@ gchar *rowdata[1];
+ 		if (extract_quoted(tmp) != 0) 
+ 			return;
+ 
++		if (matchnr == 0 && trackinfo[matchnr]->track_nr == 0)
++			matchnr++;
++
+ 		if (mode == 0) {
+ 			if (matchnr >= cdinfo.nr_tracks) {
+ 				g_warning("invalid track count from cddb-server\n");
+@@ -8482,14 +8487,20 @@ gint i;
+ 
+ 	/* build of command line */
+ 	if (mode == 0 || mode == 2) {
++		gint	ntr = cdinfo.nr_tracks;
++
++		if (ntr > 0 && trackinfo[0]->track_nr == 0)
++			ntr--;
+ 		g_snprintf(tmp,MAXLINE,"cddb query %s %d ",
+-			cdinfo.cddb_discid, cdinfo.nr_tracks);
++			cdinfo.cddb_discid, ntr);
+ 		for (i = 0; i < cdinfo.nr_tracks; i++) {
++			if (trackinfo[i]->track_nr == 0)
++				continue;
+ 			g_snprintf(tmp2,MAXLINE,"%d ",
+ 				trackinfo[i]->start_sec + 150);
+ 			strcat(tmp,tmp2);
+ 		}
+-		g_snprintf(tmp2,MAXLINE,"%d",cdinfo.total_size / 75);
++		g_snprintf(tmp2,MAXLINE,"%d",(cdinfo.leadout + 150) / 75);
+ 		strcat(tmp,tmp2);
+ 	} else {
+ 		/* get data from toc file */
+-- 
+1.7.6.1
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list