<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[137367] trunk/dports/audio/cd-discid</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/137367">137367</a></dd>
<dt>Author</dt> <dd>mf2k@macports.org</dd>
<dt>Date</dt> <dd>2015-06-10 07:49:27 -0700 (Wed, 10 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>cd-discid: Update to version 1.4. (#48005)</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsaudiocddiscidPortfile">trunk/dports/audio/cd-discid/Portfile</a></li>
<li><a href="#trunkdportsaudiocddiscidfilespatchcddiscidcdiff">trunk/dports/audio/cd-discid/files/patch-cd-discid.c.diff</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsaudiocddiscidfilespatchMakefilediff">trunk/dports/audio/cd-discid/files/patch-Makefile.diff</a></li>
<li><a href="#trunkdportsaudiocddiscidfilespatchcddiscid1diff">trunk/dports/audio/cd-discid/files/patch-cd-discid.1.diff</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsaudiocddiscidfilespatchMakefile">trunk/dports/audio/cd-discid/files/patch-Makefile</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsaudiocddiscidPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/cd-discid/Portfile (137366 => 137367)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/cd-discid/Portfile        2015-06-10 14:47:41 UTC (rev 137366)
+++ trunk/dports/audio/cd-discid/Portfile        2015-06-10 14:49:27 UTC (rev 137367)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> PortSystem              1.0
</span><span class="cx"> 
</span><span class="cx"> name                    cd-discid
</span><del>-version                 1.1
</del><ins>+version                 1.4
</ins><span class="cx"> categories              audio
</span><span class="cx"> license                 {GPL-2+ Artistic-1}
</span><span class="cx"> platforms               darwin
</span><span class="lines">@@ -24,26 +24,20 @@
</span><span class="cx"> homepage                http://linukz.org/cd-discid.shtml
</span><span class="cx"> master_sites            http://linukz.org/download/
</span><span class="cx"> 
</span><del>-checksums               md5     04cb368e3f1ce17e656ac6691ca0b687 \
-                        sha1    74cedeb2c5bf4f3248af249c0ff344ea9d713d1a \
-                        rmd160  4fe4e53103565a01d1dc2dffcc9d43b4b1ea6565
</del><ins>+checksums               rmd160  a63dabd35ca0b1f8114eeca78f79ea2f6b52cd6e \
+                        sha256  ffd68cd406309e764be6af4d5cbcc309e132c13f3597c6a4570a1f218edd2c63
</ins><span class="cx"> 
</span><del>-patchfiles              patch-Makefile
-post-patch {
-    reinplace &quot;s/@VERSION@/${version}/g&quot; ${worksrcpath}/Makefile
-}
</del><ins>+patchfiles              patch-Makefile.diff \
+                        patch-cd-discid.c.diff \
+                        patch-cd-discid.1.diff
</ins><span class="cx"> 
</span><span class="cx"> use_configure           no
</span><span class="cx"> 
</span><span class="cx"> build.env               CC=${configure.cc}
</span><span class="cx"> 
</span><del>-destroot.destdir        prefix=${destroot}${prefix}
</del><ins>+destroot.destdir        PREFIX=${destroot}${prefix}
</ins><span class="cx"> 
</span><span class="cx"> universal_variant       no
</span><span class="cx"> 
</span><del>-platform macosx {
-    patchfiles-append   patch-cd-discid.c.diff
-}
-
</del><span class="cx"> livecheck.type          regex
</span><span class="cx"> livecheck.regex         ${name}-(\[0-9.\]+)\\.tar
</span></span></pre></div>
<a id="trunkdportsaudiocddiscidfilespatchMakefile"></a>
<div class="delfile"><h4>Deleted: trunk/dports/audio/cd-discid/files/patch-Makefile (137366 => 137367)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/cd-discid/files/patch-Makefile        2015-06-10 14:47:41 UTC (rev 137366)
+++ trunk/dports/audio/cd-discid/files/patch-Makefile        2015-06-10 14:49:27 UTC (rev 137367)
</span><span class="lines">@@ -1,22 +0,0 @@
</span><del>---- Makefile.orig        2009-09-02 03:03:08.000000000 -0500
-+++ Makefile        2010-03-20 07:48:10.000000000 -0500
-@@ -1,17 +1,11 @@
--VERSION = 0.8
--CC = gcc
--CFLAGS = -g -O2
--LDFLAGS =
--LIBS = 
--DEFS =  
-+VERSION = @VERSION@
- INSTALL = /usr/bin/install -c

- # Installation directories
--prefix = ${DESTDIR}/usr
- exec_prefix = ${prefix}
- mandir = ${prefix}/share/man/man1
- bindir = ${exec_prefix}/bin
--etcdir = ${DESTDIR}/etc
-+etcdir = ${prefix}/etc

- INCL = 
- SRCS = cd-discid.c
</del></span></pre></div>
<a id="trunkdportsaudiocddiscidfilespatchMakefilediff"></a>
<div class="addfile"><h4>Added: trunk/dports/audio/cd-discid/files/patch-Makefile.diff (0 => 137367)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/cd-discid/files/patch-Makefile.diff                                (rev 0)
+++ trunk/dports/audio/cd-discid/files/patch-Makefile.diff        2015-06-10 14:49:27 UTC (rev 137367)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+--- Makefile.orig        2015-06-09 23:14:28.000000000 +0200
++++ Makefile        2015-06-09 23:15:13.000000000 +0200
+@@ -28,9 +28,8 @@
+         $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS)

+ install: cd-discid
+-        $(INSTALL) -D cd-discid $(DESTDIR)$(BINDIR)/cd-discid
+-        $(STRIP) $(DESTDIR)$(BINDIR)/cd-discid
+-        $(INSTALL) -D -m 644 cd-discid.1 $(DESTDIR)$(MANDIR)/cd-discid.1
++        $(INSTALL) cd-discid $(DESTDIR)$(BINDIR)/cd-discid
++        $(INSTALL) -m 644 cd-discid.1 $(DESTDIR)$(MANDIR)/cd-discid.1

+ clean:
+         $(RM) $(OBJS) cd-discid
</ins></span></pre></div>
<a id="trunkdportsaudiocddiscidfilespatchcddiscid1diff"></a>
<div class="addfile"><h4>Added: trunk/dports/audio/cd-discid/files/patch-cd-discid.1.diff (0 => 137367)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/cd-discid/files/patch-cd-discid.1.diff                                (rev 0)
+++ trunk/dports/audio/cd-discid/files/patch-cd-discid.1.diff        2015-06-10 14:49:27 UTC (rev 137367)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+--- cd-discid.1.orig        2013-05-14 11:02:00.000000000 +0200
++++ cd-discid.1        2015-06-10 09:33:52.000000000 +0200
+@@ -33,14 +33,20 @@
+ is omitted, the following device name is assumed:
+ .RS
+ .IP \fI/dev/cdrom\fP
+-Linux and FreeBSD
++Linux, FreeBSD and DragonFly
+ .IP \fI/dev/cd0a\fP
+ OpenBSD and NetBSD
+ .IP \fI/dev/vol/aliases/cdrom0\fP
+ Solaris
+-.IP \fI/dev/disk1\fP
++.IP \fI/dev/rdisk1\fP
+ MacOS X
+ .IP \fI/dev/cd0\fP
+ Hurd
+ .SH AUTHOR
+-Robert Woodcock &lt;rcw@debian.org&gt;. Updates by Timur Bish &lt;taem@linukz.org&gt;.
++Robert Woodcock &lt;rcw@debian.org&gt;
++.SH &quot;REPORTING BUGS&quot;
++Timur Birsh &lt;taem@linukz.org&gt;
++.SH &quot;SEE ALSO&quot;
++http://linukz.org/cd-discid.shtml
++.br
++https://github.com/taem/cd-discid
</ins></span></pre></div>
<a id="trunkdportsaudiocddiscidfilespatchcddiscidcdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/cd-discid/files/patch-cd-discid.c.diff (137366 => 137367)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/cd-discid/files/patch-cd-discid.c.diff        2015-06-10 14:47:41 UTC (rev 137366)
+++ trunk/dports/audio/cd-discid/files/patch-cd-discid.c.diff        2015-06-10 14:49:27 UTC (rev 137367)
</span><span class="lines">@@ -1,40 +1,79 @@
</span><del>---- cd-discid.c.orig        2003-12-15 16:55:00.000000000 -0700
-+++ cd-discid.c        2008-10-23 14:46:35.000000000 -0600
-@@ -86,6 +86,13 @@
- #define        cdrom_tocentry  CDTrackInfo
- #define               cdte_track_address trackStartAddress
</del><ins>+--- cd-discid.c.orig        2013-05-14 11:02:00.000000000 +0200
++++ cd-discid.c        2015-06-10 09:18:49.000000000 +0200
+@@ -1,6 +1,6 @@
+ /*
+  * Copyright (c) 1999-2003 Robert Woodcock &lt;rcw@debian.org&gt;
+- * Copyright (c) 2009-2012 Timur Birsh &lt;taem@linukz.org&gt;
++ * Copyright (c) 2009-2013 Timur Birsh &lt;taem@linukz.org&gt;
+  * This code is hereby licensed for public consumption under either the
+  * GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice.
</ins><span class="cx">  
</span><del>-+#if defined (__i386__) || defined(__x86_64__)
-+#define SWAP ntohl
-+#define RESWAP htonl
-+#else
-+#define SWAP
-+#define RESWAP
-+#endif
</del><ins>+@@ -14,6 +14,8 @@
+  * OpenBSD: Marcus Daniel &lt;danielm@uni-muenster.de&gt;
+  * NetBSD: Chris Gilbert &lt;chris@NetBSD.org&gt;
+  * MacOSX: Evan Jones &lt;ejones@uwaterloo.ca&gt; http://www.eng.uwaterloo.ca/~ejones/
++ *         Thomas Klausner &lt;tk@giga.or.at&gt;
++ * DragonFly: Thomas Klausner &lt;tk@giga.or.at&gt;, http://pkgsrc.se/audio/cd-discid
+  */

+ #include &lt;stdio.h&gt;
+@@ -46,7 +48,7 @@

+ /* __FreeBSD_kernel__ is needed for properly compiling on Debian GNU/kFreeBSD
+    Look at http://glibc-bsd.alioth.debian.org/porting/PORTING for more info */
+-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ #include &lt;sys/cdio.h&gt;
+ #define CDROM_LBA               CD_LBA_FORMAT    /* first frame is 0 */
+ #define CD_MSF_OFFSET           150              /* MSF offset of first frame */
+@@ -93,7 +95,7 @@
+ #define cdth_trk1               lastTrackNumberInLastSessionLSB
+ #define cdrom_tocentry          CDTrackInfo
+ #define cdte_track_address      trackStartAddress
+-#define DEVICE_NAME             &quot;/dev/disk1&quot;
++#define DEVICE_NAME             &quot;/dev/rdisk1&quot;

</ins><span class="cx">  #else
</span><del>- # error &quot;Your OS isn't supported yet.&quot;
- #endif        /* os selection */
-@@ -194,7 +201,7 @@
</del><ins>+ #error &quot;Your OS isn't supported yet.&quot;
+@@ -130,7 +132,7 @@
+         int drive, i, totaltime;
+         long int cksum = 0;
+         int musicbrainz = 0;
+-        unsigned char first = 1, last = 1;
++        unsigned char last = 1;
+         char *devicename = DEVICE_NAME;
+         struct cdrom_tochdr hdr;
+         struct cdrom_tocentry *TocEntry;
+@@ -187,7 +189,6 @@
+         }
+ #endif

+-        first = hdr.cdth_trk0;
+         last = hdr.cdth_trk1;

+         len = (last + 1) * sizeof(struct cdrom_tocentry);
+@@ -236,8 +237,7 @@
</ins><span class="cx">           * TocEntry[last-1].lastRecordedAddress + 1, so we compute the start
</span><span class="cx">           * of leadout from the start+length of the last track instead
</span><span class="cx">           */
</span><del>--        TocEntry[last].cdte_track_address = TocEntry[last-1].trackSize + TocEntry[last-1].trackStartAddress;
-+        TocEntry[last].cdte_track_address = RESWAP(SWAP(TocEntry[last-1].trackSize) + SWAP(TocEntry[last-1].trackStartAddress));
- #else /* FreeBSD, Linux, Solaris */
-         for (i=0; i &lt; last; i++) {
</del><ins>+-        TocEntry[last].cdte_track_address = TocEntry[last - 1].trackSize +
+-                TocEntry[last - 1].trackStartAddress;
++        TocEntry[last].cdte_track_address = htonl(ntohl(TocEntry[last-1].trackSize) + ntohl(TocEntry[last-1].trackStartAddress));
+ #else   /* FreeBSD, Linux, Solaris */
+         for (i = 0; i &lt; last; i++) {
</ins><span class="cx">                  /* tracks start with 1, but I must start with 0 on OpenBSD */
</span><del>-@@ -214,12 +221,12 @@
-         }
- #endif
</del><ins>+@@ -260,12 +260,12 @@
+         /* release file handle */
+         close(drive);
</ins><span class="cx">  
</span><span class="cx"> -#if defined(__FreeBSD__)
</span><del>-+#if defined(__FreeBSD__) || (defined(__APPLE__) &amp;&amp; (defined (__i386__) || defined(__x86_64__)))
</del><ins>++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
</ins><span class="cx">          TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
</span><del>- #endif       
</del><ins>+ #endif
</ins><span class="cx">  
</span><del>-         for (i=0; i &lt; last; i++) {
</del><ins>+         for (i = 0; i &lt; last; i++) {
</ins><span class="cx"> -#if defined(__FreeBSD__)
</span><del>-+#if defined(__FreeBSD__) || (defined(__APPLE__) &amp;&amp; (defined (__i386__) || defined(__x86_64__)))
</del><ins>++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
</ins><span class="cx">                  TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
</span><span class="cx">  #endif
</span><span class="cx">                  cksum += cddb_sum((TocEntry[i].cdte_track_address + CD_MSF_OFFSET) / CD_FRAMES);
</span></span></pre>
</div>
</div>

</body>
</html>