Subversion Repositories SvarDOS

Rev

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

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