Changeset 137367


Ignore:
Timestamp:
Jun 10, 2015, 2:49:27 PM (4 years ago)
Author:
mf2k@…
Message:

cd-discid: Update to version 1.4. (#48005)

Location:
trunk/dports/audio/cd-discid
Files:
2 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/audio/cd-discid/Portfile

    r97115 r137367  
    44
    55name                    cd-discid
    6 version                 1.1
     6version                 1.4
    77categories              audio
    88license                 {GPL-2+ Artistic-1}
     
    2525master_sites            http://linukz.org/download/
    2626
    27 checksums               md5     04cb368e3f1ce17e656ac6691ca0b687 \
    28                         sha1    74cedeb2c5bf4f3248af249c0ff344ea9d713d1a \
    29                         rmd160  4fe4e53103565a01d1dc2dffcc9d43b4b1ea6565
     27checksums               rmd160  a63dabd35ca0b1f8114eeca78f79ea2f6b52cd6e \
     28                        sha256  ffd68cd406309e764be6af4d5cbcc309e132c13f3597c6a4570a1f218edd2c63
    3029
    31 patchfiles              patch-Makefile
    32 post-patch {
    33     reinplace "s/@VERSION@/${version}/g" ${worksrcpath}/Makefile
    34 }
     30patchfiles              patch-Makefile.diff \
     31                        patch-cd-discid.c.diff \
     32                        patch-cd-discid.1.diff
    3533
    3634use_configure           no
     
    3836build.env               CC=${configure.cc}
    3937
    40 destroot.destdir        prefix=${destroot}${prefix}
     38destroot.destdir        PREFIX=${destroot}${prefix}
    4139
    4240universal_variant       no
    4341
    44 platform macosx {
    45     patchfiles-append   patch-cd-discid.c.diff
    46 }
    47 
    4842livecheck.type          regex
    4943livecheck.regex         ${name}-(\[0-9.\]+)\\.tar
  • trunk/dports/audio/cd-discid/files/patch-cd-discid.c.diff

    r41112 r137367  
    1 --- cd-discid.c.orig    2003-12-15 16:55:00.000000000 -0700
    2 +++ cd-discid.c 2008-10-23 14:46:35.000000000 -0600
    3 @@ -86,6 +86,13 @@
    4  #define        cdrom_tocentry  CDTrackInfo
    5  #define               cdte_track_address trackStartAddress
     1--- cd-discid.c.orig    2013-05-14 11:02:00.000000000 +0200
     2+++ cd-discid.c 2015-06-10 09:18:49.000000000 +0200
     3@@ -1,6 +1,6 @@
     4 /*
     5  * Copyright (c) 1999-2003 Robert Woodcock <rcw@debian.org>
     6- * Copyright (c) 2009-2012 Timur Birsh <taem@linukz.org>
     7+ * Copyright (c) 2009-2013 Timur Birsh <taem@linukz.org>
     8  * This code is hereby licensed for public consumption under either the
     9  * GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice.
    610 
    7 +#if defined (__i386__) || defined(__x86_64__)
    8 +#define SWAP ntohl
    9 +#define RESWAP htonl
    10 +#else
    11 +#define SWAP
    12 +#define RESWAP
    13 +#endif
     11@@ -14,6 +14,8 @@
     12  * OpenBSD: Marcus Daniel <danielm@uni-muenster.de>
     13  * NetBSD: Chris Gilbert <chris@NetBSD.org>
     14  * MacOSX: Evan Jones <ejones@uwaterloo.ca> http://www.eng.uwaterloo.ca/~ejones/
     15+ *         Thomas Klausner <tk@giga.or.at>
     16+ * DragonFly: Thomas Klausner <tk@giga.or.at>, http://pkgsrc.se/audio/cd-discid
     17  */
     18 
     19 #include <stdio.h>
     20@@ -46,7 +48,7 @@
     21 
     22 /* __FreeBSD_kernel__ is needed for properly compiling on Debian GNU/kFreeBSD
     23    Look at http://glibc-bsd.alioth.debian.org/porting/PORTING for more info */
     24-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     25+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
     26 #include <sys/cdio.h>
     27 #define CDROM_LBA               CD_LBA_FORMAT    /* first frame is 0 */
     28 #define CD_MSF_OFFSET           150              /* MSF offset of first frame */
     29@@ -93,7 +95,7 @@
     30 #define cdth_trk1               lastTrackNumberInLastSessionLSB
     31 #define cdrom_tocentry          CDTrackInfo
     32 #define cdte_track_address      trackStartAddress
     33-#define DEVICE_NAME             "/dev/disk1"
     34+#define DEVICE_NAME             "/dev/rdisk1"
     35 
    1436 #else
    15  # error "Your OS isn't supported yet."
    16  #endif /* os selection */
    17 @@ -194,7 +201,7 @@
     37 #error "Your OS isn't supported yet."
     38@@ -130,7 +132,7 @@
     39        int drive, i, totaltime;
     40        long int cksum = 0;
     41        int musicbrainz = 0;
     42-       unsigned char first = 1, last = 1;
     43+       unsigned char last = 1;
     44        char *devicename = DEVICE_NAME;
     45        struct cdrom_tochdr hdr;
     46        struct cdrom_tocentry *TocEntry;
     47@@ -187,7 +189,6 @@
     48        }
     49 #endif
     50 
     51-       first = hdr.cdth_trk0;
     52        last = hdr.cdth_trk1;
     53 
     54        len = (last + 1) * sizeof(struct cdrom_tocentry);
     55@@ -236,8 +237,7 @@
    1856         * TocEntry[last-1].lastRecordedAddress + 1, so we compute the start
    1957         * of leadout from the start+length of the last track instead
    2058         */
    21 -       TocEntry[last].cdte_track_address = TocEntry[last-1].trackSize + TocEntry[last-1].trackStartAddress;
    22 +       TocEntry[last].cdte_track_address = RESWAP(SWAP(TocEntry[last-1].trackSize) + SWAP(TocEntry[last-1].trackStartAddress));
    23  #else /* FreeBSD, Linux, Solaris */
    24         for (i=0; i < last; i++) {
     59-       TocEntry[last].cdte_track_address = TocEntry[last - 1].trackSize +
     60-               TocEntry[last - 1].trackStartAddress;
     61+       TocEntry[last].cdte_track_address = htonl(ntohl(TocEntry[last-1].trackSize) + ntohl(TocEntry[last-1].trackStartAddress));
     62 #else   /* FreeBSD, Linux, Solaris */
     63        for (i = 0; i < last; i++) {
    2564                /* tracks start with 1, but I must start with 0 on OpenBSD */
    26 @@ -214,12 +221,12 @@
    27         }
     65@@ -260,12 +260,12 @@
     66        /* release file handle */
     67        close(drive);
     68 
     69-#if defined(__FreeBSD__)
     70+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
     71        TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
    2872 #endif
    2973 
     74        for (i = 0; i < last; i++) {
    3075-#if defined(__FreeBSD__)
    31 +#if defined(__FreeBSD__) || (defined(__APPLE__) && (defined (__i386__) || defined(__x86_64__)))
    32         TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
    33  #endif       
    34  
    35         for (i=0; i < last; i++) {
    36 -#if defined(__FreeBSD__)
    37 +#if defined(__FreeBSD__) || (defined(__APPLE__) && (defined (__i386__) || defined(__x86_64__)))
     76+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
    3877                TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
    3978 #endif
Note: See TracChangeset for help on using the changeset viewer.