diff --git a/audio/grip/Makefile b/audio/grip/Makefile new file mode 100644 index 00000000000..9d8908eef3a --- /dev/null +++ b/audio/grip/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ + +COMMENT= "front-end to external cd audio rippers and mp3 encoders" + +V= 2.95 +DISTNAME= grip-${V} +CATEGORIES= audio +NEED_VERSION= 1.402 +EXTRACT_SUFX= .tgz + +MAINTAINER= David Lebel + +HOMEPAGE= http://www.nostatic.org/grip/ + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= http://www.nostatic.org/grip/ + +LIB_DEPENDS= gtk.1.2::x11/gtk+ +USE_GMAKE= Yes + +ALL_TARGET= gripnopar gcd + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/grip ${PREFIX}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/gcd ${PREFIX}/bin/ + ${INSTALL_DATA} ${WRKSRC}/grip.1 ${PREFIX}/man/man1/ + +.include diff --git a/audio/grip/files/md5 b/audio/grip/files/md5 new file mode 100644 index 00000000000..4edbec6c15c --- /dev/null +++ b/audio/grip/files/md5 @@ -0,0 +1,3 @@ +MD5 (grip-2.95.tgz) = fabf302f9f35708725415b2d1f7d3602 +RMD160 (grip-2.95.tgz) = 1336dbf471177d4789b404272d165082ef863e1d +SHA1 (grip-2.95.tgz) = ef4cdfa1fd06d1487257260d12c87d8da4080980 diff --git a/audio/grip/patches/patch-Makefile b/audio/grip/patches/patch-Makefile new file mode 100644 index 00000000000..b8bb1700568 --- /dev/null +++ b/audio/grip/patches/patch-Makefile @@ -0,0 +1,50 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ +--- Makefile.orig Wed Oct 18 15:12:53 2000 ++++ Makefile Tue Apr 10 15:06:07 2001 +@@ -6,14 +6,11 @@ OS=$(shell uname -s) + # Compiler + CC= gcc + +-# Install prefix +-PREFIX=/usr +- + # Installation directory -- where the binary will go +-INSTALLDIR= $(PREFIX)/bin ++INSTALLDIR= $(TRUEPREFIX)/bin + + # Location to store auxilliary files +-AUXDIR= $(PREFIX)/lib/grip ++AUXDIR= $(TRUEPREFIX)/lib/grip + + + # Compiler flags +@@ -28,13 +25,17 @@ endif + ifeq ($(OS), FreeBSD) + LIBS+= -pthread + endif ++ifeq ($(OS), OpenBSD) ++LIBS+= -D_THREAD_SAFE ++endif ++ + PARLIBS= cdparanoia/interface/libcdda_interface.a \ + cdparanoia/paranoia/libcdda_paranoia.a + + # This is needed for "make install" + OWNER = root +-GROUP = root +-INSTALL = /usr/bin/install -o $(OWNER) -g $(GROUP) ++GROUP = wheel ++INSTALL = /usr/bin/install -c -o $(OWNER) -g $(GROUP) + + + # ----------- You shouldn't need to make changes below here. ------------- +@@ -43,7 +44,8 @@ VERSION= 2.95 + + OBJS= cddb.o cd.o id3.o bug.o parsecfg.o dialog/input.o dialog/message.o + +-all: grip gcd ++all: gripnopar gcd ++xall: grip gcd + + grip: grip.o $(OBJS) cdpar.o + $(CC) -o grip grip.o cdpar.o $(OBJS) $(LIBS) $(PARLIBS) diff --git a/audio/grip/patches/patch-cd_c b/audio/grip/patches/patch-cd_c new file mode 100644 index 00000000000..b487b181bd2 --- /dev/null +++ b/audio/grip/patches/patch-cd_c @@ -0,0 +1,130 @@ +$OpenBSD: patch-cd_c,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ +--- cd.c.orig Wed Oct 18 15:12:53 2000 ++++ cd.c Tue Apr 10 15:00:59 2001 +@@ -46,7 +46,7 @@ + #include + #endif + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + #define CDIOREADSUBCHANNEL CDIOCREADSUBCHANNEL + #endif + +@@ -55,6 +55,10 @@ + #include + #endif + ++ /* for OS's that need to re-open the CD after a disc change */ ++extern char cddevice[]; ++extern int g_cd_desc; ++ + /* Initialize the CD-ROM for playing audio CDs */ + + int CDInitDevice(char *device_name) +@@ -128,9 +132,28 @@ int CDStat(int cd_desc,struct disc_info + #ifdef CDIOREADTOCHEADER + struct ioc_toc_header cdth; + #endif ++ int ret; + + int readtracks,frame[MAX_TRACKS],pos; +- int retcode; ++ ++#ifdef __OpenBSD__ /* fix for disc info never updating */ ++ if ((disc->disc_present == 0) && (cd_desc < 0)) { ++ if((cd_desc = g_cd_desc = open(cddevice, O_RDONLY ++# ifdef NON_BLOCKING ++ | O_NONBLOCK ++# endif ++ )) < 0){ ++# ifdef DEBUG ++ // fprintf(stderr, "open failed (%s)\n", cddevice); ++ fprintf(stderr, "o"); ++# endif ++ return -1; ++ } ++# ifdef DEBUG ++ fprintf(stderr, "*"); ++# endif ++ } ++#endif /* __OpenBSD__ fix for disc info never updating */ + + #ifdef CDROM_DRIVE_STATUS + retcode = ioctl(cd_desc, CDROM_DRIVE_STATUS, CDSL_CURRENT); +@@ -143,29 +166,41 @@ int CDStat(int cd_desc,struct disc_info + return -1; + #endif + +-#ifdef CDIOREADSUBCHANNEL ++#ifdef CDIOREADSUBCHANNEL /* netbsd */ + bzero(&cdsc, sizeof(cdsc)); + cdsc.data = &data; + cdsc.data_len = sizeof(data); + cdsc.data_format = CD_CURRENT_POSITION; + cdsc.address_format = CD_MSF_FORMAT; + +- if(ioctl(cd_desc, CDIOCREADSUBCHANNEL, (char *)&cdsc) < 0) ++ if((ret = ioctl(cd_desc, CDIOCREADSUBCHANNEL, (char *)&cdsc)) < 0) + #endif + #ifdef CDROM_READ_SUBCHANNEL + sch.sch_data_format = CDROM_CURRENT_POSITION; + + sch.sch_address_format = CDROM_MSF_FORMAT; ++ ++ g_message("CDIOCREADSUBCHANNEL %d %m", ret); + + if(ioctl(cd_desc, CDROM_READ_SUBCHANNEL, &sch) < 0) + #endif +-#ifdef CDROMSUBCHNL ++#ifdef CDROMSUBCHNL /* netbsd - w. no toc flag, new disc */ + cdsc.cdsc_format = CDROM_MSF; + +- if(ioctl(cd_desc, CDROMSUBCHNL, &cdsc) < 0) ++ errno = 0; ++ ++ if((ret = ioctl(cd_desc, CDROMSUBCHNL, &cdsc)) < 0) + #endif + { ++ /* errno 5 = EIO, 9 = BAD_FD */ ++ g_message("CDROMSUBCHNL %d %d", ret, errno); + disc->disc_present = 0; ++#ifdef __OpenBSD__ /* fix for disc info never updating */ ++ if (cd_desc >= 0){ ++ close(cd_desc); ++ g_cd_desc = -1; ++ } ++#endif /* __OpenBSD__ fix for disc info never updating */ + + return 0; + } +@@ -177,6 +212,12 @@ int CDStat(int cd_desc,struct disc_info + (cdsc.cdsc_audiostatus<0x11||cdsc.cdsc_audiostatus>0x15)) + { + disc->disc_present = 0; ++#ifdef __OpenBSD__ /* fix for disc info never updating */ ++ if (cd_desc >= 0){ ++ close(cd_desc); ++ g_cd_desc = -1; ++ } ++#endif /* __OpenBSD__ fix for disc info never updating */ + + return 0; + } +@@ -240,7 +281,7 @@ int CDStat(int cd_desc,struct disc_info + + /* Read the Table Of Contents header */ + +-#ifdef CDIOREADTOCHEADER ++#ifdef CDIOREADTOCHEADER /* netbsd */ + if(ioctl(cd_desc, CDIOREADTOCHEADER, (char *)&cdth) < 0) { + printf("Error: Failed to read disc contents\n"); + +@@ -261,7 +302,7 @@ int CDStat(int cd_desc,struct disc_info + + /* Read the table of contents */ + +-#ifdef CDIOREADTOCENTRYS ++#ifdef CDIOREADTOCENTRYS /* netbsd */ + cdte.address_format = CD_MSF_FORMAT; + cdte.starting_track = 0; + cdte.data = toc_buffer; diff --git a/audio/grip/patches/patch-cddb_c b/audio/grip/patches/patch-cddb_c new file mode 100644 index 00000000000..b71acdfa0d4 --- /dev/null +++ b/audio/grip/patches/patch-cddb_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-cddb_c,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ +--- cddb.c.orig Wed Oct 18 15:12:53 2000 ++++ cddb.c Tue Apr 10 15:00:59 2001 +@@ -396,7 +396,7 @@ static void CDDBProcessLine(char *inbuff + int numtracks) + { + int track; +- int len; ++ int len = 0; + char *st; + + if(!strncasecmp(inbuffer,"DTITLE",6)) { +@@ -572,7 +572,7 @@ gboolean CDDBStatDiscData(int cd_desc) + + int CDDBReadDiscData(int cd_desc,DiscData *ddata) + { +- FILE *cddb_data; ++ FILE *cddb_data = NULL; + int index,genre; + char root_dir[256], file[256], inbuf[512]; + struct disc_info disc; diff --git a/audio/grip/patches/patch-config_h b/audio/grip/patches/patch-config_h new file mode 100644 index 00000000000..d6f354eaccc --- /dev/null +++ b/audio/grip/patches/patch-config_h @@ -0,0 +1,21 @@ +$OpenBSD: patch-config_h,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ +--- config.h.orig Wed Oct 18 15:12:53 2000 ++++ config.h Tue Apr 10 15:00:59 2001 +@@ -5,7 +5,7 @@ + /* Mike's email address */ + #define MAINTAINER "oliphant@gtk.org" + +-#if defined(__linux__) || defined(__FreeBSD__) || defined(__osf__) /* __osf__ ?? */ ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__osf__) /* __osf__ ?? */ + + #define MAILER "/usr/sbin/sendmail -t" + +@@ -28,7 +28,7 @@ + #define HAVE_MNTENT_H 1 + + +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__OpenBSD__) + + /* Define if you have the header file. (FreeBSD, OpenBSD , + Solaris*/ diff --git a/audio/grip/patches/patch-grip_c b/audio/grip/patches/patch-grip_c new file mode 100644 index 00000000000..4290465cf00 --- /dev/null +++ b/audio/grip/patches/patch-grip_c @@ -0,0 +1,441 @@ +$OpenBSD: patch-grip_c,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ +--- grip.c.orig Wed Oct 18 15:12:53 2000 ++++ grip.c Tue Apr 10 15:00:59 2001 +@@ -38,7 +38,7 @@ + #if defined(__linux__) + #include + #endif +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + #include + #include + #endif +@@ -125,7 +125,7 @@ void SelectRow(GtkWidget *widget,gint ro + GdkEventButton *event,gpointer data); + void CDDBToggle(void); + void LookupDisc(gboolean manual); +-void DoLookup(void); ++void *DoLookup(void *); + gboolean CDDBLookupDisc(CDDBServer *server); + void SubmitEntryCB(void); + void SubmitEntry(void); +@@ -156,6 +156,9 @@ void Usage(void); + void ParseArgs(int numargs,char *args[]); + void ShuffleTracks(int num_tracks); + void MakeStyles(void); ++void setCurrentTrackIndex(int track); ++void ParseRipCmd(char *instr,char *outstr,int track,int startsec,int endsec, ++ char *filename); + + /* Rip-related functions */ + +@@ -211,7 +214,7 @@ GtkStyle *style_dark_grey; + + GdkCursor *wait_cursor; + +-int cd_desc; ++int g_cd_desc; + int changer_slots; + int current_disc=0; + int volume=255; +@@ -792,7 +795,7 @@ void PlaylistChanged(void) + + InitProgram(info.disc_totaltracks,play_mode); + +- if(CDDBWriteDiscData(cd_desc,&ddata,NULL,TRUE)<0) ++ if(CDDBWriteDiscData(g_cd_desc,&ddata,NULL,TRUE)<0) + DisplayMsg("Error saving disc data\n"); + } + +@@ -854,7 +857,7 @@ void SetYear(int year) + void SaveDiscInfo(void) + { + if(have_disc) { +- if(CDDBWriteDiscData(cd_desc,&ddata,NULL,TRUE)<0) ++ if(CDDBWriteDiscData(g_cd_desc,&ddata,NULL,TRUE)<0) + DisplayMsg("Error saving disc data\n"); + } + else BoolDialog("No disc present","OK",NULL,NULL,NULL); +@@ -974,7 +977,7 @@ void SetVolume(GtkWidget *widget,gpointe + volume=vol.vol_front.left=vol.vol_front.right= + vol.vol_back.left=vol.vol_back.right=GTK_ADJUSTMENT(widget)->value; + +- CDSetVolume(cd_desc,&vol); ++ CDSetVolume(g_cd_desc,&vol); + } + + void NextTrack(void) +@@ -986,7 +989,7 @@ void NextTrack(void) + } + #endif + +- CDStat(cd_desc,&info,FALSE); ++ CDStat(g_cd_desc,&info,FALSE); + + if(current_track_index<(prog_totaltracks-1)) { + gtk_clist_select_row(GTK_CLIST(trackclist), +@@ -1009,7 +1012,7 @@ void PrevTrack(void) + } + #endif + +- CDStat(cd_desc,&info,FALSE); ++ CDStat(g_cd_desc,&info,FALSE); + + if((info.disc_mode==CDAUDIO_PLAYING) && + ((info.disc_frame - info.track[info.disc_track-1].track_start) > 100)) +@@ -1120,7 +1123,7 @@ void FastFwd(void) + tv.seconds=5; + + if((info.disc_mode==CDAUDIO_PLAYING)||(info.disc_mode==CDAUDIO_PAUSED)) { +- CDAdvance(cd_desc,&info,&tv); ++ CDAdvance(g_cd_desc,&info,&tv); + } + } + +@@ -1146,7 +1149,7 @@ void Rewind(void) + tv.seconds=-5; + + if((info.disc_mode==CDAUDIO_PLAYING)||(info.disc_mode==CDAUDIO_PAUSED)) { +- CDAdvance(cd_desc,&info,&tv); ++ CDAdvance(g_cd_desc,&info,&tv); + } + } + +@@ -1161,7 +1164,7 @@ void NextDisc(void) + + if(changer_slots>1) { + current_disc=(current_disc+1)%changer_slots; +- CDChangerSelectDisc(cd_desc,current_disc); ++ CDChangerSelectDisc(g_cd_desc,current_disc); + have_disc=FALSE; + } + } +@@ -1172,8 +1175,8 @@ void StopPlay(void) + if(ripping) return; + #endif + +- CDStop(cd_desc); +- CDStat(cd_desc,&info,FALSE); ++ CDStop(g_cd_desc); ++ CDStat(g_cd_desc,&info,FALSE); + stopped=TRUE; + + if(stop_first) +@@ -1197,8 +1200,8 @@ void EjectDisc(void) + + if(have_disc) { + Debug("Have disc -- ejecting\n"); +- CDStop(cd_desc); +- CDEject(cd_desc); ++ CDStop(g_cd_desc); ++ CDEject(g_cd_desc); + playing=0; + have_disc=FALSE; + update_required=TRUE; +@@ -1207,12 +1210,12 @@ void EjectDisc(void) + } + else { + if(faulty_eject) { +- if(tray_open) CDClose(cd_desc); +- else CDEject(cd_desc); ++ if(tray_open) CDClose(g_cd_desc); ++ else CDEject(g_cd_desc); + } + else { +- if(TrayOpen(cd_desc)!=0) CDClose(cd_desc); +- else CDEject(cd_desc); ++ if(TrayOpen(g_cd_desc)!=0) CDClose(g_cd_desc); ++ else CDEject(g_cd_desc); + } + + tray_open=!tray_open; +@@ -1232,7 +1235,7 @@ void PlayTrackCB(GtkWidget *widget,gpoin + } + #endif + +- CDStat(cd_desc,&info,FALSE); ++ CDStat(g_cd_desc,&info,FALSE); + + if(play_mode!=PM_NORMAL&&!((info.disc_mode==CDAUDIO_PLAYING)|| + info.disc_mode==CDAUDIO_PAUSED)) { +@@ -1247,11 +1250,11 @@ void PlayTrackCB(GtkWidget *widget,gpoin + if(track==(info.disc_track-1)) { + switch(info.disc_mode) { + case CDAUDIO_PLAYING: +- CDPause(cd_desc); ++ CDPause(g_cd_desc); + return; + break; + case CDAUDIO_PAUSED: +- CDResume(cd_desc); ++ CDResume(g_cd_desc); + return; + break; + default: +@@ -1267,8 +1270,8 @@ void PlayTrack(int track) + Busy(); + + if(play_mode==PM_NORMAL) +- CDPlayTrack(cd_desc,&info,track+1,info.disc_totaltracks); +- else CDPlayTrack(cd_desc,&info,track+1,track+1); ++ CDPlayTrack(g_cd_desc,&info,track+1,info.disc_totaltracks); ++ else CDPlayTrack(g_cd_desc,&info,track+1,track+1); + + UnBusy(); + +@@ -1288,16 +1291,16 @@ void CheckNewDisc(void) + if(!looking_up) { + Debug("Checking for a new disc\n"); + +- if( (CDStat(cd_desc,&info,FALSE) == 0) ++ if( (CDStat(g_cd_desc,&info,FALSE) == 0) + && info.disc_present +- && (CDStat(cd_desc,&info,TRUE) == 0) ) { ++ && (CDStat(g_cd_desc,&info,TRUE) == 0) ) { + + Debug("CDStat found a disc, checking tracks\n"); + + if(CheckTracks()) { + Debug("We have a valid disc!\n"); + +- new_id=CDDBDiscid(cd_desc); ++ new_id=CDDBDiscid(g_cd_desc); + InitProgram(info.disc_totaltracks,play_mode); + if(play_first) + if(info.disc_mode == CDAUDIO_COMPLETED || +@@ -1352,7 +1355,7 @@ void UpdateDisplay(void) + + if(!update_required) { + if(have_disc) { +- CDStat(cd_desc,&info,FALSE); ++ CDStat(g_cd_desc,&info,FALSE); + + if((info.disc_mode==CDAUDIO_PLAYING)|| + (info.disc_mode==CDAUDIO_PAUSED)) { +@@ -1420,7 +1423,7 @@ void UpdateDisplay(void) + if(!stopped) PlayTrack(CURRENT_TRACK); + } + else if(stopped) { +- CDStop(cd_desc); ++ CDStop(g_cd_desc); + #ifndef GRIPCD + frames=secs=mins=0; + g_snprintf(buf,80,"Current sector: %6d",frames); +@@ -1654,7 +1657,7 @@ void CDDBToggle(void) + if(looking_up) { + #ifdef SOLARIS + pthread_exit(&status); +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__OpenBSD__) + pthread_kill(cddb_thread, 0); + #else + pthread_kill_other_threads_np(); +@@ -1682,15 +1685,15 @@ void LookupDisc(gboolean manual) + ddata.data_multi_artist=FALSE; + ddata.data_year=0; + +- present=CDDBStatDiscData(cd_desc); ++ present=CDDBStatDiscData(g_cd_desc); + + if(!manual&&present) { +- CDDBReadDiscData(cd_desc,&ddata); ++ CDDBReadDiscData(g_cd_desc,&ddata); + update_required=TRUE; + } + else { + if(!manual) { +- ddata.data_id=CDDBDiscid(cd_desc); ++ ddata.data_id=CDDBDiscid(g_cd_desc); + ddata.data_genre=7; /* "misc" */ + strcpy(ddata.data_title,"Unknown Disc"); + strcpy(ddata.data_artist,""); +@@ -1710,15 +1713,23 @@ void LookupDisc(gboolean manual) + if(!local_mode && (manual?TRUE:automatic_cddb)) { + looking_up=TRUE; + +- pthread_create(&cddb_thread,NULL,(void *)&DoLookup,NULL); ++ Debug("creating cddb lookup thread.\n"); ++ pthread_create(&cddb_thread,NULL, DoLookup,NULL); ++#if 1 ++ /* XXX: */ ++ Debug("join cddb lookup thread.\n"); ++ pthread_join(cddb_thread, NULL); ++#endif + } + } + } + +-void DoLookup(void) ++void *DoLookup(void *unused) + { + int cddb_found = 0; + ++ Debug("cddb lookup thread running.\n"); ++ + if(!CDDBLookupDisc(&dbserver)) { + if(*(dbserver2.name)) { + if(CDDBLookupDisc(&dbserver2)) { +@@ -1737,6 +1748,7 @@ void DoLookup(void) + + looking_up=FALSE; + pthread_exit(0); ++ return (NULL); + } + + gboolean CDDBLookupDisc(CDDBServer *server) +@@ -1749,15 +1761,15 @@ gboolean CDDBLookupDisc(CDDBServer *serv + if(server->use_proxy) + Debug("Querying %s (through %s) for disc %02x.\n",server->name, + server->proxy->name, +- CDDBDiscid(cd_desc)); ++ CDDBDiscid(g_cd_desc)); + else + Debug("Querying %s for disc %02x.\n",server->name, +- CDDBDiscid(cd_desc)); ++ CDDBDiscid(g_cd_desc)); + + strncpy(hello.hello_program,PROGRAM,256); + strncpy(hello.hello_version,VERSION,256); + +- if(!CDDBDoQuery(cd_desc,server,&hello,&query)) { ++ if(!CDDBDoQuery(g_cd_desc,server,&hello,&query)) { + update_required=TRUE; + } else { + switch(query.query_match) { +@@ -1768,12 +1780,12 @@ gboolean CDDBLookupDisc(CDDBServer *serv + query.query_list[0].list_title); + entry.entry_genre = query.query_list[0].list_genre; + entry.entry_id = query.query_list[0].list_id; +- CDDBRead(cd_desc,server,&hello,&entry,&ddata); ++ CDDBRead(g_cd_desc,server,&hello,&entry,&ddata); + + Debug("Done\n"); + success=TRUE; + +- if(CDDBWriteDiscData(cd_desc,&ddata,NULL,TRUE)<0) ++ if(CDDBWriteDiscData(g_cd_desc,&ddata,NULL,TRUE)<0) + printf("Error saving disc data\n"); + + update_required=TRUE; +@@ -1860,7 +1872,7 @@ void SubmitEntry(void) + fprintf(efp , "To: %s\nFrom: %s\nSubject: cddb %s %02x\n\n", \ + cddb_submit_email,user_email,CDDBGenre(ddata.data_genre), \ + ddata.data_id); +- if(CDDBWriteDiscData(cd_desc,&ddata,efp,FALSE)<0) { ++ if(CDDBWriteDiscData(g_cd_desc,&ddata,efp,FALSE)<0) { + DisplayMsg("Error: Unable to write disc data"); + fclose(efp); + } +@@ -1924,7 +1936,7 @@ void UpdateTracks(void) + if(have_disc) { + auto_eject_countdown=0; /* Reset to make sure we don't eject twice */ + +- current_discid=CDDBDiscid(cd_desc); ++ current_discid=CDDBDiscid(g_cd_desc); + + SetTitle(ddata.data_title); + SetArtist(ddata.data_artist); +@@ -3286,7 +3298,7 @@ GtkWidget *MakeControls(void) + gtk_widget_set_name(volume_control,"darkgrey"); + gtk_box_pack_start(GTK_BOX(vbox),volume_control,FALSE,FALSE,0); + +- /* CDGetVolume(cd_desc,&vol); ++ /* CDGetVolume(g_cd_desc,&vol); + gtk_adjustment_set_value(GTK_ADJUSTMENT(adj),(vol.vol_front.left+ + vol.vol_front.right)/2);*/ + +@@ -3770,7 +3782,7 @@ void ParseFileFmt(char *instr,char *outs + else strncpy(outstr,"NoTitle",left); + break; + case 'i': +- g_snprintf(outstr,PATH_MAX,"%02x",CDDBDiscid(cd_desc)); ++ g_snprintf(outstr,PATH_MAX,"%02x",CDDBDiscid(g_cd_desc)); + break; + #ifndef GRIPCD + case 'g': +@@ -3929,7 +3941,7 @@ void ParseEncFileFmt(char *instr,char *o + /* Make file1 relative to file2 */ + char *MakeRelative(char *file1,char *file2) + { +- int pos, pos2, slashcnt, i; ++ int pos, pos2 = 0, slashcnt, i; + char *rel=file1; + char tem[PATH_MAX]=""; + +@@ -4464,7 +4476,7 @@ void RedirectIO(gboolean redirect_output + } + + close(fd); +- close(cd_desc); ++ close(g_cd_desc); + } + + void ID3Add(char *file,EncodeTrack *enc_track) +@@ -4494,7 +4506,7 @@ void FillInEncode(int track,EncodeTrack + strncpy(new_track->disc_name,ddata.data_title,80); + strncpy(new_track->disc_artist,ddata.data_artist,80); + new_track->id3_genre=id3_genre_number; +- new_track->discid=CDDBDiscid(cd_desc); ++ new_track->discid=CDDBDiscid(g_cd_desc); + } + + void AddToEncode(int track) +@@ -4629,7 +4641,7 @@ void DoRip(GtkWidget *widget,gpointer da + return; + } + +- CDStop(cd_desc); ++ CDStop(g_cd_desc); + stopped=TRUE; + + if(ripping) return; +@@ -4753,7 +4765,7 @@ gboolean RipNextTrack(void) + sprintf(tmp,"Rip: Trk %d (0.0x)",rip_track+1); + gtk_label_set(GTK_LABEL(rip_prog_label),tmp); + +- CDStop(cd_desc); ++ CDStop(g_cd_desc); + + if(rip_partial) { + startsec=start_sector; +@@ -4854,7 +4866,7 @@ void PlaySegmentCB(GtkWidget *widget,gpo + + void PlaySegment(int track) + { +- CDPlayFrames(cd_desc,info.track[track].track_start+start_sector, ++ CDPlayFrames(g_cd_desc,info.track[track].track_start+start_sector, + info.track[track].track_start+end_sector); + } + +@@ -5220,8 +5232,8 @@ int main(int argc,char *argv[]) + find_cdrom(); + #endif + +- cd_desc=CDInitDevice(cddevice); +- if(cd_desc==-1) { ++ g_cd_desc=CDInitDevice(cddevice); ++ if(g_cd_desc==-1) { + BoolDialog("Unable to open the cd device. Please make sure that you are\n" + "using the correct device (passed to the program with \"-d\")\n" + "and that you have permission to access the device. See the\n" +@@ -5232,9 +5244,9 @@ int main(int argc,char *argv[]) + have_working_device=TRUE; + + if(!no_interrupt) +- CDStop(cd_desc); ++ CDStop(g_cd_desc); + +- changer_slots=CDChangerSlots(cd_desc); ++ changer_slots=CDChangerSlots(g_cd_desc); + + CheckNewDisc(); + UpdateDisplay(); +@@ -5245,7 +5257,7 @@ int main(int argc,char *argv[]) + gtk_main(); + + if(!no_interrupt) +- CDStop(cd_desc); ++ CDStop(g_cd_desc); + + DoSaveConfig(); + diff --git a/audio/grip/pkg/DESCR b/audio/grip/pkg/DESCR new file mode 100644 index 00000000000..acdc46549ad --- /dev/null +++ b/audio/grip/pkg/DESCR @@ -0,0 +1,8 @@ +Grip is a front-end to external cd audio rippers (such as dagrab +or cdda2wav). It also provides an automated frontend for MP3 encoders, +letting you take a disc and transform it easily straight into MP3s. +The CDDB protocol is supported for retrieving track information +from disc database servers. Grip works with DigitalDJ to provide a +unified "computerized" version of your music collection. + +WWW: ${HOMEPAGE} diff --git a/audio/grip/pkg/PLIST b/audio/grip/pkg/PLIST new file mode 100644 index 00000000000..a05c15c0c84 --- /dev/null +++ b/audio/grip/pkg/PLIST @@ -0,0 +1,4 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/05/19 00:21:00 lebel Exp $ +bin/gcd +bin/grip +man/man1/grip.1