Gentoo Archives: gentoo-commits

From: "Cedric Krier (cedk)" <cedk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-sound/audicle/files: audicle-1.0.0.6-hid-smc.patch audicle-1.0.0.6-font.patch
Date: Sun, 30 Mar 2008 00:20:10
Message-Id: E1JflHM-0002yS-33@stork.gentoo.org
1 cedk 08/03/30 00:20:08
2
3 Added: audicle-1.0.0.6-hid-smc.patch
4 audicle-1.0.0.6-font.patch
5 Log:
6 New ebuild for bug #144667
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.1 media-sound/audicle/files/audicle-1.0.0.6-hid-smc.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/audicle/files/audicle-1.0.0.6-hid-smc.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/audicle/files/audicle-1.0.0.6-hid-smc.patch?rev=1.1&content-type=text/plain
14
15 Index: audicle-1.0.0.6-hid-smc.patch
16 ===================================================================
17 diff -ru audicle-1.0.0.6~/lang/chuck-1.2.1.1/src/util_hid.cpp audicle-1.0.0.6/lang/chuck-1.2.1.1/src/util_hid.cpp
18 --- audicle-1.0.0.6~/lang/chuck-1.2.1.1/src/util_hid.cpp 2008-03-30 00:29:37.000000000 +0100
19 +++ audicle-1.0.0.6/lang/chuck-1.2.1.1/src/util_hid.cpp 2008-03-30 00:33:08.000000000 +0100
20 @@ -7175,14 +7175,139 @@
21 int WiiRemote_send( const HidMsg * msg ){ return -1; }
22 const char * WiiRemote_name( int wr ){ return NULL; }
23
24 +#define SYSFS_TILTSENSOR_FILE "/sys/devices/platform/applesmc/position"
25 +#define TILTSENSOR_BUF_LEN 32
26 +
27 +static struct t_TiltSensor_data
28 +{
29 + union
30 + {
31 + struct t_macbook
32 + {
33 + int x;
34 + int y;
35 + int z;
36 + } macbook;
37 + } data;
38 + int dataType;
39 + int detected;
40 + int refcount;
41 +
42 + t_TiltSensor_data()
43 + {
44 + refcount = 0;
45 + dataType = -1;
46 + detected = 0;
47 + }
48 +
49 +} TiltSensor_data;
50 +enum
51 +{
52 + linuxAppleSMCMacBookDataType
53 +};
54 +static int TiltSensor_detect()
55 +{
56 + int fd;
57 +
58 + fd = open(SYSFS_TILTSENSOR_FILE, O_RDONLY);
59 +
60 + if (fd > 0)
61 + {
62 + TiltSensor_data.dataType = linuxAppleSMCMacBookDataType;
63 + TiltSensor_data.detected = 1;
64 + close(fd);
65 + return 1;
66 + }
67 +
68 + TiltSensor_data.detected = -1;
69 +
70 + return 0;
71 +}
72 +
73 +static int TiltSensor_do_read()
74 +{
75 +
76 + switch(TiltSensor_data.dataType)
77 + {
78 + case linuxAppleSMCMacBookDataType:
79 + char buf[TILTSENSOR_BUF_LEN];
80 + int ret, fd;
81 + fd = open(SYSFS_TILTSENSOR_FILE, O_RDONLY);
82 +
83 + if (fd < 0) {
84 + return -1;
85 + }
86 + ret = read(fd, buf, TILTSENSOR_BUF_LEN);
87 + if (ret < 0) {
88 + close(fd);
89 + return -1;
90 + }
91 + if (sscanf(buf, "(%d,%d,%d)\n", &TiltSensor_data.data.macbook.x, &TiltSensor_data.data.macbook.y, &TiltSensor_data.data.macbook.z) != 3) {
92 + close(fd);
93 + return -1;
94 + }
95 + close(fd);
96 + break;
97 + default:
98 + return 0;
99 + }
100 + return 1;
101 +}
102 void TiltSensor_init(){}
103 void TiltSensor_quit(){}
104 void TiltSensor_probe(){}
105 -int TiltSensor_count(){ return 0; }
106 -int TiltSensor_open( int ts ){ return -1; }
107 -int TiltSensor_close( int ts ){ return -1; }
108 -int TiltSensor_read( int ts, int type, int num, HidMsg * msg ){ return -1; }
109 -const char * TiltSensor_name( int ts ){ return NULL; }
110 +int TiltSensor_count()
111 +{
112 + if(TiltSensor_data.detected == 0)
113 + TiltSensor_detect();
114 +
115 + if(TiltSensor_data.detected == -1)
116 + return 0;
117 + else if(TiltSensor_data.detected == 1)
118 + return 1;
119 +
120 + return 0;
121 +}
122 +int TiltSensor_open( int ts )
123 +{
124 + if(TiltSensor_data.detected == 0)
125 + TiltSensor_detect();
126 +
127 + if(TiltSensor_data.detected == -1)
128 + return -1;
129 +
130 + TiltSensor_data.refcount++;
131 +
132 + return 0;
133 +}
134 +int TiltSensor_close( int ts )
135 +{
136 + TiltSensor_data.refcount--;
137 +
138 + return 0;
139 +}
140 +int TiltSensor_read( int ts, int type, int num, HidMsg * msg )
141 +{
142 +
143 + if(TiltSensor_data.detected == -1)
144 + return -1;
145 +
146 + if(!TiltSensor_do_read())
147 + return -1;
148 +
149 + if(TiltSensor_data.dataType == linuxAppleSMCMacBookDataType)
150 + {
151 + msg->idata[0] = TiltSensor_data.data.macbook.x;
152 + msg->idata[1] = TiltSensor_data.data.macbook.y;
153 + msg->idata[2] = TiltSensor_data.data.macbook.z;
154 + }
155 +
156 + return 0;
157 +}
158 +const char * TiltSensor_name( int ts )
159 +{
160 + return "Apple Sudden Motion Sensor";
161 +}
162
163
164 #endif
165
166
167
168 1.1 media-sound/audicle/files/audicle-1.0.0.6-font.patch
169
170 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/audicle/files/audicle-1.0.0.6-font.patch?rev=1.1&view=markup
171 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/audicle/files/audicle-1.0.0.6-font.patch?rev=1.1&content-type=text/plain
172
173 Index: audicle-1.0.0.6-font.patch
174 ===================================================================
175 diff -ru audicle-1.0.0.6~/src/audicle_font.cpp audicle-1.0.0.6/src/audicle_font.cpp
176 --- audicle-1.0.0.6~/src/audicle_font.cpp 2008-03-30 00:29:37.000000000 +0100
177 +++ audicle-1.0.0.6/src/audicle_font.cpp 2008-03-30 01:04:46.000000000 +0100
178 @@ -201,13 +201,13 @@
179 #ifdef __PLATFORM_WIN32__
180 char fontpath[] = "C:\\WINDOWS\\FONTS\\";
181 #else
182 -char fontpath[] = "/define/this/directory/";
183 +char fontpath[] = "/usr/share/fonts/corefonts/";
184
185 #endif
186 #endif
187
188 -char kernedfontfile[] = "FTGL:verdana.TTF";
189 -char monospacedfontfile[] = "FTGL:LUCON.TTF";
190 +char kernedfontfile[] = "FTGL:verdana.ttf";
191 +char monospacedfontfile[] = "FTGL:couri.ttf";
192
193
194 class AudicleFTGLFont : public AudicleFont {
195 @@ -301,13 +301,11 @@
196 #endif
197
198 // we should do a directory scan here...
199 - AudicleFont::available_fonts().push_back( "FTGL:ARIAL.TTF" );
200 - AudicleFont::available_fonts().push_back( "FTGL:ARIBLK.TTF" );
201 - AudicleFont::available_fonts().push_back( "FTGL:BYTE.TTF" );
202 - AudicleFont::available_fonts().push_back( "FTGL:COUR.TTF" );
203 - AudicleFont::available_fonts().push_back( "FTGL:LUCON.TTF" );
204 - AudicleFont::available_fonts().push_back( "FTGL:TIMES.TTF" );
205 - AudicleFont::available_fonts().push_back( "FTGL:verdana.TTF" );
206 + AudicleFont::available_fonts().push_back( "FTGL:arial.ttf" );
207 + AudicleFont::available_fonts().push_back( "FTGL:ariblk.ttf" );
208 + AudicleFont::available_fonts().push_back( "FTGL:cour.ttf" );
209 + AudicleFont::available_fonts().push_back( "FTGL:times.ttf" );
210 + AudicleFont::available_fonts().push_back( "FTGL:verdana.ttf" );
211
212 };
213
214 diff -ru audicle-1.0.0.6~/src/audicle_ui_base.cpp audicle-1.0.0.6/src/audicle_ui_base.cpp
215 --- audicle-1.0.0.6~/src/audicle_ui_base.cpp 2008-03-30 00:29:37.000000000 +0100
216 +++ audicle-1.0.0.6/src/audicle_ui_base.cpp 2008-03-30 00:30:32.000000000 +0100
217 @@ -47,8 +47,8 @@
218 void init_UI_Fonts() {
219 if ( _ui_fonts_inited ) return;
220 #ifdef _USE_FTGL_FONTS_
221 - labelFont = AudicleFont::loadFont ( "FTGL:verdana.TTF" );
222 - labelFontMono = AudicleFont::loadFont ( "FTGL:LUCON.TTF" );
223 + labelFont = AudicleFont::loadFont ( "FTGL:verdana.ttf" );
224 + labelFontMono = AudicleFont::loadFont ( "FTGL:couri.ttf" );
225 #else
226 labelFont = AudicleFont::loadFont ( "OpenGL:variable" );
227 labelFontMono = AudicleFont::loadFont ( "OpenGL:variable" );
228 diff -ru audicle-1.0.0.6~/src/audicle_ui_editor.cpp audicle-1.0.0.6/src/audicle_ui_editor.cpp
229 --- audicle-1.0.0.6~/src/audicle_ui_editor.cpp 2008-03-30 00:29:37.000000000 +0100
230 +++ audicle-1.0.0.6/src/audicle_ui_editor.cpp 2008-03-30 00:30:32.000000000 +0100
231 @@ -46,7 +46,7 @@
232
233 void init_Buffer_Font() {
234 #ifdef _USE_FTGL_FONTS_
235 - bufferFont = AudicleFont::loadFont ( "FTGL:LUCON.TTF" );
236 + bufferFont = AudicleFont::loadFont ( "FTGL:couri.ttf" );
237 #else
238 bufferFont = AudicleFont::loadFont ( "OpenGL:mono" );
239 #endif
240
241
242
243 --
244 gentoo-commits@l.g.o mailing list