aboutsummaryrefslogtreecommitdiff
path: root/audio/grip/files
diff options
context:
space:
mode:
authorPatrick Li <pat@FreeBSD.org>2002-03-14 06:56:08 +0000
committerPatrick Li <pat@FreeBSD.org>2002-03-14 06:56:08 +0000
commitb46ed553c88e4516adb862e051e5d6e90661d7d6 (patch)
tree4d779fc532382a012c1c3edbd0444f9f97396763 /audio/grip/files
parent857a47813ecabc3bca791baea3ba788c644aa53f (diff)
downloadports-b46ed553c88e4516adb862e051e5d6e90661d7d6.tar.gz
ports-b46ed553c88e4516adb862e051e5d6e90661d7d6.zip
Notes
Diffstat (limited to 'audio/grip/files')
-rw-r--r--audio/grip/files/patch-aa38
-rw-r--r--audio/grip/files/patch-cddb.c160
-rw-r--r--audio/grip/files/patch-grip.c99
-rw-r--r--audio/grip/files/patch-grip.h18
4 files changed, 0 insertions, 315 deletions
diff --git a/audio/grip/files/patch-aa b/audio/grip/files/patch-aa
deleted file mode 100644
index ada13a171613..000000000000
--- a/audio/grip/files/patch-aa
+++ /dev/null
@@ -1,38 +0,0 @@
---- Makefile.orig Thu Oct 19 04:42:53 2000
-+++ Makefile Thu Jul 19 23:07:59 2001
-@@ -4,30 +4,24 @@
- OS=$(shell uname -s)
-
- # Compiler
--CC= gcc
-+CC?= gcc
-
- # Install prefix
--PREFIX=/usr
-+PREFIX?=/usr/local
-
- # Installation directory -- where the binary will go
- INSTALLDIR= $(PREFIX)/bin
-
- # Location to store auxilliary files
--AUXDIR= $(PREFIX)/lib/grip
-+AUXDIR= $(PREFIX)/etc
-
-
- # Compiler flags
--CFLAGS= -Wall `gtk-config --cflags` -DAUXDIR=\"$(AUXDIR)\" \
-+CFLAGS+= `$(GTK_CONFIG) --cflags gthread` -DAUXDIR=\"$(AUXDIR)\" \
- -DINSTALLDIR=\"$(INSTALLDIR)\" -D_REENTRANT
-
- # Link libraries
--LIBS= `gtk-config --libs gthread`
--ifeq ($(OS), Linux)
--LIBS+= -lpthread
--endif
--ifeq ($(OS), FreeBSD)
--LIBS+= -pthread
--endif
-+LIBS= `$(GTK_CONFIG) --libs gthread`
- PARLIBS= cdparanoia/interface/libcdda_interface.a \
- cdparanoia/paranoia/libcdda_paranoia.a
-
diff --git a/audio/grip/files/patch-cddb.c b/audio/grip/files/patch-cddb.c
deleted file mode 100644
index 14f8fa672850..000000000000
--- a/audio/grip/files/patch-cddb.c
+++ /dev/null
@@ -1,160 +0,0 @@
---- cddb.c.orig Mon Jul 16 12:15:32 2001
-+++ cddb.c Mon Jan 21 22:51:21 2002
-@@ -27,6 +27,9 @@
- #include <strings.h>
- #endif
- #include <ctype.h>
-+#include <fcntl.h>
-+#include <pthread.h>
-+#include <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/stat.h>
-@@ -43,7 +46,7 @@
- extern char *Version;
-
- static int CDDBSum(int val);
--static int CDDBConnect(CDDBServer *server);
-+static int CDDBConnect(CDDBServer *server, int ns);
- static void CDDBDisconnect(int sock);
- static void CDDBSkipHTTP(int sock);
- static int CDDBReadLine(int sock,char *inbuffer,int len);
-@@ -59,6 +62,81 @@
- "data","folk","jazz","misc","newage",
- "reggae","rock","soundtrack"};
-
-+/* nonblocking connect */
-+
-+static int
-+nonbconnect(int fd, struct sockaddr *pa, socklen_t cba, int ns)
-+{
-+ int n;
-+ int s;
-+ int fl;
-+ fd_set rfds, wfds;
-+ struct timeval tv;
-+
-+ if (!ns) {
-+ n = connect(fd, pa, cba);
-+ pthread_testcancel();
-+ return n;
-+ }
-+
-+ fl = fcntl(fd, F_GETFL, 0);
-+ fcntl(fd, F_SETFL, fl | O_NONBLOCK);
-+
-+ if ((n = connect(fd, pa, cba)) < 0) {
-+ if (errno != EINPROGRESS) {
-+ return -1;
-+ }
-+ } else if (n == 0) {
-+ fcntl(fd, F_SETFL, fl);
-+ return 0;
-+ }
-+
-+
-+ for (s = 0; s < ns; s++) {
-+ tv.tv_sec = 1;
-+ tv.tv_usec = 0;
-+ FD_ZERO(&rfds);
-+ FD_SET(fd, &rfds);
-+ wfds = rfds;
-+ if ((n = select(fd + 1, &rfds, &wfds, 0, &tv)) > 0) {
-+ break;
-+ } else if (n < 0) {
-+ if (errno == EINTR) {
-+ s--;
-+ } else {
-+ return -1;
-+ }
-+ }
-+ pthread_testcancel();
-+ }
-+
-+ if (n == 0 && s == ns) {
-+ errno = ETIMEDOUT;
-+ return -1;
-+ }
-+
-+ if (FD_ISSET(fd, &rfds) || FD_ISSET(fd, &wfds)) {
-+ int err;
-+ int cberr = sizeof(err);
-+
-+ getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &cberr);
-+ if (err) {
-+ errno = err;
-+ return -1;
-+ }
-+ fcntl(fd, F_SETFL, fl);
-+ tv.tv_sec = ns;
-+ tv.tv_usec = 0;
-+ setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
-+ return 0;
-+ }
-+
-+ /* ohshit */
-+
-+ errno = EIO; /* WTF? */
-+ return -1;
-+}
-+
- /* CDDB sum function */
-
- static int CDDBSum(int val)
-@@ -115,7 +193,7 @@
- }
-
- /* Connect to a CDDB server */
--static int CDDBConnect(CDDBServer *server)
-+static int CDDBConnect(CDDBServer *server, int ns)
- {
- int sock;
- struct sockaddr_in sin;
-@@ -146,8 +224,10 @@
-
- if((sock=socket(AF_INET,SOCK_STREAM,0))<0) return -1;
-
-- if(connect(sock,(struct sockaddr *)&sin,sizeof(sin))<0) return -1;
--
-+ if(nonbconnect(sock,(struct sockaddr *)&sin,sizeof(sin),ns)<0) {
-+ close(sock);
-+ sock = -1;
-+ }
- return sock;
- }
-
-@@ -243,7 +323,7 @@
- /* Query the CDDB for the CD currently in the CD-ROM */
-
- gboolean CDDBDoQuery(int cd_desc,CDDBServer *server,
-- CDDBHello *hello,CDDBQuery *query)
-+ CDDBHello *hello,CDDBQuery *query, int ns)
- {
- int socket;
- int index;
-@@ -251,7 +331,7 @@
- char *offset_buffer,*query_buffer,*http_buffer,inbuffer[256];
- int tot_len,len;
-
-- socket=CDDBConnect(server);
-+ socket=CDDBConnect(server,ns);
-
- if(socket==-1) return FALSE;
-
-@@ -476,14 +556,14 @@
-
- gboolean CDDBRead(int cd_desc,CDDBServer *server,
- CDDBHello *hello,CDDBEntry *entry,
-- DiscData *data)
-+ DiscData *data, int ns)
- {
- int socket;
- int index;
- char outbuffer[256], inbuffer[512],cmdbuffer[256];
- struct disc_info disc;
-
-- socket=CDDBConnect(server);
-+ socket=CDDBConnect(server,ns);
- if(socket==-1) return FALSE;
-
- CDStat(cd_desc,&disc,TRUE);
diff --git a/audio/grip/files/patch-grip.c b/audio/grip/files/patch-grip.c
deleted file mode 100644
index 7f931df1da6b..000000000000
--- a/audio/grip/files/patch-grip.c
+++ /dev/null
@@ -1,99 +0,0 @@
---- grip.c.orig Mon Jul 16 12:15:32 2001
-+++ grip.c Mon Jan 21 23:03:30 2002
-@@ -54,6 +54,8 @@
- #include "parsecfg.h"
- #include "dialog/dialog.h"
-
-+#define CDDB_USE_CANCEL 1
-+
- #ifdef CDPAR
- #define size16 short
- #define size32 int
-@@ -212,6 +214,8 @@
-
- GdkCursor *wait_cursor;
-
-+int cddb_tmo = 30;
-+
- int cd_desc;
- int changer_slots;
- int current_disc=0;
-@@ -315,7 +319,7 @@
- gboolean use_proxy=FALSE;
- gboolean use_proxy_env=FALSE;
-
--char *bin_search_paths[]={"/cpd/misc/bin","/usr/bin","/usr/local/bin",NULL};
-+char *bin_search_paths[]={"/cpd/misc/bin","/usr/bin","%%LOCALBASE%%/bin",NULL};
- Ripper ripper_defaults[]={
- #ifdef CDPAR
- {"grip (cdparanoia)",""},
-@@ -328,7 +332,7 @@
- #endif
- {"other",""},
- {"",""}};
--char ripexename[256]="/usr/bin/cdparanoia";
-+char ripexename[256]="%%LOCALBASE%%/bin/cdparanoia";
- char ripcmdline[256]="-d %c %t:[.%b]-%t:[.%e] %f";
- int selected_ripper=0;
- char outputdir[256];
-@@ -347,7 +351,7 @@
- gboolean disable_extra_paranoia=FALSE;
- gboolean disable_scratch_detect=FALSE;
- gboolean disable_scratch_repair=FALSE;
--char mp3exename[256]="/usr/bin/bladeenc";
-+char mp3exename[256]="%%LOCALBASE%%/bin/bladeenc";
- char mp3cmdline[256]="-%b -QUIT %f";
- int selected_encoder=1;
- char mp3fileformat[256]="~/mp3/%a/%d/%n.mp3";
-@@ -450,7 +454,7 @@
- "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial",
- "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy",
- "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle",
-- "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes",
-+ "Native American", "Cabaret", "New Wave", "Psychedelic", "Rave", "Showtunes",
- "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro",
- "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk",
- "Swing", "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass",
-@@ -1657,8 +1661,12 @@
- pthread_exit(&status);
- #elif defined(__FreeBSD__)
- pthread_kill(cddb_thread, 0);
-+#elif defined(linux)
-+#if CDDB_USE_CANCEL
-+ pthread_cancel(cddb_thread);
- #else
-- pthread_kill_other_threads_np();
-+ pthread_kill_other_threads_np();
-+#endif
- #endif
- Debug("Aborted\n");
- looking_up=FALSE;
-@@ -1722,6 +1730,7 @@
- int cddb_found = 0;
-
- if(!CDDBLookupDisc(&dbserver)) {
-+ pthread_testcancel();
- if(*(dbserver2.name)) {
- if(CDDBLookupDisc(&dbserver2)) {
- cddb_found = 1;
-@@ -1759,9 +1768,10 @@
- strncpy(hello.hello_program,PROGRAM,256);
- strncpy(hello.hello_version,VERSION,256);
-
-- if(!CDDBDoQuery(cd_desc,server,&hello,&query)) {
-+ if(!CDDBDoQuery(cd_desc,server,&hello,&query,cddb_tmo)) {
- update_required=TRUE;
- } else {
-+ pthread_testcancel();
- switch(query.query_match) {
- case MATCH_INEXACT:
- case MATCH_EXACT:
-@@ -1770,7 +1780,7 @@
- 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(cd_desc,server,&hello,&entry,&ddata,cddb_tmo);
-
- Debug("Done\n");
- success=TRUE;
diff --git a/audio/grip/files/patch-grip.h b/audio/grip/files/patch-grip.h
deleted file mode 100644
index 9a7b02bee3e7..000000000000
--- a/audio/grip/files/patch-grip.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- grip.h.orig Mon Jul 16 12:15:32 2001
-+++ grip.h Mon Jan 21 22:51:22 2002
-@@ -239,13 +239,10 @@
- char *CDDBGenre(int genre);
- int CDDBGenreValue(char *genre);
- gboolean CDDBDoQuery(int cd_desc,CDDBServer *server,
-- CDDBHello *hello,CDDBQuery *query);
-+ CDDBHello *hello,CDDBQuery *query, int ns);
- gboolean CDDBRead(int cd_desc,CDDBServer *server,
- CDDBHello *hello,CDDBEntry *entry,
-- DiscData *data);
--gboolean CDDBRead(int cd_desc,CDDBServer *server,
-- CDDBHello *hello,CDDBEntry *entry,
-- DiscData *data);
-+ DiscData *data, int ns);
- gboolean CDDBStatDiscData(int cd_desc);
- int CDDBReadDiscData(int cd_desc, DiscData *outdata);
- int CDDBWriteDiscData(int cd_desc,DiscData *ddata,FILE *outfile,