summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/attachments/20110203/d758517e/attachment-0001.html
blob: 709ce30e31f303c2cb8ef00cd25931a2d57a9991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[399] Import cleaned multiarch-utils*</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>399</dd>
<dt>Author</dt> <dd>dmorgan</dd>
<dt>Date</dt> <dd>2011-02-03 19:09:01 +0100 (Thu, 03 Feb 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Import cleaned multiarch-utils*</pre>

<h3>Added Paths</h3>
<ul>
<li>multiarch-utils/</li>
<li><a href="#multiarchutilsCLEANUP_PROGRESStxt">multiarch-utils/CLEANUP_PROGRESS.txt</a></li>
<li>multiarch-utils/trunk/</li>
<li><a href="#multiarchutilstrunkMakefile">multiarch-utils/trunk/Makefile</a></li>
<li><a href="#multiarchutilstrunkNEWS">multiarch-utils/trunk/NEWS</a></li>
<li><a href="#multiarchutilstrunkcheckmultiarchfiles">multiarch-utils/trunk/check-multiarch-files</a></li>
<li><a href="#multiarchutilstrunkmacrosmultiarch">multiarch-utils/trunk/macros.multiarch</a></li>
<li><a href="#multiarchutilstrunkmkmultiarch">multiarch-utils/trunk/mkmultiarch</a></li>
<li><a href="#multiarchutilstrunkmultiarchdispatch">multiarch-utils/trunk/multiarch-dispatch</a></li>
<li><a href="#multiarchutilstrunkmultiarchdispatchh">multiarch-utils/trunk/multiarch-dispatch.h</a></li>
<li><a href="#multiarchutilstrunkmultiarchplatform">multiarch-utils/trunk/multiarch-platform</a></li>
</ul>

</div>
<div id="patch"><pre>
<a id="multiarchutilsCLEANUP_PROGRESStxt">Added: multiarch-utils/CLEANUP_PROGRESS.txt</a>
===================================================================
--- multiarch-utils/CLEANUP_PROGRESS.txt	                        (rev 0)
+++ multiarch-utils/CLEANUP_PROGRESS.txt	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,3 @@
+- License is GPL according to the relevant rpm spec written by Mandriva (no explicit
+  COPYING or LICENSE files)
+- '# Project: Mandriva Linux' in several files, removed


Property changes on: multiarch-utils/CLEANUP_PROGRESS.txt
___________________________________________________________________
<a id="svneolstyle">Added: svn:eol-style</a>
   + native

<a id="multiarchutilstrunkMakefile">Added: multiarch-utils/trunk/Makefile</a>
===================================================================
--- multiarch-utils/trunk/Makefile	                        (rev 0)
+++ multiarch-utils/trunk/Makefile	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,76 @@
+#---------------------------------------------------------------
+# Package         : multiarch-utils
+# File            : Makefile
+# Version         : $Id: Makefile 265211 2010-01-24 12:53:25Z anssi $
+# Author          : Gwenole Beauchesne
+# Created On      : Wed Jan 12 18:42:04 CET 2005
+#---------------------------------------------------------------
+
+prefix		= /usr
+bindir		= $(prefix)/bin
+includedir	= $(prefix)/include
+
+RPM_MACRO_FILES	= multiarch
+RPM_BIN_FILES	= mkmultiarch check-multiarch-files
+BINARIES	= multiarch-platform multiarch-dispatch
+INCLUDES	= multiarch-dispatch.h
+OTHER_FILES	= Makefile NEWS
+FILES		= $(foreach file,$(RPM_MACRO_FILES),macros.$(file)) $(RPM_BIN_FILES) $(BINARIES) $(INCLUDES) $(OTHER_FILES)
+
+PACKAGE		= multiarch-utils
+VERSION		= 1.0.13
+MULTIARCH_DIST	= 1020
+
+all:
+	@echo &quot;nothing to be done for $(PACKAGE)-$(VERSION)&quot;
+
+clean: cleandist
+	rm -f *~
+
+install:
+	-mkdir -p $(DESTDIR)/etc/rpm
+	for f in $(RPM_MACRO_FILES); do \
+	  perl -pe 's/%MULTIARCH_DISTRO%/$(MULTIARCH_DIST)/' macros.$$f &gt; $(DESTDIR)/etc/rpm/macros.$$f; \
+	  if [[ -d /etc/rpm/macros.d ]]; then \
+	    mkdir -p $(DESTDIR)/etc/rpm/macros.d; \
+	    mv $(DESTDIR)/etc/rpm/macros.$$f $(DESTDIR)/etc/rpm/macros.d/$$f.macros; \
+	  fi; \
+	done
+	-mkdir -p $(DESTDIR)$(prefix)/lib/rpm
+	install -m755 $(RPM_BIN_FILES) $(DESTDIR)$(prefix)/lib/rpm/
+	-mkdir -p $(DESTDIR)$(bindir)
+	install -m755 $(BINARIES) $(DESTDIR)$(bindir)/
+	-mkdir -p $(DESTDIR)$(includedir)
+	install -m644 $(INCLUDES) $(DESTDIR)$(includedir)/
+
+localdist: cleandist dir localcopy changelog tar
+
+cleandist:
+	rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
+
+dir:
+	mkdir $(PACKAGE)-$(VERSION)
+
+localcopy:
+	tar c $(FILES) | tar x -C $(PACKAGE)-$(VERSION)
+
+tar:
+	tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
+	bzip2 -9vf $(PACKAGE)-$(VERSION).tar
+	rm -rf $(PACKAGE)-$(VERSION)
+
+dist: cleandist export changelog tar
+
+export:
+	svn export -rBASE . $(PACKAGE)-$(VERSION)
+
+changelog: ../common/username
+	svn2cl --authors=../common/username --file=$(PACKAGE)-$(VERSION)/ChangeLog 
+	rm -f $(PACKAGE)-$(VERSION)/ChangeLog.bak
+
+# Local variables:
+# mode: makefile
+# tab-width: 8
+# End:
+#
+# Makefile ends here


Property changes on: multiarch-utils/trunk/Makefile
___________________________________________________________________
Added: svn:eol-style
   + native

<a id="multiarchutilstrunkNEWS">Added: multiarch-utils/trunk/NEWS</a>
===================================================================
--- multiarch-utils/trunk/NEWS	                        (rev 0)
+++ multiarch-utils/trunk/NEWS	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,18 @@
+Version 1.0.13 - 09 January 2011, by Olivier Blin
+- fix other multiarch() macros by adding nil
+
+Version 1.0.12 - 08 January 2011, by Olivier Blin
+- fix multiarch() macro
+
+Version 1.0.11 - 08 January 2011, by Olivier Blin
+- remove obsole mdk macros
+
+Version 1.0.10 - 24 January 2010, by Anssi Hannula
+
+- remove dispatch file for host.def, it is no longer used
+- fix broken sparc64 check (from Per Øyvind Karlsen, #27277)
+- fix broken check for rpm/macros.d directory (from Per Øyvind Karlsen)
+- add mips support (from Arnaud Patard)
+- add armel support (from Arnaud Patard)
+- add additional guards for some interfering definitions in
+  multiarch-dispatch.h (reported by Jérôme Brenier)

<a id="multiarchutilstrunkcheckmultiarchfiles">Added: multiarch-utils/trunk/check-multiarch-files</a>
===================================================================
--- multiarch-utils/trunk/check-multiarch-files	                        (rev 0)
+++ multiarch-utils/trunk/check-multiarch-files	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,95 @@
+#!/usr/bin/perl
+#---------------------------------------------------------------
+# Module          : multiarch-utils
+# File            : check-multiarch
+# Version         : $Id: check-multiarch-files 156134 2005-08-07 14:29:26Z gbeauchesne $
+# Author          : Gwenole Beauchesne
+# Created On      : Mon Jan 24 18:02:21 CET 2005
+#---------------------------------------------------------------
+
+use strict;
+use MDK::Common;
+
+my $RPM_BUILD_ROOT = (shift);
+
+if (! -d $RPM_BUILD_ROOT ) {
+    while (&lt;STDIN&gt;) { } # consume all inputs
+    exit 1
+}
+
+while (&lt;STDIN&gt;) {
+    chomp;
+
+    # File must be located in the usual development directories
+    -f $_ or next;
+    m,^\Q$RPM_BUILD_ROOT\E/usr(/X11R6)?/(bin|include)/, or next;
+    m,/multiarch-.+-\w+/, and next;
+    m,/include/asm, and next;
+
+    my $multiarch = 0;
+    my $multiarch_type;
+
+    # Heuristics for binary files
+    if (/bin/) {
+        my $file_magic = `file $_`;
+        $multiarch_type = &quot;binary&quot;;
+
+        # check for *-config script files
+        if (/.+[-_]config/ &amp;&amp; $file_magic =~ /shell script/) {
+            my $options;
+            foreach (cat_($_)) {
+                foreach my $opt (qw(cflags libs ldflags cppflags libdir libtool)) {
+                    $options .= &quot; --$opt&quot; if /(\[--$opt\]|--$opt\s+([\#\[]|display|print))/;
+                }
+            }
+            # run the script to find out any libdir dependent flags
+            if ($options) {
+                my $output = `$_ $options`;
+                $multiarch = 1 if ($output =~ /(?&lt;!\/include)\/lib(32|64)?/);
+            }
+        }
+    }
+
+    # Heuristics for include files
+    elsif (/include/) {
+        $multiarch_type = &quot;header&quot;;
+        my %archdefs;
+        foreach (cat_($_)) {
+            if (/\#\s*define\s+(\w+)\s+(.+)/) {
+                my ($def, $val) = ($1, $2);
+
+                # check for typical arch-dependent macro definitions
+                my @keywords_with_int = qw(SIZEOF_VOID_P SIZEOF_CHAR_P SIZEOF_LONG BYTES_PER_LONG BITS_PER_LONG BITS_PER_WORD);
+                foreach my $pat (@keywords_with_int) {
+                    if ($def =~ /$pat/ &amp;&amp; int($val)) {
+                        $archdefs{$def}++;
+                        last;
+                    }
+                }
+
+                # check for libdir references, typically plugins dir
+                # XXX check for /DIR/ in $def ?
+                if ($val =~ /&quot;\/usr(\/X11R6)?\/lib(32|64)?\/(?!(X11|font)\/).*&quot;/) {
+                    $multiarch = 1;
+                }
+            }
+        }
+
+        # ignore multiple definitions of the same macro, assume
+        # arch-dependence is handled in that case
+        if (! $multiarch) {
+            foreach my $e (keys %archdefs) {
+                my $val = $archdefs{$e};
+                $multiarch = 1 if ($val == 1);
+            }
+        }
+    }
+
+    # Multiarch files detected?
+    print &quot;$_\n&quot; if $multiarch;
+}
+
+# Local variables:
+# tab-width: 4
+# indent-tabs-mode: nil
+# End:


Property changes on: multiarch-utils/trunk/check-multiarch-files
___________________________________________________________________
<a id="svnexecutable">Added: svn:executable</a>
   + *

<a id="multiarchutilstrunkmacrosmultiarch">Added: multiarch-utils/trunk/macros.multiarch</a>
===================================================================
--- multiarch-utils/trunk/macros.multiarch	                        (rev 0)
+++ multiarch-utils/trunk/macros.multiarch	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,19 @@
+%multiarch_platform		multiarch-%{_arch}-%{_target_os}
+%multiarch_bindir		%{_bindir}/%{multiarch_platform}
+%multiarch_includedir		%{_includedir}/%{multiarch_platform}
+%multiarch_x11bindir		%{_prefix}/X11R6/bin/%{multiarch_platform}
+%multiarch_x11includedir	%{_prefix}/X11R6/include/%{multiarch_platform}
+
+%multiarch_distro %MULTIARCH_DISTRO%
+
+%multiarch_binaries() \
+%{_prefix}/lib/rpm/mkmultiarch binaries %* \
+%{nil}
+
+%multiarch_includes() \
+%{_prefix}/lib/rpm/mkmultiarch includes %* \
+%{nil}
+
+%multiarch() \
+%* \
+%{nil}

<a id="multiarchutilstrunkmkmultiarch">Added: multiarch-utils/trunk/mkmultiarch</a>
===================================================================
--- multiarch-utils/trunk/mkmultiarch	                        (rev 0)
+++ multiarch-utils/trunk/mkmultiarch	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,94 @@
+#!/bin/bash
+#---------------------------------------------------------------
+# Module          : multiarch-utils
+# File            : mkmultiarch
+# Version         : $Id: mkmultiarch 156134 2005-08-07 14:29:26Z gbeauchesne $
+# Author          : Gwenole Beauchesne
+# Created On      : Wed Jan 12 10:54:10 CET 2005
+#---------------------------------------------------------------
+
+usage=&quot;Usage: $0 &lt;binaries|includes&gt; &lt;file1&gt; [&lt;file2&gt; ...]&quot;
+mplat=`multiarch-platform`
+type=$1
+case $type in
+    binaries|includes) shift;;
+    *) echo $usage; exit 1;;
+esac
+
+function error() {
+    echo ${1+&quot;$@&quot;} &gt; /dev/stderr
+    exit 1
+}
+
+# read link on one level only
+function read_link_1() {
+    perl -e 'print readlink(shift)' $1
+}
+
+function dispatch_binaries() {
+    local file=$1
+    local bindir=`dirname $file`
+    local archbindir=$bindir/$mplat
+    [[ -d $archbindir ]] || mkdir -p $archbindir
+    if [[ -L $file ]]; then
+	link=`read_link_1 $file`
+	case $link in
+	    /*)
+		mv $file $archbindir/
+		;;
+	    ../*)
+		ln -s ../$link $archbindir/${file##*/}
+		rm -f $file
+		;;
+	esac
+    elif [[ -f $file ]]; then
+	mv $file $archbindir/
+    else
+	error &quot;Unsupported file type for $file&quot;
+    fi
+    ln -s /usr/bin/multiarch-dispatch $file
+}
+
+function dispatch_includes() {
+    local file=$1
+    local incdir=`dirname $file`
+
+    # handle circular inclusions
+    local tag=$incdir/.multiarch-processing.${file##*/}
+    [[ -f &quot;$tag&quot; ]] &amp;&amp; return
+    touch $tag
+
+    # sanity checks, extract path parts
+    echo $file | grep -q '/include/' || error &quot;Unsupported includedir $incdir&quot;
+    local prefix=`echo $incdir | sed -n '/\(.*\/include\)\/.*/s//\1/p'`
+    [[ -z &quot;$prefix&quot; ]] &amp;&amp; prefix=&quot;$incdir&quot;
+    local suffix=`echo $incdir | sed -n '/.*\/include\/\(.*\)/s//\1/p'`
+    [[ -n &quot;$suffix&quot; ]] &amp;&amp; suffix=&quot;$suffix/&quot;
+
+    # dispatch nested includes expected in local directory
+    sed -n '/^#[ \t]*include[ \t]*&quot;\([^&quot;][^&quot;]*\)&quot;.*/s//\1/p' $file | \
+    while read localfile; do
+	[[ -f &quot;$incdir/$localfile&quot; ]] &amp;&amp; dispatch_includes $incdir/$localfile
+    done
+
+    # dispatch selected include file, provided it's not already dispatched
+    grep -q _MULTIARCH_HEADER $file || {
+	local archincdir=$prefix/$mplat/$suffix
+	[[ -d $archincdir ]] || mkdir -p $archincdir
+	mv $file $archincdir/
+	cat &gt; $file &lt;&lt; EOF
+#define _MULTIARCH_HEADER $suffix${file##*/}
+#include &lt;multiarch-dispatch.h&gt;
+EOF
+    }
+
+    # done with this file
+    rm -f $tag
+}
+
+while [[ $# -gt 0 ]]; do
+    file=$1
+    shift 1
+    [[ -f $file ]] || error &quot;$file does not exist!&quot;
+    dispatch_$type $file
+done


Property changes on: multiarch-utils/trunk/mkmultiarch
___________________________________________________________________
Added: svn:executable
   + *

<a id="multiarchutilstrunkmultiarchdispatch">Added: multiarch-utils/trunk/multiarch-dispatch</a>
===================================================================
--- multiarch-utils/trunk/multiarch-dispatch	                        (rev 0)
+++ multiarch-utils/trunk/multiarch-dispatch	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,34 @@
+#!/bin/sh
+#---------------------------------------------------------------
+# Module          : multiarch-utils
+# File            : multiarch-dispatch
+# Version         : $Id: multiarch-dispatch 156136 2005-08-07 15:46:51Z gbeauchesne $
+# Author          : Gwenole Beauchesne
+# Created On      : Wed Jan 12 12:38:53 EST 2005
+#---------------------------------------------------------------
+
+if [[ &quot;$0&quot; = &quot;/usr/bin/multiarch-dispatch&quot; ]]; then
+    echo &quot;Helper script to dispatch a binary under a specific personality&quot;
+    exit 0
+fi
+
+# go through symlinks until multiarch-dispatch leaf is reached
+mprog=&quot;$0&quot;
+mcomp=&quot;$mprog&quot;
+while [[ -L &quot;$mcomp&quot; ]]; do
+    mprog=&quot;$mcomp&quot;
+    mcomp=`readlink &quot;$mprog&quot;`
+    case &quot;$mcomp&quot; in
+	/*) ;;
+	*)  mcomp=`dirname &quot;$mprog&quot;`/&quot;$mcomp&quot;;;
+    esac
+done
+
+bin=`dirname &quot;$mprog&quot;`/`multiarch-platform`/&quot;${mprog##*/}&quot;
+
+if [[ ! -x &quot;$bin&quot; ]]; then
+    echo &quot;Cannot execute $bin&quot; &gt; /dev/stderr
+    exit 1
+fi
+
+exec $bin ${1+&quot;$@&quot;}


Property changes on: multiarch-utils/trunk/multiarch-dispatch
___________________________________________________________________
Added: svn:executable
   + *

<a id="multiarchutilstrunkmultiarchdispatchh">Added: multiarch-utils/trunk/multiarch-dispatch.h</a>
===================================================================
--- multiarch-utils/trunk/multiarch-dispatch.h	                        (rev 0)
+++ multiarch-utils/trunk/multiarch-dispatch.h	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,172 @@
+/* Undefine some built-ins */
+#ifdef  linux
+#undef  linux
+#define _multiarch_defined_linux
+#endif
+#ifdef  i386
+#undef  i386
+#define _multiarch_defined_i386
+#endif
+#ifdef  sparc
+#undef  sparc
+#define _multiarch_defined_sparc
+#endif
+#ifdef	mips
+#undef	mips
+#define	_multiarch_defined_mips
+#endif
+#ifdef	arm
+#undef	arm
+#define	_multiarch_defined_arm
+#endif
+
+/* Undefine some interfering definitions (not built-ins) */
+/* We can only redefine value 1, so we let it fail with other values */
+#if x86_64 == 1
+#define _multiarch_defined_x86_64
+#undef x86_64
+#endif
+#if ppc64 == 1
+#define _multiarch_defined_ppc64
+#undef ppc64
+#endif
+#if ppc == 1
+#define _multiarch_defined_ppc
+#undef ppc
+#endif
+#if sparc64 == 1
+#define _multiarch_defined_sparc64
+#undef sparc64
+#endif
+#if s390x == 1
+#define _multiarch_defined_s390x
+#undef s390x
+#endif
+#if s390 == 1
+#define _multiarch_defined_s390
+#undef s390
+#endif
+#if ia64 == 1
+#define _multiarch_defined_ia64
+#undef ia64
+#endif
+#if alpha == 1
+#define _multiarch_defined_alpha
+#undef alpha
+#endif
+#if mipsel == 1
+#define _multiarch_defined_mipsel
+#undef mipsel
+#endif
+#if armeb == 1
+#define _multiarch_defined_armeb
+#undef armeb
+#endif
+
+/* Dispatch arch dependent header */
+#if defined(__linux__)
+#define _MULTIARCH_OS linux
+#endif
+#define _MULTIARCH_MAKE_HEADER(arch,header) &lt;multiarch-arch-_MULTIARCH_OS/header&gt;
+#if defined(__x86_64__)
+#include _MULTIARCH_MAKE_HEADER(x86_64,_MULTIARCH_HEADER)
+#elif defined(__i386__)
+#include _MULTIARCH_MAKE_HEADER(i386,_MULTIARCH_HEADER)
+#elif defined(__powerpc64__)
+#include _MULTIARCH_MAKE_HEADER(ppc64,_MULTIARCH_HEADER)
+#elif defined(__powerpc__)
+#include _MULTIARCH_MAKE_HEADER(ppc,_MULTIARCH_HEADER)
+#elif defined(__sparc__) &amp;&amp; defined(__arch64__)
+#include _MULTIARCH_MAKE_HEADER(sparc64,_MULTIARCH_HEADER)
+#elif defined(__sparc__)
+#include _MULTIARCH_MAKE_HEADER(sparc,_MULTIARCH_HEADER)
+#elif defined(__s390x__)
+#include _MULTIARCH_MAKE_HEADER(s390x,_MULTIARCH_HEADER)
+#elif defined(__s390__)
+#include _MULTIARCH_MAKE_HEADER(s390,_MULTIARCH_HEADER)
+#elif defined(__ia64__)
+#include _MULTIARCH_MAKE_HEADER(ia64,_MULTIARCH_HEADER)
+#elif defined(__alpha__)
+#include _MULTIARCH_MAKE_HEADER(alpha,_MULTIARCH_HEADER)
+#elif defined(__mips__)
+#if defined(__BIG_ENDIAN__)
+#include _MULTIARCH_MAKE_HEADER(mips,_MULTIARCH_HEADER)
+#else
+#include _MULTIARCH_MAKE_HEADER(mipsel,_MULTIARCH_HEADER)
+#endif
+#elif defined(__arm__)
+#if defined(__BIG_ENDIAN__)
+#include _MULTIARCH_MAKE_HEADER(armeb,_MULTIARCH_HEADER)
+#else
+#include _MULTIARCH_MAKE_HEADER(arm,_MULTIARCH_HEADER)
+#endif
+#else
+#error &quot;Unknown architecture, please submit bug report&quot;
+#endif
+#undef _MULTIARCH_MAKE_HEADER
+#undef _MULTIARCH_OS
+#undef _MULTIARCH_HEADER
+
+/* Redefine built-ins */
+#ifdef  _multiarch_defined_linux
+#undef  _multiarch_defined_linux
+#define linux 1
+#endif
+#ifdef  _multiarch_defined_i386
+#undef  _multiarch_defined_i386
+#define i386 1
+#endif
+#ifdef  _multiarch_defined_sparc
+#undef  _multiarch_defined_sparc
+#define sparc 1
+#endif
+#ifdef  _multiarch_defined_mips
+#undef  _multiarch_defined_mips
+#define mips 1
+#endif
+#ifdef  _multiarch_defined_arm
+#undef  _multiarch_defined_arm
+#define arm 1
+#endif
+
+/* Redefine interfering defitions */
+#ifdef  _multiarch_defined_x86_64
+#undef  _multiarch_defined_x86_64
+#define x86_64 1
+#endif
+#ifdef  _multiarch_defined_ppc64
+#undef  _multiarch_defined_ppc64
+#define ppc64 1
+#endif
+#ifdef  _multiarch_defined_ppc
+#undef  _multiarch_defined_ppc
+#define ppc 1
+#endif
+#ifdef  _multiarch_defined_sparc64
+#undef  _multiarch_defined_sparc64
+#define sparc64 1
+#endif
+#ifdef  _multiarch_defined_s390x
+#undef  _multiarch_defined_s390x
+#define s390x 1
+#endif
+#ifdef  _multiarch_defined_s390
+#undef  _multiarch_defined_s390
+#define s390 1
+#endif
+#ifdef  _multiarch_defined_ia64
+#undef  _multiarch_defined_ia64
+#define ia64 1
+#endif
+#ifdef  _multiarch_defined_alpha
+#undef  _multiarch_defined_alpha
+#define alpha 1
+#endif
+#ifdef  _multiarch_defined_mipsel
+#undef  _multiarch_defined_mipsel
+#define mipsel 1
+#endif
+#ifdef  _multiarch_defined_armeb
+#undef  _multiarch_defined_armeb
+#define armeb 1
+#endif


Property changes on: multiarch-utils/trunk/multiarch-dispatch.h
___________________________________________________________________
Added: svn:eol-style
   + native

<a id="multiarchutilstrunkmultiarchplatform">Added: multiarch-utils/trunk/multiarch-platform</a>
===================================================================
--- multiarch-utils/trunk/multiarch-platform	                        (rev 0)
+++ multiarch-utils/trunk/multiarch-platform	2011-02-03 18:09:01 UTC (rev 399)
@@ -0,0 +1,14 @@
+#!/bin/sh
+arch=`uname -m`
+`perl -e '$le   = unpack(&quot;h*&quot;, pack(&quot;s&quot;, 1)) =~ /^1/; exit $le;'`
+le=$?
+case $arch in
+i?86) arch=i386;;
+mips*) [ $le -eq 1 ] &amp;&amp; arch=&quot;$arch&quot;el ;;
+arm*) [ $le -eq 0 ] &amp;&amp; arch=&quot;armeb&quot; || arch=&quot;arm&quot; ;;
+esac
+os=`uname -s`
+case $os in
+Linux*) os=linux;;
+esac
+echo multiarch-$arch-$os


Property changes on: multiarch-utils/trunk/multiarch-platform
___________________________________________________________________
Added: svn:executable
   + *

</pre></div>

</body>
</html>