Skip to content

Commit

Permalink
Port build instructions generator changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed May 14, 2024
1 parent f95d406 commit 5951bfb
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions build.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
<option>Ubuntu 18</option>
<option>Ubuntu 20</option>
<option>Ubuntu 22</option>
<option>Ubuntu 24</option>
<option>Other</option>
</select>
<p></p>
Expand Down Expand Up @@ -260,7 +261,7 @@
</div>

<div id="buildRootDiv" class="hide">
<label><input type="checkbox" id="buildRootCheckbox" onchange="onOptionsChanged()"/>Build from root user (unrecommended).</label>
<label><input type="checkbox" id="buildRootCheckbox" onchange="onOptionsChanged()"/>Build from root user (not recommended).</label>
</div>

<p></p>
Expand Down Expand Up @@ -446,7 +447,7 @@
pre_text.push('Install Git, ' + compiler + ', make, CMake >= 3.0.2, OpenSSL-dev, zlib-dev, gperf using your package manager.');
}
if (os_freebsd) {
pre_text.push('Note that the following instruction is for FreeBSD 11.');
pre_text.push('Note that the following instruction is for FreeBSD 13.');
pre_text.push('Note that the following calls to <code>pkg</code> needs to be run as <code>root</code>.');
}
if (os_openbsd) {
Expand Down Expand Up @@ -496,6 +497,19 @@
return '-10';
case 'Ubuntu 22':
return '-14';
case 'Ubuntu 24':
return '-18';
default:
return ''; // use default version
}
}

function getLibcplusplusVersionSuffix() {
switch (linux_distro) {
case 'Ubuntu 20':
case 'Ubuntu 22':
case 'Ubuntu 24':
return getClangVersionSuffix();
default:
return ''; // use default version
}
Expand All @@ -514,7 +528,7 @@
commands.push(sudo + 'apk update');
commands.push(sudo + 'apk upgrade');
var packages = 'alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake';
commands.push(sudo + 'apk add --update ' + packages);
commands.push(sudo + 'apk add ' + packages);
break;
case 'CentOS 7':
case 'CentOS 8':
Expand All @@ -538,6 +552,7 @@
case 'Ubuntu 18':
case 'Ubuntu 20':
case 'Ubuntu 22':
case 'Ubuntu 24':
if (linux_distro.includes('Debian') && !use_root) {
commands.push('su -');
}
Expand All @@ -553,9 +568,9 @@
packages += ' cmake';
}
if (use_clang) {
packages += ' clang' + getClangVersionSuffix() + ' libc++-dev';
if (linux_distro === 'Debian 10+' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20' || linux_distro === 'Ubuntu 22') {
packages += ' libc++abi-dev';
packages += ' clang' + getClangVersionSuffix() + ' libc++' + getLibcplusplusVersionSuffix() + '-dev';
if (linux_distro === 'Debian 10+' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20' || linux_distro === 'Ubuntu 22' || linux_distro === 'Ubuntu 24') {
packages += ' libc++abi' + getLibcplusplusVersionSuffix() + '-dev';
}
} else {
packages += ' g++';
Expand Down Expand Up @@ -587,7 +602,7 @@
commands.push('su -');
}
commands.push('export PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r)/All');
var packages = 'git gperf cmake openssl gcc12-libs mozilla-rootcerts-openssl';
var packages = 'git gperf pcre2 cmake openssl gcc12-libs mozilla-rootcerts-openssl';
commands.push('pkg_add ' + packages);
if (!use_root) {
commands.push('exit');
Expand Down

0 comments on commit 5951bfb

Please sign in to comment.