Subversion Repositories SvarDOS

Rev

Rev 1512 | Rev 1520 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1512 Rev 1513
1
<h1>SvarDOS repository</h1>
1
<h1>SvarDOS repository</h1>
2
<p class="copyr">"the world of packages"</p>
2
<p class="copyr">"the world of packages"</p>
3
 
3
 
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
5
 
5
 
6
<!-- <p>If you wish to receive notifications about new or updated packages, you may subscribe to the <a href="http://svn.svardos.org/rss.php?repname=SvarDOS&path=%2Fpackages%2F">SvarDOS Packages RSS feed</a>.</p>-->
6
<!-- <p>If you wish to receive notifications about new or updated packages, you may subscribe to the <a href="http://svn.svardos.org/rss.php?repname=SvarDOS&path=%2Fpackages%2F">SvarDOS Packages RSS feed</a>.</p>-->
7
 
7
 
8
<?php
8
<?php
9
  // load the category list
9
  // load the category list
10
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
10
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
11
  sort($cats);
11
  sort($cats);
12
 
12
 
13
  $catfilter = '';
13
  $catfilter = '';
14
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
14
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
-
 
15
 
-
 
16
  // hw filter?
-
 
17
  $hw = array();
-
 
18
  if (!empty($_GET['hwcpu'])) $hw[] = strtolower($_GET['hwcpu']);
-
 
19
  if (!empty($_GET['hwvid'])) $hw[] = strtolower($_GET['hwvid']);
-
 
20
  if ((!empty($_GET['fpu'])) && ($_GET['fpu'] == 'yes')) $hw[] = 'fpu';
-
 
21
 
15
?>
22
?>
16
 
23
 
17
<form action="?" method="get">
24
<form action="?" method="get">
18
<br>
25
<br>
19
<p>Category filter:&nbsp;
26
<p>Filters:<br>
20
<input type="hidden" name="p" value="repo">
27
<input type="hidden" name="p" value="repo">
-
 
28
 
-
 
29
Target hardware:
-
 
30
 
-
 
31
<select name="hwcpu">
-
 
32
 
-
 
33
<?php
-
 
34
  // build form with list of CPUs + preselect the current CPU (if any)
-
 
35
  $cpus = array('586', '486', '186', '8086');
-
 
36
  foreach ($cpus as $cpu) {
-
 
37
    $sel = '';
-
 
38
    if (array_search($cpu, $hw) !== false) $sel = ' selected';
-
 
39
    echo "<option{$sel}>{$cpu}</option>\n";
-
 
40
  }
-
 
41
?>
-
 
42
</select>
-
 
43
 
-
 
44
<select name="hwfpu">
-
 
45
<?php
-
 
46
if (empty($_GET['hwfpu'])) {
-
 
47
  echo "<option selected value=\"\">no FPU</option>\n";
-
 
48
  echo "<option>FPU</option>\n";
-
 
49
} else {
-
 
50
  echo "<option value=\"\">no FPU</option>\n";
-
 
51
  echo "<option selected>FPU</option>\n";
-
 
52
}
-
 
53
?>
-
 
54
</select>
-
 
55
 
-
 
56
<select name="hwvid">
-
 
57
<?php
-
 
58
  // build form with list of CPUs + preselect the current CPU (if any)
-
 
59
  $vids = array('SVGA', 'VGA', 'MCGA', 'EGA', 'CGA', 'MDA', 'HGC');
-
 
60
  foreach ($vids as $v) {
-
 
61
    $sel = '';
-
 
62
    if (array_search(strtolower($v), $hw) !== false) $sel = ' selected';
-
 
63
    echo "<option{$sel}>{$v}</option>\n";
-
 
64
  }
-
 
65
?>
-
 
66
</select>
-
 
67
 
-
 
68
<br>
-
 
69
 
-
 
70
Category:
21
<select name="cat">
71
<select name="cat">
22
  <option value="">ALL</option>
72
  <option value="">ALL</option>
23
<?php
73
<?php
24
  foreach ($cats as $c) {
74
  foreach ($cats as $c) {
25
    $sel = '';
75
    $sel = '';
26
    if ($c == $catfilter) $sel = ' selected';
76
    if ($c == $catfilter) $sel = ' selected';
27
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
77
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
28
  }
78
  }
29
?>
79
?>
30
</select>
80
</select>
-
 
81
 
31
<input type="submit" value="refresh">
82
<input type="submit" value="apply">
32
</p>
83
</p>
33
</form>
84
</form>
34
 
85
 
35
 
86
 
36
<?php
87
<?php
37
 
88
 
38
// hw filter?
-
 
39
$hw = array();
-
 
40
if (!empty($_GET['hw'])) {
-
 
41
  $hw = explode(' ', strtolower($_GET['hw']));
89
// add all supported subsets of hardware (eg. VGA supports MDA, EGA and CGA modes)
42
  foreach ($hw as $h) {
90
foreach ($hw as $h) {
43
 
-
 
44
    // add all supported CPUs
-
 
45
    if ($h == '586') {
-
 
46
      $hw[] = '8086';
-
 
47
      $hw[] = '186';
-
 
48
      $hw[] = '286';
-
 
49
      $hw[] = '386';
-
 
50
      $hw[] = '486';
-
 
51
    }
-
 
52
    if ($h == '486') {
-
 
53
      $hw[] = '8086';
-
 
54
      $hw[] = '186';
-
 
55
      $hw[] = '286';
-
 
56
      $hw[] = '386';
-
 
57
    }
-
 
58
    if ($h == '386') {
-
 
59
      $hw[] = '8086';
-
 
60
      $hw[] = '186';
-
 
61
      $hw[] = '286';
-
 
62
    }
-
 
63
    if ($h == '286') {
-
 
64
      $hw[] = '8086';
-
 
65
      $hw[] = '186';
-
 
66
    }
-
 
67
    if ($h == '186') {
-
 
68
      $hw[] = '8086';
-
 
69
    }
-
 
70
 
-
 
71
    // add all supported graphic
-
 
72
    if ($h == 'svga') {
-
 
73
      $hw[] = 'vga';
-
 
74
      $hw[] = 'ega';
-
 
75
      $hw[] = 'cga';
-
 
76
      $hw[] = 'mda';
-
 
77
    }
-
 
78
    if ($h == 'vga') {
-
 
79
      $hw[] = 'ega';
-
 
80
      $hw[] = 'cga';
-
 
81
      $hw[] = 'mda';
-
 
82
    }
-
 
83
    if ($h == 'ega') {
-
 
84
      $hw[] = 'cga';
-
 
85
      $hw[] = 'mda';
-
 
86
    }
-
 
87
    if ($h == 'cga') {
-
 
88
      $hw[] = 'mda';
-
 
89
    }
-
 
90
 
91
 
-
 
92
  // add all supported CPUs
-
 
93
  if ($h == '586') {
-
 
94
    $hw[] = '8086';
-
 
95
    $hw[] = '186';
-
 
96
    $hw[] = '286';
-
 
97
    $hw[] = '386';
-
 
98
    $hw[] = '486';
-
 
99
  }
-
 
100
  if ($h == '486') {
-
 
101
    $hw[] = '8086';
-
 
102
    $hw[] = '186';
-
 
103
    $hw[] = '286';
-
 
104
    $hw[] = '386';
-
 
105
  }
-
 
106
  if ($h == '386') {
-
 
107
    $hw[] = '8086';
-
 
108
    $hw[] = '186';
-
 
109
    $hw[] = '286';
-
 
110
  }
-
 
111
  if ($h == '286') {
-
 
112
    $hw[] = '8086';
-
 
113
    $hw[] = '186';
-
 
114
  }
-
 
115
  if ($h == '186') {
-
 
116
    $hw[] = '8086';
91
  }
117
  }
-
 
118
 
-
 
119
  // add all supported graphic
-
 
120
  if ($h == 'svga') {
-
 
121
    $hw[] = 'vga';
-
 
122
    $hw[] = 'ega';
-
 
123
    $hw[] = 'cga';
-
 
124
    $hw[] = 'mda';
-
 
125
  }
-
 
126
  if ($h == 'vga') {
-
 
127
    $hw[] = 'mcga';
-
 
128
    $hw[] = 'ega';
-
 
129
    $hw[] = 'cga';
-
 
130
    $hw[] = 'mda';
-
 
131
  }
-
 
132
  if ($h == 'mcga') {
-
 
133
    $hw[] = 'ega';
-
 
134
    $hw[] = 'cga';
-
 
135
    $hw[] = 'mda';
-
 
136
  }
-
 
137
  if ($h == 'ega') {
-
 
138
    $hw[] = 'cga';
-
 
139
    $hw[] = 'mda';
-
 
140
  }
-
 
141
  if ($h == 'cga') {
-
 
142
    $hw[] = 'mda';
-
 
143
  }
-
 
144
  if ($h == 'hgc') {
-
 
145
    $hw[] = 'mda';
-
 
146
  }
-
 
147
 
92
}
148
}
93
 
149
 
-
 
150
 
94
$db = json_decode(file_get_contents('../packages/_index.json'), true);
151
$db = json_decode(file_get_contents('../packages/_index.json'), true);
95
 
152
 
96
echo "<table style=\"width: 100%;\">\n";
153
echo "<table style=\"width: 100%;\">\n";
97
 
154
 
98
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
155
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
99
 
156
 
100
foreach ($db as $pkg => $meta) {
157
foreach ($db as $pkg => $meta) {
101
 
158
 
102
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
159
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
103
 
160
 
104
  $desc = $meta['desc'];
161
  $desc = $meta['desc'];
105
  check_next_ver:
162
  check_next_ver:
106
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
163
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
107
  if (empty($pref)) continue; // no more versions
164
  if (empty($pref)) continue; // no more versions
108
  $hwhint = '';
165
  $hwhint = '';
109
  if (!empty($pref['hwreq'])) {
166
  if (!empty($pref['hwreq']) && (!empty($hw))) {
110
    /* if hw filter present, make sure it fullfills package's requirements */
167
    /* if hw filter present, make sure it fullfills package's requirements */
111
    foreach (explode(' ', $pref['hwreq']) as $req) {
168
    foreach (explode(' ', $pref['hwreq']) as $req) {
112
      if (array_search($req, $hw, true) === false) goto check_next_ver;
169
      if (array_search($req, $hw, true) === false) goto check_next_ver;
113
    }
170
    }
114
 
171
 
115
    $hwhint = ' title="' . htmlspecialchars(strtoupper($pref['hwreq'])) . '"';
172
    $hwhint = ' title="' . htmlspecialchars(strtoupper($pref['hwreq'])) . '"';
116
  }
173
  }
117
  $ver = $pref['ver'];
174
  $ver = $pref['ver'];
118
  $bsum = $pref['bsum'];
175
  $bsum = $pref['bsum'];
119
 
176
 
120
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
177
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
121
}
178
}
122
echo "</table>\n";
179
echo "</table>\n";
123
 
180
 
124
$errs = trim(file_get_contents('../packages/_buildidx.log'));
181
$errs = trim(file_get_contents('../packages/_buildidx.log'));
125
if (!empty($errs)) echo '<p style="color: #f00; font-weigth: bold;">Note to SvarDOS packagers: inconsistencies have been detected in the repository, please <a href="?p=repo&amp;showlogs=1#logs">review them</a>.</p>';
182
if (!empty($errs)) echo '<p style="color: #f00; font-weigth: bold;">Note to SvarDOS packagers: inconsistencies have been detected in the repository, please <a href="?p=repo&amp;showlogs=1#logs">review them</a>.</p>';
126
 
183
 
127
if ($_GET['showlogs'] == 1) {
184
if ($_GET['showlogs'] == 1) {
128
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
185
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
129
  if (empty($errs)) {
186
  if (empty($errs)) {
130
    echo "no buildidx errors to display\n";
187
    echo "no buildidx errors to display\n";
131
  } else {
188
  } else {
132
    echo nl2br(htmlentities($errs));
189
    echo nl2br(htmlentities($errs));
133
  }
190
  }
134
  echo "</p>\n";
191
  echo "</p>\n";
135
}
192
}
136
 
193
 
137
?>
194
?>
138
 
195