From d55870fda1cc69e97e395d4bfa0eebfd6b088b5a Mon Sep 17 00:00:00 2001 From: jperkin Date: Thu, 12 Dec 2013 16:41:32 +0000 Subject: 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. --- audio/cdparanoia/Makefile | 6 +- audio/cdparanoia/distinfo | 18 ++-- audio/cdparanoia/patches/patch-aa | 6 +- audio/cdparanoia/patches/patch-ac | 194 ++++++++++++++++++++------------------ audio/cdparanoia/patches/patch-ae | 6 +- audio/cdparanoia/patches/patch-cb | 14 ++- audio/cdparanoia/patches/patch-cd | 28 ++++-- audio/cdparanoia/patches/patch-cf | 57 +++++------ audio/cdparanoia/patches/patch-ch | 14 +-- audio/cdparanoia/patches/patch-ci | 19 ++-- 10 files changed, 195 insertions(+), 167 deletions(-) diff --git a/audio/cdparanoia/Makefile b/audio/cdparanoia/Makefile index 6604fed5844..3edaa734eb4 100644 --- a/audio/cdparanoia/Makefile +++ b/audio/cdparanoia/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2012/09/11 23:59:28 asau Exp $ +# $NetBSD: Makefile,v 1.33 2013/12/12 16:41:32 jperkin Exp $ # DISTNAME= cdparanoia-III-10.2 @@ -13,7 +13,7 @@ HOMEPAGE= http://www.xiph.org/paranoia/ COMMENT= CDDA reading utility with extra data verification features LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 -ONLY_FOR_PLATFORM= FreeBSD-*-* NetBSD-*-* Linux-*-* DragonFly-*-* Darwin-*-* +ONLY_FOR_PLATFORM= FreeBSD-*-* NetBSD-*-* Linux-*-* DragonFly-*-* Darwin-*-* SunOS-*-* PKG_INSTALLATION_TYPES= overwrite pkgviews @@ -26,6 +26,8 @@ CONFIGURE_ARGS+= --includedir=${PREFIX}/include/cdparanoia MAKE_ENV+= GCC=yes CFLAGS+= -Dprivate_data=private +CFLAGS.SunOS+= -Du_int16_t=uint16_t -Du_int32_t=uint32_t -DCDDA_TEST + LDFLAGS.FreeBSD+= -lcam LDFLAGS.DragonFly+= -lcam diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo index eabe10b2063..92e352dc648 100644 --- a/audio/cdparanoia/distinfo +++ b/audio/cdparanoia/distinfo @@ -1,23 +1,23 @@ -$NetBSD: distinfo,v 1.30 2010/12/16 04:55:46 chuck Exp $ +$NetBSD: distinfo,v 1.31 2013/12/12 16:41:32 jperkin Exp $ SHA1 (cdparanoia-III-10.2.src.tgz) = 1901e20d3a370ca6afa4c76a9ef30d3f03044320 RMD160 (cdparanoia-III-10.2.src.tgz) = d6c4ea9cc4aa4d5bcca4985e668ea6142d53cc55 Size (cdparanoia-III-10.2.src.tgz) = 183236 bytes -SHA1 (patch-aa) = e00476e557772f97e1588650bbfab19a985a7921 +SHA1 (patch-aa) = b67a318d4e5c0ca87639645096a41eaeb3fb2d1e SHA1 (patch-ab) = af07649ac4e0d4a5c2798e4cfc903e6959adea44 -SHA1 (patch-ac) = bd79af2f7544aa7e1c55150c761870887b49a160 +SHA1 (patch-ac) = d47ec9e3ae300cc6fcb4e7377bb8a13ff0c3cacd SHA1 (patch-ad) = f0c79049cbc26e9483c410f00cb6df85c280c145 -SHA1 (patch-ae) = dda320ca0817b06cb25be86b2a891776550603ae +SHA1 (patch-ae) = b40f156534c7e08dcea617eab980f1be48c4f6b1 SHA1 (patch-ba) = 0f4f8ddecd9f5f273f7a1687bbb1477fd64500c1 SHA1 (patch-ca) = 9860c2227f9d359e808c0ee0989020a9a3163a48 -SHA1 (patch-cb) = 48c05accf3b235a2a1bb168b88cad6e8936169b1 +SHA1 (patch-cb) = 880d667b26891beb2c64ebe1937c4a2931dd42d5 SHA1 (patch-cc) = e692c8f4a9811123baa6cb25c09dea0004cc9b68 -SHA1 (patch-cd) = 7141563e10b0d23dbd4ff824224a10908741be5b +SHA1 (patch-cd) = c37da19fc99b5aa5682b08cd6ad162687e9b1337 SHA1 (patch-ce) = b343191fa2e337e2c3c091c585451c726c1f745b -SHA1 (patch-cf) = 8d204272dace7bb1d3238e44f6ff152ab38f0930 +SHA1 (patch-cf) = 4208e82efd5bba15677dcc0ae5883bd9353624c6 SHA1 (patch-cg) = fd92ca2b999c4d25ddbe5abe5f384c5c83019624 -SHA1 (patch-ch) = 4b0a232bc21fc57777897269139894428d11016b -SHA1 (patch-ci) = dabc5121436aee0efde4cda8a01903d918cb8e4a +SHA1 (patch-ch) = 80672901f4ddbc4f7228cfa1f57ee477c1e1ac28 +SHA1 (patch-ci) = bc0645bf6d2e3841817adb639bfa3ac68cb7f606 SHA1 (patch-cj) = e2420e2ccadd2d6ea30d6bf48af9c141dc395afc SHA1 (patch-ck) = 0232f8f42d98b49043f55cd6aaf1f50ab38fadfb SHA1 (patch-cn) = b79db0b24a042a5801b47e6db5e20cbf07a53475 diff --git a/audio/cdparanoia/patches/patch-aa b/audio/cdparanoia/patches/patch-aa index f331487ac5f..c87d4d3a6e0 100644 --- a/audio/cdparanoia/patches/patch-aa +++ b/audio/cdparanoia/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.7 2010/12/15 21:08:30 chuck Exp $ +$NetBSD: patch-aa,v 1.8 2013/12/12 16:41:32 jperkin Exp $ ---- configure.in.orig 2006-08-16 20:02:25.000000000 +0200 +--- configure.in.orig 2006-08-16 18:02:25.000000000 +0000 +++ configure.in @@ -12,6 +12,25 @@ AC_PROG_RANLIB AC_CHECK_PROG(AR,ar,ar) @@ -15,7 +15,7 @@ $NetBSD: patch-aa,v 1.7 2010/12/15 21:08:30 chuck Exp $ + EXTRA_OBJS="cooked_interface.o scsi_interface.o" + EXTRA_LIBS=-lrt + ;; -+*-*-netbsd*) ++*-*-netbsd*|*-*-solaris*) + EXTRA_OBJS=scsi_interface.o + EXTRA_LIBS= + ;; diff --git a/audio/cdparanoia/patches/patch-ac b/audio/cdparanoia/patches/patch-ac index b8fdf704863..4ee3dd0e71c 100644 --- a/audio/cdparanoia/patches/patch-ac +++ b/audio/cdparanoia/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ +$NetBSD: patch-ac,v 1.11 2013/12/12 16:41:32 jperkin Exp $ ---- configure.orig 2006-08-16 20:02:25.000000000 +0200 +--- configure.orig 2006-08-16 18:02:25.000000000 +0000 +++ configure @@ -1,25 +1,82 @@ #! /bin/sh @@ -1127,7 +1127,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; -@@ -632,17 +1116,16 @@ Try \`$0 --help' for more information." +@@ -632,17 +1116,16 @@ Try \`$0 --help' for more information." ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && @@ -3083,7 +3083,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; -@@ -2098,219 +2782,72 @@ return f (e, argv, 0) != argv[0] || f +@@ -2098,219 +2782,72 @@ return f (e, argv, 0) != argv[0] || f return 0; } _ACEOF @@ -3493,7 +3493,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ else if test -n "$INSTALL"; then ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test. -@@ -2435,26 +2986,47 @@ do +@@ -2435,26 +2986,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do @@ -3538,6 +3538,10 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ + EXTRA_OBJS=scsi_interface.o + EXTRA_LIBS= + ;; ++*-*-solaris*) ++ EXTRA_OBJS=test_interface.o ++ EXTRA_LIBS= ++ ;; +*) + EXTRA_OBJS="cooked_interface.o scsi_interface.o" + EXTRA_LIBS= @@ -3547,7 +3551,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test -z "$GCC"; then DEBUG="-g" OPT="-O" -@@ -2463,6 +3035,12 @@ else +@@ -2463,6 +3039,12 @@ else i?86-*-linux*) DEBUG="-g -Wall -fsigned-char" OPT="-O2 -ffast-math -fsigned-char -finline-functions";; @@ -3560,7 +3564,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ *) DEBUG="-g -Wall -fsigned-char" OPT="-O2 -fsigned-char";; -@@ -2475,15 +3053,15 @@ ac_cpp='$CPP $CPPFLAGS' +@@ -2475,15 +3057,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -3579,7 +3583,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -@@ -2510,35 +3088,35 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -2510,35 +3092,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF @@ -3631,7 +3635,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -2548,34 +3126,34 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -2548,34 +3130,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF @@ -3681,7 +3685,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ rm -f conftest.err conftest.$ac_ext done -@@ -2593,8 +3171,8 @@ fi +@@ -2593,8 +3175,8 @@ fi else ac_cv_prog_CPP=$CPP fi @@ -3692,7 +3696,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do -@@ -2617,35 +3195,35 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -2617,35 +3199,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF @@ -3744,7 +3748,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -2655,34 +3233,34 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -2655,34 +3237,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF @@ -3794,7 +3798,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ rm -f conftest.err conftest.$ac_ext done -@@ -2691,11 +3269,13 @@ rm -f conftest.err conftest.$ac_ext +@@ -2691,11 +3273,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -3811,7 +3815,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ fi ac_ext=c -@@ -2705,25 +3285,144 @@ ac_link='$CC -o conftest$ac_exeext $CFLA +@@ -2705,25 +3289,144 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -3970,7 +3974,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -2745,35 +3444,32 @@ main () +@@ -2745,35 +3448,32 @@ main () } _ACEOF rm -f conftest.$ac_objext @@ -4023,7 +4027,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -@@ -2829,6 +3525,7 @@ cat confdefs.h >>conftest.$ac_ext +@@ -2829,6 +3529,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include @@ -4031,7 +4035,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -@@ -2848,36 +3545,50 @@ main () +@@ -2848,36 +3549,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) @@ -4095,7 +4099,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF -@@ -2900,11 +3611,11 @@ fi +@@ -2900,11 +3615,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do @@ -4112,7 +4116,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -2917,41 +3628,42 @@ $ac_includes_default +@@ -2917,41 +3632,42 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -4179,7 +4183,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ _ACEOF fi -@@ -2959,73 +3671,15 @@ fi +@@ -2959,73 +3675,15 @@ fi done @@ -4260,7 +4264,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -@@ -3038,7 +3692,7 @@ $ac_includes_default +@@ -3038,7 +3696,7 @@ $ac_includes_default int main () { @@ -4269,7 +4273,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3046,27 +3700,23 @@ test_array [0] = 0 +@@ -3046,27 +3704,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4310,7 +4314,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -3079,7 +3729,7 @@ $ac_includes_default +@@ -3079,7 +3733,7 @@ $ac_includes_default int main () { @@ -4319,7 +4323,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3087,46 +3737,43 @@ test_array [0] = 0 +@@ -3087,46 +3741,43 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4390,7 +4394,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -@@ -3136,7 +3783,7 @@ $ac_includes_default +@@ -3136,7 +3787,7 @@ $ac_includes_default int main () { @@ -4399,7 +4403,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3144,27 +3791,23 @@ test_array [0] = 0 +@@ -3144,27 +3795,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4440,7 +4444,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -3177,7 +3820,7 @@ $ac_includes_default +@@ -3177,7 +3824,7 @@ $ac_includes_default int main () { @@ -4449,7 +4453,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3185,50 +3828,49 @@ test_array [0] = 0 +@@ -3185,50 +3832,49 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4528,7 +4532,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -@@ -3242,7 +3884,7 @@ $ac_includes_default +@@ -3242,7 +3888,7 @@ $ac_includes_default int main () { @@ -4537,7 +4541,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3250,52 +3892,48 @@ test_array [0] = 0 +@@ -3250,52 +3896,48 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4616,7 +4620,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -3303,8 +3941,8 @@ cat confdefs.h >>conftest.$ac_ext +@@ -3303,8 +3945,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @@ -4627,7 +4631,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #include #include int -@@ -3313,133 +3951,94 @@ main () +@@ -3313,133 +3955,94 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) @@ -4816,7 +4820,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -@@ -3452,7 +4051,7 @@ $ac_includes_default +@@ -3452,7 +4055,7 @@ $ac_includes_default int main () { @@ -4825,7 +4829,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3460,27 +4059,23 @@ test_array [0] = 0 +@@ -3460,27 +4063,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4866,7 +4870,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -3493,7 +4088,7 @@ $ac_includes_default +@@ -3493,7 +4092,7 @@ $ac_includes_default int main () { @@ -4875,7 +4879,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3501,46 +4096,43 @@ test_array [0] = 0 +@@ -3501,46 +4100,43 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4946,7 +4950,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -@@ -3550,7 +4142,7 @@ $ac_includes_default +@@ -3550,7 +4146,7 @@ $ac_includes_default int main () { @@ -4955,7 +4959,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3558,27 +4150,23 @@ test_array [0] = 0 +@@ -3558,27 +4154,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -4996,7 +5000,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -3591,7 +4179,7 @@ $ac_includes_default +@@ -3591,7 +4183,7 @@ $ac_includes_default int main () { @@ -5005,7 +5009,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3599,50 +4187,49 @@ test_array [0] = 0 +@@ -3599,50 +4191,49 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5084,7 +5088,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -@@ -3656,7 +4243,7 @@ $ac_includes_default +@@ -3656,7 +4247,7 @@ $ac_includes_default int main () { @@ -5093,7 +5097,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3664,52 +4251,48 @@ test_array [0] = 0 +@@ -3664,52 +4255,48 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5172,7 +5176,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -3717,8 +4300,8 @@ cat confdefs.h >>conftest.$ac_ext +@@ -3717,8 +4304,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @@ -5183,7 +5187,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #include #include int -@@ -3727,133 +4310,94 @@ main () +@@ -3727,133 +4314,94 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) @@ -5372,7 +5376,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -@@ -3866,7 +4410,7 @@ $ac_includes_default +@@ -3866,7 +4414,7 @@ $ac_includes_default int main () { @@ -5381,7 +5385,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3874,27 +4418,23 @@ test_array [0] = 0 +@@ -3874,27 +4422,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5422,7 +5426,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -3907,7 +4447,7 @@ $ac_includes_default +@@ -3907,7 +4451,7 @@ $ac_includes_default int main () { @@ -5431,7 +5435,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3915,46 +4455,43 @@ test_array [0] = 0 +@@ -3915,46 +4459,43 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5502,7 +5506,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -@@ -3964,7 +4501,7 @@ $ac_includes_default +@@ -3964,7 +4505,7 @@ $ac_includes_default int main () { @@ -5511,7 +5515,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -3972,27 +4509,23 @@ test_array [0] = 0 +@@ -3972,27 +4513,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5552,7 +5556,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -4005,7 +4538,7 @@ $ac_includes_default +@@ -4005,7 +4542,7 @@ $ac_includes_default int main () { @@ -5561,7 +5565,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4013,50 +4546,49 @@ test_array [0] = 0 +@@ -4013,50 +4550,49 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5640,7 +5644,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -@@ -4070,7 +4602,7 @@ $ac_includes_default +@@ -4070,7 +4606,7 @@ $ac_includes_default int main () { @@ -5649,7 +5653,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4078,52 +4610,48 @@ test_array [0] = 0 +@@ -4078,52 +4614,48 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5728,7 +5732,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4131,8 +4659,8 @@ cat confdefs.h >>conftest.$ac_ext +@@ -4131,8 +4663,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @@ -5739,7 +5743,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #include #include int -@@ -4141,133 +4669,94 @@ main () +@@ -4141,133 +4673,94 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) @@ -5928,7 +5932,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -@@ -4280,7 +4769,7 @@ $ac_includes_default +@@ -4280,7 +4773,7 @@ $ac_includes_default int main () { @@ -5937,7 +5941,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4288,27 +4777,23 @@ test_array [0] = 0 +@@ -4288,27 +4781,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -5978,7 +5982,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -4321,7 +4806,7 @@ $ac_includes_default +@@ -4321,7 +4810,7 @@ $ac_includes_default int main () { @@ -5987,7 +5991,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4329,46 +4814,43 @@ test_array [0] = 0 +@@ -4329,46 +4818,43 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -6058,7 +6062,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -@@ -4378,7 +4860,7 @@ $ac_includes_default +@@ -4378,7 +4864,7 @@ $ac_includes_default int main () { @@ -6067,7 +6071,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4386,27 +4868,23 @@ test_array [0] = 0 +@@ -4386,27 +4872,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -6108,7 +6112,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -@@ -4419,7 +4897,7 @@ $ac_includes_default +@@ -4419,7 +4901,7 @@ $ac_includes_default int main () { @@ -6117,7 +6121,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4427,50 +4905,49 @@ test_array [0] = 0 +@@ -4427,50 +4909,49 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -6196,7 +6200,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -@@ -4484,7 +4961,7 @@ $ac_includes_default +@@ -4484,7 +4965,7 @@ $ac_includes_default int main () { @@ -6205,7 +6209,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ test_array [0] = 0 ; -@@ -4492,52 +4969,48 @@ test_array [0] = 0 +@@ -4492,52 +4973,48 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext @@ -6284,7 +6288,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4545,8 +5018,8 @@ cat confdefs.h >>conftest.$ac_ext +@@ -4545,8 +5022,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @@ -6295,7 +6299,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #include #include int -@@ -4555,61 +5028,80 @@ main () +@@ -4555,61 +5032,80 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) @@ -6405,7 +6409,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF -@@ -4627,12 +5119,13 @@ case 4 in +@@ -4627,12 +5123,13 @@ case 4 in $ac_cv_sizeof_long) SIZE32="long";; esac @@ -6423,7 +6427,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -@@ -4642,57 +5135,95 @@ $ac_includes_default +@@ -4642,57 +5139,95 @@ $ac_includes_default int main () { @@ -6549,7 +6553,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -@@ -4702,79 +5233,118 @@ $ac_includes_default +@@ -4702,79 +5237,118 @@ $ac_includes_default int main () { @@ -6709,7 +6713,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4785,41 +5355,38 @@ $ac_includes_default +@@ -4785,41 +5359,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -6772,7 +6776,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4828,81 +5395,78 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -4828,81 +5399,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF @@ -6900,7 +6904,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ _ACEOF SBPCD_H="-DSBPCD_H='1' " fi -@@ -4912,19 +5476,21 @@ done +@@ -4912,19 +5480,21 @@ done for ac_header in linux/ucdrom.h do @@ -6933,7 +6937,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4935,41 +5501,38 @@ $ac_includes_default +@@ -4935,41 +5505,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -6996,7 +7000,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4978,81 +5541,78 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -4978,81 +5545,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF @@ -7124,7 +7128,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ _ACEOF UCDROM_H="-DUCDROM_H='1' " fi -@@ -5060,39 +5620,359 @@ fi +@@ -5060,39 +5624,359 @@ fi done @@ -7505,7 +7509,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -5108,10 +5988,10 @@ main () +@@ -5108,10 +5992,10 @@ main () #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; @@ -7519,7 +7523,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; -@@ -5120,16 +6000,17 @@ main () +@@ -5120,16 +6004,17 @@ main () an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; @@ -7541,7 +7545,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; -@@ -5148,7 +6029,9 @@ main () +@@ -5148,7 +6033,9 @@ main () } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -7551,7 +7555,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #endif ; -@@ -5156,42 +6039,39 @@ main () +@@ -5156,42 +6043,39 @@ main () } _ACEOF rm -f conftest.$ac_objext @@ -7614,7 +7618,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ _ACEOF fi -@@ -5204,7 +6084,13 @@ fi +@@ -5204,7 +6088,13 @@ fi @@ -7629,7 +7633,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -@@ -5223,39 +6109,59 @@ _ACEOF +@@ -5223,39 +6113,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. @@ -7705,7 +7709,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ fi fi rm -f confcache -@@ -5264,63 +6170,54 @@ test "x$prefix" = xNONE && prefix=$ac_de +@@ -5264,63 +6174,54 @@ test "x$prefix" = xNONE && prefix=$ac_de # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' @@ -7802,7 +7806,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ done LIBOBJS=$ac_libobjs -@@ -5329,11 +6226,12 @@ LTLIBOBJS=$ac_ltlibobjs +@@ -5329,11 +6230,12 @@ LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} @@ -7818,7 +7822,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. -@@ -5346,22 +6244,78 @@ ac_cs_silent=false +@@ -5346,22 +6248,78 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF @@ -7903,7 +7907,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -@@ -5371,33 +6325,60 @@ else +@@ -5371,33 +6329,60 @@ else fi @@ -7978,7 +7982,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ as_basename=basename else as_basename=false -@@ -5405,159 +6386,122 @@ fi +@@ -5405,159 +6390,122 @@ fi # Name of the executable. @@ -8216,7 +8220,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ if mkdir -p . 2>/dev/null; then as_mkdir_p=: -@@ -5566,7 +6510,28 @@ else +@@ -5566,7 +6514,28 @@ else as_mkdir_p=false fi @@ -8246,7 +8250,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -@@ -5575,31 +6540,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P +@@ -5575,31 +6544,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" @@ -8282,7 +8286,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS -@@ -5607,124 +6555,106 @@ generated by GNU Autoconf 2.59. Invocat +@@ -5607,124 +6559,108 @@ generated by GNU Autoconf 2.59. Invocat CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ @@ -8401,6 +8405,8 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; @@ -8451,7 +8457,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ esac shift -@@ -5738,32 +6668,48 @@ if $ac_cs_silent; then +@@ -5738,32 +6674,48 @@ if $ac_cs_silent; then fi _ACEOF @@ -8513,7 +8519,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck 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 +6719,464 @@ if $ac_need_defaults; then +@@ -5773,344 +6725,464 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree @@ -9257,7 +9263,7 @@ $NetBSD: patch-ac,v 1.10 2010/12/15 21:08:30 chuck Exp $ # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. -@@ -6132,4 +7198,8 @@ if test "$no_create" != yes; then +@@ -6132,4 +7204,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-ae b/audio/cdparanoia/patches/patch-ae index 73fd8313fdc..5ac1e40ca80 100644 --- a/audio/cdparanoia/patches/patch-ae +++ b/audio/cdparanoia/patches/patch-ae @@ -1,6 +1,6 @@ -$NetBSD: patch-ae,v 1.7 2009/08/09 16:00:53 drochner Exp $ +$NetBSD: patch-ae,v 1.8 2013/12/12 16:41:32 jperkin Exp $ ---- main.c.orig 2008-09-11 23:11:02.000000000 +0200 +--- main.c.orig 2008-09-11 21:11:02.000000000 +0000 +++ main.c @@ -25,7 +25,9 @@ #include @@ -139,7 +139,7 @@ $NetBSD: patch-ae,v 1.7 2009/08/09 16:00:53 drochner Exp $ /* Query the cdrom/disc; we may need to override some settings */ -+#if defined(__APPLE__) && defined(__MACH__) ++#if defined(__APPLE__) && defined(__MACH__) || defined(__sun) + d=cdda_find_a_cdrom(verbose,NULL); +#else +#ifndef __linux__ /* XXX */ diff --git a/audio/cdparanoia/patches/patch-cb b/audio/cdparanoia/patches/patch-cb index 9a98d77d362..a7da9dbc346 100644 --- a/audio/cdparanoia/patches/patch-cb +++ b/audio/cdparanoia/patches/patch-cb @@ -1,7 +1,7 @@ -$NetBSD: patch-cb,v 1.8 2010/12/16 04:55:46 chuck Exp $ +$NetBSD: patch-cb,v 1.9 2013/12/12 16:41:32 jperkin Exp $ ---- interface/low_interface.h.orig 2008-09-11 06:43:52.000000000 -0400 -+++ interface/low_interface.h 2010-12-15 23:40:19.000000000 -0500 +--- interface/low_interface.h.orig 2008-09-11 10:43:52.000000000 +0000 ++++ interface/low_interface.h @@ -26,6 +26,7 @@ #include #include @@ -10,10 +10,14 @@ $NetBSD: patch-cb,v 1.8 2010/12/16 04:55:46 chuck Exp $ #include #include -@@ -54,6 +55,22 @@ +@@ -54,6 +55,26 @@ #include #include ++#elif defined(__sun) ++ ++#include ++ +#elif defined(__FreeBSD__) || defined(__DragonFly__) + +#include @@ -33,7 +37,7 @@ $NetBSD: patch-cb,v 1.8 2010/12/16 04:55:46 chuck Exp $ #include "cdda_interface.h" #ifndef SG_EMULATED_HOST -@@ -100,17 +117,29 @@ +@@ -100,17 +121,29 @@ typedef struct sg_io_hdr struct cdda_private_data { struct sg_header *sg_hd; unsigned char *sg_buffer; /* points into sg_hd */ diff --git a/audio/cdparanoia/patches/patch-cd b/audio/cdparanoia/patches/patch-cd index e945af51023..1e4b6f38213 100644 --- a/audio/cdparanoia/patches/patch-cd +++ b/audio/cdparanoia/patches/patch-cd @@ -1,8 +1,8 @@ -$NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ +$NetBSD: patch-cd,v 1.6 2013/12/12 16:41:32 jperkin Exp $ ---- interface/common_interface.c.orig 2008-08-21 18:08:54.000000000 +0200 +--- interface/common_interface.c.orig 2008-08-21 16:08:54.000000000 +0000 +++ interface/common_interface.c -@@ -9,26 +9,42 @@ +@@ -9,26 +9,50 @@ ******************************************************************/ #include @@ -19,6 +19,10 @@ $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ +#ifdef __linux__ #include ++#endif ++ ++#ifdef __sun ++#include +#endif /* Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */ @@ -30,6 +34,10 @@ $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ 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)) @@ -45,7 +53,7 @@ $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ /* 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 +65,7 @@ char *atapi_drive_info(int fd){ +@@ -49,6 +73,7 @@ char *atapi_drive_info(int fd){ free(id); return(ret); } @@ -53,7 +61,7 @@ $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ int data_bigendianp(cdrom_drive *d){ float lsb_votes=0; -@@ -174,9 +191,12 @@ int data_bigendianp(cdrom_drive *d){ +@@ -174,9 +199,12 @@ int data_bigendianp(cdrom_drive *d){ knows the leadout/leadin size. */ int FixupTOC(cdrom_drive *d,int tracks){ @@ -66,7 +74,7 @@ $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ /* First off, make sure the 'starting sector' is >=0 */ for(j=0;jioctl_fd, CDIOREADMSADDR, &ms_addr) == -1) ++#else ++ if (ioctl(d->ioctl_fd, CDROMREADOFFSET, &ms_addr) == -1) ++#endif + return -1; +#endif @@ -94,7 +106,7 @@ $NetBSD: patch-cd,v 1.5 2009/08/09 16:00:53 drochner Exp $ /* This is an odd little piece of code --Monty */ -@@ -226,15 +258,17 @@ int FixupTOC(cdrom_drive *d,int tracks){ +@@ -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)) { diff --git a/audio/cdparanoia/patches/patch-cf b/audio/cdparanoia/patches/patch-cf index 314917061b7..c7d6dd3033a 100644 --- a/audio/cdparanoia/patches/patch-cf +++ b/audio/cdparanoia/patches/patch-cf @@ -1,7 +1,7 @@ -$NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ +$NetBSD: patch-cf,v 1.13 2013/12/12 16:41:32 jperkin Exp $ ---- interface/scan_devices.c.orig 2008-08-26 12:55:22 +0300 -+++ interface/scan_devices.c 2009-08-26 09:50:54 +0300 +--- interface/scan_devices.c.orig 2008-08-26 09:55:22.000000000 +0000 ++++ interface/scan_devices.c @@ -1,6 +1,8 @@ /****************************************************************** * CopyPolicy: GNU Lesser General Public License 2.1 applies @@ -20,7 +20,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ #define MAX_DEV_LEN 20 /* Safe because strings only come from below */ /* must be absolute paths! */ static char *scsi_cdrom_prefixes[]={ -@@ -52,11 +56,30 @@ static char *cdrom_devices[]={ +@@ -52,11 +56,33 @@ static char *cdrom_devices[]={ "/dev/cm206cd", "/dev/gscd", "/dev/optcd",NULL}; @@ -36,12 +36,15 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ + "/dev/rcd?d", + "/dev/cd?c", + "/dev/cd?d", NULL}; ++#elif defined(__sun) ++static char *cdrom_devices[] = { ++ "/dev/dsk/c?t?d?s2", NULL}; +#endif /* Functions here look for a cdrom drive; full init of a drive type happens in interface.c */ -+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__)) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__sun) cdrom_drive *cdda_find_a_cdrom(int messagedest,char **messages){ +#if defined(__APPLE__) && defined(__MACH__) + cdrom_drive *d = calloc(1, sizeof(cdrom_drive)); @@ -51,7 +54,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ /* Brute force... */ int i=0; -@@ -78,10 +101,12 @@ cdrom_drive *cdda_find_a_cdrom(int messa +@@ -78,10 +104,12 @@ cdrom_drive *cdda_find_a_cdrom(int messa if((d=cdda_identify(buffer,messagedest,messages))) return(d); idmessage(messagedest,messages,"",NULL); @@ -64,7 +67,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ } }else{ /* Name. Go for it. */ -@@ -93,11 +118,13 @@ cdrom_drive *cdda_find_a_cdrom(int messa +@@ -93,11 +121,13 @@ cdrom_drive *cdda_find_a_cdrom(int messa i++; } idmessage(messagedest,messages, @@ -80,7 +83,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ cdrom_drive *cdda_identify(const char *device, int messagedest,char **messages){ struct stat st; cdrom_drive *d=NULL; -@@ -119,8 +146,14 @@ cdrom_drive *cdda_identify(const char *d +@@ -119,8 +149,14 @@ cdrom_drive *cdda_identify(const char *d /* an IDE device may have scsi-ide support, SG_IO support and cooked support. Prefer the SCSI variants, they give the most control */ @@ -95,7 +98,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ #ifdef CDDA_TEST if(!d)d=cdda_identify_test(device,messagedest,messages); -@@ -148,6 +181,7 @@ char *test_resolve_symlink(const char *f +@@ -148,6 +184,7 @@ char *test_resolve_symlink(const char *f cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest, char **messages){ @@ -103,7 +106,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ cdrom_drive *d=NULL; struct stat st; int fd=-1, i; -@@ -272,8 +306,60 @@ cdrom_drive *cdda_identify_cooked(const +@@ -272,8 +309,60 @@ cdrom_drive *cdda_identify_cooked(const } idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); return(d); @@ -164,7 +167,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ struct sg_id { long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */ long l2; /* Unique id */ -@@ -288,12 +374,18 @@ typedef struct scsiid{ +@@ -288,12 +377,18 @@ typedef struct scsiid{ /* Even *this* isn't as simple as it bloody well should be :-P */ /* SG has an easy interface, but SCSI overall does not */ static int get_scsi_id(int fd, scsiid *id){ @@ -183,7 +186,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ if(ioctl(fd,SCSI_IOCTL_GET_IDLUN,&argid))return(-1); id->bus=argid.l2; /* for now */ id->id=argid.l1&0xff; -@@ -301,6 +393,13 @@ static int get_scsi_id(int fd, scsiid *i +@@ -301,6 +396,13 @@ static int get_scsi_id(int fd, scsiid *i if(ioctl(fd,SCSI_IOCTL_GET_BUS_NUMBER,&busarg)==0) id->bus=busarg; @@ -197,7 +200,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ return(0); } -@@ -400,6 +499,7 @@ matchfail: +@@ -400,6 +502,7 @@ matchfail: if(dev!=-1)close(dev); return(NULL); } @@ -205,7 +208,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ void strscat(char *a,char *b,int n){ int i; -@@ -411,6 +511,7 @@ void strscat(char *a,char *b,int n){ +@@ -411,6 +514,7 @@ void strscat(char *a,char *b,int n){ strcat(a," "); } @@ -213,7 +216,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ /* At this point, we're going to punt compatability before SG2, and allow only SG2 and SG3 */ static int verify_SG_version(cdrom_drive *d,int messagedest, -@@ -488,7 +589,9 @@ int check_sgio(const char *device, int m +@@ -488,7 +592,9 @@ int check_sgio(const char *device, int m close(fd); return 0; } @@ -223,7 +226,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ /* scanning is always done by specifying a device name in specialized_device; generic_device is only filled when the generic device force option is used, and in that case, use of SG (not SGIO) should indeed be -@@ -527,11 +630,13 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -527,11 +633,13 @@ cdrom_drive *cdda_identify_scsi(const ch return(NULL); } @@ -237,7 +240,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ } if(specialized_device){ -@@ -553,6 +658,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -553,6 +661,7 @@ cdrom_drive *cdda_identify_scsi(const ch if(specialized_device==NULL)goto cdda_identify_scsi_fail; } @@ -245,7 +248,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ /* sgio is always preferred if it's there, unless user has forced the generic scsi device name */ if(use_sgio){ if(check_sgio(specialized_device,messagedest,messages)){ -@@ -562,18 +668,24 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -562,18 +671,24 @@ cdrom_drive *cdda_identify_scsi(const ch use_sgio=0; } } @@ -270,7 +273,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ if(generic_device){ specialized_device= scsi_match(generic_device,scsi_cdrom_prefixes, -@@ -589,6 +701,12 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -589,6 +704,12 @@ cdrom_drive *cdda_identify_scsi(const ch if(!generic_device) goto cdda_identify_scsi_fail; } @@ -283,7 +286,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ } } -@@ -639,6 +757,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -639,6 +760,7 @@ cdrom_drive *cdda_identify_scsi(const ch type=(int)(i_st.st_rdev>>8); if(!use_sgio){ @@ -291,7 +294,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ if(type==SCSI_CDROM_MAJOR){ if (!S_ISBLK(i_st.st_mode)) { idmessage(messagedest,messages,"\t\tSCSI CDROM device %s not a " -@@ -650,10 +769,12 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -650,10 +772,12 @@ cdrom_drive *cdda_identify_scsi(const ch "major number",specialized_device); goto cdda_identify_scsi_fail; } @@ -304,7 +307,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ if((int)(g_st.st_rdev>>8)==SCSI_GENERIC_MAJOR){ if (!S_ISCHR(g_st.st_mode)) { idmessage(messagedest,messages,"\t\tGeneric SCSI device %s not a " -@@ -665,6 +786,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -665,6 +789,7 @@ cdrom_drive *cdda_identify_scsi(const ch "major number",generic_device); goto cdda_identify_scsi_fail; } @@ -312,7 +315,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ } d=calloc(1,sizeof(cdrom_drive)); -@@ -685,6 +807,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -685,6 +810,7 @@ cdrom_drive *cdda_identify_scsi(const ch d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); g_fd=d->cdda_fd=dup(d->ioctl_fd); }else{ @@ -320,7 +323,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ version=verify_SG_version(d,messagedest,messages); switch(version){ case -1:case 0:case 1: -@@ -694,6 +817,9 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -694,6 +820,9 @@ cdrom_drive *cdda_identify_scsi(const ch d->interface=GENERIC_SCSI; break; } @@ -330,7 +333,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ /* malloc our big buffer for scsi commands */ d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE); -@@ -740,6 +866,15 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -740,6 +869,15 @@ cdrom_drive *cdda_identify_scsi(const ch } /* It would seem some TOSHIBA CDROMs gets things wrong */ @@ -346,7 +349,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ if (p && !strncmp (p + 8, "TOSHIBA", 7) && !strncmp (p + 16, "CD-ROM", 6) && -@@ -780,6 +915,88 @@ cdda_identify_scsi_fail: +@@ -780,6 +918,88 @@ cdda_identify_scsi_fail: } return(NULL); } @@ -435,7 +438,7 @@ $NetBSD: patch-cf,v 1.12 2009/08/29 04:54:52 hasso Exp $ #ifdef CDDA_TEST -@@ -829,3 +1046,4 @@ cdrom_drive *cdda_identify_test(const ch +@@ -829,3 +1049,4 @@ cdrom_drive *cdda_identify_test(const ch } #endif diff --git a/audio/cdparanoia/patches/patch-ch b/audio/cdparanoia/patches/patch-ch index 551281d9fb6..ffcb668c854 100644 --- a/audio/cdparanoia/patches/patch-ch +++ b/audio/cdparanoia/patches/patch-ch @@ -1,7 +1,7 @@ -$NetBSD: patch-ch,v 1.7 2010/12/16 04:55:46 chuck Exp $ +$NetBSD: patch-ch,v 1.8 2013/12/12 16:41:32 jperkin Exp $ ---- interface/cdda_interface.h.orig 2008-09-11 06:43:52.000000000 -0400 -+++ interface/cdda_interface.h 2010-12-15 23:39:17.000000000 -0500 +--- interface/cdda_interface.h.orig 2008-09-11 10:43:52.000000000 +0000 ++++ interface/cdda_interface.h @@ -18,9 +18,24 @@ #endif #define CD_FRAMESAMPLES (CD_FRAMESIZE_RAW / 4) @@ -20,14 +20,14 @@ $NetBSD: patch-ch,v 1.7 2010/12/16 04:55:46 chuck Exp $ +#include +#endif + -+#if defined(__NetBSD__) || (defined(__APPLE__) && defined(__MACH__)) ++#if defined(__NetBSD__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__sun) +#define ENOMEDIUM 12345 +#endif + #define MAXTRK 100 typedef struct TOC { /* structure of table of contents */ -@@ -35,6 +50,7 @@ +@@ -35,6 +50,7 @@ typedef struct TOC { /* structure of tab #define TEST_INTERFACE 2 #define SGIO_SCSI 3 #define SGIO_SCSI_BUGGY1 4 @@ -35,7 +35,7 @@ $NetBSD: patch-ch,v 1.7 2010/12/16 04:55:46 chuck Exp $ #define CDDA_MESSAGE_FORGETIT 0 #define CDDA_MESSAGE_PRINTIT 1 -@@ -49,13 +65,27 @@ +@@ -49,13 +65,27 @@ typedef struct cdrom_drive{ int opened; /* This struct may just represent a candidate for opening */ char *cdda_device_name; @@ -65,7 +65,7 @@ $NetBSD: patch-ch,v 1.7 2010/12/16 04:55:46 chuck Exp $ int interface; int bigendianp; int nsectors; -@@ -84,7 +114,7 @@ +@@ -84,7 +114,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 3be0cd8f16c..aa8c62e9f7b 100644 --- a/audio/cdparanoia/patches/patch-ci +++ b/audio/cdparanoia/patches/patch-ci @@ -1,8 +1,8 @@ -$NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ +$NetBSD: patch-ci,v 1.10 2013/12/12 16:41:32 jperkin Exp $ ---- interface/interface.c.orig 2008-09-11 06:43:52.000000000 -0400 -+++ interface/interface.c 2010-12-15 23:41:29.000000000 -0500 -@@ -35,6 +35,10 @@ +--- interface/interface.c.orig 2008-09-11 10:43:52.000000000 +0000 ++++ interface/interface.c +@@ -35,6 +35,10 @@ int cdda_close(cdrom_drive *d){ _clean_messages(d); if(d->cdda_device_name)free(d->cdda_device_name); @@ -13,7 +13,7 @@ $NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ if(d->ioctl_device_name)free(d->ioctl_device_name); if(d->drive_model)free(d->drive_model); if(d->cdda_fd!=-1)close(d->cdda_fd); -@@ -43,6 +47,19 @@ +@@ -43,6 +47,19 @@ int cdda_close(cdrom_drive *d){ if(d->private->sg_hd)free(d->private->sg_hd); free(d->private); } @@ -33,7 +33,7 @@ $NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ free(d); } -@@ -55,22 +72,31 @@ +@@ -55,22 +72,32 @@ int cdda_open(cdrom_drive *d){ if(d->opened)return(0); switch(d->interface){ @@ -42,6 +42,7 @@ $NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ + if((ret=osx_open_device(d))) + return ret; + break; ++#elif defined(__sun) +#else case SGIO_SCSI_BUGGY1: case SGIO_SCSI: @@ -49,7 +50,7 @@ $NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ if((ret=scsi_init_drive(d))) return(ret); break; -+#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__sun) case COOKED_IOCTL: if((ret=cooked_init_drive(d))) return(ret); @@ -65,7 +66,7 @@ $NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ default: cderror(d,"100: Interface not supported\n"); return(-100); -@@ -113,7 +139,7 @@ +@@ -113,7 +140,7 @@ long cdda_read_timed(cdrom_drive *d, voi if(sectors>0){ sectors=d->read_audio(d,buffer,beginsector,sectors); @@ -74,7 +75,7 @@ $NetBSD: patch-ci,v 1.9 2010/12/16 04:55:46 chuck Exp $ /* byteswap? */ if(d->bigendianp==-1) /* not determined yet */ d->bigendianp=data_bigendianp(d); -@@ -127,7 +153,9 @@ +@@ -127,7 +154,9 @@ long cdda_read_timed(cdrom_drive *d, voi } } } -- cgit v1.2.3