View | Details | Raw Unified | Return to bug 165833
Collapse All | Expand All

(-)cynthiune/Makefile (-4 / +3 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	cynthiune
8
PORTNAME=	cynthiune
9
PORTVERSION=	0.9.5
9
PORTVERSION=	0.9.5
10
PORTREVISION=	9
10
PORTREVISION=	10
11
CATEGORIES=	audio gnustep
11
CATEGORIES=	audio gnustep
12
MASTER_SITES=	${MASTER_SITE_DEBIAN}
12
MASTER_SITES=	${MASTER_SITE_DEBIAN}
13
MASTER_SITE_SUBDIR=	pool/main/c/cynthiune.app
13
MASTER_SITE_SUBDIR=	pool/main/c/cynthiune.app
Lines 16-30 Link Here
16
MAINTAINER=	dinoex@FreeBSD.org
16
MAINTAINER=	dinoex@FreeBSD.org
17
COMMENT=	Romantic music player for GNUstep
17
COMMENT=	Romantic music player for GNUstep
18
18
19
LICENSE=	GPLv2
20
19
LIB_DEPENDS+=	FLAC:${PORTSDIR}/audio/flac
21
LIB_DEPENDS+=	FLAC:${PORTSDIR}/audio/flac
20
LIB_DEPENDS+=	tag.1:${PORTSDIR}/audio/taglib
22
LIB_DEPENDS+=	tag.1:${PORTSDIR}/audio/taglib
21
LIB_DEPENDS+=	musicbrainz.4:${PORTSDIR}/audio/libmusicbrainz
22
LIB_DEPENDS+=	modplug.1:${PORTSDIR}/audio/libmodplug
23
LIB_DEPENDS+=	modplug.1:${PORTSDIR}/audio/libmodplug
23
LIB_DEPENDS+=	artsc.0:${PORTSDIR}/audio/arts
24
LIB_DEPENDS+=	artsc.0:${PORTSDIR}/audio/arts
24
LIB_DEPENDS+=	id3tag.0:${PORTSDIR}/audio/libid3tag
25
LIB_DEPENDS+=	id3tag.0:${PORTSDIR}/audio/libid3tag
25
26
26
LICENSE=	GPLv2
27
28
USE_GNUSTEP=	yes
27
USE_GNUSTEP=	yes
29
USE_GNUSTEP_BACK=	yes
28
USE_GNUSTEP_BACK=	yes
30
USE_GNUSTEP_BUILD=	yes
29
USE_GNUSTEP_BUILD=	yes
(-)cynthiune/files/patch-CynthiuneController.m (+12 lines)
Line 0 Link Here
1
--- ./CynthiuneController.m.orig	2006-03-28 01:41:08.000000000 -0500
2
+++ ./CynthiuneController.m	2012-03-06 09:08:34.000000000 -0500
3
@@ -28,9 +28,6 @@
4
 #import <AppKit/NSPasteboard.h>
5
 #import <AppKit/NSToolbar.h>
6
 #import <AppKit/NSWindow.h>
7
-#ifdef GNUSTEP
8
-#import <AppKit/NSWindow+Toolbar.h>
9
-#endif
10
 #import <Foundation/NSArray.h>
11
 #import <Foundation/NSBundle.h>
12
 #import <Foundation/NSFileManager.h>
(-)cynthiune/files/patch-GNUmakefile.preamble (+11 lines)
Line 0 Link Here
1
--- ./GNUmakefile.preamble.orig	2012-03-05 20:54:59.000000000 -0500
2
+++ ./GNUmakefile.preamble	2012-03-05 20:55:39.000000000 -0500
3
@@ -25,7 +25,7 @@
4
 ADDITIONAL_CPPFLAGS += -DLOCALBUILD=1
5
 endif
6
 
7
-ADDITIONAL_GUI_LIBS += -L/MingW/bin -lmusicbrainz
8
+ADDITIONAL_GUI_LIBS += -L/MingW/bin
9
 
10
 ifneq (mingw32, $(GNUSTEP_TARGET_OS))
11
 ifeq ($(debug), yes)
(-)cynthiune/files/patch-SongInspectorController.m (+198 lines)
Line 0 Link Here
1
--- ./SongInspectorController.m.orig	2012-03-05 20:56:28.000000000 -0500
2
+++ ./SongInspectorController.m	2012-03-05 21:03:15.000000000 -0500
3
@@ -34,8 +34,6 @@
4
 #import <Foundation/NSString.h>
5
 #import <Foundation/NSThread.h>
6
 
7
-#import <musicbrainz/mb_c.h>
8
-
9
 #import <Cynthiune/Format.h>
10
 #import <Cynthiune/NSViewExtensions.h>
11
 #import <Cynthiune/utils.h>
12
@@ -156,10 +154,10 @@
13
     {
14
       if (!threadRunning)
15
         {
16
-          [lookupButton setEnabled: YES];
17
-          [lookupButton setImage: [NSImage imageNamed: @"lookup-mb-on"]];
18
+          [lookupButton setEnabled: NO];
19
+          [lookupButton setImage: [NSImage imageNamed: @"lookup-mb-off"]];
20
           [lookupAnimation setImage: nil];
21
-          [lookupStatusLabel setStringValue: @""];
22
+          [lookupStatusLabel setStringValue: @"MB lookup doesn't work!"];
23
         }
24
     }
25
   else
26
@@ -320,39 +318,6 @@
27
                               forKey: @"song"]];
28
 }
29
 
30
-- (char *) _generateTrmId
31
-{
32
-  id <Format> stream;
33
-  trm_t trmGen;
34
-  int size;
35
-  char sig[17];
36
-  unsigned char buffer[4096];
37
-  char *trmId;
38
-
39
-  stream = [song openStreamForSong];
40
-  if (stream)
41
-    {
42
-      trmGen = trm_New ();
43
-      trm_SetPCMDataInfo (trmGen,
44
-                          [stream readRate], [stream readChannels], 16);
45
-      trm_SetSongLength (trmGen, [stream readDuration]);
46
-      size = [stream readNextChunk: buffer withSize: 4096];
47
-      while (!trm_GenerateSignature (trmGen, (char *) buffer, size))
48
-        size = [stream readNextChunk: buffer withSize: 4096];
49
-
50
-      trm_FinalizeSignature (trmGen, sig, NULL);
51
-
52
-      trmId = malloc (37);
53
-      trm_ConvertSigToASCII (trmGen, sig, trmId);
54
-      trm_Delete (trmGen);
55
-      [stream streamClose];
56
-    }
57
-  else
58
-    trmId = NULL;
59
-
60
-  return trmId;
61
-}
62
-
63
 - (void) updateField: (NSTextField *) field
64
           withString: (NSString *) string
65
 {
66
@@ -418,132 +383,6 @@
67
                                    selector: @selector (_updateFieldsWithTrackInfos:)];
68
 }
69
 
70
-- (NSDictionary *) readMB: (musicbrainz_t) mb
71
-                    track: (int) track
72
-{
73
-  NSMutableDictionary *trackInfos;
74
-  NSString *string;
75
-  char cString[100];
76
-  int releases;
77
-
78
-  trackInfos = [NSMutableDictionary new];
79
-  [trackInfos autorelease];
80
-
81
-  mb_Select1 (mb, MBS_SelectTrack, track);
82
-  if (mb_GetResultData (mb, MBE_TrackGetTrackName, cString, 100))
83
-    {
84
-      string = [NSString stringWithUTF8String: cString];
85
-      [trackInfos setObject: string forKey: @"title"];
86
-    }
87
-
88
-  if (mb_GetResultData (mb, MBE_TrackGetArtistName, cString, 100))
89
-    {
90
-      string = [NSString stringWithUTF8String: cString];
91
-      [trackInfos setObject: string forKey: @"artist"];
92
-    }
93
-
94
-  if (mb_GetResultData (mb, MBE_TrackGetTrackNum, cString, 100))
95
-    {
96
-      string = [NSString stringWithUTF8String: cString];
97
-      [trackInfos setObject: string forKey: @"trackNumber"];
98
-    }
99
-
100
-  if (mb_Select (mb, MBS_SelectTrackAlbum))
101
-    {
102
-      if (mb_GetResultData (mb, MBE_AlbumGetAlbumName, cString, 100))
103
-        {
104
-          string = [NSString stringWithUTF8String: cString];
105
-          [trackInfos setObject: string forKey: @"album"];
106
-        }
107
-#ifdef MBE_AlbumGetNumReleaseDates
108
-      releases = mb_GetResultInt (mb, MBE_AlbumGetNumReleaseDates);
109
-      if (releases)
110
-        {
111
-          mb_Select1 (mb, MBS_SelectReleaseDate, 1);
112
-          if (mb_GetResultData (mb, MBE_ReleaseGetDate, cString, 100))
113
-            {
114
-              *(cString + 4) = 0;
115
-              string = [NSString stringWithUTF8String: cString];
116
-              [trackInfos setObject: string forKey: @"year"];
117
-            }
118
-          mb_Select (mb, MBS_Back);
119
-        }
120
-#endif
121
-
122
-      mb_Select (mb, MBS_Back);
123
-    }
124
-
125
-  mb_Select (mb, MBS_Rewind);
126
-
127
-  return trackInfos;
128
-}
129
-
130
-- (void) _parseMB: (musicbrainz_t) mb
131
-{
132
-  int count, results;
133
-  NSMutableArray *allTrackInfos;
134
-
135
-  results = mb_GetResultInt (mb, MBE_GetNumTracks);
136
-  allTrackInfos = [[NSMutableArray alloc] initWithCapacity: results];
137
-  [allTrackInfos autorelease];
138
-
139
-  for (count = 0; count < results; count++)
140
-    [allTrackInfos addObject: [self readMB: mb track: count + 1]];
141
-
142
-  [self performSelectorOnMainThread: @selector (_updateSongFields:)
143
-        withObject: allTrackInfos
144
-        waitUntilDone: YES];
145
-}
146
-
147
-- (void) lookupThread
148
-{
149
-  NSAutoreleasePool *pool;
150
-  char *trmId;
151
-  musicbrainz_t mb;
152
-  char **qis;
153
-  char error[80];
154
-
155
-  pool = [NSAutoreleasePool new];
156
-
157
-  [self updateField: lookupStatusLabel
158
-        withString: LOCALIZED(@"Generating TRM...")];
159
-  trmId = [self _generateTrmId];
160
-  if (trmId && !threadShouldDie)
161
-    {
162
-      qis = MakeQis (trmId, song);
163
-
164
-      if (strcasecmp (trmId, busyTrmId))
165
-        {
166
-          [self updateField: lookupStatusLabel
167
-                withString: LOCALIZED (@"Querying MusicBrainz server...")];
168
-          mb = mb_New ();
169
-          mb_UseUTF8 (mb, YES);
170
-          if (mb_QueryWithArgs (mb, MBQ_TrackInfoFromTRMId, qis))
171
-            [self _parseMB: mb];
172
-          else
173
-            {
174
-//            FIXME: there should be an accurate error message here...
175
-              [self updateField: lookupStatusLabel
176
-                    withString: @""];
177
-              mb_GetQueryError (mb, error, 80);
178
-              NSLog (@"Musicbrainz error: %s (%s)", error, trmId);
179
-            }
180
-          mb_Delete (mb);
181
-        }
182
-      else
183
-        [self updateField: lookupStatusLabel
184
-              withString: LOCALIZED (@"The MusicBrainz server was too busy")];
185
-
186
-      FreeQis (qis);
187
-    }
188
-
189
-  [self performSelectorOnMainThread: @selector (lookupThreadEnded)
190
-        withObject: nil
191
-        waitUntilDone: NO];
192
-
193
-  [pool release];
194
-}
195
-
196
 - (void) mbLookup: (id)sender
197
 {
198
   if (song)

Return to bug 165833