Subversion Repositories SvarDOS

Rev

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

Rev 1520 Rev 1523
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
 
15
 
16
  // hw filter?
16
  // hw filter?
17
  $hw = array();
17
  $hw = array();
18
  if (!empty($_GET['hwcpu'])) $hw[] = strtolower($_GET['hwcpu']);
18
  if (!empty($_GET['hwcpu'])) $hw[] = strtolower($_GET['hwcpu']);
19
  if (!empty($_GET['hwvid'])) $hw[] = strtolower($_GET['hwvid']);
19
  if (!empty($_GET['hwvid'])) $hw[] = strtolower($_GET['hwvid']);
20
  if ((!empty($_GET['fpu'])) && ($_GET['fpu'] == 'yes')) $hw[] = 'fpu';
20
  if ((!empty($_GET['fpu'])) && ($_GET['fpu'] == 'yes')) $hw[] = 'fpu';
21
 
21
 
22
?>
22
?>
23
 
23
 
24
<form action="?" method="get">
24
<form action="?" method="get">
25
<br>
25
<br>
26
<p>Filters:<br>
26
<p>Filters:<br>
27
<input type="hidden" name="p" value="repo">
27
<input type="hidden" name="p" value="repo">
28
 
28
 
29
Target hardware:
29
Target hardware:
30
 
30
 
31
<select name="hwcpu">
31
<select name="hwcpu">
32
 
32
 
33
<?php
33
<?php
34
  // build form with list of CPUs + preselect the current CPU (if any)
34
  // build form with list of CPUs + preselect the current CPU (if any)
35
  $cpus = array('586', '486', '386', '286', '186', '8086');
35
  $cpus = array('586', '486', '386', '286', '186', '8086');
36
  foreach ($cpus as $cpu) {
36
  foreach ($cpus as $cpu) {
37
    $sel = '';
37
    $sel = '';
38
    if (array_search($cpu, $hw) !== false) $sel = ' selected';
38
    if (array_search($cpu, $hw) !== false) $sel = ' selected';
39
    echo "<option{$sel}>{$cpu}</option>\n";
39
    echo "<option{$sel}>{$cpu}</option>\n";
40
  }
40
  }
41
?>
41
?>
42
</select>
42
</select>
43
 
43
 
44
<select name="hwfpu">
44
<select name="hwfpu">
45
<?php
45
<?php
46
if (empty($_GET['hwfpu'])) {
46
if (empty($_GET['hwfpu'])) {
47
  echo "<option selected value=\"\">no FPU</option>\n";
47
  echo "<option selected value=\"\">no FPU</option>\n";
48
  echo "<option>FPU</option>\n";
48
  echo "<option>FPU</option>\n";
49
} else {
49
} else {
50
  echo "<option value=\"\">no FPU</option>\n";
50
  echo "<option value=\"\">no FPU</option>\n";
51
  echo "<option selected>FPU</option>\n";
51
  echo "<option selected>FPU</option>\n";
52
}
52
}
53
?>
53
?>
54
</select>
54
</select>
55
 
55
 
56
<select name="hwvid">
56
<select name="hwvid">
57
<?php
57
<?php
58
  // build form with list of graphic cards + preselect the current card (if any)
58
  // build form with list of graphic cards + preselect the current card (if any)
59
  $vids = array('SVGA', 'VGA', 'MCGA', 'EGA', 'CGA', 'MDA');
59
  $vids = array('SVGA', 'VGA', 'MCGA', 'EGA', 'CGA', 'MDA');
60
  foreach ($vids as $v) {
60
  foreach ($vids as $v) {
61
    $sel = '';
61
    $sel = '';
62
    if (array_search(strtolower($v), $hw) !== false) $sel = ' selected';
62
    if (array_search(strtolower($v), $hw) !== false) $sel = ' selected';
63
    echo "<option{$sel}>{$v}</option>\n";
63
    echo "<option{$sel}>{$v}</option>\n";
64
  }
64
  }
65
?>
65
?>
66
</select>
66
</select>
67
 
67
 
68
<br>
68
<br>
69
 
69
 
70
Category:
70
Category:
71
<select name="cat">
71
<select name="cat">
72
  <option value="">ALL</option>
72
  <option value="">ALL</option>
73
<?php
73
<?php
74
  foreach ($cats as $c) {
74
  foreach ($cats as $c) {
75
    $sel = '';
75
    $sel = '';
76
    if ($c == $catfilter) $sel = ' selected';
76
    if ($c == $catfilter) $sel = ' selected';
77
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
77
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
78
  }
78
  }
79
?>
79
?>
80
</select>
80
</select>
81
 
81
 
82
<input type="submit" value="apply">
82
<input type="submit" value="apply">
83
</p>
83
</p>
84
</form>
84
</form>
85
 
85
 
86
 
86
 
87
<?php
87
<?php
88
 
88
 
89
// add all supported subsets of hardware (eg. VGA supports MDA, EGA and CGA modes)
89
// add all supported subsets of hardware (eg. VGA supports MDA, EGA and CGA modes)
90
foreach ($hw as $h) {
90
foreach ($hw as $h) {
91
 
91
 
92
  // add all supported CPUs
92
  // add all supported CPUs
93
  if ($h == '586') {
93
  if ($h == '586') {
94
    $hw[] = '8086';
94
    $hw[] = '8086';
95
    $hw[] = '186';
95
    $hw[] = '186';
96
    $hw[] = '286';
96
    $hw[] = '286';
97
    $hw[] = '386';
97
    $hw[] = '386';
98
    $hw[] = '486';
98
    $hw[] = '486';
99
  }
99
  }
100
  if ($h == '486') {
100
  if ($h == '486') {
101
    $hw[] = '8086';
101
    $hw[] = '8086';
102
    $hw[] = '186';
102
    $hw[] = '186';
103
    $hw[] = '286';
103
    $hw[] = '286';
104
    $hw[] = '386';
104
    $hw[] = '386';
105
  }
105
  }
106
  if ($h == '386') {
106
  if ($h == '386') {
107
    $hw[] = '8086';
107
    $hw[] = '8086';
108
    $hw[] = '186';
108
    $hw[] = '186';
109
    $hw[] = '286';
109
    $hw[] = '286';
110
  }
110
  }
111
  if ($h == '286') {
111
  if ($h == '286') {
112
    $hw[] = '8086';
112
    $hw[] = '8086';
113
    $hw[] = '186';
113
    $hw[] = '186';
114
  }
114
  }
115
  if ($h == '186') {
115
  if ($h == '186') {
116
    $hw[] = '8086';
116
    $hw[] = '8086';
117
  }
117
  }
118
 
118
 
119
  // add all supported graphic
119
  // add all supported graphic
120
  if ($h == 'svga') {
120
  if ($h == 'svga') {
121
    $hw[] = 'vga';
121
    $hw[] = 'vga';
122
    $hw[] = 'ega';
122
    $hw[] = 'ega';
123
    $hw[] = 'cga';
123
    $hw[] = 'cga';
124
    $hw[] = 'mda';
124
    $hw[] = 'mda';
125
  }
125
  }
126
  if ($h == 'vga') {
126
  if ($h == 'vga') {
127
    $hw[] = 'mcga';
127
    $hw[] = 'mcga';
128
    $hw[] = 'ega';
128
    $hw[] = 'ega';
129
    $hw[] = 'cga';
129
    $hw[] = 'cga';
130
    $hw[] = 'mda';
130
    $hw[] = 'mda';
131
  }
131
  }
132
  if ($h == 'mcga') {
132
  if ($h == 'mcga') {
133
    $hw[] = 'ega';
133
    $hw[] = 'ega';
134
    $hw[] = 'cga';
134
    $hw[] = 'cga';
135
    $hw[] = 'mda';
135
    $hw[] = 'mda';
136
  }
136
  }
137
  if ($h == 'ega') {
137
  if ($h == 'ega') {
138
    $hw[] = 'cga';
138
    $hw[] = 'cga';
139
    $hw[] = 'mda';
139
    $hw[] = 'mda';
140
  }
140
  }
141
  if ($h == 'cga') {
141
  if ($h == 'cga') {
142
    $hw[] = 'mda';
142
    $hw[] = 'mda';
143
  }
143
  }
144
}
144
}
145
 
145
 
146
 
146
 
147
$db = json_decode(file_get_contents('../packages/_index.json'), true);
147
$db = json_decode(file_get_contents('../packages/_index.json'), true);
148
 
148
 
149
echo "<table style=\"width: 100%;\">\n";
149
echo "<table style=\"width: 100%;\">\n";
150
 
150
 
151
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
151
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
152
 
152
 
153
foreach ($db as $pkg => $meta) {
153
foreach ($db as $pkg => $meta) {
154
 
154
 
155
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
155
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
156
 
156
 
157
  $desc = $meta['desc'];
157
  $desc = $meta['desc'];
158
  check_next_ver:
158
  check_next_ver:
159
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
159
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
160
  if (empty($pref)) continue; // no more versions
160
  if (empty($pref)) continue; // no more versions
161
  $hwhint = '';
161
  $hwhint = '';
162
  if (!empty($pref['hwreq'])) {
162
  if (!empty($pref['hwreq'])) {
163
    $hwhint = ' title="' . htmlspecialchars(strtoupper($pref['hwreq'])) . '"';
163
    $hwhint = ' title="' . htmlspecialchars(strtoupper(implode(', ', $pref['hwreq']))) . '"';
164
 
164
 
165
    /* if hw filter present, make sure it fullfills package's requirements */
165
    /* if hw filter present, make sure it fullfills package's requirements */
166
    if (!empty($hw)) {
166
    if (!empty($hw)) {
167
      foreach (explode(' ', $pref['hwreq']) as $req) {
167
      foreach ($pref['hwreq'] as $req) {
168
        if (array_search($req, $hw, true) === false) goto check_next_ver;
168
        if (array_search($req, $hw, true) === false) goto check_next_ver;
169
      }
169
      }
170
    }
170
    }
171
  }
171
  }
172
  $ver = $pref['ver'];
172
  $ver = $pref['ver'];
173
  $bsum = $pref['bsum'];
173
  $bsum = $pref['bsum'];
174
 
174
 
175
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
175
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
176
}
176
}
177
echo "</table>\n";
177
echo "</table>\n";
178
 
178
 
179
$errs = trim(file_get_contents('../packages/_buildidx.log'));
179
$errs = trim(file_get_contents('../packages/_buildidx.log'));
180
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>';
180
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>';
181
 
181
 
182
if ($_GET['showlogs'] == 1) {
182
if ($_GET['showlogs'] == 1) {
183
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
183
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
184
  if (empty($errs)) {
184
  if (empty($errs)) {
185
    echo "no buildidx errors to display\n";
185
    echo "no buildidx errors to display\n";
186
  } else {
186
  } else {
187
    echo nl2br(htmlentities($errs));
187
    echo nl2br(htmlentities($errs));
188
  }
188
  }
189
  echo "</p>\n";
189
  echo "</p>\n";
190
}
190
}
191
 
191
 
192
?>
192
?>
193
 
193