From e2e82a4228a340ab27af015055008f55db115aa7 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 21 Dec 2002 21:53:02 +0000 Subject: [PATCH] drop getopt_long() workarounds --- audio/cdparanoia/patches/patch-Makefile_in | 11 +- audio/cdparanoia/patches/patch-configure_in | 19 +--- audio/cdparanoia/patches/patch-main_c | 109 -------------------- 3 files changed, 3 insertions(+), 136 deletions(-) delete mode 100644 audio/cdparanoia/patches/patch-main_c diff --git a/audio/cdparanoia/patches/patch-Makefile_in b/audio/cdparanoia/patches/patch-Makefile_in index faa80fbef83..754498aa185 100644 --- a/audio/cdparanoia/patches/patch-Makefile_in +++ b/audio/cdparanoia/patches/patch-Makefile_in @@ -1,15 +1,6 @@ -$OpenBSD: patch-Makefile_in,v 1.4 2002/09/16 13:35:52 lebel Exp $ +$OpenBSD: patch-Makefile_in,v 1.5 2002/12/21 21:53:02 naddy Exp $ --- Makefile.in.orig Wed Mar 28 00:46:58 2001 +++ Makefile.in Mon Sep 16 14:44:37 2002 -@@ -8,7 +8,7 @@ VPATH=@srcdir@ - srcdir=@srcdir@ - - @SET_MAKE@ --FLAGS=@TYPESIZES@ @CFLAGS@ -+FLAGS=@GETOPT_LONG@ @TYPESIZES@ @CFLAGS@ - OPT=@OPT@ $(FLAGS) - DEBUG=@DEBUG@ $(FLAGS) - CC=@CC@ @@ -23,33 +23,33 @@ BINDIR=@bindir@ MANDIR=@mandir@ INCLUDEDIR=@includedir@ diff --git a/audio/cdparanoia/patches/patch-configure_in b/audio/cdparanoia/patches/patch-configure_in index ac82123bbf7..e7db3667e6e 100644 --- a/audio/cdparanoia/patches/patch-configure_in +++ b/audio/cdparanoia/patches/patch-configure_in @@ -1,6 +1,6 @@ -$OpenBSD: patch-configure_in,v 1.6 2002/09/16 13:35:52 lebel Exp $ +$OpenBSD: patch-configure_in,v 1.7 2002/12/21 21:53:02 naddy Exp $ --- configure.in.orig Sun Mar 26 09:33:22 2000 -+++ configure.in Mon Sep 16 14:44:52 2002 ++++ configure.in Sat Dec 21 22:39:30 2002 @@ -1,34 +1,32 @@ AC_INIT(interface/interface.c) @@ -60,18 +60,3 @@ $OpenBSD: patch-configure_in,v 1.6 2002/09/16 13:35:52 lebel Exp $ if test -z "$SIZE16"; then AC_MSG_ERROR(No 16 bit tupe found on this platform!) -@@ -63,11 +61,14 @@ fi - AC_CHECK_HEADERS(linux/sbpcd.h, SBPCD_H="-DSBPCD_H='1' ") - AC_CHECK_HEADERS(linux/ucdrom.h, UCDROM_H="-DUCDROM_H='1' ") - -+AC_CHECK_FUNCS(getopt_long, GETOPT_LONG="-DGETOPT_LONG='1' ") -+ - AC_PROG_MAKE_SET - AC_C_CONST - - AC_SUBST(SBPCD_H) - AC_SUBST(UCDROM_H) -+AC_SUBST(GETOPT_LONG) - AC_SUBST(TYPESIZES) - AC_SUBST(OPT) - AC_SUBST(DEBUG) diff --git a/audio/cdparanoia/patches/patch-main_c b/audio/cdparanoia/patches/patch-main_c deleted file mode 100644 index 4d025e3403c..00000000000 --- a/audio/cdparanoia/patches/patch-main_c +++ /dev/null @@ -1,109 +0,0 @@ -$OpenBSD: patch-main_c,v 1.3 2002/09/16 13:35:52 lebel Exp $ ---- main.c.orig Mon Mar 26 05:44:50 2001 -+++ main.c Mon Sep 16 14:45:07 2002 -@@ -49,7 +49,9 @@ - #include - #include - #include -+#ifdef GETOPT_LONG - #include -+#endif - #include - #include - #include -@@ -231,6 +233,7 @@ VERSION"\n" - " cdparanoia [options] [outfile]\n\n" - - "OPTIONS:\n" -+#ifdef GETOPT_LONG - " -v --verbose : extra verbose operation\n" - " -q --quiet : quiet operation\n" - " -e --stderr-progress : force output of progress information to\n" -@@ -276,6 +279,48 @@ 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" -+#else -+" -v : extra verbose operation\n" -+" -q : quiet operation\n" -+" -e : force output of progress information to\n" -+" stderr (for wrapper scripts)\n" -+" -V : print version info and quit\n" -+" -Q : autosense drive, query disc and quit\n" -+" -B : 'batch' mode (saves each track to a seperate file.\n" -+" -s : do an exhaustive search for drive\n" -+" -h : print help\n\n" -+ -+" -p : output raw 16 bit PCM in host byte order\n" -+" -r : output raw 16 bit little-endian PCM\n" -+" -R : output raw 16 bit big-endian PCM\n" -+" -w : output as WAV file (default)\n" -+" -f : output as AIFF file\n" -+" -a : output as AIFF-C file\n" -+" -i : output human readable ripping info to file\n\n" -+ -+" -c : force treating drive as little endian\n" -+" -C : force treating drive as big endian\n" -+" -n : force default number of sectors in read to n sectors\n" -+" -o : force minimum overlap search during\n" -+" verification to n sectors\n" -+" -d : use specified device; disallow autosense\n" -+" -g : use specified generic scsi device\n" -+" -S : read from device at specified speed\n" -+" -t : Add sectors to the values reported\n" -+" when addressing tracks. May be negative\n" -+" -T : Assume that the beginning offset of\n" -+" track 1 as reported in the TOC will be\n" -+" addressed as LBA 0. Necessary for some\n" -+" Toshiba drives to get track boundaries\n" -+" correct\n" -+" -z[=n] : never accept any less than perfect\n" -+" data reconstruction (don't allow 'V's)\n" -+" but if [n] is given, skip after [n]\n" -+" retries without progress.\n" -+" -Z : disable all paranoia checking\n" -+" -Y : only do cdda2wav-style overlap checking\n" -+" -X : abort on imperfect reads/skips\n\n" -+#endif - - "OUTPUT SMILIES:\n" - " :-) Normal operation, low/no jitter\n" -@@ -376,7 +421,7 @@ static void callback(long inpos, int fun - int graph=30; - char buffer[256]; - static long c_sector=0,v_sector=0; -- static char dispcache[30]=" "; -+ static char dispcache[30 + 1]=" "; - static int last=0; - static long lasttime=0; - long sector,osector=0; -@@ -587,6 +632,7 @@ static void callback(long inpos, int fun - - const char *optstring = "escCn:o:O:d:g:S:prRwafvqVQhZz::YXWBi:Tt:"; - -+#ifdef GETOPT_LONG - struct option options [] = { - {"stderr-progress",no_argument,NULL,'e'}, - {"search-for-drive",no_argument,NULL,'s'}, -@@ -621,6 +667,7 @@ struct option options [] = { - - {NULL,0,NULL,0} - }; -+#endif - - long blocking_write(int outf, char *buffer, long num){ - long words=0,temp; -@@ -673,7 +720,12 @@ int main(int argc,char *argv[]){ - - atexit(cleanup); - -- while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){ -+#ifdef GETOPT_LONG -+ while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF) -+#else -+ while((c=getopt(argc,argv,optstring))!=EOF) -+#endif -+ { - switch(c){ - case 'B': - batch=1;