head 1.7; access; symbols pkgsrc-2026Q1:1.7.0.62 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.60 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.58 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.56 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.54 pkgsrc-2025Q1-base:1.7 pkgsrc-2024Q4:1.7.0.52 pkgsrc-2024Q4-base:1.7 pkgsrc-2024Q3:1.7.0.50 pkgsrc-2024Q3-base:1.7 pkgsrc-2024Q2:1.7.0.48 pkgsrc-2024Q2-base:1.7 pkgsrc-2024Q1:1.7.0.46 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.7.0.44 pkgsrc-2023Q4-base:1.7 pkgsrc-2023Q3:1.7.0.42 pkgsrc-2023Q3-base:1.7 pkgsrc-2023Q2:1.7.0.40 pkgsrc-2023Q2-base:1.7 pkgsrc-2023Q1:1.7.0.38 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.7.0.36 pkgsrc-2022Q4-base:1.7 pkgsrc-2022Q3:1.7.0.34 pkgsrc-2022Q3-base:1.7 pkgsrc-2022Q2:1.7.0.32 pkgsrc-2022Q2-base:1.7 pkgsrc-2022Q1:1.7.0.30 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.28 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.26 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.24 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.22 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.7.0.20 pkgsrc-2020Q4-base:1.7 pkgsrc-2020Q3:1.7.0.18 pkgsrc-2020Q3-base:1.7 pkgsrc-2020Q2:1.7.0.16 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.12 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.14 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.10 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.8 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.6 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.4 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.2 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.6.0.40 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.38 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.36 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.34 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.30 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.28 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.26 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.24 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.22 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.20 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.18 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.16 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.14 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.12 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.10 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.8 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.6 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.6.0.4 pkgsrc-2014Q1-base:1.6 pkgsrc-2013Q4:1.6.0.2 pkgsrc-2013Q4-base:1.6 pkgsrc-2013Q3:1.5.0.34 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.32 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.30 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.28 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.26 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.24 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.22 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.5.0.20 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q3:1.5.0.18 pkgsrc-2011Q3-base:1.5 pkgsrc-2011Q2:1.5.0.16 pkgsrc-2011Q2-base:1.5 pkgsrc-2011Q1:1.5.0.14 pkgsrc-2011Q1-base:1.5 pkgsrc-2010Q4:1.5.0.12 pkgsrc-2010Q4-base:1.5 pkgsrc-2010Q3:1.5.0.10 pkgsrc-2010Q3-base:1.5 pkgsrc-2010Q2:1.5.0.8 pkgsrc-2010Q2-base:1.5 pkgsrc-2010Q1:1.5.0.6 pkgsrc-2010Q1-base:1.5 pkgsrc-2009Q4:1.5.0.4 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.2 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.4.0.28 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.26 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.24 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.22 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.20 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.18 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.16 pkgsrc-2008Q1:1.4.0.14 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.12 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.10 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.8 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.6 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.4 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.2 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.3.0.4 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.2 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.2.0.18 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.16 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.14 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.12 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.10 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.8 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.6 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.4 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 netbsd-1-4-PATCH002:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.7 date 2018.09.27.15.29.06; author triaxx; state Exp; branches; next 1.6; commitid XAIjiOr0UyKxWKTA; 1.6 date 2013.12.12.16.41.32; author jperkin; state Exp; branches; next 1.5; commitid lQNU6i8bUcN6BRgx; 1.5 date 2009.08.09.16.00.53; author drochner; state Exp; branches; next 1.4; 1.4 date 2006.09.03.17.13.30; author ben; state Exp; branches; next 1.3; 1.3 date 2006.03.07.06.29.03; author joerg; state Exp; branches; next 1.2; 1.2 date 2003.10.20.12.07.23; author grant; state Exp; branches; next 1.1; 1.1 date 2000.01.19.08.03.00; author itohy; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.01.19.08.03.00; author itohy; state Exp; branches; next ; desc @@ 1.7 log @cdparanoia: fix build on FreeBSD Add comments to patches (not always relevant) to appease pkglint Bump revision @ text @$NetBSD: patch-cd,v 1.6 2013/12/12 16:41:32 jperkin Exp $ Support for Sun and several BSD. --- interface/common_interface.c.orig 2008-08-21 16:08:54.000000000 +0000 +++ interface/common_interface.c @@@@ -9,26 +9,50 @@@@ ******************************************************************/ #include +#if defined(__APPLE__) && defined(__MACH__) +#include +#include +#include +#include +#include +#endif #include "low_interface.h" #include "utils.h" #include "smallft.h" +#ifdef __linux__ #include +#endif + +#ifdef __sun +#include +#endif /* Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */ /* Also test using CDROM_GET_CAPABILITY (if available) as some newer DVDROMs will reject CDROMVOLREAD ioctl for god-knows-what reason */ int ioctl_ping_cdrom(int fd){ +#ifdef __linux__ struct cdrom_volctrl volctl; if (ioctl(fd, CDROMVOLREAD, &volctl) && ioctl(fd, CDROM_GET_CAPABILITY, NULL)<0) return(1); /* failure */ +#elif defined(__sun) + struct cdrom_volctrl volctl; + if (ioctl(fd, CDROMVOLCTRL, &volctl)) + return(1); /* failure */ +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) + struct ioc_vol volctl; + if (ioctl(fd, CDIOCGETVOL, &volctl)) + return(1); /* failure */ +#endif return(0); /* success! */ } +#ifdef __linux__ /* Use the ioctl thingy above ping the cdrom; this will get model info */ char *atapi_drive_info(int fd){ /* Work around the fact that the struct grew without warning in @@@@ -49,6 +73,7 @@@@ char *atapi_drive_info(int fd){ free(id); return(ret); } +#endif int data_bigendianp(cdrom_drive *d){ float lsb_votes=0; @@@@ -174,9 +199,12 @@@@ int data_bigendianp(cdrom_drive *d){ knows the leadout/leadin size. */ int FixupTOC(cdrom_drive *d,int tracks){ +#ifdef __linux__ struct cdrom_multisession ms_str; +#endif int j; +#if !(defined(__APPLE__) && defined(__MACH__)) /* First off, make sure the 'starting sector' is >=0 */ for(j=0;jioctl_fd != -1) { +#ifdef __linux__ int result; ms_str.addr_format = CDROM_LBA; result = ioctl(d->ioctl_fd, CDROMMULTISESSION, &ms_str); if (result == -1) return -1; +# define ms_addr (ms_str.addr.lba) +#endif + +#if defined(__NetBSD__) || defined(__sun) + int ms_addr; + + ms_addr = 0; /* last session */ +#ifdef __NetBSD__ + if (ioctl(d->ioctl_fd, CDIOREADMSADDR, &ms_addr) == -1) +#else + if (ioctl(d->ioctl_fd, CDROMREADOFFSET, &ms_addr) == -1) +#endif + return -1; +#endif - if (ms_str.addr.lba > 100) { + if (ms_addr > 100) { /* This is an odd little piece of code --Monty */ @@@@ -226,15 +270,17 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ /* adjust end of last audio track to be in the first session */ for (j = tracks-1; j >= 0; j--) { if (j > 0 && !IS_AUDIO(d,j) && IS_AUDIO(d,j-1)) { - if ((d->disc_toc[j].dwStartSector > ms_str.addr.lba - 11400) && - (ms_str.addr.lba - 11400 > d->disc_toc[j-1].dwStartSector)) - d->disc_toc[j].dwStartSector = ms_str.addr.lba - 11400; + if ((d->disc_toc[j].dwStartSector > ms_addr - 11400) && + (ms_addr - 11400 > d->disc_toc[j-1].dwStartSector)) + d->disc_toc[j].dwStartSector = ms_addr - 11400; break; } } return 1; } } +#endif +#endif return 0; } @ 1.6 log @Make package build on SunOS. The end result is mostly non-functional as it is missing SCSI and CDDA support, however this does enable a number of other packages to now build, many of which do not depend on working cdparanoia for their own functionality. @ text @d1 3 a3 1 $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ @ 1.5 log @update to 3.0.10.2 (which is III-10.2 upstream) This is a major update (9.8 was released 2001), most significant changes are support for new (Linux) kernel interfaces and improved drive cache model. pkgsrc note: I've tried to retain Darwin/FreeBSD/DragonFly support, except in scsi_interface.c where the structure changed significantly. Someone who can test please add it back. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- interface/common_interface.c.orig 2008-08-21 18:08:54.000000000 +0200 d5 1 a5 1 @@@@ -9,26 +9,42 @@@@ d23 4 d37 4 d56 1 a56 1 @@@@ -49,6 +65,7 @@@@ char *atapi_drive_info(int fd){ d64 1 a64 1 @@@@ -174,9 +191,12 @@@@ int data_bigendianp(cdrom_drive *d){ d77 1 a77 1 @@@@ -211,14 +231,26 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ d92 1 a92 1 +#ifdef __NetBSD__ d96 1 d98 3 d109 1 a109 1 @@@@ -226,15 +258,17 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ @ 1.4 log @Fix build on Mac OS X and bump pkgrevision. This is based on the work found at: http://strangehours.livejournal.com/9698.html Tested on i386 Mac OS X 10.4.7 and i386 NetBSD 3.0. TODO: manual device selection in Mac OS X. @ text @d3 1 a3 1 --- interface/common_interface.c.orig 2000-04-19 15:41:04.000000000 -0700 d5 1 a5 1 @@@@ -9,23 +9,39 @@@@ d25 2 d30 2 a31 1 if (ioctl(fd, CDROMVOLREAD, &volctl)) d48 1 a48 1 @@@@ -46,6 +62,7 @@@@ char *atapi_drive_info(int fd){ d56 2 a57 2 @@@@ -171,9 +188,12 @@@@ int data_bigendianp(cdrom_drive *d){ knows the leasoud/leadin size. */ d69 1 a69 1 @@@@ -208,14 +228,26 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ d97 1 a97 1 @@@@ -223,14 +255,16 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ d101 2 a102 1 - if (d->disc_toc[j].dwStartSector > ms_str.addr.lba - 11400) d104 2 a105 1 + if (d->disc_toc[j].dwStartSector > ms_addr - 11400) @ 1.3 log @Sync DragonFly/FreeBSD support with FreeBSD ports by adding cdda_device_name to struct cdrom_drive. This makes a number of hacks in various places superfluous and should fix the KDE multimedia issues. Bump revision. Recursive bump will follow, since the major version changed. @ text @d1 1 a1 1 $NetBSD: patch-cd,v 1.2 2003/10/20 12:07:23 grant Exp $ d3 1 a3 1 --- interface/common_interface.c.orig 2000-04-20 08:41:04.000000000 +1000 d5 12 a16 1 @@@@ -13,19 +13,28 @@@@ d45 1 a45 1 @@@@ -46,6 +55,7 @@@@ char *atapi_drive_info(int fd){ d53 1 a53 1 @@@@ -171,7 +181,9 @@@@ int data_bigendianp(cdrom_drive *d){ d62 1 d64 3 a66 1 @@@@ -208,14 +220,26 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ d94 1 a94 1 @@@@ -223,14 +247,15 @@@@ int FixupTOC(cdrom_drive *d,int tracks){ d109 1 @ 1.2 log @merge some patches from FreeBSD ports. allows this to build on FreeBSD using the ATAPI/CAM subsystem. @ text @d1 1 a1 1 $NetBSD$ d19 1 a19 1 +#elif defined(__FreeBSD__) || defined(__NetBSD__) d56 1 a56 1 +#ifndef __FreeBSD__ @ 1.1 log @Initial revision @ text @d3 3 a5 3 --- interface/common_interface.c.orig Tue Dec 14 13:28:00 1999 +++ interface/common_interface.c Sat Jan 15 16:55:18 2000 @@@@ -13,19 +13,29 @@@@ d19 1 a19 2 +#endif +#ifdef __NetBSD__ d34 1 a34 1 @@@@ -46,6 +56,7 @@@@ d42 1 a42 1 @@@@ -171,7 +182,9 @@@@ d52 2 a53 1 @@@@ -209,13 +222,24 @@@@ d56 1 d80 1 a80 1 @@@@ -223,8 +247,8 @@@@ d91 7 @ 1.1.1.1 log @An attempt to port cdparanoia-III-alpha9.7. CD-DA extraction tool with excessive data corrections, such as jitter, loss of data, etc. This will soon be obsoleted by cdparanoia IV, I hope.... Most SCSI/ATAPI CD-ROM drives should work fine. However, the ATAPI stuff is totally untested, and if it happened to work, it was a miracle. :-) Currently, - the feature to search for CD-ROM device is not implemented and the -g option is required, - the libraries are not installed. @ text @@