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

(-)/tmp/banshee/Makefile (-36 / +9 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	banshee
8
PORTNAME=	banshee
9
PORTVERSION=	1.5.1
9
PORTVERSION=	1.5.1
10
PORTREVISION=	1
10
PORTEPOCH=	1
11
PORTEPOCH=	1
11
CATEGORIES=	multimedia audio
12
CATEGORIES=	multimedia audio
12
MASTER_SITES=	http://download.banshee-project.org/${PORTNAME}/stable/${PORTVERSION}/
13
MASTER_SITES=	http://download.banshee-project.org/${PORTNAME}/stable/${PORTVERSION}/
Lines 27-43 Link Here
27
		${LOCALBASE}/libdata/pkgconfig/mono-zeroconf.pc:${PORTSDIR}/net/mono-zeroconf \
28
		${LOCALBASE}/libdata/pkgconfig/mono-zeroconf.pc:${PORTSDIR}/net/mono-zeroconf \
28
		${LOCALBASE}/libdata/pkgconfig/mono-addins.pc:${PORTSDIR}/devel/mono-addins
29
		${LOCALBASE}/libdata/pkgconfig/mono-addins.pc:${PORTSDIR}/devel/mono-addins
29
30
30
OPTIONS=	DOCS "Install documentation" on \
31
OPTIONS=	DOCS      "Install documentation" on \
31
		MTP "Enable MTP support" on
32
		MTP       "Enable MTP support"    on \
32
#		BPMDETECT "Enable BPM detection" on
33
		BPMDETECT "Enable BPM detection"  on \
33
#		IPOD "Enable iPod support" on \
34
#		IPOD      "Enable iPod support"   on
34
35
35
USE_BZIP2=	yes
36
USE_BZIP2=	yes
36
USE_GMAKE=	yes
37
USE_GMAKE=	yes
37
USE_PERL5_BUILD=yes
38
USE_PERL5_BUILD=yes
38
GNU_CONFIGURE=	yes
39
GNU_CONFIGURE=	yes
39
USE_GNOME=	gnomehack gtksharp20 gnomesharp20
40
USE_GNOME=	gnomehack gtksharp20 gnomesharp20
40
USE_GSTREAMER=	yes
41
USE_GSTREAMER=	cdparanoia
41
USE_GETTEXT=	yes
42
USE_GETTEXT=	yes
42
USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}-1
43
USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}-1
43
USE_XORG=	xrandr xxf86vm
44
USE_XORG=	xrandr xxf86vm
Lines 72-107 Link Here
72
PLIST_SUB+=	OPT_MTP="@comment "
73
PLIST_SUB+=	OPT_MTP="@comment "
73
.endif
74
.endif
74
75
75
#.if !defined(WITHOUT_BPMDETECT)
76
.if !defined(WITHOUT_BPMDETECT)
76
#USE_GSTREAMER+=	soundtouch
77
USE_GSTREAMER+=	soundtouch
77
#.endif
78
.endif
78
79
post-patch:
80
	@${REINPLACE_CMD} "s|!/bin/bash|!${PREFIX}/bin/bash|" \
81
				${WRKSRC}/build/icon-theme-installer \
82
				${WRKSRC}/build/private-icon-theme-installer \
83
				${WRKSRC}/data/desktop-files/update-desktop-file.sh \
84
				${WRKSRC}/src/Clients/Booter/banshee-1.in
85
	@${REINPLACE_CMD} 's|sed -r|sed -E|' \
86
				${WRKSRC}/data/icon-theme-hicolor/Makefile.in
87
#				${WRKSRC}/configure \
88
89
# XXX - This is gross.
90
post-configure:
91
	@${REINPLACE_CMD} -e 's|^\(MSGFMT =\).*|\1 ${LOCALBASE}/bin/msgfmt|' \
92
		-e 's|^\(GMSGFMT =\).*|\1 ${LOCALBASE}/bin/msgfmt|' \
93
			${WRKSRC}/po/Makefile
94
95
# XXX - Really ugly too.
96
pre-build:
97
	${MKDIR} ${WRKSRC}/bin/share/banshee-1/icons/hicolor/scalable/
98
99
# XXX - This one is the best.
100
pre-install:
101
.for i in 16x16 22x22 32x32 48x48 128x128 scalable
102
. for j in actions categories devices status
103
	@${MKDIR} ${PREFIX}/share/banshee-1/icons/hicolor/$i/$j/
104
. endfor
105
.endfor
106
79
107
.include <bsd.port.post.mk>
80
.include <bsd.port.post.mk>
(-)/tmp/banshee/files/patch-fix-startup (-13 lines)
Lines 1-13 Link Here
1
--- src/Core/Banshee.Services/Banshee.MediaEngine/TranscoderService.cs.orig	2008-10-01 17:43:36.000000000 +0000
2
+++ src/Core/Banshee.Services/Banshee.MediaEngine/TranscoderService.cs	2009-02-23 09:48:57.000000000 +0000
3
@@ -97,7 +97,9 @@
4
             queue = new Queue <TranscodeContext> ();
5
 
6
             try {
7
-                Banshee.IO.Directory.Delete (cache_dir, true);
8
+		if (Banshee.IO.Directory.Exists (cache_dir)) {
9
+                    Banshee.IO.Directory.Delete (cache_dir, true);
10
+		}
11
             } catch {}
12
 
13
             Banshee.IO.Directory.Create (cache_dir);
(-)/tmp/banshee/files/patch-src_Libraries_MusicBrainz_Makefile.in (+13 lines)
Line 0 Link Here
1
2
$FreeBSD$
3
4
--- src/Libraries/MusicBrainz/Makefile.in.orig
5
+++ src/Libraries/MusicBrainz/Makefile.in
6
@@ -347,6 +347,7 @@
7
 SOURCES = \
8
 	MusicBrainz/Artist.cs \
9
 	MusicBrainz/Disc.cs \
10
+	MusicBrainz/DiscFreeBSD.cs \
11
 	MusicBrainz/DiscLinux.cs \
12
 	MusicBrainz/DiscWin32.cs \
13
 	MusicBrainz/Event.cs \
(-)/tmp/banshee/files/patch-src_Libraries_MusicBrainz_MusicBrainz_DiscFreeBSD.cs (+140 lines)
Line 0 Link Here
1
2
$FreeBSD$
3
4
--- /dev/null
5
+++ src/Libraries/MusicBrainz/MusicBrainz/DiscFreeBSD.cs
6
@@ -0,0 +1,134 @@
7
+// DiskFreeBSD.cs
8
+// 
9
+// Copyright (c) 2009 Romain Tartière <romain@blogreen.org>
10
+//
11
+// Permission is hereby granted, free of charge, to any person obtaining a copy
12
+// of this software and associated documentation files (the "Software"), to deal
13
+// in the Software without restriction, including without limitation the rights
14
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+// copies of the Software, and to permit persons to whom the Software is
16
+// furnished to do so, subject to the following conditions:
17
+//
18
+// The above copyright notice and this permission notice shall be included in
19
+// all copies or substantial portions of the Software.
20
+//
21
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+// THE SOFTWARE.
28
+
29
+using System;
30
+using System.Runtime.InteropServices;
31
+
32
+namespace MusicBrainz
33
+{
34
+	internal sealed class DiscFreeBSD : LocalDisc
35
+	{
36
+	
37
+#region <fcntl.h>
38
+		const int O_RDONLY   = 0x0000;	// open for reading only
39
+		const int O_NONBLOCK = 0x0004;	// no delay
40
+
41
+		[DllImport ("libc.so.7", CharSet = CharSet.Auto, SetLastError = true)]
42
+		static extern int open (string path, int flags);
43
+#endregion
44
+		
45
+#region <unistd.h>
46
+		[DllImport ("libc.so.7", SetLastError = true)]
47
+		static extern int close (int d);
48
+#endregion
49
+
50
+#region <sys/cdio.h>
51
+		struct msf_lba {
52
+			public int lba;	// network byte order
53
+		};
54
+		
55
+		[StructLayout (LayoutKind.Explicit)]
56
+		struct cd_toc_entry {
57
+			[FieldOffset (2)]
58
+			public byte track;
59
+			[FieldOffset (4)]
60
+			public msf_lba addr;
61
+		};
62
+		
63
+		// Ioctls for the CD drive
64
+		
65
+		const byte CD_LBA_FORMAT = 1;
66
+		
67
+		struct ioc_toc_header {
68
+			public short len;
69
+			public byte starting_track;
70
+			public byte ending_track;
71
+		};
72
+		const ulong CDIOREADTOCHEADER = 1074029316;
73
+		[DllImport ("libc.so.7", EntryPoint = "ioctl")]
74
+        static extern int cd_read_toc_header (int fd, ulong request, ref ioc_toc_header data);
75
+        static int cd_read_toc_header (int fd, ref ioc_toc_header data)
76
+        {
77
+            return cd_read_toc_header (fd, CDIOREADTOCHEADER, ref data);
78
+        }
79
+		
80
+		struct ioc_read_toc_entry {
81
+			public byte address_format;
82
+			public byte starting_track;
83
+			public ushort data_len;
84
+			public IntPtr data; // cd_toc_entry*
85
+		};
86
+		const ulong CDIOREADTOCENTRYS = 3222299397;
87
+		[DllImport ("libc.so.7", EntryPoint = "ioctl")]
88
+        static extern int cd_read_toc_entrys (int fd, ulong request, ref ioc_read_toc_entry data);
89
+        static int cd_read_toc_entrys (int fd, ref ioc_read_toc_entry data)
90
+        {
91
+            return cd_read_toc_entrys (fd, CDIOREADTOCENTRYS, ref data);
92
+        }
93
+		
94
+#endregion
95
+		
96
+		internal DiscFreeBSD (string device)
97
+		{
98
+			int fd = open (device, O_RDONLY | O_NONBLOCK);
99
+			
100
+			if (fd < 0) throw new LocalDiscException (String.Format ("Cannot open device `{0}'", device));
101
+			
102
+			try {
103
+				ioc_toc_header h = new ioc_toc_header ();
104
+				if (cd_read_toc_header (fd, ref h) < 0) throw new LocalDiscException ("Cannot read table of contents header");
105
+				if (h.ending_track == 0) throw new LocalDiscException ("This disc has no tracks");
106
+				
107
+				first_track = h.starting_track;
108
+				last_track = h.ending_track;
109
+				
110
+				int n = h.ending_track - h.starting_track + 1;
111
+				int len = (n + 1) * Marshal.SizeOf (typeof (cd_toc_entry));
112
+				
113
+				ioc_read_toc_entry t = new ioc_read_toc_entry ();
114
+				t.address_format = CD_LBA_FORMAT;
115
+				t.starting_track = 0;
116
+				t.data_len = (ushort) len;
117
+				t.data = Marshal.AllocHGlobal (len);
118
+				try {
119
+				
120
+					if (cd_read_toc_entrys (fd, ref t) < 0) throw new LocalDiscException ("Cannot read table of contents entries");
121
+				
122
+                	for (int i = 0; i <= n; i++) {
123
+						ulong offset = (ulong) (i * Marshal.SizeOf (typeof (cd_toc_entry)));
124
+                		cd_toc_entry e = (cd_toc_entry) Marshal.PtrToStructure ((IntPtr) ((ulong)t.data + offset), typeof (cd_toc_entry));
125
+    	                track_offsets[first_track + i] = System.Net.IPAddress.NetworkToHostOrder (e.addr.lba) + 150;
126
+        	        }
127
+					// Move Leadout to the beginning.
128
+        	        track_offsets [0] = track_offsets [last_track + 1];
129
+					track_offsets [last_track + 1] = 0;
130
+				} finally {
131
+					Marshal.FreeHGlobal (t.data);
132
+				}
133
+			} finally {
134
+				close (fd);
135
+			}
136
+			
137
+			Init ();
138
+		}
139
+	}
140
+}
(-)/tmp/banshee/files/patch-src_Libraries_MusicBrainz_MusicBrainz_LocalDisc.cs (+18 lines)
Line 0 Link Here
1
2
$FreeBSD$
3
4
--- src/Libraries/MusicBrainz/MusicBrainz/LocalDisc.cs.orig
5
+++ src/Libraries/MusicBrainz/MusicBrainz/LocalDisc.cs
6
@@ -131,7 +131,11 @@
7
             try {
8
                 switch (Environment.OSVersion.Platform){
9
                 case PlatformID.Unix:
10
-                    return new DiscLinux (device);
11
+                        try {
12
+                            return new DiscLinux (device);
13
+                        } catch {
14
+                            return new DiscFreeBSD (device);
15
+                        }
16
                 //case PlatformID.Win32NT:
17
                     //return new DiscWin32NT (device);
18
                 default:
(-)/tmp/banshee/pkg-plist (-17 / +7 lines)
Lines 44-57 Link Here
44
lib/banshee-1/Extensions/Banshee.CoverArt.dll.mdb
44
lib/banshee-1/Extensions/Banshee.CoverArt.dll.mdb
45
lib/banshee-1/Extensions/Banshee.Daap.dll
45
lib/banshee-1/Extensions/Banshee.Daap.dll
46
lib/banshee-1/Extensions/Banshee.Daap.dll.mdb
46
lib/banshee-1/Extensions/Banshee.Daap.dll.mdb
47
%%OPT_IPOD%%lib/banshee-1/Extensions/Banshee.Dap.Ipod.dll
48
%%OPT_IPOD%%lib/banshee-1/Extensions/Banshee.Dap.Ipod.dll.mdb
47
lib/banshee-1/Extensions/Banshee.Dap.MassStorage.dll
49
lib/banshee-1/Extensions/Banshee.Dap.MassStorage.dll
48
lib/banshee-1/Extensions/Banshee.Dap.MassStorage.dll.mdb
50
lib/banshee-1/Extensions/Banshee.Dap.MassStorage.dll.mdb
49
%%OPT_MTP%%lib/banshee-1/Extensions/Banshee.Dap.Mtp.dll
51
%%OPT_MTP%%lib/banshee-1/Extensions/Banshee.Dap.Mtp.dll
50
%%OPT_MTP%%lib/banshee-1/Extensions/Banshee.Dap.Mtp.dll.mdb
52
%%OPT_MTP%%lib/banshee-1/Extensions/Banshee.Dap.Mtp.dll.mdb
51
lib/banshee-1/Extensions/Banshee.Dap.dll
53
lib/banshee-1/Extensions/Banshee.Dap.dll
52
lib/banshee-1/Extensions/Banshee.Dap.dll.mdb
54
lib/banshee-1/Extensions/Banshee.Dap.dll.mdb
53
%%OPT_IPOD%%lib/banshee-1/Extensions/Banshee.Dap.Ipod.dll
54
%%OPT_IPOD%%lib/banshee-1/Extensions/Banshee.Dap.Ipod.dll.mdb
55
lib/banshee-1/Extensions/Banshee.FileSystemQueue.dll
55
lib/banshee-1/Extensions/Banshee.FileSystemQueue.dll
56
lib/banshee-1/Extensions/Banshee.FileSystemQueue.dll.mdb
56
lib/banshee-1/Extensions/Banshee.FileSystemQueue.dll.mdb
57
lib/banshee-1/Extensions/Banshee.InternetRadio.dll
57
lib/banshee-1/Extensions/Banshee.InternetRadio.dll
Lines 74-83 Link Here
74
lib/banshee-1/Extensions/Banshee.PlayerMigration.dll.mdb
74
lib/banshee-1/Extensions/Banshee.PlayerMigration.dll.mdb
75
lib/banshee-1/Extensions/Banshee.Podcasting.dll
75
lib/banshee-1/Extensions/Banshee.Podcasting.dll
76
lib/banshee-1/Extensions/Banshee.Podcasting.dll.mdb
76
lib/banshee-1/Extensions/Banshee.Podcasting.dll.mdb
77
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp.dll
78
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp.dll.mdb
79
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp-ui.dll
77
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp-ui.dll
80
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp-ui.dll.mdb
78
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp-ui.dll.mdb
79
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp.dll
80
%%OPT_IPOD%%lib/banshee-1/Extensions/ipod-sharp.dll.mdb
81
lib/banshee-1/Halie.exe
81
lib/banshee-1/Halie.exe
82
lib/banshee-1/Halie.exe.mdb
82
lib/banshee-1/Halie.exe.mdb
83
lib/banshee-1/Hyena.Gui.dll
83
lib/banshee-1/Hyena.Gui.dll
Lines 138-143 Link Here
138
share/banshee-1/audio-profiles/wav.xml
138
share/banshee-1/audio-profiles/wav.xml
139
share/banshee-1/audio-profiles/wavpack.xml
139
share/banshee-1/audio-profiles/wavpack.xml
140
share/banshee-1/audio-profiles/wma.xml
140
share/banshee-1/audio-profiles/wma.xml
141
share/banshee-1/icons/hicolor/128x128/devices/phone-htc-g1-white.png
141
share/banshee-1/icons/hicolor/16x16/actions/media-import-audio-cd.png
142
share/banshee-1/icons/hicolor/16x16/actions/media-import-audio-cd.png
142
share/banshee-1/icons/hicolor/16x16/actions/media-repeat-all.png
143
share/banshee-1/icons/hicolor/16x16/actions/media-repeat-all.png
143
share/banshee-1/icons/hicolor/16x16/actions/media-repeat-none.png
144
share/banshee-1/icons/hicolor/16x16/actions/media-repeat-none.png
Lines 202-208 Link Here
202
share/banshee-1/icons/hicolor/48x48/categories/podcast.png
203
share/banshee-1/icons/hicolor/48x48/categories/podcast.png
203
share/banshee-1/icons/hicolor/48x48/categories/radio.png
204
share/banshee-1/icons/hicolor/48x48/categories/radio.png
204
share/banshee-1/icons/hicolor/48x48/devices/phone-htc-g1-white.png
205
share/banshee-1/icons/hicolor/48x48/devices/phone-htc-g1-white.png
205
share/banshee-1/icons/hicolor/128x128/devices/phone-htc-g1-white.png
206
share/banshee-1/icons/hicolor/scalable/categories/radio.svg
206
share/banshee-1/icons/hicolor/scalable/categories/radio.svg
207
%%OPT_IPOD%%share/banshee-1/icons/hicolor/scalable/devices/multimedia-player-ipod-U2-color.svg
207
%%OPT_IPOD%%share/banshee-1/icons/hicolor/scalable/devices/multimedia-player-ipod-U2-color.svg
208
%%OPT_IPOD%%share/banshee-1/icons/hicolor/scalable/devices/multimedia-player-ipod-U2-monochrome.svg
208
%%OPT_IPOD%%share/banshee-1/icons/hicolor/scalable/devices/multimedia-player-ipod-U2-monochrome.svg
Lines 270-297 Link Here
270
share/locale/zh_CN/LC_MESSAGES/banshee-1.mo
270
share/locale/zh_CN/LC_MESSAGES/banshee-1.mo
271
share/locale/zh_HK/LC_MESSAGES/banshee-1.mo
271
share/locale/zh_HK/LC_MESSAGES/banshee-1.mo
272
share/locale/zh_TW/LC_MESSAGES/banshee-1.mo
272
share/locale/zh_TW/LC_MESSAGES/banshee-1.mo
273
@dirrmtry share/locale/ky/LC_MESSAGES
274
@dirrm share/banshee-1/icons/hicolor/scalable/status
275
@dirrm share/banshee-1/icons/hicolor/scalable/devices
273
@dirrm share/banshee-1/icons/hicolor/scalable/devices
276
@dirrm share/banshee-1/icons/hicolor/scalable/categories
274
@dirrm share/banshee-1/icons/hicolor/scalable/categories
277
@dirrm share/banshee-1/icons/hicolor/scalable/actions
278
@dirrm share/banshee-1/icons/hicolor/scalable
275
@dirrm share/banshee-1/icons/hicolor/scalable
279
@dirrm share/banshee-1/icons/hicolor/128x128/status
280
@dirrm share/banshee-1/icons/hicolor/128x128/devices
281
@dirrm share/banshee-1/icons/hicolor/128x128/categories
282
@dirrm share/banshee-1/icons/hicolor/128x128/actions
283
@dirrm share/banshee-1/icons/hicolor/128x128
284
@dirrm share/banshee-1/icons/hicolor/48x48/status
285
@dirrm share/banshee-1/icons/hicolor/48x48/devices
276
@dirrm share/banshee-1/icons/hicolor/48x48/devices
286
@dirrm share/banshee-1/icons/hicolor/48x48/categories
277
@dirrm share/banshee-1/icons/hicolor/48x48/categories
287
@dirrm share/banshee-1/icons/hicolor/48x48/actions
278
@dirrm share/banshee-1/icons/hicolor/48x48/actions
288
@dirrm share/banshee-1/icons/hicolor/48x48
279
@dirrm share/banshee-1/icons/hicolor/48x48
289
@dirrm share/banshee-1/icons/hicolor/32x32/status
290
@dirrm share/banshee-1/icons/hicolor/32x32/devices
280
@dirrm share/banshee-1/icons/hicolor/32x32/devices
291
@dirrm share/banshee-1/icons/hicolor/32x32/categories
292
@dirrm share/banshee-1/icons/hicolor/32x32/actions
281
@dirrm share/banshee-1/icons/hicolor/32x32/actions
293
@dirrm share/banshee-1/icons/hicolor/32x32
282
@dirrm share/banshee-1/icons/hicolor/32x32
294
@dirrm share/banshee-1/icons/hicolor/22x22/status
295
@dirrm share/banshee-1/icons/hicolor/22x22/devices
283
@dirrm share/banshee-1/icons/hicolor/22x22/devices
296
@dirrm share/banshee-1/icons/hicolor/22x22/categories
284
@dirrm share/banshee-1/icons/hicolor/22x22/categories
297
@dirrm share/banshee-1/icons/hicolor/22x22/actions
285
@dirrm share/banshee-1/icons/hicolor/22x22/actions
Lines 302-307 Link Here
302
@dirrm share/banshee-1/icons/hicolor/16x16/categories
290
@dirrm share/banshee-1/icons/hicolor/16x16/categories
303
@dirrm share/banshee-1/icons/hicolor/16x16/actions
291
@dirrm share/banshee-1/icons/hicolor/16x16/actions
304
@dirrm share/banshee-1/icons/hicolor/16x16
292
@dirrm share/banshee-1/icons/hicolor/16x16
293
@dirrm share/banshee-1/icons/hicolor/128x128/devices
294
@dirrm share/banshee-1/icons/hicolor/128x128
305
@dirrm share/banshee-1/icons/hicolor
295
@dirrm share/banshee-1/icons/hicolor
306
@dirrm share/banshee-1/icons
296
@dirrm share/banshee-1/icons
307
@dirrm share/banshee-1/audio-profiles
297
@dirrm share/banshee-1/audio-profiles

Return to bug 140570