diff options
author | triaxx <triaxx@pkgsrc.org> | 2018-09-27 15:29:06 +0000 |
---|---|---|
committer | triaxx <triaxx@pkgsrc.org> | 2018-09-27 15:29:06 +0000 |
commit | 80c59e85d9fa44c5f8777d479c5bc88847d7f8ba (patch) | |
tree | 08240cf87713a8bec11c3101863dd88bb2085d1e /audio | |
parent | eb5a0fcfa12b36ff22df9725b3644058eec2953d (diff) | |
download | pkgsrc-80c59e85d9fa44c5f8777d479c5bc88847d7f8ba.tar.gz |
cdparanoia: fix build on FreeBSD
Add comments to patches (not always relevant) to appease pkglint
Bump revision
Diffstat (limited to 'audio')
-rw-r--r-- | audio/cdparanoia/Makefile | 4 | ||||
-rw-r--r-- | audio/cdparanoia/distinfo | 37 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-aa | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ab | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ac | 28 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ad | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ae | 33 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ba | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ca | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cb | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cc | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cd | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ce | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cg | 201 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ch | 15 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ci | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cj | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-ck | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cn | 4 |
19 files changed, 300 insertions, 70 deletions
diff --git a/audio/cdparanoia/Makefile b/audio/cdparanoia/Makefile index 8b1ff3368f6..2f6010a828f 100644 --- a/audio/cdparanoia/Makefile +++ b/audio/cdparanoia/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.38 2017/08/01 14:58:52 wiz Exp $ +# $NetBSD: Makefile,v 1.39 2018/09/27 15:29:06 triaxx Exp $ DISTNAME= cdparanoia-III-10.2 PKGNAME= cdparanoia-3.0.10.2 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= audio MASTER_SITES= http://downloads.xiph.org/releases/cdparanoia/ EXTRACT_SUFX= .src.tgz diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo index 7e476c38a0a..90679671f92 100644 --- a/audio/cdparanoia/distinfo +++ b/audio/cdparanoia/distinfo @@ -1,24 +1,25 @@ -$NetBSD: distinfo,v 1.35 2017/07/12 10:53:23 wiz Exp $ +$NetBSD: distinfo,v 1.36 2018/09/27 15:29:06 triaxx Exp $ SHA1 (cdparanoia-III-10.2.src.tgz) = 1901e20d3a370ca6afa4c76a9ef30d3f03044320 RMD160 (cdparanoia-III-10.2.src.tgz) = d6c4ea9cc4aa4d5bcca4985e668ea6142d53cc55 SHA512 (cdparanoia-III-10.2.src.tgz) = 4ab0a0f5ef44d56c1af72d1fc1035566a1a89c4eeddb9e8baea675fe51c06138d913342afc8bed167d9fa55672fa25a2763ce21f7e24c1232e4739aff20733a7 Size (cdparanoia-III-10.2.src.tgz) = 183236 bytes -SHA1 (patch-aa) = b67a318d4e5c0ca87639645096a41eaeb3fb2d1e -SHA1 (patch-ab) = af07649ac4e0d4a5c2798e4cfc903e6959adea44 -SHA1 (patch-ac) = 87718f65b1994f6e266c7b8221fb8b585b9094b8 -SHA1 (patch-ad) = 861237917c229a4640b9311d371913aae78b746c -SHA1 (patch-ae) = f12c5aca0b78803e1ab1be8518b032748a45ee0e -SHA1 (patch-ba) = c846425d26372bada1bc086a7dc26120163feb13 -SHA1 (patch-ca) = 9860c2227f9d359e808c0ee0989020a9a3163a48 -SHA1 (patch-cb) = 880d667b26891beb2c64ebe1937c4a2931dd42d5 -SHA1 (patch-cc) = e692c8f4a9811123baa6cb25c09dea0004cc9b68 -SHA1 (patch-cd) = c37da19fc99b5aa5682b08cd6ad162687e9b1337 -SHA1 (patch-ce) = b343191fa2e337e2c3c091c585451c726c1f745b +SHA1 (patch-aa) = 3b1557fd2d8cf2e746397ec92e46ad3723e78c6e +SHA1 (patch-ab) = 29765396395c311b7904337f2a741eadde0806b7 +SHA1 (patch-ac) = b826430a6b51d76fefe6b51d4fc97addbca8eeac +SHA1 (patch-ad) = 0e0a2d88dd20ac76f1c74fb3a101df5d98d14a22 +SHA1 (patch-ae) = cf411e6c85c0079c0300237d66fd194c6285fd8e +SHA1 (patch-ba) = ad900b66052364fce32e9bb41ac318d42304860a +SHA1 (patch-ca) = 259a9ad675875dcbeffe4a294df0b15eadaa9622 +SHA1 (patch-cb) = a8827d1e0f8857a8f12cf6db9c9a80d9c6f85300 +SHA1 (patch-cc) = 93f9a2ca1a0987baf8857bd38602d3abeeb4e7ef +SHA1 (patch-cd) = cb6dd2f65de11536d3264eb7b2a7807df1a51a1d +SHA1 (patch-ce) = 5580f294ebbd0a5cacdb54ef149aa8ef71fec075 SHA1 (patch-cf) = 4208e82efd5bba15677dcc0ae5883bd9353624c6 -SHA1 (patch-cg) = a492f6d2459f75420930d8a6f264bde82119d23e -SHA1 (patch-ch) = 80672901f4ddbc4f7228cfa1f57ee477c1e1ac28 -SHA1 (patch-ci) = bc0645bf6d2e3841817adb639bfa3ac68cb7f606 -SHA1 (patch-cj) = e2420e2ccadd2d6ea30d6bf48af9c141dc395afc -SHA1 (patch-ck) = 0232f8f42d98b49043f55cd6aaf1f50ab38fadfb -SHA1 (patch-cn) = b79db0b24a042a5801b47e6db5e20cbf07a53475 +SHA1 (patch-cg) = 76ceca718c46f57ebb9bec63078c1f9f7e1bf778 +SHA1 (patch-ch) = 607f57828094ada2799b84723cc01ae333887d2f +SHA1 (patch-ci) = 783a8cdf88aa9a0f7be3bb2c865b6609237291fc +SHA1 (patch-cj) = 99bdcf970d9b74154ee205e9465e67dbfed773b0 +SHA1 (patch-ck) = 968a7191d10f16e298853175543c8f533659acc2 +SHA1 (patch-cn) = 62a2e329b8bec1c74e53e72a478576c484e67b56 +SHA1 (patch-paranoia_overlap.c) = 3c46bbf406214d30b09e88cd10a3bc3946c77396 diff --git a/audio/cdparanoia/patches/patch-aa b/audio/cdparanoia/patches/patch-aa index c87d4d3a6e0..7158a657226 100644 --- a/audio/cdparanoia/patches/patch-aa +++ b/audio/cdparanoia/patches/patch-aa @@ -1,4 +1,6 @@ -$NetBSD: patch-aa,v 1.8 2013/12/12 16:41:32 jperkin Exp $ +$NetBSD: patch-aa,v 1.9 2018/09/27 15:29:06 triaxx Exp $ + +Support for MacOS and NetBSD. --- configure.in.orig 2006-08-16 18:02:25.000000000 +0000 +++ configure.in diff --git a/audio/cdparanoia/patches/patch-ab b/audio/cdparanoia/patches/patch-ab index 2d6e949ae93..2169d03fa9e 100644 --- a/audio/cdparanoia/patches/patch-ab +++ b/audio/cdparanoia/patches/patch-ab @@ -1,4 +1,6 @@ -$NetBSD: patch-ab,v 1.10 2009/08/09 16:00:53 drochner Exp $ +$NetBSD: patch-ab,v 1.11 2018/09/27 15:29:06 triaxx Exp $ + +Fix Makefile.in for build --- Makefile.in.orig 2008-09-11 22:33:30.000000000 +0200 +++ Makefile.in diff --git a/audio/cdparanoia/patches/patch-ac b/audio/cdparanoia/patches/patch-ac index b2db28f4c0b..0c79ab5c59e 100644 --- a/audio/cdparanoia/patches/patch-ac +++ b/audio/cdparanoia/patches/patch-ac @@ -1,4 +1,6 @@ -$NetBSD: patch-ac,v 1.12 2017/07/12 10:53:23 wiz Exp $ +$NetBSD: patch-ac,v 1.13 2018/09/27 15:29:06 triaxx Exp $ + +Regen of configure script. --- configure.orig 2006-08-16 18:02:25.000000000 +0000 +++ configure @@ -8286,7 +8288,7 @@ $NetBSD: patch-ac,v 1.12 2017/07/12 10:53:23 wiz Exp $ CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS -@@ -5607,124 +6559,106 @@ generated by GNU Autoconf 2.59. Invocat +@@ -5607,124 +6559,122 @@ generated by GNU Autoconf 2.59. Invocat CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ @@ -8405,6 +8407,22 @@ $NetBSD: patch-ac,v 1.12 2017/07/12 10:53:23 wiz Exp $ -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; @@ -8455,7 +8473,7 @@ $NetBSD: patch-ac,v 1.12 2017/07/12 10:53:23 wiz Exp $ esac shift -@@ -5738,32 +6676,48 @@ if $ac_cs_silent; then +@@ -5738,32 +6688,48 @@ if $ac_cs_silent; then fi _ACEOF @@ -8517,7 +8535,7 @@ $NetBSD: patch-ac,v 1.12 2017/07/12 10:53:23 wiz Exp $ # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely -@@ -5773,344 +6727,464 @@ if $ac_need_defaults; then +@@ -5773,344 +6739,464 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree @@ -9261,7 +9279,7 @@ $NetBSD: patch-ac,v 1.12 2017/07/12 10:53:23 wiz Exp $ # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. -@@ -6132,4 +7206,8 @@ if test "$no_create" != yes; then +@@ -6132,4 +7218,8 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi diff --git a/audio/cdparanoia/patches/patch-ad b/audio/cdparanoia/patches/patch-ad index 92c189f7be3..6a9a601255e 100644 --- a/audio/cdparanoia/patches/patch-ad +++ b/audio/cdparanoia/patches/patch-ad @@ -1,4 +1,6 @@ -$NetBSD: patch-ad,v 1.7 2017/07/12 10:53:23 wiz Exp $ +$NetBSD: patch-ad,v 1.8 2018/09/27 15:29:06 triaxx Exp $ + +Support for NetBSD and MacOS. --- utils.h.orig 2008-08-22 09:39:06.000000000 +0000 +++ utils.h diff --git a/audio/cdparanoia/patches/patch-ae b/audio/cdparanoia/patches/patch-ae index b7d44f8e422..adbeff2699e 100644 --- a/audio/cdparanoia/patches/patch-ae +++ b/audio/cdparanoia/patches/patch-ae @@ -1,18 +1,21 @@ -$NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ +$NetBSD: patch-ae,v 1.10 2018/09/27 15:29:06 triaxx Exp $ + +Fix wrong asumption that getopt_long is implemented everywhere. --- main.c.orig 2008-09-11 21:11:02.000000000 +0000 +++ main.c -@@ -25,7 +25,9 @@ +@@ -25,7 +25,10 @@ #include <unistd.h> #include <string.h> #include <fcntl.h> +#ifdef GETOPT_LONG #include <getopt.h> +#endif ++#include <err.h> #include <errno.h> #include <math.h> #include <sys/time.h> -@@ -204,6 +206,7 @@ VERSION"\n" +@@ -204,6 +207,7 @@ VERSION"\n" " cdparanoia [options] <span> [outfile]\n\n" "OPTIONS:\n" @@ -20,7 +23,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ " -A --analyze-drive : run and log a complete analysis of drive\n" " caching, timing and reading behavior;\n" " verifies that cdparanoia is correctly\n" -@@ -239,6 +242,7 @@ VERSION"\n" +@@ -239,6 +243,7 @@ VERSION"\n" " to n sectors\n" " -o --force-search-overlap <n> : force minimum overlap search during\n" " verification to n sectors\n" @@ -28,7 +31,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ " -d --force-cdrom-device <dev> : use specified device; disallow \n" " autosense\n" " -k --force-cooked-device <dev> : use specified cdrom device and force\n" -@@ -248,6 +252,7 @@ VERSION"\n" +@@ -248,6 +253,7 @@ VERSION"\n" " -g --force-generic-device <dev> : use specified generic scsi device and\n" " force use of the old SG kernel\n" " interface. -g cannot be used with -k.\n" @@ -36,7 +39,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ " -S --force-read-speed <n> : read from device at specified speed; by\n" " default, cdparanoia sets drive to full\n" " speed.\n" -@@ -267,6 +272,52 @@ VERSION"\n" +@@ -267,6 +273,52 @@ VERSION"\n" " -Z --disable-paranoia : disable all paranoia checking\n" " -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking\n" " -X --abort-on-skip : abort on imperfect reads/skips\n\n" @@ -89,7 +92,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ "OUTPUT SMILIES:\n" " :-) Normal operation, low/no jitter\n" -@@ -588,10 +639,10 @@ static void callback(long inpos, int fun +@@ -588,10 +640,10 @@ static void callback(long inpos, int fun buffer[aheadposition+19]='>'; } @@ -102,7 +105,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ fprintf(logfile,"\n\n"); fflush(logfile); } -@@ -606,6 +657,7 @@ static void callback(long inpos, int fun +@@ -606,6 +658,7 @@ static void callback(long inpos, int fun const char *optstring = "escCn:o:O:d:g:k:S:prRwafvqVQhZz::YXWBi:Tt:l::L::A"; @@ -110,7 +113,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ struct option options [] = { {"stderr-progress",no_argument,NULL,'e'}, {"search-for-drive",no_argument,NULL,'s'}, -@@ -644,6 +696,7 @@ struct option options [] = { +@@ -644,6 +697,7 @@ struct option options [] = { {NULL,0,NULL,0} }; @@ -118,7 +121,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ long blocking_write(int outf, char *buffer, long num){ long words=0,temp; -@@ -703,7 +756,12 @@ int main(int argc,char *argv[]){ +@@ -703,7 +757,12 @@ int main(int argc,char *argv[]){ atexit(cleanup); @@ -132,7 +135,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ switch(c){ case 'B': batch=1; -@@ -720,6 +778,7 @@ int main(int argc,char *argv[]){ +@@ -720,6 +779,7 @@ int main(int argc,char *argv[]){ case 'o': force_cdrom_overlap=atoi(optarg); break; @@ -140,7 +143,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ case 'd': if(force_cdrom_device)free(force_cdrom_device); force_cdrom_device=copystring(optarg); -@@ -733,6 +792,7 @@ int main(int argc,char *argv[]){ +@@ -733,6 +793,7 @@ int main(int argc,char *argv[]){ if(force_generic_device)free(force_generic_device); force_generic_device=copystring(optarg); break; @@ -148,7 +151,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ case 'k': if(force_generic_device || force_cdrom_device){ report("-k option incompatable with -d and -g\n"); -@@ -939,6 +999,18 @@ int main(int argc,char *argv[]){ +@@ -939,6 +1000,18 @@ int main(int argc,char *argv[]){ /* Query the cdrom/disc; we may need to override some settings */ @@ -167,7 +170,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ if(force_cooked_device){ d=cdda_identify_cooked(force_cooked_device,verbose,NULL); }else if(force_generic_device) -@@ -971,6 +1043,7 @@ int main(int argc,char *argv[]){ +@@ -971,6 +1044,7 @@ int main(int argc,char *argv[]){ report(" "); } } @@ -175,7 +178,7 @@ $NetBSD: patch-ae,v 1.9 2015/02/21 00:09:08 joerg Exp $ if(!d){ if(!verbose) -@@ -1005,7 +1078,9 @@ int main(int argc,char *argv[]){ +@@ -1005,7 +1079,9 @@ int main(int argc,char *argv[]){ report("Forcing default to read %d sectors; " "ignoring preset and autosense",force_cdrom_sectors); d->nsectors=force_cdrom_sectors; diff --git a/audio/cdparanoia/patches/patch-ba b/audio/cdparanoia/patches/patch-ba index c63eddaec0f..37bcc41249a 100644 --- a/audio/cdparanoia/patches/patch-ba +++ b/audio/cdparanoia/patches/patch-ba @@ -1,4 +1,6 @@ -$NetBSD: patch-ba,v 1.5 2017/07/12 10:53:23 wiz Exp $ +$NetBSD: patch-ba,v 1.6 2018/09/27 15:29:06 triaxx Exp $ + +Fix Makefile.in. --- paranoia/Makefile.in.orig 2008-09-04 19:02:47.000000000 +0000 +++ paranoia/Makefile.in diff --git a/audio/cdparanoia/patches/patch-ca b/audio/cdparanoia/patches/patch-ca index 29eacae34d6..16ca99df0fc 100644 --- a/audio/cdparanoia/patches/patch-ca +++ b/audio/cdparanoia/patches/patch-ca @@ -1,4 +1,6 @@ -$NetBSD: patch-ca,v 1.9 2009/08/14 15:51:06 drochner Exp $ +$NetBSD: patch-ca,v 1.10 2018/09/27 15:29:06 triaxx Exp $ + +Fix Makefile.in. --- interface/Makefile.in.orig 2008-08-21 18:08:54.000000000 +0200 +++ interface/Makefile.in diff --git a/audio/cdparanoia/patches/patch-cb b/audio/cdparanoia/patches/patch-cb index a7da9dbc346..f0d6585458c 100644 --- a/audio/cdparanoia/patches/patch-cb +++ b/audio/cdparanoia/patches/patch-cb @@ -1,4 +1,6 @@ -$NetBSD: patch-cb,v 1.9 2013/12/12 16:41:32 jperkin Exp $ +$NetBSD: patch-cb,v 1.10 2018/09/27 15:29:06 triaxx Exp $ + +Support for Common Access Method. --- interface/low_interface.h.orig 2008-09-11 10:43:52.000000000 +0000 +++ interface/low_interface.h diff --git a/audio/cdparanoia/patches/patch-cc b/audio/cdparanoia/patches/patch-cc index ea2329926d5..5163a7dc3a9 100644 --- a/audio/cdparanoia/patches/patch-cc +++ b/audio/cdparanoia/patches/patch-cc @@ -1,4 +1,6 @@ -$NetBSD: patch-cc,v 1.8 2010/03/26 16:38:32 jdc Exp $ +$NetBSD: patch-cc,v 1.9 2018/09/27 15:29:06 triaxx Exp $ + +Support for NetBSD. --- interface/utils.h.orig 2008-08-14 13:56:20.000000000 +0000 +++ interface/utils.h 2010-03-24 10:55:09.000000000 +0000 diff --git a/audio/cdparanoia/patches/patch-cd b/audio/cdparanoia/patches/patch-cd index 1e4b6f38213..2a52a33813a 100644 --- a/audio/cdparanoia/patches/patch-cd +++ b/audio/cdparanoia/patches/patch-cd @@ -1,4 +1,6 @@ -$NetBSD: patch-cd,v 1.6 2013/12/12 16:41:32 jperkin Exp $ +$NetBSD: patch-cd,v 1.7 2018/09/27 15:29:06 triaxx Exp $ + +Support for Sun and several BSD. --- interface/common_interface.c.orig 2008-08-21 16:08:54.000000000 +0000 +++ interface/common_interface.c diff --git a/audio/cdparanoia/patches/patch-ce b/audio/cdparanoia/patches/patch-ce index 84801f53e02..b67e480387b 100644 --- a/audio/cdparanoia/patches/patch-ce +++ b/audio/cdparanoia/patches/patch-ce @@ -1,4 +1,6 @@ -$NetBSD: patch-ce,v 1.7 2009/08/14 15:51:06 drochner Exp $ +$NetBSD: patch-ce,v 1.8 2018/09/27 15:29:06 triaxx Exp $ + +Support for several BSD. --- interface/cooked_interface.c.orig 2008-08-26 11:55:22.000000000 +0200 +++ interface/cooked_interface.c diff --git a/audio/cdparanoia/patches/patch-cg b/audio/cdparanoia/patches/patch-cg index 6b92b587b65..c94097138eb 100644 --- a/audio/cdparanoia/patches/patch-cg +++ b/audio/cdparanoia/patches/patch-cg @@ -1,4 +1,4 @@ -$NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ +$NetBSD: patch-cg,v 1.14 2018/09/27 15:29:06 triaxx Exp $ - fix ripping on NetBSD/amd64 - build fix on DragonFly @@ -79,7 +79,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ /* scary buffer fill hack */ if(bytecheck && out_size>in_size) -@@ -417,6 +438,71 @@ static int sgio_handle_scsi_cmd(cdrom_dr +@@ -417,6 +438,161 @@ static int sgio_handle_scsi_cmd(cdrom_dr errno = 0; return 0; } @@ -148,10 +148,100 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ + return 0; +} +#endif /* __NetBSD__ */ ++ ++#if defined(__FreeBSD__) ++static int fb_handle_scsi_cmd(cdrom_drive *d, ++ unsigned char *cmd, ++ unsigned int cmd_len, ++ unsigned int in_size, ++ unsigned int out_size, ++ unsigned char bytefill, ++ int bytecheck, ++ unsigned char *sense){ ++ int result; ++ int error_code, sense_key, asc, ascq; ++ ++ bzero(&d->ccb->csio, sizeof(d->ccb->csio)); ++ ++ memcpy(d->ccb->csio.cdb_io.cdb_bytes, d->private->sg_buffer, cmd_len); ++ ++ if (bytecheck && out_size == 0) ++ memset(d->private->sg_buffer, bytefill, in_size); ++ ++ cam_fill_csio(&d->ccb->csio, ++ /* retries */ 0, ++ /* cbfcnp */ NULL, ++ /* flags */ CAM_DEV_QFRZDIS | (out_size ? CAM_DIR_OUT : CAM_DIR_IN), ++ /* tag_action */ MSG_SIMPLE_Q_TAG, ++ /* data_ptr */ out_size ? d->private->sg_buffer + cmd_len : d->private->sg_buffer, ++ /* dxfer_len */ out_size ? out_size : in_size, ++ /* sense_len */ SSD_FULL_SIZE, ++ /* cdb_len */ cmd_len, ++ /* timeout */ 60000); /* XXX */ ++ ++ if ((result = cam_send_ccb(d->dev, d->ccb)) < 0 || ++ (d->ccb->ccb_h.status & CAM_STATUS_MASK) == 0 /* hack? */) ++ return TR_EREAD; ++ ++ if ((d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP && ++ (d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR) { ++ fprintf (stderr, "\t\terror returned from SCSI command:\n" ++ "\t\tccb->ccb_h.status == %d\n", d->ccb->ccb_h.status); ++ errno = EIO; ++ return TR_UNKNOWN; ++ } ++ ++ if (d->ccb->csio.dxfer_len != in_size) { ++ errno = EIO; ++ return TR_EREAD; ++ } ++ ++ scsi_extract_sense(&d->ccb->csio.sense_data, &error_code, &sense_key, ++ &asc, &ascq); ++ ++ switch (error_code) { ++ case SSD_CURRENT_ERROR: ++ case SSD_DEFERRED_ERROR: ++#if (CAM_VERSION > 0x15) ++ case SSD_DESC_CURRENT_ERROR: ++ case SSD_DESC_DEFERRED_ERROR: ++#endif ++ switch (sense_key) { ++ case SSD_KEY_NO_SENSE: ++ errno = EIO; ++ return TR_UNKNOWN; ++ case SSD_KEY_RECOVERED_ERROR: ++ break; ++ case SSD_KEY_NOT_READY: ++ errno = EBUSY; ++ return TR_BUSY; ++ case SSD_KEY_MEDIUM_ERROR: ++ errno = EIO; ++ if ((asc == 0x0c) && (ascq == 0x09)) ++ return TR_STREAMING; ++ else ++ return TR_MEDIUM; ++ case SSD_KEY_HARDWARE_ERROR: ++ errno = EIO; ++ return TR_FAULT; ++ case SSD_KEY_ILLEGAL_REQUEST: ++ errno = EINVAL; ++ return TR_ILLEGAL; ++ default: ++ errno = EIO; ++ return TR_UNKNOWN; ++ } ++ default: ++ break; ++ } ++ ++ return 0; ++} ++#endif /* __FreeBSD__ */ static int handle_scsi_cmd(cdrom_drive *d, unsigned char *cmd, -@@ -427,9 +513,14 @@ static int handle_scsi_cmd(cdrom_drive * +@@ -427,9 +603,17 @@ static int handle_scsi_cmd(cdrom_drive * int bytecheck, unsigned char *sense){ @@ -163,10 +253,13 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ +#ifdef __NetBSD__ + return nb_handle_scsi_cmd(d,cmd,cmd_len,in_size,out_size,bytefill,bytecheck,sense); +#endif ++#if defined(__FreeBSD__) ++ return fb_handle_scsi_cmd(d,cmd,cmd_len,in_size,out_size,bytefill,bytecheck,sense); ++#endif } -@@ -453,6 +544,7 @@ static int test_unit_ready(cdrom_drive * +@@ -453,6 +637,7 @@ static int test_unit_ready(cdrom_drive * return 1; } @@ -174,7 +267,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ static void reset_scsi(cdrom_drive *d){ int arg,tries=0; d->enable_cdda(d,0); -@@ -471,6 +563,22 @@ static void reset_scsi(cdrom_drive *d){ +@@ -471,6 +656,45 @@ static void reset_scsi(cdrom_drive *d){ d->enable_cdda(d,1); } @@ -194,10 +287,33 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ + d->enable_cdda(d,1); +} +#endif ++ ++#if defined(__FreeBSD__) ++static void reset_scsi(cdrom_drive *d) { ++ d->enable_cdda(d,0); ++ ++ d->ccb->ccb_h.func_code = XPT_RESET_DEV; ++ d->ccb->ccb_h.timeout = 5000; ++ ++ cdmessage(d, "sending SCSI reset... "); ++ if (cam_send_ccb(d->dev, d->ccb)) { ++ cdmessage(d, "error sending XPT_RESET_DEV CCB"); ++ } else { ++ ++ if (((d->ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) || ++ ((d->ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_BDR_SENT)) ++ cdmessage(d,"OK\n"); ++ else ++ cdmessage(d,"FAILED\n"); ++ } ++ ++ d->enable_cdda(d,1); ++} ++#endif static int mode_sense_atapi(cdrom_drive *d,int size,int page){ unsigned char sense[SG_MAX_SENSE]; -@@ -657,6 +765,7 @@ static int scsi_read_toc (cdrom_drive *d +@@ -657,6 +881,7 @@ static int scsi_read_toc (cdrom_drive *d /* read the header first */ unsigned char sense[SG_MAX_SENSE]; unsigned char cmd[10] = { 0x43, 0, 0, 0, 0, 0, 1, 0, 12, 0}; @@ -205,7 +321,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ cmd[1]=d->lun<<5; if (handle_scsi_cmd (d,cmd,10, 0, 12,'\377',1,sense)){ -@@ -674,7 +783,7 @@ static int scsi_read_toc (cdrom_drive *d +@@ -674,7 +899,7 @@ static int scsi_read_toc (cdrom_drive *d } for (i = first; i <= last; i++){ @@ -214,7 +330,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ cmd[1]=d->lun<<5; cmd[6]=i; -@@ -695,7 +804,7 @@ static int scsi_read_toc (cdrom_drive *d +@@ -695,7 +920,7 @@ static int scsi_read_toc (cdrom_drive *d } } @@ -223,7 +339,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ cmd[1]=d->lun<<5; cmd[6]=0xAA; -@@ -745,7 +854,8 @@ static int scsi_read_toc2 (cdrom_drive * +@@ -745,7 +970,8 @@ static int scsi_read_toc2 (cdrom_drive * } for (i = 0; i < tracks; i++){ @@ -233,7 +349,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ cmd[5]=i+1; cmd[8]=255; -@@ -1587,6 +1697,7 @@ static void check_cache(cdrom_drive *d){ +@@ -1587,6 +1813,7 @@ static void check_cache(cdrom_drive *d){ } } @@ -241,7 +357,7 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ static int check_atapi(cdrom_drive *d){ int atapiret=-1; int fd = d->cdda_fd; /* check the device we'll actually be using to read */ -@@ -1616,7 +1727,32 @@ static int check_atapi(cdrom_drive *d){ +@@ -1616,7 +1843,79 @@ static int check_atapi(cdrom_drive *d){ return(d->is_atapi); } @@ -272,6 +388,69 @@ $NetBSD: patch-cg,v 1.13 2015/08/10 21:19:28 khorben Exp $ + } +} +#endif ++ ++#if defined(__FreeBSD__) ++static int ++check_atapi(cdrom_drive *d) ++{ ++ bzero(&(&d->ccb->ccb_h)[1], sizeof(d->ccb->cpi) - sizeof(d->ccb->ccb_h)); ++ ++ d->ccb->ccb_h.func_code = XPT_PATH_INQ; ++ ++ cdmessage(d, "\nChecking for ATAPICAM...\n"); ++ ++ if (cam_send_ccb(d->dev, d->ccb) < 0) { ++ cderror(d, "\terror sending XPT_PATH_INQ CCB: "); ++ cderror(d, cam_errbuf); ++ cderror(d, "\n"); ++ return -1; ++ } ++ ++ if ((d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { ++ cderror(d, "\tXPT_PATH_INQ CCB failed: "); ++ cderror(d, cam_errbuf); ++ cderror(d, "\n"); ++ return -1; ++ } ++ ++ /* ++ * if the bus device name is `ata', we're (obviously) ++ * running ATAPICAM. ++ * same for the new ahci(4) and siis(4) drivers and future others ++ * which use SATA transport too... ++ */ ++ ++ if (strncmp(d->ccb->cpi.dev_name, "ata", 3) == 0 || ++#if __FreeBSD_version >= 800102 ++ d->ccb->cpi.transport == XPORT_SATA || ++#endif ++ d->ccb->cpi.transport == XPORT_ATA) { ++ cdmessage(d, "\tDrive is ATAPI (using ATAPICAM or direct CAM (S)ATA transport)\n"); ++ d->is_atapi = 1; ++ } else { ++ cdmessage(d, "\tDrive is SCSI\n"); ++ d->is_atapi = 0; ++ } ++ ++ return d->is_atapi; ++} ++#endif static int check_mmc(cdrom_drive *d){ unsigned char *b; +@@ -1664,6 +1963,7 @@ static void check_exceptions(cdrom_drive + } + } + ++#if defined(__linux__) + /* request vendor brand and model */ + unsigned char *scsi_inquiry(cdrom_drive *d){ + unsigned char sense[SG_MAX_SENSE]; +@@ -1675,6 +1975,7 @@ unsigned char *scsi_inquiry(cdrom_drive + } + return (d->private->sg_buffer); + } ++#endif + + int scsi_init_drive(cdrom_drive *d){ + int ret; diff --git a/audio/cdparanoia/patches/patch-ch b/audio/cdparanoia/patches/patch-ch index ffcb668c854..c24c14334b4 100644 --- a/audio/cdparanoia/patches/patch-ch +++ b/audio/cdparanoia/patches/patch-ch @@ -1,8 +1,10 @@ -$NetBSD: patch-ch,v 1.8 2013/12/12 16:41:32 jperkin Exp $ +$NetBSD: patch-ch,v 1.9 2018/09/27 15:29:06 triaxx Exp $ + +Support for MacOS. --- interface/cdda_interface.h.orig 2008-09-11 10:43:52.000000000 +0000 +++ interface/cdda_interface.h -@@ -18,9 +18,24 @@ +@@ -18,9 +18,25 @@ #endif #define CD_FRAMESAMPLES (CD_FRAMESIZE_RAW / 4) @@ -20,14 +22,15 @@ $NetBSD: patch-ch,v 1.8 2013/12/12 16:41:32 jperkin Exp $ +#include <camlib.h> +#endif + -+#if defined(__NetBSD__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__sun) ++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__sun) || \ ++ (defined(__APPLE__) && defined(__MACH__)) +#define ENOMEDIUM 12345 +#endif + #define MAXTRK 100 typedef struct TOC { /* structure of table of contents */ -@@ -35,6 +50,7 @@ typedef struct TOC { /* structure of tab +@@ -35,6 +51,7 @@ typedef struct TOC { /* structure of tab #define TEST_INTERFACE 2 #define SGIO_SCSI 3 #define SGIO_SCSI_BUGGY1 4 @@ -35,7 +38,7 @@ $NetBSD: patch-ch,v 1.8 2013/12/12 16:41:32 jperkin Exp $ #define CDDA_MESSAGE_FORGETIT 0 #define CDDA_MESSAGE_PRINTIT 1 -@@ -49,13 +65,27 @@ typedef struct cdrom_drive{ +@@ -49,13 +66,27 @@ typedef struct cdrom_drive{ int opened; /* This struct may just represent a candidate for opening */ char *cdda_device_name; @@ -65,7 +68,7 @@ $NetBSD: patch-ch,v 1.8 2013/12/12 16:41:32 jperkin Exp $ int interface; int bigendianp; int nsectors; -@@ -84,7 +114,7 @@ typedef struct cdrom_drive{ +@@ -84,7 +115,7 @@ typedef struct cdrom_drive{ int is_atapi; int is_mmc; diff --git a/audio/cdparanoia/patches/patch-ci b/audio/cdparanoia/patches/patch-ci index aa8c62e9f7b..dbfb01b9f4c 100644 --- a/audio/cdparanoia/patches/patch-ci +++ b/audio/cdparanoia/patches/patch-ci @@ -1,4 +1,6 @@ -$NetBSD: patch-ci,v 1.10 2013/12/12 16:41:32 jperkin Exp $ +$NetBSD: patch-ci,v 1.11 2018/09/27 15:29:06 triaxx Exp $ + +Support for MacOS. --- interface/interface.c.orig 2008-09-11 10:43:52.000000000 +0000 +++ interface/interface.c diff --git a/audio/cdparanoia/patches/patch-cj b/audio/cdparanoia/patches/patch-cj index b4b649b22bc..8c716b956cb 100644 --- a/audio/cdparanoia/patches/patch-cj +++ b/audio/cdparanoia/patches/patch-cj @@ -1,4 +1,6 @@ -$NetBSD: patch-cj,v 1.1 2006/09/03 17:13:30 ben Exp $ +$NetBSD: patch-cj,v 1.2 2018/09/27 15:29:06 triaxx Exp $ + +Support for MacOS. --- interface/common_interface.h.orig 1999-08-15 14:52:42.000000000 -0700 +++ interface/common_interface.h diff --git a/audio/cdparanoia/patches/patch-ck b/audio/cdparanoia/patches/patch-ck index 759fe9c3e8d..60788724982 100644 --- a/audio/cdparanoia/patches/patch-ck +++ b/audio/cdparanoia/patches/patch-ck @@ -1,4 +1,6 @@ -$NetBSD: patch-ck,v 1.1 2006/09/03 17:13:30 ben Exp $ +$NetBSD: patch-ck,v 1.2 2018/09/27 15:29:06 triaxx Exp $ + +Interface for MacOS. --- /dev/null 2006-09-03 08:46:15.000000000 -0700 +++ interface/osx_interface.h 2006-09-03 08:49:13.000000000 -0700 diff --git a/audio/cdparanoia/patches/patch-cn b/audio/cdparanoia/patches/patch-cn index 3b0d482aad3..714d81dd4bd 100644 --- a/audio/cdparanoia/patches/patch-cn +++ b/audio/cdparanoia/patches/patch-cn @@ -1,4 +1,6 @@ -$NetBSD: patch-cn,v 1.1 2006/09/03 17:13:30 ben Exp $ +$NetBSD: patch-cn,v 1.2 2018/09/27 15:29:06 triaxx Exp $ + +Interface for MacOS. --- /dev/null 2006-09-03 09:28:05.000000000 -0700 +++ interface/osx_interface.c 2006-09-03 09:35:39.000000000 -0700 |